Introduction
The AudiofyText API offers all the functions that are available on our website but with more focus on application programming. It is free to use this API in the current and future development of applications as well. However, we would like to inform you that maintaining the API does not come for free on our end, so we would appreciate if you could use it with due respect. If you have any questions or encounter any problems, please do not hesitate to contact us via email or Twitter.
API Details
The AudiofyText API is available at api.audiofytext.com and supports two key operations:
- This operation allows you to generate a sound from text and it will return a unique ID of the created sound.
- This operation allows you to get the public URL of a sound given its ID, so that you can easily get and share the audio.
Discover AudiofyText on GitHub
If you're interested in the source code for AudiofyText and want to explore how it works, check out the AudiofyText GitHub Repository. This repository contains the full code for the Text-to-Speech and Speech-to-Text features, allowing you to integrate them into your own projects or contribute to the development.
Feel free to explore, fork, or contribute to the project. Happy coding!
Voice Options
The AudiofyText API has a limited set of voices which have been selected from well know and reliable services including Google Translate. The list of voices might be expanded in the future as well as removed from the list in the future as well. To help prevent any potential issues, it is recommended that you always use the shortened voice/language codes instead of the full names when making a request to the API.
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) |
eo | Esperanto |
et | Estonian |
fil-PH | Filipino |
fi-FI | Finnish |
fr-FR | French |
fr-CA | French (Canada) |
de-DE | German |
el-GR | Greek |
gu | Gujarati |
hi-IN | Hindi |
hu-HU | Hungarian |
is-IS | Icelandic |
id-ID | Indonesian |
it-IT | Italian |
ja-JP | Japanese (Japan) |
kn | Kannada |
km | Khmer |
ko-KR | Korean |
la | Latin |
lv | Latvian |
mk | Macedonian |
ml | Malayalam |
mr | Marathi |
ne | Nepali |
nb-NO | Norwegian |
pl-PL | Polish |
pt-BR | Portuguese |
ro-RO | Romanian |
ru-RU | Russian |
sr-RS | Serbian |
si | Sinhala |
sk-SK | Slovak |
es-MX | Spanish (Mexico) |
es-ES | Spanish (Spain) |
sw | Swahili |
sv-SE | Swedish |
ta | Tamil |
te | Telugu |
th-TH | Thai |
tr-TR | Turkish |
uk-UA | Ukrainian |
ur | Urdu |
vi-VN | Vietnamese |
cy | Welsh |
Operations Reference
Create Sound
Use the POST /sounds
endpoint to create a new sound file. Currently, the engine
parameter is not used, but it is included for potential future support for multiple engines. Both the voice
and text
are required parameters.
Request Example
Set the Content-Type
header 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
with the following response body:
{ "success": true, "id": "" }
Example ID: 416eda90-552e-11e7-9a60-63d42f732a9c
On Failure:
If the request fails, you will receive a status code of 400
or 500
with the following response body:
{ "success": false, "message": "Request failed due to..." }
Retrieve Sound
Use the GET /sounds/:id
endpoint to check the current status of a requested sound and retrieve the public URL for the MP3 file.
Response
On Success:
If the request is still being processed, the status will be Pending
:
{ "status": "Pending" }
Once the request has been fulfilled, you will receive a Done
status and the public URL for the MP3 file:
{ "status": "Done", "location": "https://hostname/path/to/audio.mp3" }
If there was an issue fulfilling the request, you will receive an error status and a corresponding message:
{ "status": "Error", "message": "Failed to create sound due to..." }