跳到正文
Vercel Blog· Kevin Dawkins·· 20 小時前AI 評分59

Microsoft AI 模型現已可於 Vercel AI Gateway 使用

Microsoft AI models are now available on AI Gateway

AI 導讀

Microsoft AI 模型已加入 Vercel AI Gateway,提供即時語音生成與即時文字轉錄功能。

  • 語音模型:MAI‑Voice‑2.1 及 MAI‑Voice‑2.1‑Flash 支援 23 種語言,適用於敘事、播客與即時回應。
正文

Vercel and Microsoft AI (MAI) have partnered to make MAI models available on AI Gateway. AI Gateway is one of a limited number of platforms offering access to MAI models.

MAI's focus on security and zero data retention (ZDR) align with Vercel's goal of giving AI Gateway users control over their data and transparency in how it is used for training.

MAI models on AI Gateway

MAI's latest audio models are now supported on AI Gateway. MAI-Voice-2.1 and MAI-Voice-2.1-Flash generate speech, while MAI-Transcribe-2 Streaming returns transcript updates as audio arrives.

  • MAI-Voice-2.1 (microsoft/mai-voice-2.1) generates expressive speech in 23 languages and keeps a consistent speaker across longer passages. Use it for narration, audiobooks, podcasts, and lessons where delivery matters from start to finish.

  • MAI-Voice-2.1-Flash (microsoft/mai-voice-2.1-flash) brings the same multilingual speech generation to lower-latency interactions. It is suited to voice agents, assistants, and spoken replies that need to arrive quickly.

  • MAI-Transcribe-2 Streaming (microsoft/mai-transcribe-2-streaming) returns partial transcripts while audio is still arriving. Applications can show live captions or follow a conversation as it happens, without waiting for the full recording.

AI Gateway bills these models at their listed rates, with no platform fee or markup on inference.

Get started

Use generateSpeech in AI SDK 7 with MAI-Voice-2.1-Flash to create a spoken response. The voice name selects Microsoft's Harper voice with the Flash model:

For longer audio such as narration, use microsoft/mai-voice-2.1.

Transcribe live audio

streamTranscribe takes a stream of audio chunks and returns transcript updates as the audio arrives. This example assumes microphoneStream is a ReadableStream of 16 kHz, 16-bit PCM audio:

Partial transcripts can change as more audio arrives, so replace the displayed text when a new partial arrives.

Additional resources

Explore MAI-Voice-2.1-Flash for speech generation and MAI-Transcribe-2 Streaming for live transcription. See the MAI model page for the full family, or follow the speech quickstart to get started.

AI Gateway provides one API for calling models, tracking usage and cost, and viewing request traces. It also supports routing, retries, and failover across available providers.

Read more

來源:Vercel Blog · vercel.com