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: Delay before Utterance when calling speak() Method #87

Open
ThomasWagner-dev opened this issue Feb 24, 2023 · 0 comments
Open

bug: Delay before Utterance when calling speak() Method #87

ThomasWagner-dev opened this issue Feb 24, 2023 · 0 comments

Comments

@ThomasWagner-dev
Copy link

ThomasWagner-dev commented Feb 24, 2023

Plugin version: 2.0.1

Platform(s): Web, Android?, Ios?

Current behavior:
When supplying "lang" and "rate" arguments to the "speak()" Method there is a long delay before the utterance starts. This does not happen, when not suppling "lang" or "rate" arguments.

Expected behavior:
No delay before the utterance when calling "speak()", regardless of arguments given.

Steps to reproduce:

  • Install Plugin
  • Create "TTSOptions" Array with "lang" or "rate" specified
  • Call "speak()" Method with those Options

Related code:

// Type definitions of variables used, values are assigned before initialising the "options" Array.
public playBackSpeed: number;
let filteredText: string;

// Initialise variables...

const options: TTSOptions = {
        text: filteredText,
        lang: 'de-DE',
        rate: this.playBackSpeed,
        pitch: this.pitch,
        volume: 1.0,
        category: 'ambient'
      };
      try {
        await TextToSpeech.speak(options);
        this.speaking = false;
      } catch (e) {}

Other information:

Capacitor doctor:

💊   Capacitor Doctor  💊 

Latest Dependencies:

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

Installed Dependencies:

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

[success] iOS looking great! 👌
[success] Android looking great! 👌
@ThomasWagner-dev ThomasWagner-dev changed the title Delay before Utterance when calling speak() Method bug: bug: Delay before Utterance when calling speak() Method Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants