# MAI-Voice-2.1

MAI-Voice-2.1 is our highest-fidelity, most expressive text-to-speech model, delivering rich, natural speech across 23 languages. It extends the MAI-Voice family with broad multilingual coverage, gated instant voice cloning, and strong long-form generation capabilities. With its detailed prosody, nuanced expressiveness, and studio-grade audio quality, MAI-Voice-2.1 is ideal for experiences where maximum voice quality and fidelity are required - long-form narration, brand-defining audio etc.

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

## 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'),
  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)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
