Pregunta

I need to add thousands of new words to speech dictionary on windows 7 by visual studio from an input file to use in windows' native speech recognition. is it possible? Should I use Microsoft Speech API (SAPI) 5.4 ? If so help me with that. thanks.

¿Fue útil?

Solución

You can't do that with the System.Speech.Recognition library; you have to use the speechlib automation interface.

Once you've got a reference to speechlib in your project, you can add pronunciations using the AddPronunciation method like this:

static void AddPronunciations()
{
    SpLexicon lex = new SpeechLib.SpLexicon();
    long langid = Thread.CurrentCulture.LCID;
    lex.AddPronunciation("word", langid);
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top