Page 1 of 1

Google text to speech in GD for linux users

PostPosted: Tue Aug 13, 2013 8:09 pm
by wissam
Hi

if u want to use Google tts in GD u can do that following these steps :
1 - Edit -> Dictionaries -> Programs.
2 - click on Add and choose "Audio" in type field .
3 - in "Command Line" field copy and paste this command:

Code: Select all
bash -c "p=$(echo "%GDWORD%" |sed 's/ /+/g');wget -U Mozilla -q -O - "$@" translate.google.com/translate_tts?tl=en\&q=$p|mpg123 -"

click ok

for languages other than english change tl=en in the command ,for example fr for french or es for spanish ......
sorry for my bad English.
Note: mpg123 should be installed .

Re: Google text to speech in GD for linux users

PostPosted: Sat Feb 01, 2014 10:25 am
by toctoc3
Thanks!! its so easy


Code for Spanish speech:
Code: Select all
bash -c "p=$(echo "%GDWORD%" |sed 's/ /+/g');wget -U Mozilla -q -O - "$@" translate.google.com/translate_tts?tl=es\&q=$p|mpg123 -"


And 4 Italian speech:
Code: Select all
bash -c "p=$(echo "%GDWORD%" |sed 's/ /+/g');wget -U Mozilla -q -O - "$@" translate.google.com/translate_tts?tl=it\&q=$p|mpg123 -"

Re: Google text to speech in GD for linux users

PostPosted: Fri Oct 31, 2014 8:22 pm
by xkomczax
Hey, thanks for this! :-)

However I found "small" problem: in French there is problem with pronouncing letter "é". Instead of "é" the voice says "copyright" (quite strange, I know...). For instance: the word "président" is pronounced "pr-copyright-side". on google translate the pronunciation seems to be OK.

EDIT: It doesn't work with words including character "ç" such as "français". The pronunciation is somehow crippled

Re: Google text to speech in GD for linux users

PostPosted: Fri Nov 07, 2014 8:44 pm
by wissam
xkomczax wrote:Hey, thanks for this! :-)

However I found "small" problem: in French there is problem with pronouncing letter "é". Instead of "é" the voice says "copyright" (quite strange, I know...). For instance: the word "président" is pronounced "pr-copyright-side". on google translate the pronunciation seems to be OK.

EDIT: It doesn't work with words including character "ç" such as "français". The pronunciation is somehow crippled

Hmmmm,starnge.
Ok try adding ie=UTF-8 to the command to become like this :
Code: Select all
bash -c "p=$(echo "%GDWORD%" |sed 's/ /+/g');wget -U Mozilla -q -O - "$@" translate.google.com/translate_tts?ie=UTF-8\&tl=fr\&q=$p|mpg123 -"

this worked for me .

Re: Google text to speech in GD for linux users

PostPosted: Fri Nov 07, 2014 8:53 pm
by xkomczax
Ok try adding ie=UTF-8 to the command to become like this :

hey, wissam, thank you! Now it works perfectly. Thanks a lot! :-)