Microsoft.Speech.Synthesis não funciona para Text To Speech MAS System.Speech.Synthesis funciona. Por que?

Eu apenas tento executar um exemplo simples da Microsoft para Text To Speech usandoMicrosoft.Speech.dll;

using System;
using Microsoft.Speech.Synthesis;

namespace TTS
{
    class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Testing TTS!");

            // Initialize a new instance of the SpeechSynthesizer.
            using (SpeechSynthesizer synth = new SpeechSynthesizer())
            {

                // 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)");

                // Build a prompt.
                PromptBuilder builder = new PromptBuilder();
                builder.AppendText("That is a big pizza!");

                // Speak the prompt.
                synth.Speak(builder);
            }

            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
    }
}

Embora eu tenha as vozes certas,não faz som algum. Nenhuma voz de texto para fala (TTS).

Quando uso a MicrosoftSystem.Speech.dll entãoEu posso ouvir a voz. Portanto, não há problema de som.

using System;
using System.Speech.Synthesis;

namespace TTS
{
    class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Testing TTS!");

            // Initialize a new instance of the SpeechSynthesizer.
            using (SpeechSynthesizer synth = new SpeechSynthesizer())
            {

                // 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);
                }

                // Build a prompt.
                PromptBuilder builder = new PromptBuilder();
                builder.AppendText("That is a big pizza!");

                // Speak the prompt.
                synth.Speak(builder);
            }

            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
    }
}

Em breve

Por que não consigo ouvir nenhuma voz ou fazer o Text To Speech (TTS) com o Microsoft Speech Platform usando o Microsoft.Speech? Devo fazer alguma configuração extra?

questionAnswers(3)

yourAnswerToTheQuestion