how to use Speech / Parole feature on osX Lion ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
how to use Speech / Parole feature on osX Lion ?
Hi,
As you may have seen, osx Lion offers now speech in many languages (not only english but fr, de, sp, etc...).
How to use it in LiveCode ?
1/ Enable new voices if the user didn't do that : you have to donwload them.
2/ Select the right voice
3/ modify the speed
4/ send strings to voices
I can't find function related to that.
Best,
Frédéric
As you may have seen, osx Lion offers now speech in many languages (not only english but fr, de, sp, etc...).
How to use it in LiveCode ?
1/ Enable new voices if the user didn't do that : you have to donwload them.
2/ Select the right voice
3/ modify the speed
4/ send strings to voices
I can't find function related to that.
Best,
Frédéric
Re: how to use Speech / Parole feature on osX Lion ?
Bonjour Frédéric,
But I am not sure if they work correct with the new voices in Lion!
EDIT!
Just checked, they do work!
...
put "Bonjour Frédéric, ça va bien?" into tString
get shell("say" && tString)
...
Works great with the new german voices!
Best
Klaus
Since this is a feature built into the OS, I doubt that you can do this via LiveCode.1/ Enable new voices if the user didn't do that : you have to donwload them.
Check "revSpeech" in the dictionary!2/ Select the right voice
3/ modify the speed
But I am not sure if they work correct with the new voices in Lion!
EDIT!
Just checked, they do work!
See above but can also us SHELL to do so:4/ send strings to voices
...
put "Bonjour Frédéric, ça va bien?" into tString
get shell("say" && tString)
...
Works great with the new german voices!

Best
Klaus
Re: how to use Speech / Parole feature on osX Lion ?
Bonjour Frédéric,
Check also "revstopSpeech" in the dictionary
Klaus said :
Best
Jean-Marc
Check also "revstopSpeech" in the dictionary
Klaus said :
Is there an equivalent of "revstopSpeech" with the shell command ?See above but can also us SHELL to do so:
put "Bonjour Frédéric, ça va bien?" into tString
get shell("say" && tString)
Best
Jean-Marc
https://alternatic.ch
Re: how to use Speech / Parole feature on osX Lion ?
Hi Jean-Marc,
sorry, no idea.
You can check the man pages for SAY, enter this into the TERMINAL:
man say
Best
Klaus
sorry, no idea.
You can check the man pages for SAY, enter this into the TERMINAL:
man say
Best
Klaus
Re: how to use Speech / Parole feature on osX Lion ?
Hm, since SHELL calls are blocking in LiveCode, this doesn't matter at all
But REVSPEAK should work!

But REVSPEAK should work!
Re: how to use Speech / Parole feature on osX Lion ?
Tanks a lot.
I Will mâle some try.
Do you think it possible to record The VoiceOver generated by The synthetiser ?
Best,
Frédéric
I Will mâle some try.
Do you think it possible to record The VoiceOver generated by The synthetiser ?
Best,
Frédéric
Re: how to use Speech / Parole feature on osX Lion ?
Hi Frédéric,
eSpeak isn't as beautiful as Lion's speech feaures, but it is cross-platform (inlcuding Mac) and available in quite a few languages. It can also be used to create sound files.
Regarding Lion's speech, you can use the revSetSpeechVoice command to change voices. I'd expect to be able to select a voice in a different language. Use the revSpeechVoices function to see a list of all voices available to LiveCode.
Kind regards,
Mark
eSpeak isn't as beautiful as Lion's speech feaures, but it is cross-platform (inlcuding Mac) and available in quite a few languages. It can also be used to create sound files.
Regarding Lion's speech, you can use the revSetSpeechVoice command to change voices. I'd expect to be able to select a voice in a different language. Use the revSpeechVoices function to see a list of all voices available to LiveCode.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: how to use Speech / Parole feature on osX Lion ?
Thanks for the information but I need something that do not need to be downloaded apart from my app.
Frédéric
Frédéric
Re: how to use Speech / Parole feature on osX Lion ?
Hi Frédéric,
here is a little stack that lets you type/paste text into a field. This text is then put into an AppleScript and send off. It will create a sound file (.aif) on the desktop with the text spoken with the current voice.
Works only on a Mac due to Applescript.
I did not test on Lion but it works on Snow Leopard. Should work on Lion also.
Kind regards
Bernd
here is a little stack that lets you type/paste text into a field. This text is then put into an AppleScript and send off. It will create a sound file (.aif) on the desktop with the text spoken with the current voice.
Works only on a Mac due to Applescript.
I did not test on Lion but it works on Snow Leopard. Should work on Lion also.
Kind regards
Bernd
- Attachments
-
- textToSpeechToRecording.livecode.zip
- (1.84 KiB) Downloaded 342 times
Re: how to use Speech / Parole feature on osX Lion ?
Bonjour Frédéric,

Open the terminal and type:
man say
Hit enter and see all possible options for this shell command.
Best
Klaus
yes, check the example of Bernd that uses AppleScript, but this can also be done via SHELL, if you like this betterfpierron wrote:Do you think it possible to record The VoiceOver generated by The synthetiser ?

Open the terminal and type:
man say
Hit enter and see all possible options for this shell command.
Best
Klaus
Re: how to use Speech / Parole feature on osX Lion ?
Hi Bernd,
Best from Geneva
Jean-Marc
Yes. I tested itShould work on Lion also.
Best from Geneva
Jean-Marc
https://alternatic.ch
Re: how to use Speech / Parole feature on osX Lion ?
Hi Jean-Marc,
thanks for testing. I am still not on Lion yet.
I gather that you are into compiling externals. Wow. Xcode / C, objective C scare me to death.
Kind regards
Bernd
thanks for testing. I am still not on Lion yet.
I gather that you are into compiling externals. Wow. Xcode / C, objective C scare me to death.
Kind regards
Bernd
Re: how to use Speech / Parole feature on osX Lion ?
Hi Bernd,
I'm not the author, i just have found a way to use it for iPad
Kind regards
Jean-marc
Me too.Wow. Xcode / C, objective C scare me to death.
I'm not the author, i just have found a way to use it for iPad
Kind regards
Jean-marc
https://alternatic.ch
Re: how to use Speech / Parole feature on osX Lion ?
Hi All,
It seem Applescript is the only one way to speak a language with diacritical chars and apostrophe
• RevSpeak don't speak a string with diacritical chars
• Shell don't speak a string with an apostrophe
The best way should be LiveCode fix the revspeak.
Someone know something about this in LC 5.5 ?
Best regards
Jean-Marc
It seem Applescript is the only one way to speak a language with diacritical chars and apostrophe
• RevSpeak don't speak a string with diacritical chars
• Shell don't speak a string with an apostrophe
The best way should be LiveCode fix the revspeak.
Someone know something about this in LC 5.5 ?
Best regards
Jean-Marc
https://alternatic.ch
Re: how to use Speech / Parole feature on osX Lion ?
Hi Jean-Marc,
You can use apostrophs in the shell if you put the entire string inside quotes or if you escape the apostrophe with a preceding backslash.
The shell understands UTF8, which means you can use any character if you convert it to UTF8 first. I'm not sure that you can call the shell using UTF8 from LiveCode, but you can write a simple shell script to disk, change the permissions and use the shell to run it:
Mark
You can use apostrophs in the shell if you put the entire string inside quotes or if you escape the apostrophe with a preceding backslash.
The shell understands UTF8, which means you can use any character if you convert it to UTF8 first. I'm not sure that you can call the shell using UTF8 from LiveCode, but you can write a simple shell script to disk, change the permissions and use the shell to run it:
Kind regards,put "say" && quote & "Je suis à l'école" & quote into url "binfile:talk.sh"
get shell("chmod 755 talk.sh")
get shell("talk.sh")
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode