dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.95k stars 4.65k forks source link

System.Speech.Synthesis.SpeechSynthesizer not implemented in core? #46730

Closed jasonliaocn closed 3 years ago

jasonliaocn commented 4 years ago

I'm trying to migrate some of the Wpf application from .net framework to .net core, then I cannot find a replacement of the System.Speech.Synthesis.SpeechSynthesizer which exists in the System.Speech.dll. And the msdn docs says not supported in .net core. Is this removed or how can we use the speech function in Windows 10 without Azure Speech Services?

lukeb1961 commented 3 years ago

PowerShell 7.2.0-preview.3 Copyright (c) Microsoft Corporation.

https://aka.ms/powershell Type 'help' to get help.

PS C:\Users\LukeB> Add-Type -LiteralPath ((Get-ChildItem -Filter *.dll -Recurse (Split-Path (Get-Package system.speech).Source)).FullName)[-1] PS C:\Users\LukeB> $synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer PS C:\Users\LukeB> $synth

State Rate Volume Voice


Ready 0 100 System.Speech.Synthesis.VoiceInfo

PS C:\Users\LukeB> $synth.GetInstalledVoices().voiceinfo.name Microsoft David Desktop Microsoft James Microsoft Catherine Microsoft Mark Microsoft Zira Desktop PS C:\Users\LukeB>