How to create mp3 from text with Google TTS?

inpost picture inpost · Nov 3, 2017 · Viewed 9.5k times · Source

How to create mp3 from any text with Google TTS?

1) I try to find google.translate API, but finded only "audio to text", except "text to audio"!

2) I try to find SpeechSynthesis convert to mp3, but again find nothing!

3) I find only site "beta.soundoftext.com", they generate mp3 audio file without API interface.

So, can anyone help me, please. I searching for any ways to convert text to SPEECH for my web-site (Dedicated Server). Thank you!

Answer

ncpierson picture ncpierson · Nov 13, 2017

I'm the creator of Sound of Text.

My site does have an API! (As of last week)

You can find the documentation for the API here: https://soundoftext.com/docs.

However, behind the scenes, I'm just using an npm library that automatically generates the Google Translate TTS link for me. Specifically, I'm using this library: https://www.npmjs.com/package/google-tts-api

I'm pretty sure every popular language has a library that does a similar thing, and I can help you find it if you tell me what language you prefer to use.

Or you can just use my API =)