问题
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