Got it finally... arg, problem with user agent looks like, need to use
-U "Mozilla/5.0"

Thanks to: 
http://lists.mplayerhq.hu/pipermail/mplayer-users/2011-January/081868.html

On Jul 7, 10:25 am, Falazar <[email protected]> wrote:
> Hi,
>   I have a couple small personal programs that use the audio
> translation service from google, but I have noticed that it is
> sounding out the name of the special characters for some swedish words
> instead of pronouncing them correctly.  But the odd thing is, if you
> load it directly from the google page in a browser it is pronounced
> correctly....
>
> examples 
> below:http://falazar.com/projects/Isabell/test.php?word=ih%E5ghttp://falazar.com/projects/Isabell/test.php?word=ihåg
>
> http://falazar.com/projects/Isabell/test.php?word=säger
>
> Loading directly from google 
> like:http://translate.google.com/translate_tts?tl=sv&q=säger
>
> pronounces it correctly.... but using php (or anything else) to grab
> the file doesnt work.
>
> The php script I use is very simple:
> Get file, save file, play in flash, but it pronounces it in correctly
> if downloaded.
>
> 19.   $url = "http://translate.google.com/translate_tts?tl=sv&q=
> $words";
> 20.
> 22.   $current = file_get_contents($url);
> 24.   file_put_contents($file, $current);
> 25.
> 27.   print "$words <br>
> 28.    <embed type=application/x-shockwave-flash
> 29.     flashvars=\"audioUrl=$file&autoPlay=true\"
> 30.     src=\"http://www.google.com/reader/ui/3523697345-audio-
> player.swf\" width=400 height=27
> 31.     quality=best>
> 32.   </embed>";
>
> wget -U "Firefox/3.0.15" "http://translate.google.com/translate_tts?
> tl=sv&q=säger" -O sound.mp3
>
> This gets the same incorrect file, so it just seems to only work in
> the browser, this is very frustrating... and should be something
> simple, thanks!
>
> If I can get this fixed it would really help me to continue learning
> the language, thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"General" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-translate-general?hl=en.

Reply via email to