# MAI-Voice-2.1-Flash

MAI-Voice-2.1-Flash is a text-to-speech model built for fast, low-latency generation. It produces high- fidelity, natural, and expressive speech across 23 languages and supports gated instant voice cloning, all while being optimized for real-time responsiveness. Its human-like intonation, rhythm, and emotional nuance make it ideal for voice agents, assistants, and other interactive scenarios where latency and cost are critical.

- **Model ID:** `microsoft/mai-voice-2.1-flash`
- **Type:** speech
- **Providers:** azure
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $15/1M input tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/mai-voice-2.1-flash

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { experimental_generateSpeech as generateSpeech } from 'ai';
import { gateway } from '@ai-sdk/gateway';
import { writeFile } from 'node:fs/promises';

const result = await generateSpeech({
  model: gateway.speechModel('microsoft/mai-voice-2.1-flash'),
  text: 'Hello from the Vercel AI Gateway!',
  voice: 'en-US-Harper',
});

await writeFile('speech.mp3', result.audio.uint8Array);
```

## Links

- [Model page](https://vercel.com/ai-gateway/models/mai-voice-2.1-flash)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
