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

Cancel consistency problems #15

Open
bradclorio opened this issue May 16, 2022 · 0 comments
Open

Cancel consistency problems #15

bradclorio opened this issue May 16, 2022 · 0 comments

Comments

@bradclorio
Copy link

Hey, I don't know if anyone is still looking at this but I am having issues with the cancel argument. From what I understand, if cancel is set to true then the text argument will interrupt any other text that is currently being spoken. What I have found is that this doesn't happen consistently. Right now I have some code to speak a number every time it changes until they get to a goal number.
Every time the number changes this is run where pickedNumber is the new number:
TTS.speak({text: pickedNumber+' ', rate: listSpeeds.selectionData[0].TTSRate, cancel: true});

Every time the pickedNumber reaches the goal number this is run:
TTS.speak({text: "Complete", rate: TTSRate, cancel: true});

What I have found is that the pickedNumber text does interrupt other text statements, but the "Complete" text does not interrupt the pickedNumber text. I have tried initializing the pickedNumber variable as a string, setting PickedNumber to a number+" ", using the String(pickedNumber) in the text argument, have the text argument be " "+pickedNumber+" ", and have another speak with a text: " " to try to interrupt. Nothing has made "Complete" consistently interrupt the pickedNumber.

If anyone has any insight to this or any tips, let me know. Thank you.

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

No branches or pull requests

1 participant