iOS16 AVSpeechSynthesizer 语音合成无法工作
如题,通过以下方法调用api,在iOS12的手机可以正常播放文本合成的语音
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc]initWithString:@“一”];
[AppResidentObjc.speechSynthesizer speakUtterance:utterance];
在iOS 16系统的设备上没有声音,并且会打印以下错误,而且只打印一次,之后不管怎么调用都不会发出声音,也不会打印错误信息。
请问有人知道怎么解决吗?上网查了之后都说iOS16之后需要设置成全局变量,我试过了没用,_speechSynthesizer = AVSpeechSynthesizer.alloc.init;
2023-03-22 11:19:50.396360+0800 cydictionary[741:85126] [catalog] Unable to list voice folder
2023-03-22 11:19:50.417779+0800 cydictionary[741:85126] [catalog] Unable to list voice folder
2023-03-22 11:19:50.424523+0800 cydictionary[741:85126] [catalog] Unable to list voice folder
2023-03-22 11:19:50.430474+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11006 (Can't compile rule): regularExpression=Ne-\Yo, message=unrecognized character follows , characterPosition=4
2023-03-22 11:19:50.430818+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 16038 (Resource load failed): component=ttt re, uri=rlst yosemite set mnc, contentType=application x-vocalizer-rettt+text;loader=broker, lhError=88602000
2023-03-22 11:19:50.439849+0800 cydictionary[741:85126] [catalog] Unable to list voice folder
2023-03-22 11:19:50.457786+0800 cydictionary[741:85134] [catalog] Query for com.apple.MobileAsset.VoiceServices.VoiceResources failed: 2
2023-03-22 11:19:50.459442+0800 cydictionary[741:85226] [AXTTSCommon] File file: System Library PrivateFrameworks TextToSpeechMauiSupport.framework TTSResources zh-CN Tingting Contents user_rules.txt contained data that was not null terminated
2023-03-22 11:19:50.462345+0800 cydictionary[741:85226] [AXTTSCommon] File file: System Library PreinstalledAssetsV2 RequiredByOs com_apple_MobileAsset_VoiceServices_VoiceResources 8d852b175651f5419106c1d13970e75a23748469.asset AssetData vocalizer-user-dict.dat contained data that was not null terminated
2023-03-22 11:19:50.477151+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=(
2023-03-22 11:19:50.477193+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=?
2023-03-22 11:19:50.477214+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option==
2023-03-22 11:19:50.477231+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=C
2023-03-22 11:19:50.477249+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=N
2023-03-22 11:19:50.477267+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=Y
2023-03-22 11:19:50.477284+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=)
2023-03-22 11:19:50.477300+0800 cydictionary[741:85226] [AXTTSCommon] MauiVocalizer: 11016 (Ruleset parse failed: Ignoring unknown option): option=
一样,请问解决了吗
一样 解决了吗