Fluency and Pronunciation are scored based on a speaker reading aloud a passage for up to 45 seconds. The request parameters which you can see in the cURL below are the same as in the Score Text/Pronunciation function. Please review below sections on making a simple CURL based request to the fluency scoring function:
curl --location -g 'https://api.speechace.co/api/scoring/text/v9/json?key={{speechace_prokey}}&dialect=en-us' \
--form 'text="Yes, I do. Travel today is vastly different than what it used to be. In the past, a traveller had little idea about what to expect when they arrived at their destination. These days, the internet connects our world in ways previous generations could only dream about. We can instantly review destination information and make travel arrangements. Also, in the past, people could only travel by land or sea and travelling was often long and unsafe."' \
--form 'user_audio_file=@"./traveltoday.wav"' \
--form 'include_fluency="1"'
This is the dialect in which the speaker will be assessed.Note: Not all features of the score/text API support every dialect. Applicable dialects will be explicitly mentioned.
user_id
String
Optional: A unique anonymized identifier (generated by your application) for the end-user who spoke the audio.
Request Body
Parameter
Type
Description
text
String
A word, phrase, or sentence to score. This should be in the dialect chosen. For example, if fr-fr is the chosen dialect, then the word can be Salut.
user_audio_file
File
file with user audio (wav, mp3, m4a, webm, ogg, aiff)
question_info
String
Optional: A unique identifier (generated by your application) for the activity or question this user audio is answering.
no_mc
String
Optional: no_mc = 1 to indicate the text field contains multiple lines.
include_fluency
String
Set include_fluency= 1 to include fluency scoring in the response.
include_intonation
String
Optional: include_intonation= 1 to include intonation and stress-level scores. See this guide for how to use this field.
markup_language
String
Optional: markup_language = arpa_mark This key signifies that the text parameter may contain markup annotations.See this guide for how to use this field.
include_unknown_words
String
Optional: include_unknown_words = 1This key instructs Speechace to automatically infer the expected pronunciation for unknown terms, such as names, places, and other specific terminology. This ensures accurate feedback even for unfamiliar words.
detect_dialect
String
Optional field: Possible values - 0 | 11: will apply language detection and warn if the majority of the response language is different from the intended scoring dialect.
enforce_dialect
String
Optional field: Possible values - 0 | 11: will apply language detection and error if the majority of the response language is different from the intended scoring dialect.Setting enforce_dialect=1 automatically sets detect_dialect=1.
The responses below show a correct response, and a response where the speaker doesn't read the complete passage and as a result triggers fidelity detection.
Fidelity detection identifies when the test-taker deviates from intended utterance and API detects incomplete or off-script attempts.