Browse
 
Tools
Rss Categories

LV_SRE_IsValidSampaPhonemeString

Reference Number: AA-01810 Views: 11299 0 Rating/ Voters

Returns a positive number if the specified PhonemeString contains no invalid or unsupported SAMPA format phonemes in the context of the specified language

See Remarks, below, for more details.

Function

  • int LV_SRE_IsValidSampaPhonemeString(const char * PhonemeString, const char * Language)

Parameters

LanguageString

The input string in SAMPA format that needs to be verified

Language

The language identifier for the verification, so that the correct phonetic alphabet context 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


Return Values

1

No errors; the string contains no invalid SAMPA phonemes in the context of the specified language.

0

The request was processed successfully and the PhonemeString was found to contain at least one unsupported or invalid SAMPA phoneme in the context of the specified language.

LV_FAILURE

This will be returned if either PhonemeString 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_IsValidSampaPhonemeString 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.