naoufal / react-native-speech

A text-to-speech library for React Native.
https://www.npmjs.com/package/react-native-speech
304 stars 53 forks source link

Speech.stop() won't allow me to Speech.speak() again. #7

Open JonathanWi opened 8 years ago

JonathanWi commented 8 years ago

Hi!

When using your component, I realized that Speech.stop(), which removes the Speech instance, won't allow me to re-launh a Speech.speak() again. When catching the error, Speech.speak tells me : "There is a speech in progress. Use the paused method to know if it's paused." when there is absolutely nothing in progress. I have no issue pausing / resuming a Speech.speak().

Any idea?

Cheers

JonathanWi commented 8 years ago

Update : it appears that removing

if (self.synthesizer) {
    return callback(@[RCTMakeError(@"There is a speech in progress.  Use the `paused` method to know if it's paused.", nil, nil)]);
}

make things work, I'll look into it more deeply

irfanayaz89 commented 7 years ago

@JonathanWi: Any update on this?

Swyanmitra commented 5 years ago

Is it fixed?