SAPI Symbol Usage for Speech Dictionary Input

风格不统一 提交于 2019-12-02 18:58:14

问题


I've been doing some work to add words and pronunciations to the Windows speech dictionary via the SpLexicon Interface of SAPI 5.4 (which I think is the only way to do it) via the AddPronunciation function, or in my case:

// Initialize SpLexicon instance
SpLexicon lex = new SpLexicon();

// Specify the word to add to the speech dictionary
string myWord = "father";

// Set the language ID (US English)
int langid = new System.Globalization.CultureInfo("en-US").LCID;

// Specify the word's part of speech
SpeechPartOfSpeech mySpeechPart = SpeechPartOfSpeech.SPSNoun;

// Specify the word's pronunciation in SAPI phone symbols
string myPronunciation = "f aa dh er";

// Call actual speech API method for adding word data to the speech dictionary
lex.AddPronunciation(myWord, langid, mySpeechPart, myPronunciation);

I'm referencing the American English Phoneme Table for determining what SAPI symbols to use. I've noticed though that using the emphasis markers "1" or "2" as well as the syllable marker "-" doesn't seem to affect the TTS pronunciation. Are these modifier symbols only used for XML input, or am I possibly doing something wrong?

来源:https://stackoverflow.com/questions/49783718/sapi-symbol-usage-for-speech-dictionary-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!