Skip to content

Fix throwing error when calling stop and pause functions#274

Open
powfix wants to merge 1 commit intoak1394:masterfrom
powfix:master
Open

Fix throwing error when calling stop and pause functions#274
powfix wants to merge 1 commit intoak1394:masterfrom
powfix:master

Conversation

@powfix
Copy link
Copy Markdown

@powfix powfix commented Nov 29, 2024

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

Issue: Tts.stop() throwing an error.
#273

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@powfix I would do the same on line 181 - it also throws the same error for me.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me

@nescroft
Copy link
Copy Markdown

nescroft commented Feb 11, 2025

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);
    }
}```

@konsnos
Copy link
Copy Markdown

konsnos commented Apr 24, 2025

The changes of this PR worked on

"react-native": "0.78.2",

@HarshitMadhav
Copy link
Copy Markdown

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

@fatidian1
Copy link
Copy Markdown

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.

@Rananjaya
Copy link
Copy Markdown

I ran into the same issue on iOS with React Native 0.83.1 — this patch fixed it. Thanks!

@fatidian1
Copy link
Copy Markdown

I think this repo is dead. I could create a fork of this project, because I use it in my projects. I know expo-speech exists but it also doesn't have everything and requires expo. If you like this idea just like my comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants