我正在执行下面的设备上的文本到语音项目的代码,但得到错误"为资产构建MacinTalk语音:( null)"请帮助我如何修复或任何提示出错的地方.
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Tips For Silicon Valley From A Startup Accelerator In Gaza"];
[utterance setRate:0.015f];
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-GB"];
[synthesizer speakUtterance:utterance];
Run Code Online (Sandbox Code Playgroud)