revSpeak and accented letters

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

revSpeak and accented letters

Post by Mag » Sun Mar 09, 2014 1:53 pm

I'm trying revSpeak command and noticed that when I give it as text to speack a string containing accented letters (like "è") the text is not read. Any idea?

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

Re: revSpeak and accented letters

Post by jmburnod » Sun Mar 09, 2014 2:44 pm

Hi Mag,

Yes, revspeak doesn't work with accented letters on OSX since Lion
You have to use applescript for that

Best regards
Jean-Marc
https://alternatic.ch

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: revSpeak and accented letters

Post by Mag » Sun Mar 09, 2014 2:58 pm

Thank you so much Jean-Marc.

So, I will go with something like:

Code: Select all

put the field "AppleScriptCode" into theCode
do theCode as "applescript"
Field "AppleScriptCode":
say "Hello!" using "Agnes"

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

Re: revSpeak and accented letters

Post by jmburnod » Sun Mar 09, 2014 3:06 pm

Bernd have done an excellent stack I use every day
you can find it here
http://forums.runrev.com/phpBB2/viewtop ... eak#p42120
There is also a way by shell in the same thread
All the best
Jean-Marc
https://alternatic.ch

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: revSpeak and accented letters

Post by Mag » Sun Mar 09, 2014 3:27 pm

Very interesting...

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

Re: revSpeak and accented letters

Post by jmburnod » Sun Mar 09, 2014 3:54 pm

Hi Mag,

I forgot you have to replace " à " by " a " in the text.
Some voices (Virginie in french) says
"il est parti a accent grave Paris" instead
"il est parti à Paris"

Best regards

Jean-Marc
https://alternatic.ch

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: revSpeak and accented letters

Post by Mag » Sun Mar 09, 2014 7:02 pm

jmburnod wrote:Hi Mag,

I forgot you have to replace " à " by " a " in the text.
Some voices (Virginie in french) says
"il est parti a accent grave Paris" instead
"il est parti à Paris"

Best regards

Jean-Marc
:-O Really? But this don't changes the pronunciation of the words?

BTW
As French voices I have: Amelie, Chantal, Nicolas, Audrey, Aurelie and Thomas.

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

Re: revSpeak and accented letters

Post by jmburnod » Sun Mar 09, 2014 8:32 pm

That concern only the WORD "à" that is the reason you have to replace " à " and not "à"
https://alternatic.ch

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: revSpeak and accented letters

Post by Mag » Mon Mar 10, 2014 10:34 am

Thank you. I will add this code:

Code: Select all

replace " à " with " a " in theText -- to avoid the "il est parti a accent grave Paris" bug
:D

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

Re: revSpeak and accented letters

Post by jmburnod » Mon Mar 10, 2014 11:55 am

Hi Mag,
Glad to help you.
I didn't verify all cases but it seems that "à" is the only case considered like a word with only one accented letter
https://alternatic.ch

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

Re: revSpeak and accented letters

Post by jmburnod » Thu May 08, 2014 5:46 pm

Hi All,
There is a simpler way using revspeak

Code: Select all

on mouseUp
   get  "je suis à l'école"
   put unidecode(uniencode(it),"UTF8") into tSentence
   revspeak tSentence
end mouseUp
works fine for me
Kind regards
Jean-Marc
https://alternatic.ch

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

Re: revSpeak and accented letters

Post by jmburnod » Sat Jan 10, 2015 5:22 pm

Hi All,
It seems LC 6.7 has changed something in revspeak command
With LC 5.5 I needed use this

Code: Select all

put "mangé" into tText
revspeak unidecode(uniencode(tText),"UTF8")
because it didn't work with accented letters.

With LC 6.7 we can return to a simple revspeak command

Code: Select all

put "mangé" into tText
revspeak tText
Best regards
Jean-Marc
https://alternatic.ch

Post Reply