bug: Delay before Utterance when calling speak() Method
ThomasWagner-dev opened this issue ยท 0 comments
ThomasWagner-dev commented
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! ๐