windows - Windows 10 Powershell中未在System.Speech选项中显示已安装的文本语音转换语音

标签 windows powershell installation text-to-speech voice

我正在Windows 10 Powershell中将System.Speech对象用于“文本到语音”项目,并且正在尝试安装新声音。

我按照以下说明安装了新的系统声音:

On any edition of Windows 10, click Start > Settings, and then follow these steps:

Select the Start button, then select Settings > Time & Language > Region & Language.

Select Add a language and choose the language you want from the list. Only languages listed in the table below will have Text-to-Speech capabilities.

After the new language has been installed (this may take a few moments), select it in the Region & Language list, and then select Options.

Under Language options > Speech, select Download.

Restart your computer. The Text-to-Speech voices will be installed when your machine turns back on.



我可以看到这些声音已安装在设置中,它们也显示在Windows 10文本到语音程序中。但是,当我在Powershell中运行GetInstalledVoices()。VoiceInfo命令时,这些声音不会出现。

我需要做一些其他的设置来让System.Speech识别这些新声音吗?

最佳答案

问题出在对这个帖子的第一个答案:Windows 10 TTS voices not showing up?

Windows 10 has two different TTS engines installed by default. There are the WinRT speech synthesis APIs (in the Windows.Media.SpeechSynthesis namespace), and the SAPI speech synthesis APIs (in the System.Speech.Synthesis namespace, and the COM ISpVoice interface).

David and Zira are SAPI voices; the language packs install WinRT voices.

The SAPI APIs and voices are legacy APIs, and are not being further developed; all new voices and effort are going into the WinRT APIs and voices.

If you want to use the language pack voices, you'll need to move your application over to WinRT and use the WinRT APIs.



System.Speech对象仅适用于SAPI API语音。幸运的是,Windows并未在任何地方清楚地记录此事实,并且您必须在偶然遇到的随机堆栈溢出中找到它。

关于windows - Windows 10 Powershell中未在System.Speech选项中显示已安装的文本语音转换语音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58189350/

相关文章:

windows - 有没有办法使用 Perl 脚本更改 Windows 文件夹图标?

c - 程序无法在 Ubuntu 12.04 和 Windows XP 上运行

Visual Studio Express 2013 初学者的 C++ 安装程序

c++ - Windows Unicode 键盘钩子(Hook)

c# - .NET 4.0 是否与 Windows XP SP2 或更低版本兼容?

powershell - 如何在powershell中修改GOPATH

Powershell - 在 powershell 控制台中捕获鼠标单击事件

powershell - 写入信息未显示在由 Start-Transcript 转录的文件中

r - R 的 fracdiff 软件包无法在 Linux Mint 中安装

mysql - 如何在redhat linux上运行mysql v5.5