ak1394 / react-native-tts

React Native Text-To-Speech library for Android and iOS
624 stars 158 forks source link

Can't use enhanced voice in iOS 17 #254

Open homerquan opened 11 months ago

homerquan commented 11 months ago

Tried the react-native-tts with premium voice in iOS 17 e.g,.

Screenshot 2023-12-08 at 5 21 33 PM

But the premium voice didn't work // iosVoiceId: "com.apple.speech.synthesis.voice.Junior", (this one works) iosVoiceId: "com.apple.voice.enhanced.en-US.Samantha", (this one not, and get following error)

[TextToSpeech] VoiceProvider: Could not start synthesis for request SSML Length: 286, Voice: [AVSpeechSynthesisProviderVoice 0x6000022d6a80] Name: Samantha, Identifier: com.apple.voice.compact.en-US.Samantha, Supported Languages ( "en-US" ), Age: 0, Gender: 0, Size: 0, Version: (null), converted from tts request [TTSSpeechRequest 0x60000788d080] Alright, buddy! Let's read a book and have some fun! When you want to chat, press the blue button. And when you're done, hit the red one. We're gonna see animals and you can tell me what they're doing! It's gonna be a blast! Ready? Let's go! language: en-US footprint: compact rate: 0.500000 pitch: 1.000000 volume: 1.000000 [TextToSpeech] Failed to speak request with error: Error Domain=TTSErrorDomain Code=-4010 "(null)". Attempting to speak again with fallback identifier: com.apple.voice.compact.en-US.Samantha [TextToSpeech] Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" [TextToSpeech] Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" [TextToSpeech] Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" [TextToSpeech] Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" [TextToSpeech] Could not instantiate audio unit. Error=Error Domain=NSOSStatusErrorDomain Code=-3000 "(null)" [TextToSpeech] Couldn't find audio unit for request SSML Length: 286, Voice: [AVSpeechSynthesisProviderVoice 0x60000a4b9130] Name: Samantha, Identifier: com.apple.voice.compact.en-US.Samantha, Supported Languages ( "en-US"

homerquan commented 11 months ago

It seems related to this https://developer.apple.com/forums/thread/738048