# 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.

- **Model ID:** `elevenlabs/scribe-v2-realtime`
- **Type:** transcription
- **Providers:** elevenlabs
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** See the provider details below
- **Canonical page:** https://vercel.com/ai-gateway/models/scribe-v2-realtime

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
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);
```

## Links

- [Model page](https://vercel.com/ai-gateway/models/scribe-v2-realtime)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://elevenlabs.io/docs/api-reference/speech-to-text/v-1-speech-to-text-realtime)
- [Provider pricing](https://elevenlabs.io/pricing/api)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
