Speech to text API for files, links and live audio
Send a recording, a link or a live stream to one API and read back the transcript in any of 100 languages, with speaker labels and the timing of every word. Live audio can be translated while it is spoken.
npm install @vocalstack/js-sdkimport { VocalStack } from '@vocalstack/js-sdk';
const vs = new VocalStack({ apiKey: process.env.VOCALSTACK_API_KEY });
const tx = await vs.transcriptions.create({
file: './talk.mp3',
settings: { speakerLabels: 'on' },
});
const job = await vs.transcriptions.waitForJob(tx.id);
if (job.state !== 'done') throw new Error(`transcription ${job.state}`);
const { sentences } = await vs.transcriptions.transcript(tx.id);
for (const s of sentences) console.log(`[speaker ${s.speaker}] ${s.text}`);[speaker 0] Thanks for joining. Let's start with the quarterly numbers.
[speaker 1] Revenue was up twelve percent on the last quarter.
[speaker 0] Good. What drove most of it?What the API does
Everything the Dashboard does is in the API, at the same rates, under /v1.
Files and links
Upload an audio or video file, or pass a link to a public recording, a YouTube video or a post on sites such as Vimeo, SoundCloud and TikTok. The server transcribes it while you wait on its job.
Live and realtime sessions
Stream audio over one WebSocket and get each line back as it is spoken. A realtime session stores nothing. A live transcription is kept, and listeners can follow it on a share link.
100 languages
Transcribe and translate in 100 languages. Set the spoken language, or leave it out and the API detects it.
Speaker labels and word timings
Each sentence says who spoke it, and each segment carries the start and end of every word. Labels begin when a second voice is heard, or you can turn them on or off.
Translation
Translate a live stream while it is spoken, or read a finished transcript in another language by adding
lang=es.Summaries and exports
Ask for a summary and a title. Export to PDF, XLSX, SRT, VTT, TXT, Markdown or JSON, in the spoken language or a translation.
SDKs for TypeScript, Python and PHP
TypeScript runs on Node 20 and in browsers, Python 3.10 with asyncio, PHP 8.1 with Composer. Each one retries rate limits for you.
An MCP server for AI agents
Agents transcribe, search and read your transcripts through the MCP server at
/v1/mcp, with an API key or by signing in.
The endpoints you will use first
Every operation is in one OpenAPI document. These cover a file, a link and a live stream.
- POST
/v1/transcriptionsCreate a transcription from an uploaded file or a link. It answers at once with the transcription and its job. - GET
/v1/transcriptions/{id}/jobRead the job and its progress:queued,fetching,cropping,transcribing,done,failedorstopped. - GET
/v1/transcriptions/{id}/transcriptRead the sentences, segments with word timings and speakers. Addlang=for a translation. - GET
/v1/transcriptions/{id}/exportDownload PDF, XLSX, SRT, VTT, TXT, Markdown or JSON. - POST
/v1/realtime/sessionsOpen a realtime session and get the WebSocket address to stream audio to. - WS
/v1/transcriptions/{id}/eventsFollow a transcription’s job and state as they change. - MCP
/v1/mcpThe MCP server for AI agents, with the same account and keys.
Billed per second of audio
The API costs the same as the Dashboard. Translation, speaker labels, summaries and listeners are included.
- Pay as you go bills at least 5 minutes for each transcription.
- Premium and Enterprise bill every second with no minimum.
- New accounts get $5 of credit to try it.
Frequently Asked Questions
Docs, SDKs and tools
The API reference has a guide for each task, with complete programs for every SDK and for plain HTTP.
Guides
SDKs
- TypeScript
npm install @vocalstack/js-sdk - Python
pip install vocalstack - PHP
composer require vocalstack/sdk