Weird bug with the revSpeak speech synthesis

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
godot
Posts: 14
Joined: Tue Aug 04, 2015 8:38 pm

Weird bug with the revSpeak speech synthesis

Post by godot » Tue Nov 24, 2015 8:28 pm

Hi,

Using a Mac with OS 10.10.5 with different stable version of LC7, I have a really weird bug... and quite annoying when you are using the speech synthesis :( !
Can anyone tell me if he or she can replicate it or if it is already a acknowledge problem (didn't find it) before I report it ?
The bug is the following :
If you call directly or indirectly revSpeak after setting the voice with revSetSpeechVoice to any voice, the whole code of the calling commands/functions will be repeated twice if you press any keys (aside from cmd, crtl...) before the sentence is synthetized.

For example, in the IDE, if I put in the message box :

Code: Select all

wait 1 second;beep; revSetSpeechVoice "Ralph";revSpeak  "test";
and I press "Enter" and then any letter before "Ralph" start talking (hence the "wait"), I hear two beep and twice "test".

Note that I can also reproduce the problem outside of the msg box (it has actually been bothering me for quite some time in my standalone app...). For example, it also happens if I put this code in a function in the stack and call it through a command : the instructions of both the command and the function will be repeated twice...

Thanks for your help !

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Weird bug with the revSpeak speech synthesis

Post by dunbarx » Tue Nov 24, 2015 9:50 pm

Hi.

In 6.7 I get only what is coded. This is in a mouseUp handler in a button:

Code: Select all

on mouseUp
   wait 1 second
   beep
   revSetSpeechVoice "Ralph";revSpeak  "test"
end mouseUp
I click the button, and then immediately hit a key at random.

Craig Newman

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Weird bug with the revSpeak speech synthesis

Post by Dixie » Tue Nov 24, 2015 10:06 pm

Same as Craig...

Code: Select all

wait 1 second;beep; revSetSpeechVoice "Ralph";revSpeak  "test";
This only speaks once when run in the message box or wrapping this line of code in a 'mouseUp' handler in a button
LC 7.1 on a macBook Pro

godot
Posts: 14
Joined: Tue Aug 04, 2015 8:38 pm

Re: Weird bug with the revSpeak speech synthesis

Post by godot » Wed Nov 25, 2015 12:29 am

Hi, thank you Craig & Dixie for checking.
It's strange because I have been able to reproduce the same behavior on another computer now. So, the thing happens on a very recent Macbook Pro and an old MacBook Air, with different stable version of LC from 6.7 to 7.1 and different OS...
It 's true though taht it doesn't work with button & on Mouseup events though, only in the msg box and within stacked called through other kind of interactions (based on "on keydown" for example). I'm gonna try to make a simple stack to reproduce the bug.
If anyone else can try at least the msg box, that would be nice !
Thanks !

godot
Posts: 14
Joined: Tue Aug 04, 2015 8:38 pm

Re: Weird bug with the revSpeak speech synthesis

Post by godot » Wed Nov 25, 2015 2:09 am

Ok sorry to insist but I have found another protocol that produce the same buggy behavior without using msg box that I would hope some of you could test. Thanks !

One of the very mysterious things is that it only worked after I added... a field ! Doesn't work with button & didn't try other things.

So here the procedure :
1) create a stack
2) put a field in it
3) in the stack script, put the following script :

Code: Select all

//does this twice if one hits key before end of the cmd
on vocal speech
   wait for 2 seconds
   revSetSpeechVoice "Ralph"
   revSpeak  speech
end vocal

on keyDown Chr
   //works with any letter, just picked g randomly
   if Chr = "g" then put wrapIt()
end keyDown

//does this twice too when called as it calls vocal
function wrapIt 
   beep
   vocal "one,two"
end wrapIt
4) click in the field,
5) Then tap on the "g" key and any other letter successively.

If you get the same result as I do, you will hear two beep and then "Ralph" saying "one,two" twice (sometimes doesn't always do it the first time, so try again "g" + any other letter.)

In the 80's, a famous LISP course from MIT compared computer scientists to magicians... Well, I thing they were quite right 'cause I am sure there is a rational explanation behind all this but it all looks (& sounds) like total sorcery to me !

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Weird bug with the revSpeak speech synthesis

Post by dunbarx » Wed Nov 25, 2015 2:58 am

Hi.

Normal action (now at home) on my MacBook Air, LC 6.7, OS 10.9

Craig

godot
Posts: 14
Joined: Tue Aug 04, 2015 8:38 pm

Re: Weird bug with the revSpeak speech synthesis

Post by godot » Wed Nov 25, 2015 4:25 pm

Thanks Creg. Maybe it is related to the OS, because I have tested the bug on 4 differents mac running on 10.10.5 and they all have it.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Weird bug with the revSpeak speech synthesis

Post by dunbarx » Wed Nov 25, 2015 4:47 pm

If you find that the problem goes away in a 10.9 (or lower) machine, then I would send a bug report to QCC.

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Weird bug with the revSpeak speech synthesis

Post by jmburnod » Wed Nov 25, 2015 6:12 pm

Dixie's message box and Godot's scripts work as expected here (LC 7.0.5 OS X 10.10.3)
Jean-Marc
https://alternatic.ch

Post Reply