Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: getSupportedVoices and getSupportedLanguages return empty arrays #130

Open
sebastianovide opened this issue Jul 6, 2024 · 1 comment
Labels
bug/fix Something isn't working needs: triage platform: web Web platform

Comments

@sebastianovide
Copy link

Plugin version:

4.0.2

Platform(s):

web

Current behavior:

        const voices  = await TextToSpeech.getSupportedVoices();
        const languages = await TextToSpeech.getSupportedLanguages();
        console.log(voices)
        console.log(languages)

both return empty arrays

Expected behavior:

They should be a list

Steps to reproduce:

in one of my js files, I have that code, when I run it I gen empty arrays

Related code:

        const voices  = await TextToSpeech.getSupportedVoices();
        const languages = await TextToSpeech.getSupportedLanguages();
        console.log(voices)
        console.log(languages)

Other information:

as a workaround, I wrapp it in a settimeout. That works

      setTimeout(async () => {
        const voices  = await TextToSpeech.getSupportedVoices();
        const languages = await TextToSpeech.getSupportedLanguages();
        console.log(voices)
        console.log(languages)
      }, 100)

Capacitor doctor:

💊   Capacitor Doctor  💊 

Latest Dependencies:

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

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 6.1.0
  @capacitor/core: 6.1.0
  @capacitor/android: 6.1.0

[success] Android looking great! 👌
@sebastianovide
Copy link
Author

See https://capacitor-plugin-demo-robingenz.vercel.app/text-to-speech

It would not show voices on my phone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix Something isn't working needs: triage platform: web Web platform
Projects
None yet
Development

No branches or pull requests

2 participants