British English comes to Speechace API

Today we’re announcing the availability of Speechace support for British English. Ever since launching Speechace with American English we’ve heard from hundreds of teachers and students who study and practice British English.

 

Now, technically modern American English is actually closer to the 16th century British English the likes of Shakespeare would have used! In fact today’s British accent has only emerged in the 19th century well after the first British settlers had made it to America and brought their accent at the time across the atlantic.

But enough with pub trivia and on to supporting learners and teachers of both American and British English.

Today’s announcement

Today we’re making British English available on the Speechace API so this post is for you developers out there. We will soon introduce British English in the Speechace Moodle plugin, Speechace SaaS, and the Speechace Apps as well.

About the Speechace API

The Speechace API allows you to evaluate and score an audio file against an expected text. The text can be a single word, a phrases or a phoneme list. See the API Documentation for more details.

Setting the dialect to British English

To score audio against British English simply set the dialect url parameter to en-gb and scoring will use the British English model instead.

Here is an example of a curl call scoring the audio file “./audio01.wav” against the phrase “Let me check my schedule”

curl --form text='Let me check my schedule' --form user_audio_file=@./audio01.wav --form user_id=1234 https://api.speechace.co/api/scoring/text/v1.0/json?key={{Speechacekey}}&user_id=001&dialect=en-gb

Examples: You say /təˈmeɪ.t̬oʊ/; I say /təˈmɑː.təʊ/

So let’s look at a some examples of scoring American English vs British English in action.

We’ll use a simple bash script here which wraps the curl calls to the Speechace API and formats the results in tabular form. We’ll look at word and phoneme level scores only for brevity but you can see examples of the full JSON returned at the API Documentation.

Scoring the word “Schedule”

We have two recordings of “schedule” one with an American accent and one with a British accent. Neither speaker is a native but they did their best to emulate each accent. Let’s try to score all possible combinations:

A. British speaker – American model: 62%

$ bash speechace.sh -t "schedule" -a schedule_gb.wav -s phoneme -d en-us
|-------+----------+----------------|
|  api  | text     | score          |
|-------+----------+----------------|
|  v1.0 | schedule | 62             |
|  v1.0 | s        | 57.7857142857  |
|  v1.0 | k        | 11.6666666667  |
|  v1.0 | eh       | 96.9090909091  |
|  v1.0 | jh       | 14.8888888889  |
|  v1.0 | uw       | 92.3333333333  |
|  v1.0 | l        | 99.8571428571  |
|-------+----------+----------------|

Our British speaker receives a poor score of 62% because the American English trained model never learned to expect a /ch/ or a /y/ in “schedule”. This was one of many problems we saw with British teachers or British sounding students using Speechace.

B. British speaker – British model: 96%

$ bash speechace.sh -t "schedule" -a schedule_gb.wav -s phoneme -d en-gb
|-------+----------+----------------|
|  api  | text     | score          |
|-------+----------+----------------|
|  v1.0 | schedule | 96             |
|  v1.0 | sh       | 100            |
|  v1.0 | eh       | 94.6           |
|  v1.0 | d        | 92.4358974359  |
|  v1.0 | y        | 97.6666666667  |
|  v1.0 | uw       | 93.75          |
|  v1.0 | l        | 98.0689655172  |
|-------+----------+----------------|

In the British model our same speaker gets a near perfect score and we notice that the model has correctly learned the phoneme makeup of “schedule”.

C. American speaker – British model: 93%

$ bash speechace.sh -t "schedule" -a schedule_us.wav -s phoneme -d en-gb
|-------+----------+----------------|
|  api  | text     | score          |
|-------+----------+----------------|
|  v1.0 | schedule | 93             |
|  v1.0 | s        | 98.2222222222  |
|  v1.0 | k        | 91.5555555556  |
|  v1.0 | eh       | 94.75          |
|  v1.0 | d        | 97.4285714286  |
|  v1.0 | y        | 83.1666666667  |
|  v1.0 | uw       | 85.7142857143  |
|  v1.0 | l        | 99.2727272727  |
|-------+----------+----------------|

Interestingly an American speaker fairs much better against a British model than our British speaker did in case A above. That’s because our British model has learned multiple possible phoneme paths for “schedule” and accepts both British and American ways of pronouncing the word. This was all learned with no rules or heuristics to guide the scoring model.

D. American speaker – American model: 95%

$ bash speechace.sh -t "schedule" -a schedule_us.wav -s phoneme -d en-us
|-------+----------+----------------|
|  api  | text     | score          |
|-------+----------+----------------|
|  v1.0 | schedule | 95             |
|  v1.0 | s        | 97.8333333333  |
|  v1.0 | k        | 97.25          |
|  v1.0 | eh       | 98.6666666667  |
|  v1.0 | jh       | 97.6923076923  |
|  v1.0 | uw       | 81.380952381   |
|  v1.0 | l        | 99.3043478261  |
|-------+----------+----------------|

And finally, for completeness sake, our American speaker score against an American model which is mostly expected.

Next Steps

British English in Speechace is available today. You can check it out in the Speechace API and let us know what you think.

What’s next?

British English coming soon to the Speechace for Moodle plugin. Stay tuned!

2 Replies to “British English comes to Speechace API”

  1. Maxim Kokosha says:

    Nice!

  2. Pingback: Speechace

Comments are closed.