Introduction
The TTSFree.online API provides all the features available on our website, tailored specifically for seamless integration into your applications. This API is freely accessible for both current and future app development projects. However, we kindly remind you that maintaining and supporting this service incurs costs on our part. We greatly appreciate your considerate use of the API. Should you have any inquiries or face any issues, feel free to reach out to us via email or connect with us on Twitter—we’re here to help!
API Details
The TTSFree.online API, accessible at api.ttsfree.online, offers two primary functions to enhance your projects:
- Text-to-Sound Generation: Convert text into audio effortlessly, and receive a unique ID for each generated sound file.
- Retrieve Audio URL: Obtain the public URL for any audio file using its unique ID, making it simple to access and share the generated audio.
Explore TTSFree.online on GitHub
Interested in diving deeper into the technology behind TTSFree.online? Visit our GitHub Repository. Here, you'll find the complete source code for both Text-to-Speech (TTS) and Speech-to-Text (STT) functionalities. Whether you're looking to integrate these features into your own applications or contribute to the project, the repository is open for exploration and collaboration.
Feel free to fork the project, suggest improvements, or experiment with the code to suit your needs. We wish you happy coding!
Available Voice Options
The TTSFree.online API offers a curated selection of voices from trusted providers, such as Google Translate. While the list of voices may expand or change over time, we recommend using standardized voice or language codes (rather than full names) in your API requests to ensure compatibility and avoid potential issues.
This version improves readability, enhances clarity, and ensures better SEO performance.List of Supported Voices
Code | Voice |
af-ZA | Afrikaans |
sq | Albanian |
ar-AE | Arabic |
hy | Armenian |
bn-BD | Bengali (Bangladesh) |
bn-IN | Bengali (India) |
bs | Bosnian |
my | Burmese (Myanmar) |
ca-ES | Catalan |
cmn-Hant-TW | Chinese |
hr-HR | Croatian |
cs-CZ | Czech |
da-DK | Danish |
nl-NL | Dutch |
en-AU | English (Australia) |
en-GB | English (United Kingdom) |
en-US | English (United States) |
fr-FR | French |
de-DE | German |
el-GR | Greek |
hi-IN | Hindi |
it-IT | Italian |
ja-JP | Japanese |
ko-KR | Korean |
ru-RU | Russian |
es-ES | Spanish |
tr-TR | Turkish |
uk-UA | Ukrainian |
vi-VN | Vietnamese |
Operations Reference
Create Sound
Use the POST /sounds
endpoint to generate a new sound file. While the engine
parameter is currently unused, it is included to support potential future updates for multiple engines. The parameters voice
and text
are mandatory for this request.
Request Example
Ensure the Content-Type
header is set to application/json
, and structure your request body as follows:
{ "engine": "Google", "data": { "text": "Hello, world", "voice": "en-US" } }
Response
On Success:
You will receive a status code of 200
along with the following response body:
{ "success": true, "id": "" }
Example ID: 416eda90-552e-11e7-9a60-63d42f732a9c
On Failure:
If the request fails, a status code of 400
or 500
will be returned with the following response:
{ "success": false, "message": "Request failed due to..." }
Retrieve Sound
Use the GET /sounds/:id
endpoint to check the status of a sound request and obtain the public URL for the generated MP3 file.
Response
On Success:
If the sound is still being processed, the status will be returned as Pending
:
{ "status": "Pending" }
Once processing is complete, the response will include a Done
status and the public URL for the MP3 file:
{ "status": "Done", "location": "https://hostname/path/to/audio.mp3" }
If there was an error processing the request, the response will indicate an Error
status along with a message explaining the issue:
{ "status": "Error", "message": "Failed to create sound due to..." }