Google translate text-to-speech in British
Asked Answered
W

2

9

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

Wilterdink answered 13/6, 2012 at 15:49 Comment(0)
A
14

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

Anceline answered 14/6, 2012 at 12:37 Comment(1)
Works most of the time, but not always. See https://mcmap.net/q/1122762/-google-translate-text-to-speech-in-britishEllerd
F
15

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

Fanjet answered 21/12, 2012 at 19:34 Comment(1)
A weird side-effect using this approach with 'en_au', it reads a comma as pronounced 'comma'.Cynic
A
14

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

Anceline answered 14/6, 2012 at 12:37 Comment(1)
Works most of the time, but not always. See https://mcmap.net/q/1122762/-google-translate-text-to-speech-in-britishEllerd

© 2022 - 2024 — McMap. All rights reserved.