Scribe v2 Realtime
Real-time speech-to-text over WebSocket with manual or voice-activity-based commits, optional word timestamps, and language detection. Supports PCM and mu-law audio and is billed per second of streamed audio. Your use is subject to ElevenLabs's Terms & Privacy Policies.
- Price
- $0.39, Per hour of audio
import { experimental_streamTranscribe as streamTranscribe } from 'ai';import { createGateway, gateway } from '@ai-sdk/gateway';import { readFile } from 'node:fs/promises';
const modelId = 'elevenlabs/scribe-v2-realtime';
// Mint this on your server, then send only the short-lived token to the client.const { token } = await gateway.experimental_transcription.getToken({ model: modelId,});const clientGateway = createGateway({ apiKey: token });
// Raw 24 kHz, 16-bit signed little-endian mono PCM audio.const bytes = await readFile('audio.pcm');const audio = new ReadableStream<Uint8Array>({ start(controller) { controller.enqueue(new Uint8Array(bytes)); controller.close(); },});
const result = streamTranscribe({ model: clientGateway.transcription(modelId), audio, inputAudioFormat: { type: 'audio/pcm', rate: 24000 },});
for await (const part of result.fullStream) { if (part.type === 'transcript-delta') { process.stdout.write(part.delta); }}
console.log('\nFinal:', await result.text);Copy link to headingPlayground
Try out Scribe v2 Realtime by ElevenLabs. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Live transcription
Speak into your microphone and watch the transcript appear in real time.
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
Checking availability for your team
| Provider |
|---|