Browse
 
Tools
Rss Categories

LV_SRE_GetPhoneticPronunciation

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

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

Function

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

Parameters

Words

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

Language

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.

Index

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.

PronunciationBuffer

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

BufferLength

The size of the pronunciation buffer.

 
 

Return Values

LV_SUCCESS

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

LV_INVALID_INDEX

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

LV_FAILURE

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

LV_TIME_OUT

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

LV_INVALID_DICTIONARY_LANGUAGE

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

LV_NO_SERVER_AVAILABLE

The operation failed because no ASR server was available.

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

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