Data Structures | |
struct | SR_Vocabulary |
Vocabulary creation | |
There are two ways to generate a vocabulary:
1. Load a vocabulary from disk. Phonemes are retrieved from a lookup table, and fall back on a TTP engine if necessary. 2. Create an empty vocabulary. Phonemes are retrieved exclusively from a TTP engine. | |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularyCreate (ESR_Locale locale, SR_Vocabulary **self) |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularyLoad (const LCHAR *filename, SR_Vocabulary **self) |
Functions | |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularySave (SR_Vocabulary *self, const LCHAR *filename) |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularyAddWord (SR_Vocabulary *self, const LCHAR *word) |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularyGetLanguage (SR_Vocabulary *self, ESR_Locale *locale) |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularyDestroy (SR_Vocabulary *self) |
SREC_VOCABULARY_API ESR_ReturnCode | SR_VocabularyGetPronunciation (SR_Vocabulary *self, const LCHAR *word, LCHAR *pronunciation, size_t *len) |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyAddWord | ( | SR_Vocabulary * | self, | |
const LCHAR * | word | |||
) |
Adds word to vocabulary.
self | SR_Vocabulary handle | |
word | Word to be added |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyCreate | ( | ESR_Locale | locale, | |
SR_Vocabulary ** | self | |||
) |
Creates an empty Vocabulary using the specified language.
locale | ||
self | SR_Vocabulary handle |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyDestroy | ( | SR_Vocabulary * | self | ) |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyGetLanguage | ( | SR_Vocabulary * | self, | |
ESR_Locale * | locale | |||
) |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyGetPronunciation | ( | SR_Vocabulary * | self, | |
const LCHAR * | word, | |||
LCHAR * | pronunciation, | |||
size_t * | len | |||
) |
Looks up a word to vocabulary.
self | SR_Vocabulary handle | |
word | Word to be added | |
pronunciation | resulting pronunication | |
len | [in/out] Length of phoeme argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable. |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularyLoad | ( | const LCHAR * | filename, | |
SR_Vocabulary ** | self | |||
) |
Loads a vocabulary from file.
self | SR_Vocabulary handle | |
filename | File to read from |
SREC_VOCABULARY_API ESR_ReturnCode SR_VocabularySave | ( | SR_Vocabulary * | self, | |
const LCHAR * | filename | |||
) |