提问人:Mohsen Taleb 提问时间:11/8/2023 最后编辑:mklement0Mohsen Taleb 更新时间:11/8/2023 访问量:40
如何在 Windows 11 更新 (2023) 后访问 PowerShell 中新添加的自然语音
How to access newly added natural voices in PowerShell after Windows 11 update (2023)
问:
使用这个简单的 PowerShell 脚本,可以在 Windows 上列出并使用文本转语音 (tts):
Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$speak.GetInstalledVoices()|ForEach-Object { $_.VoiceInfo }
这将列出已安装的 TTS 语音:
Gender : Male
Age : Adult
Name : Microsoft David Desktop
Culture : en-US
Id : TTS_MS_EN-US_DAVID_11.0
Description : Microsoft David Desktop - English (United States)
SupportedAudioFormats : {}
AdditionalInfo : {[Age, Adult], [Gender, Male], [Language, 409], [Name, Microsoft David Desktop]...}
Gender : Female
Age : Adult
Name : Microsoft Zira Desktop
Culture : en-US
Id : TTS_MS_EN-US_ZIRA_11.0
Description : Microsoft Zira Desktop - English (United States)
SupportedAudioFormats : {}
AdditionalInfo : {[Age, Adult], [Gender, Female], [Language, 409], [Name, Microsoft Zira Desktop]...}
但是,在最新的 Windows 11 更新 (2023) 之后,该脚本无法列出为讲述人新添加的自然声音
要查看这些语言,您可以转到Settings > Accessibility > Narrator
似乎这些在 System.Speech.Synthesis 命名空间中不可用,但您知道如何从 PowerShell 访问这些声音吗?例如:?Microsoft Jenny (Natural)
答: 暂无答案
评论