Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google translate text-to-speech in British

I'm using the (unofficial) Google translate TTS api to retrieve mp3s to support disabled learners to read web pages. It all works fine, however we have an American accent (we're in the UK!). When I use Google translate however, it fetches the mp3 with a British accent - how do I invoke this behavior?

I've used the same GET request URL so I can assume it's not that:

http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en

(I've played with other language codes (en-gb) with no luck - fr works for french however.)

Many thanks

like image 903
Mike Thrussell Avatar asked Jun 13 '12 15:06

Mike Thrussell


2 Answers

You can specify a regional variation in the tl parameter after an _ character, e.g.

http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en_us

http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en_gb

http://translate.google.com/translate_tts?q=testing+1+2+3&tl=en_au

like image 73
CupawnTae Avatar answered Oct 17 '22 19:10

CupawnTae


By using google's ".co.uk" translate site's GET request, you can generate British English. So for example: translate.google.co.uk/translate_tts?q=Your+soundcard+works+perfectly&tl=en

like image 30
yhyrcanus Avatar answered Oct 17 '22 20:10

yhyrcanus