Rss Categories


Reference Number: AA-00701 Views: 8203 0 Rating/ Voters

Returns the ASR Engine's phonetic pronunciation for a list of words as a list of raw phonemes.


  • int LV_SRE_GetPhoneticPronunciation(const char* Words, const char* Language, int Index, char* PronunicationBuffer, int BufferLength)



A list of one or more words, separated by spaces that will be converted to their phonetic equivalents and returned in PronunciationBuffer.


The language whose dictionary should be checked. This needs to be a language identifier string (Ex: "AmericanEnglish", "ColombianSpanish") that corresponds to an acoustic model. See Language Identifier for the list of supported languages.


The index to the specific pronunciation you would like returned. Many words and phrases have multiple possible pronunciations; this specifies which pronunciation you would like returned. This value can be in the range [0, (LV_SRE_GetPhoneticPronunciationCount() - 1)] with the same Words and Language passed to LV_SRE_GetPhoneticPronunciationCount. The first item in the index is number 0.


The pointer to a character buffer to place the pronunciation results in.


The size of the pronunciation buffer.


Return Values


The call succeeded. The required pronunciation was copied into PronunciationBuffer.


Index is invalid. Must be in the range [0, (LV_SRE_GetPhoneticPronunciationCount() - 1)] for the same Words and Language.


The operation failed because one of the supplied parameters were NULL strings.


The sending of the request to the ASR server failed due to a timeout.


Either the requested language is not available or Language is not a valid language identifier.


The operation failed because no ASR server was available.


An exception occurred while processing the request.


After calling the function, the pronunciation buffer you specify will contain a list of space-separated phonemes that give the phonetic pronunciation of the words. Multiple words will be joined by ampersands (the & character) in the pronunciation.

If a grammar word is not in the ASR Engine's dictionary, it falls back to its internal phonetic speller to try and best determine how a word should be pronounced. Often, especially in dealing with words not native to the specified language (e.g. foreign names), it is helpful to supply phonetic spellings.

See Using Phonetic Spellings for more information about phonemes and phonetic spellings.

See Also