Microsoft Speech - SDK 5.1

Ieri sera ho scaricato l'SDK 5.1 di Microsoft Speech rilasciato il 3 Marzo 2009 e devo dire che mi è piaciuto parecchio (Link).

Referenziando la "System.Speech" si hanno a disposizione i due namespace “System.Speech.Synthesis” e “System.Speech.Recognition”.

Nel primo namespace, Synthesis, è definita la classe SpeechSynthesizer, istanziandola e richiamando il metodo Speak è possibile riprodurre la stringa di testo passata come parametro, ecco un esempio:
using (var synthesizer = new SpeechSynthesizer())
{
   synthesizer.SetOutputToDefaultAudioDevice();
   synthesizer.Speak("Master of contracts.");
}
Tra le varie modalità di utilizzo è possibile impostare come output anziché in audio device un file, ecco l’esempio:
using (var synthesizer = new SpeechSynthesizer())
{
   synthesizer.SetOutputToWaveFile(@"c:\temp\test1.wav");
   synthesizer.Speak("Master of contracts.");
}
Il metodo GetInstalledVoices restituisce l’elenco delle voci installate sul pc:
using (var synthesizer = new System.Speech.Synthesis.SpeechSynthesizer())
{
   synthesizer.SetOutputToDefaultAudioDevice();
   foreach (var voice in (from v in synthesizer.GetInstalledVoices() where v.Enabled select v))
   {
     synthesizer.SelectVoice(voice.VoiceInfo.Name);
     synthesizer.Speak("Master of contracts.");
   }
}
La classe SpeechRecognizer serve invece per effettuare il riconoscimento vocale.
Per maggiori info ecco il link al blog ufficiale: http://blogs.msdn.com/speech/default.aspx

Riccardo.

posted @ martedì 24 marzo 2009 13:38

Print

Comments on this entry:

# re: Microsoft Speech - SDK 5.1

Left by Marco Minerva at 24/03/2009 15:44
Gravatar
Hum... Strano, la versione 5.1 dello Specch SDK di Microsoft è in giro da diverso tempo... E' esattamente la stessa che io avevo utilizzato nel 2004... Mistero :-D

Ad ogni modo, gli esempi che mostri sono in realtà relativi al .NET Framework 3.0, che fornisce classi e metodi per accedere alle funzionalità dello Speech SDK.

# re: Microsoft Speech - SDK 5.1

Left by Marco Minerva at 24/03/2009 18:55
Gravatar
Non preoccuparti, è bene ripetere gli argomenti, così da dargli maggiore visibilità!

# re: Microsoft Speech - SDK 5.1

Left by XSARF at 28/10/2010 08:57
Gravatar
Watch the swiss replica watch full story on 20/20 Friday rado replicas at 10 p.m. ET
Blaze Takes watches tag heuer Young Fireman's Life
Comments have been closed on this topic.
«aprile»
domlunmarmergiovensab
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011