调用Win10隐藏的语音包
起因
在做一个文本转语音的Demo的时候,遇到了语音包无法正确被Unity识别的问题。明明电脑上安装了语音包但是代码就是识别不出来
原因
具体也不是非常清楚,但是如果语言包是在的话,大概率是Win10系统隐藏了。
确定语言包
首先查看%windir%\Speech_OneCore\Engines\TTS\zh-CN\目录下是否存在kangkang等语音
如果没有就要新增语音包,如果有,但是没有被读取出来,可能是被系统隐藏了。
解决
新建以下内容为reg注册表文件,并导入,即可识别
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_ZH-CN_KANGKANG_11.0]
@=“Microsoft Kangkang Desktop - Chinese (Simplified)”
“804”=“Microsoft Kangkang Desktop - Chinese (Simplified)”
“CLSID”=“{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}”
“LangDataPath”=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,
00,70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,
65,00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,
00,5c,00,7a,00,68,00,2d,00,43,00,4e,00,5c,00,4d,00,53,00,54,00,54,00,53,00,
4c,00,6f,00,63,00,5a,00,68,00,43,00,4e,00,2e,00,64,00,61,00,74,00,00,00
“VoicePath”=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,
70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,65,
00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,00,
5c,00,7a,00,68,00,2d,00,43,00,4e,00,5c,00,4d,00,32,00,30,00,35,00,32,00,4b,
00,61,00,6e,00,67,00,6b,00,61,00,6e,00,67,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_ZH-CN_KANGKANG_11.0\Attributes]
“Age”=“Adult”
“Gender”=“Male”
“Language”=“804”
“Name”=“Microsoft Kangkang Desktop”
“SharedPronunciation”=“”
“SpLexicon”=“{0655E396-25D0-11D3-9C26-00C04F8EF87C}”
“Vendor”=“Microsoft”
“Version”=“11.0”
————————————————
版权声明:本文为CSDN博主「ingqui」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u011446016/article/details/127640442
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!