equivalent of "revStopSpeech" by shell or Applescript ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
equivalent of "revStopSpeech" by shell or Applescript ?
Hi All,
Does Someone know an equivalent of "revStopSpeech" by shell
or Applescript ?
Jean-Marc
Does Someone know an equivalent of "revStopSpeech" by shell
or Applescript ?
Jean-Marc
https://alternatic.ch
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Jean-Marc,
in applescript you can pass a parameter to the say command "without waiting until completion" this will fire off the say command and the applescript is not waiting until the say command has finished.
example: 2 buttons
first button
the script of the second button
if you want the first button to interrupt any possible speech you could say:
the 3 scripts tested on MacOSX 10.6.8, Livecode 5.5
Kind regards
Bernd
in applescript you can pass a parameter to the say command "without waiting until completion" this will fire off the say command and the applescript is not waiting until the say command has finished.
example: 2 buttons
first button
Code: Select all
on mouseUp
put "say " & quote & "hallo world hallo world hallo world hallo world hallo world hallo world" & quote & "without waiting until completion" into tSay
do tSay as applescript
if the result is not "" then answer the result
end mouseUp
Code: Select all
on mouseUp
put "say " & quote & "" & quote & " with stopping current speech" into tSay -- just empty
do tSay as applescript
if the result is not "" then answer the result
end mouseUp
Code: Select all
on mouseUp
put "say " & quote & "hallo world hallo world hallo world hallo world hallo world hallo world" & quote & "with stopping current speech without waiting until completion" into tSay
do tSay as applescript
if the result is not "" then answer the result
end mouseUp
Kind regards
Bernd
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Bernd,
Thank a lot
They work fine.
The 3 scripts tested on MacOSX 10.7.2, Livecode 5.0
Best from Geneva
Jean-Marc
Thank a lot
They work fine.
The 3 scripts tested on MacOSX 10.7.2, Livecode 5.0
Best from Geneva
Jean-Marc
https://alternatic.ch
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Bernd,
I am confused.It work fine under Lion but the text is not spoken under SnowLeopard OSX 10.6.8, LiveCode 5.0
Kind regards
Jean-Marc
I am confused.It work fine under Lion but the text is not spoken under SnowLeopard OSX 10.6.8, LiveCode 5.0
Code: Select all
on mouseUp
put "say " & quote & "hallo world hallo world hallo world hallo world hallo world hallo world" & quote & "without waiting until completion" into tSay
do tSay as applescript
if the result is not "" then answer the result
end mouseUp
Jean-Marc
https://alternatic.ch
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Jean-Marc,
I tried the script on MacOSX 10.6.8 and LiveCode 5.0: no problem.
strange things come to mind:
Is the volume turned up?
If you test with TextEdit can TextEdit read a text for you on that machine? Menue -> Édition -> Parole -> Commencer la lecture
maybe choose another voice in System Preferences/ Speech
otherwise I have no idea
Kind regards
Bernd
I tried the script on MacOSX 10.6.8 and LiveCode 5.0: no problem.
strange things come to mind:
Is the volume turned up?
If you test with TextEdit can TextEdit read a text for you on that machine? Menue -> Édition -> Parole -> Commencer la lecture
maybe choose another voice in System Preferences/ Speech
otherwise I have no idea
Kind regards
Bernd
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Bernd,
Yes the volume is turned up and textedit speak the text
I think it don't work because i have a french voice installed (cepstral Jean-Pierre).
I test tomorrow with an other machine.
Kind regards
Jean-Marc
Yes the volume is turned up and textedit speak the text
I think it don't work because i have a french voice installed (cepstral Jean-Pierre).
I test tomorrow with an other machine.
Kind regards
Jean-Marc
https://alternatic.ch
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Bernd,
I test the three scripts under an other machine OSX 10.6.8
1."without waiting until completion" work fine
2."with stopping current speech" don't work
3. "with stopping current speech without waiting until completion" work fine
I don't know why the second don't work
Best regards
Jean-Marc
I test the three scripts under an other machine OSX 10.6.8
1."without waiting until completion" work fine
2."with stopping current speech" don't work
3. "with stopping current speech without waiting until completion" work fine
I don't know why the second don't work
Best regards
Jean-Marc
https://alternatic.ch
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Jean-Marc,
is not working?
If so then this script is just stopping any speech currently running, it does not say anything in itself. It is supposed to let you stop what is being spoken.
If that is not the problem please post the script that is not working.
Kind regards
Bernd
do you mean2."with stopping current speech" don't work
Code: Select all
on mouseUp
put "say " & quote & "" & quote & " with stopping current speech" into tSay -- just empty
do tSay as applescript
if the result is not "" then answer the result
end mouseUp
If so then this script is just stopping any speech currently running, it does not say anything in itself. It is supposed to let you stop what is being spoken.
If that is not the problem please post the script that is not working.
Kind regards
Bernd
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Bernd,
Curiously, the script 3 does stop current speech fine and speech its text fine
Kind regards
Jean-Marc
Yes, i expect it does stop a current speech but it doesn't stop it (the text spoken by the first btn)is just stopping any speech currently running
Curiously, the script 3 does stop current speech fine and speech its text fine
Kind regards
Jean-Marc
https://alternatic.ch
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Jean-Marc,
I have no explanation for this: I tested and retested the scripts I posted and script 2 works fine for me as it stops the current speech. I tested on MacOSX 10.6.8 and LiveCode 5.0 and 5.5. I copied them from the forum.
There must be something else going on. Did you copy the scripts here from the forum? Unchanged?
Please try again with a new stack and just button 1 and button 2 from the scripts above.
Kind regards
Bernd
I have no explanation for this: I tested and retested the scripts I posted and script 2 works fine for me as it stops the current speech. I tested on MacOSX 10.6.8 and LiveCode 5.0 and 5.5. I copied them from the forum.
There must be something else going on. Did you copy the scripts here from the forum? Unchanged?
Please try again with a new stack and just button 1 and button 2 from the scripts above.
Kind regards
Bernd
Re: equivalent of "revStopSpeech" by shell or Applescript ?
Hi Bernd,
I tested with an other machine OSX 10.6.8 LC 5.0 and all scripts work
I haven't explanation.
Kind regards
Jean-Marc
Yes. I used a copy of your scriptDid you copy the scripts here from the forum Unchanged?
I tested with an other machine OSX 10.6.8 LC 5.0 and all scripts work
I haven't explanation.
Kind regards
Jean-Marc
https://alternatic.ch