Microsoft.Speech.Synthesis nie działa dla Text To Speech BUT System.Speech. Działa synteza. Dlaczego?

Po prostu próbuję uruchomić prosty przykład microsoft dla Text To Speech używającMicrosoft.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);
        }
    }
}

Chociaż mam odpowiednie głosy,nie wydaje żadnego dźwięku. Głos bez tekstu na mowę (TTS).

Kiedy używam MicrosoftSystem.Speech.dll następnieSłyszę głos. Nie ma więc problemu z dźwiękiem.

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

Wkrótce

Dlaczego nie mogę usłyszeć żadnego głosu lub wykonać funkcji Text To Speech (TTS) z Microsoft Speech Platform przy użyciu Microsoft.Speech? Czy powinienem wykonać dodatkową konfigurację?

questionAnswers(3)

yourAnswerToTheQuestion