You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: