Wednesday, May 8, 2013

How to get MP3 audio recordings of your target language from Google Translate

The following instructions are a manual process to add audio from Google Translate, but you can also accomplish the same automatically for multiple cards at the same time using AwesomeTTS.

So I've been dabbling in Korean a bit and stumbled across a helpful suggestion on How to Study Korean: if you want to hear a word in your target language pronounced, you can go to Google Translate, copy and paste the word in, make sure your target language is selected, and then press the listen button to hear it.

While that has its uses, what I really wanted was a way to get an MP3 of that audio so I could add it to Anki for the Korean flashcards I'm making. Sure enough, there's a way to do that too.

With a little help from StackOverflow, it wasn't very hard to figure out how to pull this off. This was tested in Chrome, so your mileage in other browsers may vary.

  1. Copy and paste this into your browser's URL field:
    http://translate.google.com/translate_tts?tl=XX&q="TEXT"

  2. Replace XX with the two-letter ISO 639-1 code for your target language, which can be found here. Some common ones are "de" for German, "en" for English, "es" for Spanish, "fr" for French, "it" for Italian, "ja" for Japanese, "ko" for Korean, "pt" for Portuguese, and "zh" for Chinese.

  3. Replace TEXT with whatever text you want to hear.

  4. Press return. You should now be able to play the audio in the browser window. A couple examples:
    http://translate.google.com/translate_tts?tl=es&q="¿Dónde está el carro?"

    http://translate.google.com/translate_tts?tl=zh&q="车在哪儿呢?"

  5. Right click in browser window and select "Save As…".

  6. Save your MP3 file wherever you like.
If you're looking to make a whole bunch of MP3s, as I am, you can use this Excel file to help you do that. It automatically generates the URL after you input the word and the word's language in the blue cells. In lieu of copying and pasting whole URLs, it's also pretty easy to just swap the TEXT part out as many times as needed.

Although it's also not that hard to get audio files from RhinoSpike, using Google Translate has the benefit of immediate gratification (no need to wait for someone to record something for you, or needing to make recordings yourself to get to the front of the recording queue). On the other hand, it's a computer voice, so while it works pretty well for short words or phrases, intonation and pacing will be a bit weird for longer selections of text.

12 comments:

  1. That was exactly my take on the voices. The last time I checked it out a few years back it was kind of terrible, but the quality has improved such that it is a useful tool, even if it has it's limitations.


    I just installed AwesomeTTS to make it easier, but I like how Download Audio gets Japanese pitch accent right. I'll have to give that a go too. Any chance you've tried AwesomeTTS and can compare the two?

    ReplyDelete
  2. Awesome. The excel file is a great help too.

    ReplyDelete
  3. Easiest way is to use lingbit.com

    ReplyDelete
  4. That does seem to be a bit easier than the process I've laid out above, but it doesn't beat AwesomeTTS for getting audio into Anki.

    ReplyDelete
  5. I tried this and get 404 errors. I'm probably doing something wrong. If I get it working could I use an ISO code for a language not in google translate? I am studying another language written in Cyrillic and google translate sees it as Russian (it also does this with the webpages when asking to translate them), the pronounciation comes closes enough for one of the vowels

    ReplyDelete
  6. Another website to simplify the process: soundoftext.com

    ReplyDelete
  7. Gr8 TY very much! Exactly what I was looking for. Tried it works great.

    ReplyDelete
  8. how to translate a audio recording of chinese to English

    ReplyDelete
  9. Thanks for your sharing. This make my life easier. I'm looking this for some times. This solved my question.

    ReplyDelete
  10. It works for short phases. I am wondering if it possible to get a 500+ chinese character passage translated?

    ReplyDelete
  11. Good collection available on this site and much beneficial for users. I am already use this but i take so much time to install audio translation
    like 1 or half hour. So i think every one did not want to spend much time for this purpose .

    ReplyDelete