TTSForFree

v1.0.0
io.github.CalmNguyen/ttsforfree Checked 4 days ago Published 1 month ago

Generate AI voices, text-to-speech, subtitles, transcription, and video localization.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_languages List languages

List every language supported by TTSForFree text-to-speech. Returns language codes to pass to list_voices.

list_voices Find voices

Search the AI voice catalog for one language. Each result has a `voice` token (v1:...) - pass it unchanged as `voice` to text_to_speech, multi_voice_to_speech or srt_to_speech. Results are sorted by popularity; `can_use=false` means the user's plan cannot use that voice. Prefer the user's favorite or custom voices when they exist.

ParameterTypeDescription
language *stringLanguage code from list_languages, e.g. en, vi, es, ja.
genderstring
limitinteger
only_usablebooleanHide voices the current plan cannot use.
providerstringOptional voice engine filter. Gemini/OpenAI voices are the most expressive.
querystringOptional keywords matched against name, style, persona and use case, e.g. 'warm narrator', 'news', 'young'.

get_voice_details Voice details

Get full metadata for one voice token: persona, use case, accent, pitch, styles, preview audio and credit cost.

ParameterTypeDescription
voice *stringVoice token (v1:...) from list_voices, favorites or custom voices.

list_my_custom_voices My custom voices

List the user's personal voices created with Voice Design (from a text prompt) or Voice Clone (from an audio sample), plus the remaining custom-voice quota. Use `voice` from the result in any speech tool.

list_favorite_voices My favorite voices

List the voices the user marked as favorites, in their saved order. Check this first when the user did not name a voice.

add_favorite_voice Add favorite voice

Save a voice to the user's favorites (only when the user asks).

ParameterTypeDescription
voice *stringVoice token (v1:...) from list_voices.

remove_favorite_voice Remove favorite voice

Remove a voice from the user's favorites (only when the user asks).

ParameterTypeDescription
voice *stringVoice token (v1:...) from list_favorite_voices.

design_custom_voice Design a custom voice

Create a new personal AI voice from a natural-language description (Gemini Voice Design). Uses one slot of the user's custom-voice quota - confirm with the user first. Good for a unique narrator or a character voice in a video/podcast. Returns the new `voice` token.

ParameterTypeDescription
display_name *string
gender *string
language_code *stringBCP-47 locale, e.g. en-US, vi-VN.
prompt *stringDescribe age, accent, timbre, personality, energy and pace. Example: 'Calm male documentary narrator in his 40s, deep warm timbre, slow confident pace, neutral American accent.'

get_account_status Account status

Show the user's plan tier, remaining characters/credits, max characters per request, max blocks per multi-voice/SRT job and API rate limits. Call before large jobs.

text_to_speech Text to speech

Convert one text into one MP3 with one voice. Use for narration, voiceover scripts, articles, lessons, announcements or any audio whose length can follow the speech. Consumes credits (characters x voice rate). Returns job_id, status and audio_url when ready.

ParameterTypeDescription
text *stringText to read. Plain text; long text is split and merged automatically.
voice *stringVoice token (v1:...).
pitchnumberOnly some providers support pitch.
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

multi_voice_to_speech Multi-voice audio (podcast / dialogue)

Render ordered segments, each with its own voice, into ONE merged MP3. Use for podcasts, dialogues, interviews, audio dramas or explainer videos with several speakers when there are no fixed timestamps. Consumes credits.

ParameterTypeDescription
segments *array
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

srt_to_speech Subtitles to speech (video voiceover / dubbing)

Create ONE MP3 that follows a subtitle timeline: every cue starts at its timestamp and speech speed auto-fits the cue duration. Use for video voiceover, dubbing translated subtitles, YouTube localization, tutorials and any edit where audio must line up with existing video. Pass either raw `srt` (SRT or WebVTT text) or `segments` with start_ms/end_ms. For several speakers set `speaker_voices` and prefix cue text with '[Name]' or 'Name:'. The resulting MP3 starts at 00:00 of the video, so it can be muxed directly with ffmpeg (commands are returned). Consumes credits.

ParameterTypeDescription
max_speech_ratenumberHighest auto-fit speed when a cue is too short for its text.
min_speech_ratenumberLowest auto-fit speed. Set min = max for a fixed speed.
segmentsarrayAlternative to srt: timed segments.
speaker_voicesobjectMap speaker name -> voice token, e.g. {"Host": "v1:...", "Guest": "v1:..."}.
srtstringFull SRT or WebVTT content.
voicestringDefault voice token for cues without a speaker/voice.
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

get_job_status Job status

Check a speech job created earlier. Returns status (PENDING | SUCCESS | ERROR) and audio_url once SUCCESS. Never guess or fetch an audio URL before SUCCESS.

ParameterTypeDescription
job_id *integer
job_type *stringsingle = text_to_speech, multi = multi_voice_to_speech, srt = srt_to_speech.
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

list_recent_jobs Recent jobs

List the user's most recent speech jobs with status and audio URLs, to reuse earlier audio instead of paying again. For other tools (Video to SRT, video dubbing, SRT translation) or a date range, use list_history.

ParameterTypeDescription
job_typestring
limitinteger

list_history History of every tool

The user's history for one tool, newest first, filtered by date: video_to_srt (transcriptions: job_id, SRT preview; full SRT with get_transcription), video_localization and voice_to_voice (job_guid, status, final_video_url, audio_url, translated_srt_url), srt_to_speech / multi_voice / text_to_speech (job_id, audio_url), srt_translation (translation_id; full translated SRT with get_srt_translation). Use it to find earlier results instead of paying again, or to list what the user made in a period.

ParameterTypeDescription
type *string
from_datestringYYYY-MM-DD (UTC). Default: 7 days before to_date (30 for srt_translation and video_localization).
limitinteger
pageinteger
to_datestringYYYY-MM-DD (UTC), inclusive. Default: today.

get_srt_translation Translated SRT from history

Get one SRT translation from list_history (type srt_translation) as a ready-to-save SRT file in the target language, plus the original text of each cue.

ParameterTypeDescription
translation_id *integer
include_originalbooleanAlso return the original line of each cue.

get_job_detail Job segments (for Remotion / editors)

Get a multi_voice_to_speech or srt_to_speech job with every segment: text, voice and its own audio_url, plus the merged audio. Use it to build captions or a Remotion/NLE timeline (one <Sequence> per segment; measure each file's duration in the renderer).

ParameterTypeDescription
job_id *integer

create_upload_url Upload a video/audio file

Get a one-time URL to upload a local video or audio file (mp4, mov, webm, mkv, mp3, wav, m4a...) up to 2 GB. Upload with HTTP PUT of the raw bytes, e.g. `curl -T video.mp4 "<upload_url>"` (valid 15 minutes), then pass `public_url` to transcribe_media or localize_video. Only files uploaded here (or on ttsforfree.com) are accepted; YouTube and other external links are never downloaded. If you cannot run commands, ask the user to upload the file on https://ttsforfree.com/en/video-localization/ and paste the file link.

ParameterTypeDescription
file_name *stringOriginal file name with extension, e.g. lesson-01.mp4
file_size_bytesinteger
permanentbooleanSite admins only: store in site-assets/ (never auto-deleted) for files the website itself shows, e.g. landing or tutorial videos and posters. Normal uploads are temporary and removed after a few days.

transcribe_media Transcribe video/audio to SRT

Speech-to-text for an uploaded video or audio file: returns timestamped SRT (the timeline to rewrite, translate or re-voice with srt_to_speech). Credits are charged per second of media, measured by the server. Use language = the spoken language code from list_languages.

ParameterTypeDescription
language *stringSpoken language code, e.g. vi, en, ja.
media_url *stringpublic_url from create_upload_url (or a ttsforfree CDN link).
multi_speakerbooleanSeveral people talk (drama, interview, podcast): the whole file is sent at once for speaker detection, and each SRT cue starts with [Speaker N] (same N = same person across the whole file).
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

get_transcription Transcription status

Check a transcribe_media job and get its SRT once finished.

ParameterTypeDescription
job_id *integer
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

estimate_video_localization Estimate video dubbing cost

Estimate the credits to dub one video into one or more languages (speech-to-text + translation + voice + video merge) before running localize_video. Pass video_url (duration is measured) or duration_seconds.

ParameterTypeDescription
source_language *string
targets *arrayOne entry per target language (the server allows 10 per job by default).
duration_secondsnumber
video_urlstring

localize_video Dub a video into other languages

Full automatic dubbing of an uploaded video: transcribe once, translate, voice every target language with its own voice and render a dubbed video per language. Each language returns an audio_url (voice track aligned to the original timeline - upload it to YouTube Studio as a multi-language audio track) and a final_video_url. Takes several minutes: returns job_guids immediately; poll get_localization_status. Confirm the cost with estimate_video_localization for long videos. Several characters (drama, film, interview)? Set multi_speaker = true: speakers are detected on the whole video and each o…

ParameterTypeDescription
source_language *stringSpoken language of the video, e.g. vi.
targets *arrayOne entry per target language (the server allows 10 per job by default).
video_url *stringpublic_url from create_upload_url.
multi_speakerbooleanDub each character with its own voice. Speakers are detected on the whole video (labels 0, 1, 2... in order of appearance).
original_audio_volume_percentintegerKeep the original sound (music/effects) under the new voice at this volume in the dubbed video. 0 = remove.
speaker_voice_stepstringmulti_speaker without speaker_voices: pause for voice choice after transcription (srt) or after translation (translated, shows translated sample lines).

get_localization_status Video dubbing status

Status of localize_video jobs: current step, and when Completed the dubbed audio_url, final_video_url and translated SRT for each language. multi_speaker jobs waiting for voices have waiting_speaker_voices = true and a `speakers` list (lines, seconds, sample and translated sample lines) - then call set_speaker_voices.

ParameterTypeDescription
job_guids *array
wait_secondsintegerSeconds the server waits for the audio before returning. If the job is still PENDING, call get_job_status later with the returned job_id.

set_speaker_voices Choose a voice per character

For a multi_speaker localize_video job waiting at WaitingSpeakerVoices: give each speaker (key = speaker label from get_localization_status, e.g. "0") a voice token for that job's language, then dubbing continues. Speakers you leave out use the job's main voice. Pick voices that fit each character (gender, age, tone from the sample lines) and confirm with the user. translate_first = true continues to translation and pauses again with translated sample lines. Can also be called earlier, while the job is still transcribing or translating.

ParameterTypeDescription
job_guid *stringjob_guid of one language from localize_video.
speaker_voicesobject{"0": "v1:...", "1": "v1:..."}
translate_firstbooleanTranslate first and choose voices after (pauses again).

get_speaker_lines List subtitle lines with their speaker

For a multi_speaker localize_video job: every source subtitle line with block_id, time, detected speaker and (after translation) the translated line. Use it when speaker detection looks wrong (fewer speakers than characters, a child merged with an adult, a line given to the wrong person): read the lines, work out who says each one from the story, then fix them with set_speaker_lines before set_speaker_voices.

ParameterTypeDescription
job_guid *stringjob_guid of one language from localize_video.

set_speaker_lines Fix the speaker of subtitle lines

For a multi_speaker localize_video job that has not started voicing yet (e.g. WaitingSpeakerVoices): move lines to another speaker. Send only the lines to change; a new speaker number (e.g. "2" when only 0 and 1 exist) adds a character. Applies to every language of the same video that has not started voicing. The job does not continue: call set_speaker_voices afterwards (include a voice for any new speaker).

ParameterTypeDescription
job_guid *stringjob_guid of one language from localize_video.
lines *array

get_publishing_status Publishing accounts and limits

Check where the user can publish a finished video: which platforms this site offers (YouTube, X), which of the user's accounts are connected, today's YouTube limit, the credit cost of an X post and the user's credits. Call this before offering to publish and before publish_video. If nothing is connected, give the user `connect_url` (connecting needs a browser sign-in) and call this again when they say it is done.

publish_video Publish a video to YouTube or X

Post a finished video to one of the user's connected accounts. Only call after the user explicitly agreed to publish and confirmed the title (YouTube) or post text (X): this posts publicly on their behalf. YouTube: posted right away, free, needs `title`; set `privacy` (default public). X: posted now or at `scheduled_at`, needs `text` (max 280 characters, links count as 23); costs credits charged only when the post goes out - tell the user the cost from get_publishing_status first. `video_url` must be a TTSForFree link: final_video_url from get_localization_status, or public_url of a video uplo…

ParameterTypeDescription
video_url *stringTTSForFree video link (final_video_url or public_url).
account_idintegeraccount_id from get_publishing_status. Required when several accounts share a platform.
descriptionstringYouTube description.
platformstringUse when the user has exactly one account on that platform.
privacystringYouTube visibility. Default public.
scheduled_atstringX only: ISO 8601 time with offset, e.g. 2026-11-20T09:00:00+07:00. Omit to post now. Ask the user for their time zone if unclear.
tagsstringYouTube tags, comma separated.
textstringX post text.
titlestringYouTube title (no < or >).

list_published_posts Recent published and scheduled posts

The user's recent YouTube / X posts made through TTSForFree, newest first: status (scheduled, uploading, posted, failed, cancelled), the live post_url once posted, the scheduled time and any error message. Use it after publish_video to report the live link.

ParameterTypeDescription
limitinteger

cancel_scheduled_post Cancel a scheduled post

Cancel a post that is still scheduled (or failed) so it will not be published. A post that is already uploading or posted cannot be cancelled. No credits are charged for cancelled posts.

ParameterTypeDescription
post_id *integer