capacitor-community/text-to-speech

bug: TTS not triggered on iOS16

winfieldblum opened this issue · 5 comments

Plugin version:
v2.0.1

Platform(s):
iOS 16

Current behavior:
In iOS 15.5 when running

speak = async (msg) => {
    await TextToSpeech.speak({
      text: msg,
      lang: "en-AU",
      rate: 1.0,
      pitch: 1.0,
      volume: 1.0,
      category: "ambient",
    });
  }; 

or even

getSupportedLanguages()

The text is read fine in <16 but in iOS 16 (I did try en-US too) no longer does and we get errors in the console;

⚡️ To Native -> TextToSpeech getSupportedLanguages 125237587
⚡️ TO JS {"languages":[]}
⚡️ [log] - undefined
⚡️ To Native -> TextToSpeech speak 125237588
ERROR MESSAGE: {"errorMessage":"This language is not supported.","message":"This language is not supported."}
⚡️ [error] - {"errorMessage":"This language is not supported.","message":"This language is not supported."}
2022-09-14 10:02:10.029667+0930 App[78368:14819623] [asset] Failed to get sandbox extensions
2022-09-14 10:02:10.060227+0930 App[78368:14819623] [catalog] Unable to list voice folder
2022-09-14 10:02:10.075312+0930 App[78368:14819623] [catalog] Unable to list voice folder
2022-09-14 10:02:10.077749+0930 App[78368:14819623] [catalog] Unable to list voice folder
2022-09-14 10:02:10.086635+0930 App[78368:14819623] [catalog] Unable to list voice folder

Expected behavior:
Plays as normal in either <16 and 16

Steps to reproduce:
As abive

Related code:
As above

Capacitor doctor:

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 4.2.0
  @capacitor/core: 4.2.0
  @capacitor/android: 4.2.0
  @capacitor/ios: 4.2.0

Installed Dependencies:

  @capacitor/cli: 4.1.0
  @capacitor/android: 4.1.0
  @capacitor/ios: 4.1.0
  @capacitor/core: 4.1.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Thank you. I will have a look as soon as possible.

Any updates on whether this is still an issue? I was just about to start using this for an app.

I just tried it and was able to reproduce the issue in the simulator.
I don't have an iOS 16 device at the moment for testing.

@changefox Did you also experience the issue in the simulator or on the device?

According to this SO answer, the problem occurs only in the simulator: https://stackoverflow.com/a/74282321/6731412

It looks like there hasn't been a reply in 30 days, so I'm closing this issue.