flutter_tts icon indicating copy to clipboard operation
flutter_tts copied to clipboard

Broken synthesis for language 'de-DE' on iOS 15.5

Open fsievers opened this issue 1 year ago • 4 comments

🐛 Bug Report

The synthesis for the language 'de-DE' is broken with iOS 15.5. With iOS < 15.5 everything works as expected. With 15.5, numbers and words from other languages are distorted by some words (maybe characters) in the synthesized text. This only happens with flutter_tts. With text_to_speech everything works fine. But I need flutter_tts because it can run when the application is in the background.

Output on iOS 14.5 (do not forget to unmute the videoplayer):

https://user-images.githubusercontent.com/2866107/180997460-ad2b813f-f448-40bb-ba39-fae68a7b8f4f.mp4

Output on iOS 15.5 (do not forget to unmute the videoplayer):

https://user-images.githubusercontent.com/2866107/180997463-ccc06952-400e-470f-8c6e-a1725072d3dd.mp4

Expected behavior

Synthesis the correct words as with iOS < 15.5. (See, or better hear, attached examples).

It should be ˈtɛst ˈtsvaɪ̯ (like in the attachment from ios-14.5).

Expected output (do not forget to unmute the videoplayer):

https://user-images.githubusercontent.com/2866107/180997460-ad2b813f-f448-40bb-ba39-fae68a7b8f4f.mp4

Reproduction steps

  1. Start the example from flutter_tts
  2. select the language de-DE
  3. Enter something like Test 2
  4. Play TTS
  5. Hear

Configuration

Version: 3.5.0

Platform:

  • [ ] :iphone: iOS

fsievers avatar Jul 26 '22 11:07 fsievers

We have the same problem in our Flutter app.

KarinBerg avatar Jul 27 '22 09:07 KarinBerg

@fsievers can you tell me what the incorrect one is saying? I'm not sure what you mean by distorted.

dlutton avatar Jul 27 '22 17:07 dlutton

@fsievers can you tell me what the incorrect one is saying? I'm not sure what you mean by distorted.

It says:"Test Homograph Start zwei Homograph end" Zwei is the german word for two. The bold words are the expected ones.

fsievers avatar Jul 27 '22 17:07 fsievers

We are also running into this

https://user-images.githubusercontent.com/511342/181342279-b46f26a1-c1a8-4b49-8bcd-85560fd17d3d.mp4

The text synthesized is "Text-to-speech enabled". You can hear it do something strange with the dashes and says something like "encol start" and "encol end". I'm actually not sure what the word is, but looks similar to the "Homograph" placeholder in @fsievers's example: TTS seems to be vocalizing some non-printing characters.

kevmo314 avatar Jul 27 '22 18:07 kevmo314

This is a problem with Apples TTS engine. Other apps that use Apple TTS also experience this issue. So unrelated to flutter_tts.

SamuelBrucksch avatar Aug 09 '22 17:08 SamuelBrucksch

Thank you for your answer. Today I found post at https://communities.apple.com/de/thread/254066932 about the problem. I also wrote a product feedback to Apple.

fsievers avatar Aug 09 '22 20:08 fsievers

The interesting thing is that I do not have the problem if I use this text-to-speech Flutter plugin https://github.com/ixsans/text_to_speech. Unfortunately this plugin does not support the "audio session category" settings which I need.

I tested it on the same device and with the same app. Just commenting out the different plugin code. I think it's true that something on Apple's side did change but it seems not to occur for all plugins using Apple's AVSpeechSynthesizer API.

KarinBerg avatar Aug 11 '22 09:08 KarinBerg

Seems to be related to German language only and specific characters/words, like numbers, semicolons and abreviations like MMO for example.

SamuelBrucksch avatar Aug 11 '22 14:08 SamuelBrucksch