react-native-tts icon indicating copy to clipboard operation
react-native-tts copied to clipboard

Fix throwing error when calling stop and pause functions

Open powfix opened this issue 1 year ago • 4 comments

Change onWordBoundary argument type from (BOOL ) to (BOOL) in stop and pause functions

Issue: Tts.stop() throwing an error. https://github.com/ak1394/react-native-tts/issues/273

powfix avatar Nov 29 '24 09:11 powfix

yeah this method in TextToSpeech.mm has the same issue

RCT_EXPORT_METHOD(setDefaultRate:(float)rate
                  skipTransform:(BOOL *)skipTransform // not used, compatibility with Android native module signature
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)
{
    if(rate > AVSpeechUtteranceMinimumSpeechRate && rate < AVSpeechUtteranceMaximumSpeechRate) {
        _defaultRate = rate;
        resolve(@"success");
    } else {
        reject(@"bad_rate", @"Wrong rate value", nil);
    }
}```

nescroft avatar Feb 11 '25 06:02 nescroft

The changes of this PR worked on

"react-native": "0.78.2",

konsnos avatar Apr 24 '25 11:04 konsnos

I can confirm the PR works fine, why it is in open?

HarshitMadhav avatar Jul 16 '25 07:07 HarshitMadhav

I can confirm the PR works fine, why it is in open?

@HarshitMadhav This repo is dead... I switched to expo-audio, it doesn't have only switch tts engine feature, but rest works perfect and even web platform is supported.

fatidian1 avatar Jul 16 '25 11:07 fatidian1