Browse
 
Tools
Rss Categories

LV_SRE_GetLumenVoxToSampaConversion

Reference Number: AA-01808 Views: 11148 0 Rating/ Voters

Returns the LumenVox (CMU) to SAMPA phonetic conversion of the specified CmuString. Result stored in ConvertedString will be less than ConvertedStringLength bytes. 

Any conversion errors will be contained in ErrorString, which will be less than ErrorStringLength bytes

See Remarks, below, for more details.

Function

  • int LV_SRE_GetLumenVoxToSampaConversion(const char * CmuString, const char * Language, char * ConvertedString, int ConvertedStringLength, char * ErrorString, int ErrorStringLength)

Parameters

SampaString

The input string in LumenVox (CMU) format that needs to be converted into SAMPA format

Language

The language identifier for the conversion, so that the correct phonetic alphabet is used. This should be one of the ASR languages supported by LumenVox as shown in the ASR Phoneme Tables. Examples of these strings are:

  • AmericanEnglish
  • AustralianEnglish
  • IndianEnglish
  • BritishEnglish
  • CanadianFrench
  • MexicanSpanish
  • ColombianSpanish

ConvertedString

The output string in SAMPA format generated by the conversion

ConvertedStringLength

The length, in bytes, of the ConvertedString buffer.  The ConvertedString will be limited to this size during conversion

ErrorString

Any errors encountered during the conversion will be returned in this string

ErrorStringLength

The length, in bytes, of the ErrorString buffer.  The returned ErrorString will be limited to this size during conversion


Return Values

LV_SUCCESS

No errors; this grammar is now registered.

LV_FAILURE

This will be returned if either SampaString or Language is NULL

LV_TIME_OUT

The ASR did not respond within the expected period

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

Added in LumenVox version 11.2, LV_SRE_GetLumenVoxToSampaConversion forms part of a number of changes implemented for improved custom lexicon support.  These changes included the option to use either SAMPA or LumenVox native format (similar to CMU or ARPABet format) when working with custom lexicons.