Turn an audio clip into a transcript and subtitles
Upload authorized audio, save timed text and create subtitles while keeping formats and rounded-minute billing clear.
Start with a short recording containing clear speech in one of the supported languages. This API produces a transcript and timing information. It does not perform translation, live streaming or speaker diarization.
Choose a format and input
The JSON response includes text, segments and optional word timings. SRT and WebVTT are text subtitle formats. The website demo processes up to 15 seconds; marketplace limits and billing apply independently to the production examples below.
Replace the base64 placeholder with your file. See the tutorial for an upload example.
import os
import httpx
base_url = "https://speech-to-text-subtitles-api.p.rapidapi.com"
headers = {
"X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
"X-RapidAPI-Host": "speech-to-text-subtitles-api.p.rapidapi.com",
}
payload = {
"format": "json",
"word_timestamps": True,
"audio": {
"base64": "BASE64_AUDIO",
},
}
response = httpx.post(
base_url + "/v1/transcribe",
headers=headers, json=payload, timeout=120
)
response.raise_for_status()
print(response.json())The supported languages are Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish and Ukrainian. Language is detected automatically; do not send a language selector. Review accents, names, numbers and overlapping speech carefully.
Upload and save JSON
Install httpx and set RAPIDAPI_KEY from your subscription. Save an authorized recording as clip.wav. This multipart example lets the HTTP client provide the boundary instead of manually setting Content-Type.
import json
import os
from pathlib import Path
import httpx
host = "speech-to-text-subtitles-api.p.rapidapi.com"
headers = {
"X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
"X-RapidAPI-Host": host,
}
with Path("clip.wav").open("rb") as audio:
response = httpx.post(
f"https://{host}/v1/transcribe",
headers=headers,
files={"file": ("clip.wav", audio, "audio/wav")},
data={"format": "json", "word_timestamps": "true"},
timeout=250,
)
response.raise_for_status()
body = response.json()
assert isinstance(body["text"], str)
assert isinstance(body["segments"], list)
Path("transcript.json").write_text(
json.dumps(body, ensure_ascii=False, indent=2), encoding="utf-8"
)
print(body["text"])
print("Billed minutes:", body["billed_minutes"])
Create subtitle files
For a production request returning subtitles directly, change format to srt or vtt. Save response.text instead of calling response.json(). A separate API request can consume another rounded-minute allowance, even for the same recording.
If you already have the JSON segments, you can format their start, end and text into subtitle cues locally. The website demo does this for its SRT and WebVTT downloads, so downloading those formats does not dispatch a second transcription.
Check quality and allowance
Each successful recording rounds up independently to a whole billed audio minute, with a minimum of one minute. For example, 8 seconds counts as one minute and 65 seconds as two. Check the active marketplace listing for request limits, supported upload sizes and applicable charges.
Confidence values are model signals, not a guarantee that a statement is correct. Listen back to uncertain sections and review captions before publication. A timeout can leave the outcome uncertain; avoid rapidly resubmitting a potentially billable request. Correct 422 inputs and use bounded retries for temporary failures.
Model attribution: NVIDIA Parakeet TDT 0.6B v3, licensed CC-BY-4.0. Callable Labs is independent of NVIDIA.
Make it part of your application.
Get credentials and a production allowance from an available marketplace.