3 Free Text to Speech API for on Demand TTS Conversion

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




Here are some best free text to speech APIs for on demand TTS conversion. Here I have listed some very powerful online services to convert text to speech. To convert a piece of text to audio, you only have to send an API request to a specific end point in order to get the final output. To use these TTS services, you have to obtain the API credentials and then you can easily use them from your web and desktop applications. Also, if you want then you can use them from terminal using command line tools like cURL or Httpie.

I have added some really nice TTS services here for you to use. You will just have to sign up and get the API key in order to use them. And I have also added a simple trick to use Google Translate for text to speech. In the free plan there are some limitations but that is more than enough for lite and individual use. You just have to create a special URL and then use browser to make request and get the final file in MP3 format. There are some additional parameters that you can use for the same and then you can.

3 Free Text to Speech API to for on Demand TTS Conversion

3 Free Text to Speech API for on Demand TTS Conversion:

Use Google Translate for TTS

Google has one of the best speech synthesis tools and many of them we use in day to day as well. One popular tool by Google is its Translate service where you enter some text and choose a target language. And along with the translation, it generates the corresponding speech as well. And that is what we want so we can capture that using some tools and tricks. There is a trick to use Google Translate as TTS service and you will like it. You just need to have some knowledge of the cURL and URL encoding. And this method doesn’t require any API key or token.

The very first thing you have to do is make sure that you have cURL installed. It is not included by default in Windows. After that, you use the following URL to make requests and then you are done. It will download an MP3 file on your PC which contains the speech based on the input text.

Syntax: curl 'https://translate.google.com/translate_tts?ie=UTF-8&q=InputTextEncoded&tl=en&client=tw-ob' -H 'Referer: http://translate.google.com/' -H 'User-Agent: stagefright/1.2 (Linux;Android 5.0)' > google_tts.mp3

Example: curl 'https://translate.google.com/translate_tts?ie=UTF-8&q=Hello%20i love%20free%20software&tl=en&client=tw-ob' -H 'Referer: http://translate.google.com/' -H 'User-Agent: stagefright/1.2 (Linux;Android 5.0)' > google_tts.mp3

Google Translate as TTS

In the above command, you just have to change the “InputTextEncoded” parameter. This is the input text that you want to get as an audio. You can give any text here but have to make sure that it is encoded. To encode the input text, you can use some online URL encoder tools.

In the screenshot above, you can see how this command works for text to speech conversion. You just execute above command and it will instantly start downloading an MP3 file. It will save the final MP3 file in current directory and default name for the file is “google_tts.mp3” but you can change that easily.

Amazon Polly

Amazon Polly is one of the best TTS service out there that you can use. However, it is free in the free tier of Amazon Cloud. The limit for free usage of this service is 5 million characters per month. You can use it as a web application and as an API too. There are a lot of features in this text to speech service which are ideal to be used in professional work. The best part is that it supports SSML and you can opt for different audio formats as well for the final output but MP3 is the default one. It has a long list of languages and region that you can specify in the API and then get the output.

To get Amazon Polly, you will have to sign up for AWS and then you can subscribe to Polly. You can see the API documentation and then use that in your applications. There is a pretty web interface for this service as well for non technical users. The major use of this text to speech service is in generating automated voice for YouTube videos.

Above, you can see the UI of Amazon Polly. If you have a valid credit card then you can sign up for a AWS free tier that lasts in a year. After that, you can just learn basic features and then go through the API docs to understand the working and functionality. If you know SSML then it will be a pro to use this. With SSML, you can generate a customized voice and get that in an audio file. Apart from MP3, it supports OGG, PCR.

Voice RSS

VoiceRSS text to speech api

Voice RSS is yet another service which can be used as nice text to speech API. You can use easily in your desktop and mobile application for on demand text to speech conversion. It uses a very simple syntax for the API call URL that you can use in browser or in command line tools like wget, cURL, Httpie. It supports various languages for text to speech conversion with some other additional features. It supports audio formats like MP3, WAV, AAC, OGG, and CAF. Also, you can opt to get the final speech in different bit rates and frequency as explained on its documentation page.

No matter in what application you want to use this API, you are free to do that. You just sign up for a free account and then get the API key for you. After that, you can use the following syntax of the API to make calls. Do note that, here it also uses the encoded format for the input text. In the free plan of this service, you can make 350 requests per day and SSML not supported.

Syntax: http://api.voicerss.org/?key=ApIKey&hl=en-us&src=InputTextEncoded

Example: http://api.voicerss.org/?key=c8d0xxxxxc0c5&hl=en-us&src=Hello,%20this%20is%20i%20love%20free%20software%20test

When you paste the above URL in the address bar of the browser, it will give you an audio file as output. There are some other parameters you can specify in API call URL such as audio format, input language audio rate and much more. For some additional details, you can see the API page to learn these things.

Final thoughts

These are the only free Text to Speech APIs I could find that you can use reliably. You just get the API key or API credentials by signing up for them and the start using them easily. If you are from technical background then you will easily understand how to use these and you can tell me what you think about them. And also if you know some other free service apart from GCP and Azure to do the same then you can tell me.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer