Speech model
Mai Voice 2
microsoft/mai-voice-2
microsoft/mai-voice-2 is a text-to-speech model from Microsoft you can call on the OceanToken API.
Price card, similar models and questions answered: Mai Voice 2 on oceantoken.ai.
At a glance
| Model ID | microsoft/mai-voice-2 |
|---|---|
| Type | Speech |
| Publisher | Microsoft |
| Price | On oceantoken.ai |
| Endpoint | /v1/audio/speech |
| API shape | OpenAI-compatible |
| In the catalog since | 2026-06-02 |
| Scheduled retirement | 2026-12-31 |
API
POST /v1/audio/speech. Base URL https://api.oceantoken.ai, your OceanToken key as the bearer token. The OpenAI SDKs work unchanged; see the Quickstart.
Download this spec (JSON) · llms.txt for AI assistants
Basic
- curl
- Python
- JavaScript
curl https://api.oceantoken.ai/v1/audio/speech \
-H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "microsoft/mai-voice-2",
"input": "Welcome aboard.",
"voice": "en-US-Jasper:MAI-Voice-1",
"response_format": "mp3"
}' --output speech.mp3
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.oceantoken.ai/v1", api_key=os.environ["OCEANTOKEN_API_KEY"])
audio = client.audio.speech.create(
model="microsoft/mai-voice-2",
input="Welcome aboard.",
voice="en-US-Jasper:MAI-Voice-1",
response_format="mp3",
)
audio.write_to_file("speech.mp3")
import fs from 'node:fs';
import OpenAI from 'openai';
const client = new OpenAI({baseURL: 'https://api.oceantoken.ai/v1', apiKey: process.env.OCEANTOKEN_API_KEY});
const audio = await client.audio.speech.create({
"model": "microsoft/mai-voice-2",
"input": "Welcome aboard.",
"voice": "en-US-Jasper:MAI-Voice-1",
"response_format": "mp3"
});
fs.writeFileSync('speech.mp3', Buffer.from(await audio.arrayBuffer()));
Request parameters
Only what this model takes. Anything else in the request is left out before it reaches the model.
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | This model's ID. |
inputrequired | string | The text to read. |
voicerequired | string | One of this model's voices (see the Speech guide). |
response_format | string mp3, wav, opus, aac, flac, pcm, url | Audio format; url returns a link instead of the audio. |
speed | number 0.25 to 4 default 1 | Pace, on models that support it. |
instructions | string | Tone notes such as "calm, slow", on models that support them. |
Response
| Field | Type | Description |
|---|---|---|
(body) | binary | The audio file. |
More examples and how errors and billing work: Speech and transcription.
Compared with similar models
Speech models on OceanToken in the same price range as microsoft/mai-voice-2. Compare their prices on oceantoken.ai.
| Model | Publisher | Context |
|---|---|---|
Mai Voice 2microsoft/mai-voice-2 | Microsoft | — |
Qwen Audio 3.0 TTS Plusqwen/qwen-audio-3.0-tts-plus | Qwen | — |
Aura 2deepgram/aura-2 | Deepgram | — |
Voxtral Mini TTS 2603mistralai/voxtral-mini-tts-2603 | Mistral AI | — |
More from Microsoft
- Mai Image 2.6
microsoft/mai-image-2.6 - Mai Image 2.6 Flash
microsoft/mai-image-2.6-flash - Mai Transcribe 2
microsoft/mai-transcribe-2 - Mai Voice 2 Flash
microsoft/mai-voice-2-flash - Phi-4
microsoft/phi-4
All Microsoft models on OceanToken
Use it
Create an account Price on oceantoken.ai
The facts on this page were read from the live OceanToken catalog on 2026-12-02 (UTC), when the documentation was built. Prices are published on oceantoken.ai.