# 1. send your script as timed segments - one speaker per line
curl -X POST https://api.rask.ai/v2/transcriptions \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"segments": [
{"speaker": "SPEAKER_00", "start": "00:00:00,500", "end": "00:00:04,800",
"src": {"text": "Welcome to the new dashboard.", "lang": "en"},
"dst": {"text": "Bienvenido al nuevo panel.", "lang": "es-mx"}}
]}'
# 2. voice the script over your video
curl -X POST https://api.rask.ai/v2/projects \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d "{\"video_id\": \"$VIDEO_ID\", \"dst_lang\": \"es-mx\", \"transcript_id\": \"$TRANSCRIPT_ID\"}"# When status is merging_done, read the voiceover links
curl -s https://api.rask.ai/v2/projects/$ID -H "Authorization: Bearer $TOKEN" \
| jq '{status, voiceover, translated_audio, translated_video}'



Upload the video or audio recording your voiceover belongs to, using a file or a supported media URL. Its timeline provides the timing for your script.
Create a transcript from text segments with timestamps and speakers, or from an SRT file, then create the project with its transcript_id and a target language.
List the voices, assign a preset or a clone to each speaker, regenerate if needed, then download the voiceover, the video and the subtitle files.
# pip install git+ssh://[email protected]/braskai/rask-sdk.git@main
import asyncio
from rask_sdk import clients, enums, schemas
async def wait(client, job):
while job.status is not enums.ProjectStatus.MERGING_DONE:
await asyncio.sleep(10)
job = await client.get_project(project_id=job.id)
return job
async def main():
client = clients.RaskSDKClient(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)
script = await client.create_transcription(data=schemas.TranscriptionCreate(segments=[
schemas.SegmentCreate(speaker="SPEAKER_00", start="00:00:00,500", end="00:00:04,800",
src=schemas.SegmentTextCreatePatch(text="Welcome to the new dashboard.", lang="en"),
dst=schemas.SegmentTextCreatePatch(text="Bienvenido al nuevo panel.", lang="es-mx")),
]))
job = await wait(client, await client.create_project(data=schemas.ProjectCreate(
video_id=VIDEO_ID, dst_lang="es-mx", transcript_id=script.id)))
# pick a female AI voice preset from the library for SPEAKER_00
voices = await client.get_project_voices(project_id=job.id)
preset = next(v for v in voices if v.gender == "female")
await client.patch_project(project_id=job.id, data=schemas.ProjectPatch(voice={**job.voice, "SPEAKER_00": preset.id}))
job = await wait(client, await client.generate_project(project_id=job.id))
print(job.voiceover, job.translated_video)
asyncio.run(main())import time, requests
AUTH = "https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token"
API = "https://api.rask.ai"
token = requests.post(AUTH, auth=(CLIENT_ID, CLIENT_SECRET),
data={"grant_type": "client_credentials"}).json()["access_token"]
h = {"Authorization": f"Bearer {token}"}
def wait(pid):
while (p := requests.get(f"{API}/v2/projects/{pid}", headers=h).json())["status"] != "merging_done":
time.sleep(10)
return p
script = requests.post(f"{API}/v2/transcriptions", headers=h, json={"segments": [
{"speaker": "SPEAKER_00", "start": "00:00:00,500", "end": "00:00:04,800",
"src": {"text": "Welcome to the new dashboard.", "lang": "en"},
"dst": {"text": "Bienvenido al nuevo panel.", "lang": "es-mx"}},
]}).json()
pid = requests.post(f"{API}/v2/projects", headers=h, json={
"video_id": VIDEO_ID, "dst_lang": "es-mx", "transcript_id": script["id"]}).json()["id"]
project = wait(pid)
voices = requests.get(f"{API}/v2/projects/{pid}/voices", headers=h).json()
preset = next(v for v in voices if v["gender"] == "female")
requests.patch(f"{API}/v2/projects/{pid}", headers=h,
json={"voice": {**project["voice"], "SPEAKER_00": preset["id"]}})
requests.post(f"{API}/v2/projects/{pid}/generate", headers=h)
print(wait(pid)["voiceover"])// no dependencies, Node 18+ global fetch
const API = 'https://api.rask.ai';
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const auth = await fetch('https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token', {
method: 'POST',
headers: { Authorization: 'Basic ' + btoa(`${CLIENT_ID}:${CLIENT_SECRET}`) },
body: new URLSearchParams({ grant_type: 'client_credentials' }),
}).then((r) => r.json());
const h = { Authorization: `Bearer ${auth.access_token}`, 'Content-Type': 'application/json' };
const call = (method, path, body) => fetch(API + path, { method, headers: h, body: body && JSON.stringify(body) }).then((r) => r.json());
const wait = async (id) => { let p; while ((p = await call('GET', `/v2/projects/${id}`)).status !== 'merging_done') await sleep(10000); return p; };
const script = await call('POST', '/v2/transcriptions', { segments: [
{ speaker: 'SPEAKER_00', start: '00:00:00,500', end: '00:00:04,800',
src: { text: 'Welcome to the new dashboard.', lang: 'en' },
dst: { text: 'Bienvenido al nuevo panel.', lang: 'es-mx' } },
] });
const { id } = await call('POST', '/v2/projects', { video_id: VIDEO_ID, dst_lang: 'es-mx', transcript_id: script.id });
const project = await wait(id);
const voices = await call('GET', `/v2/projects/${id}/voices`);
const preset = voices.find((v) => v.gender === 'female');
await call('PATCH', `/v2/projects/${id}`, { voice: { ...project.voice, SPEAKER_00: preset.id } });
await call('POST', `/v2/projects/${id}/generate`);
console.log((await wait(id)).voiceover);# 1. token (valid 1 hour - cache and reuse it)
TOKEN=$(curl -s -X POST https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token \
-u "$CLIENT_ID:$CLIENT_SECRET" -d "grant_type=client_credentials" | jq -r .access_token)
# 2. your script as an SRT file in the target language
TRANSCRIPT_ID=$(curl -s -X POST "https://api.rask.ai/v2/transcriptions/srt?dst_lang=es-mx" \
-H "Authorization: Bearer $TOKEN" -F "dst=@script_es-mx.srt" | jq -r .id)
# 3. voice it over the video
ID=$(curl -s -X POST https://api.rask.ai/v2/projects \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d "{\"video_id\": \"$VIDEO_ID\", \"dst_lang\": \"es-mx\", \"transcript_id\": \"$TRANSCRIPT_ID\"}" | jq -r .id)
# 4. when status is merging_done, read the voiceover links
curl -s https://api.rask.ai/v2/projects/$ID -H "Authorization: Bearer $TOKEN" \
| jq '{status, voiceover, translated_video}'<?php
use GuzzleHttp\Client;
$http = new Client(['base_uri' => 'https://api.rask.ai']);
$json = fn($r) => json_decode($r->getBody(), true);
$auth = $json((new Client)->post('https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token',
['auth' => [$clientId, $clientSecret], 'form_params' => ['grant_type' => 'client_credentials']]));
$h = ['Authorization' => 'Bearer ' . $auth['access_token']];
$script = $json($http->post('/v2/transcriptions', ['headers' => $h, 'json' => ['segments' => [[
'speaker' => 'SPEAKER_00', 'start' => '00:00:00,500', 'end' => '00:00:04,800',
'src' => ['text' => 'Welcome to the new dashboard.', 'lang' => 'en'],
'dst' => ['text' => 'Bienvenido al nuevo panel.', 'lang' => 'es-mx'],
]]]]));
$p = $json($http->post('/v2/projects', ['headers' => $h, 'json' => [
'video_id' => $videoId, 'dst_lang' => 'es-mx', 'transcript_id' => $script['id']]]));
while ($p['status'] !== 'merging_done') {
sleep(10);
$p = $json($http->get("/v2/projects/{$p['id']}", ['headers' => $h]));
}
echo $p['voiceover'];{"label": "Renata", "gender": "female", "sample_src": "https://..."} AI voice preset
{"label": "Gerardo", "gender": "male", "sample_src": "https://..."} AI voice preset
{"label": "Maria Lopez", "gender": "auto", "sample_src": "https://..."} custom voice clone
{"label": "Voice Clone", "gender": "auto", "sample_src": null} instant voice clone

es-mx and es-es alike. The project records glossary_version, so later edits never silently change finished work.Yes, for video voiceover. Send your script as timed text segments or an SRT file together with a video, and the API generates natural sounding speech timed to the picture, in AI voices or voice clones, with subtitles and audio tracks in the same project.
Rask generates speech for complete projects and delivers files, which suits published video, training and marketing content. For voice agents, contact centers and other low latency applications that need audio within seconds, a streaming text to speech API is the better fit.
Speech is delivered when generation completes for the project: the voiceover as WAV on eligible plans, the mixed audio and the video. The API does not stream audio chunks or audio bytes while it generates.
Create a transcript with POST /v2/transcriptions from segments that each have a speaker, a start and end time in HH:MM:SS,mmm format, and the text. You can also upload an SRT file to POST /v2/transcriptions/srt. Then pass the transcript_id when you create the project.
Every target locale has AI voice presets with a set gender in the voice library. Get the options for a project with GET /v2/projects/{id}/voices and assign one per speaker by voice ID. In supported voice cloning languages, you can also use voice clones.
Yes. Create a Custom Voice Clone once in the Rask app with the speaker's consent, then assign its voice ID to any speaker through the API in supported voice cloning languages. It works well as a consistent brand voice.
Choose from 135+ language and regional options. Write the script in one language and Rask translates it, or send the script already in the target language. AI voices are available for every target locale.
The API takes plain text per segment. To guide pronunciation, adjust the spelling in the script text. Glossaries control how terms are translated, not how they are pronounced.
The delivery follows the selected voice and your text, including punctuation. For emotional range that matches a real performance, a voice clone of the original speaker keeps more of their voice identity.
You can use a video or an audio recording. Upload the source media and provide a timed script to generate the voiceover along its timeline. An uploaded media file is required.
No. Usage is billed per minute of video, rounded up to the next whole minute, from the same minutes pool as the Rask app. Additional minutes cost $3/min on eligible standard plans. Enterprise pricing is tailored to your agreement. Re-dubbing is billed on changed segments, with a one-minute minimum per charged run.
Start with a free trial in the Rask app, no card required, to hear the voices on your own video. API access is available on Creator Pro, Business and Enterprise plans, with capabilities determined by your plan.
API access is available on Creator Pro, Business and Enterprise plans, with capabilities determined by your plan. You generate your client id and secret in the app and start calling immediately. Enterprise terms, volume pricing and custom language coverage go through our team.