To answer your question you asked:
Why I can not hear any voice or make Text To Speech(TTS) with Microsoft Speech Platform using Microsoft.Speech?
You are missing an important thing in your code. You cannot hear a voice because following line is missing:
synth.SetOutputToDefaultAudioDevice();
This allows you to hear the voice. I had the same problem. I modified your code an inserted the code sample above:
using System;
using System.Speech.Synthesis;
using Microsoft.Speech.Synthesis;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Testing TTS!");
// Initialize a new instance of the SpeechSynthesizer.
using (SpeechSynthesizer synth = new SpeechSynthesizer())
{
// Configure the synthesizer to send output to the default audio device.
synth.SetOutputToDefaultAudioDevice();
// Output information about all of the installed voices.
Console.WriteLine("Installed voices -");
foreach (InstalledVoice voice in synth.GetInstalledVoices())
{
VoiceInfo info = voice.VoiceInfo;
Console.WriteLine(" Voice Name: " + info.Name);
}
// Select the US English voice.
synth.SelectVoice("Microsoft Server Speech Text to Speech Voice (en-GB, Hazel)");
// Speak.
synth.Speak("That is a big pizza!");
}
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}
Notice that the SetOutputToDefaultAudioDevice is not necessary when you use the System.Speech.dll. Here is the link to the documentation about the method.