gpt4 book ai didi

macos - NSSpeechSynthesizer 语音/语言关系

转载 作者:行者123 更新时间:2023-12-03 17:50:06 32 4
gpt4 key购买 nike

不幸的是,我只能说四种语言,那么如果我知道文本的语言,我如何知道我必须使用哪种 OS X 语音?我在Apple的文档中找不到任何有关它的信息。至少有一张有语音/语言的 table 吗?

最佳答案

您可以在 NSSpeechSynthesizer 上使用“+attributesForVoice:”方法。属性中包含区域设置,例如:

{
VoiceAge = 35;
VoiceDemoText = "\U0e2a\U0e27\U0e31\U0e2a\U0e14\U0e35\U0e04\U0e48\U0e30 \U0e14\U0e34\U0e09\U0e31\U0e19\U0e0a\U0e37\U0e48\U0e2dKanya";
VoiceGender = VoiceGenderFemale;
VoiceGroup = VoiceGroupCompact;
VoiceIdentifier = "com.apple.speech.synthesis.voice.kanya";
VoiceIndividuallySpokenCharacters = (
{
UnicodeCharBegin = 33;
UnicodeCharEnd = 37;
}, ...
);
VoiceLanguage = "th-TH";
VoiceLocaleIdentifier = "th_TH";
VoiceName = Kanya;
VoiceNameRoot = Kanya;
VoiceNumericID = 604143827;
VoiceRelativeDesirability = 3800;
VoiceShowInFullListOnly = 0;
VoiceSupportedCharacters = (
{
UnicodeCharBegin = 33;
UnicodeCharEnd = 37;
}, ...
);
VoiceSynthesizerNumericID = 1886745202;
VoiceVersion = "5.0.7";
}

关于macos - NSSpeechSynthesizer 语音/语言关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29152617/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com