level 14
张剑冰
楼主
源代码如下:这是一段获取 TTS 语音库的代码,但是问题是只能获取到 “Microsoft huihui desktop” 和 “Microsoft Zira desktop” 两种音色库,而我的机器上还有 Yaoyao Kangkang 等多种音色库,为啥获取不出来呢??写过TTS的大神给点帮助吧,先谢过。
Public Function GetTTSNames() As String
Dim aa As New SpeechSynthesizer
Dim TTSNames As String = ""
For Each iv As InstalledVoice In aa.GetInstalledVoices()
If TTSNames = "" Then
TTSNames = iv.VoiceInfo.Name
Else
TTSNames = TTSNames & vbNullChar & iv.VoiceInfo.Name
End If
Next
2022年06月17日 07点06分
1
Public Function GetTTSNames() As String
Dim aa As New SpeechSynthesizer
Dim TTSNames As String = ""
For Each iv As InstalledVoice In aa.GetInstalledVoices()
If TTSNames = "" Then
TTSNames = iv.VoiceInfo.Name
Else
TTSNames = TTSNames & vbNullChar & iv.VoiceInfo.Name
End If
Next