C # SpeechSynthesizer - "No voice installed in the system"

I tried to create a simple console program that uses SpeechSynthesizerout System.Speech.Synthesisto convert text to speech, but it does not work.

I am using 64-bit Windows 7 and Visual Studio 2010 (with .NET Framework 4.0, I think?)

Program:

using System.Speech.Synthesis;
// *skip*
SpeechSynthesizer speech = new SpeechSynthesizer();
speech.SetOutputToDefaultAudioDevice();
speech.Speak("Hello world");

InvalidOperationExceptionoccurs in the line speech.Speak(...)with the message In the system there is no sound installed in the system, or not in the current security setting.

speech.GetInstalledVoices()indicates that Microsoft Anna is installed, and the parameter is Enabledset to true.

I tried replacing System.Speech.Synthesiswith Microsoft.Speech.Synthesis(dll found in C: \ Program Files (x86) \ Microsoft Speech Platform SDK \ Assembly \ Microsoft.Speech.dll), but the same thing happens.

> > " " . . . Microsoft Anna - English (United States) .

( Windows , - .)

, HKEY_LOCAL_MACHINE > > Microsoft > > a > . MS-Anna-1033-20-DSK > - 409, .

Active Solution Visual Studio Configuration Manager, CPU, x86 x64, .

?: (

EDIT:

​​Visual Studio 2012 , .NET Framework 4.0, VS2012 4.5, .

, Windows 7, Text-to-Speech .

0
2

, .

My SpeechEngine ( - , Windows 7), -, System File Checker (SFC).

SFC, cmd ( ) sfc/scannow

+1

, , . , ClickOnce app.manifest:

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

/security/requestedPrivileges node.

0

Source: https://habr.com/ru/post/1680224/


All Articles