ixsans / text_to_speech

A Flutter plugin provides TTS (Text-To-Speech) Service
BSD 3-Clause "New" or "Revised" License
16 stars 22 forks source link

IOS 17 and 16 does not work #15

Open baifachuan opened 7 months ago

baifachuan commented 7 months ago

My cod:

 TextToSpeech tts = TextToSpeech();
 String language = 'zh-CN';
 tts.setLanguage(language);

but I found it does not work on IOS 17 and IOS 16.

I found the error message in Xcode:

VoiceProvider: Could not start synthesis for request SSML Length: 17, Voice: [AVSpeechSynthesisProviderVoice 0x60000214ada0] Name: Tingting, Identifier: com.apple.voice.super-compact.zh-CN.Tingting, Supported Languages (
    "zh-CN"
), Age: 0, Gender: 0, Size: 0, Version: (null), converted from tts request [TTSSpeechRequest 0x60000370f900] 约旦 language: zh-CN footprint: super-compact rate: 0.500000 pitch: 1.000000 volume: 1.000000
Failed to speak request with error: Error Domain=TTSErrorDomain Code=-4010 "(null)". Attempting to speak again with fallback identifier: com.apple.voice.compact.zh-CN.Tingting
Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)"
Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)"
Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)"

It worked before IOS 16.