S2.1 Pro
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('fish-audio/s2.1-pro'), text: 'Hello from the Vercel AI Gateway!', // Browse voices at https://fish.audio/app/discovery // Open a voice, then use "Copy Model Id" in its "..." menu. voice: '933563129e564b19a115bedd57b7406a',});
await writeFile('speech.mp3', result.audio.uint8Array);Copy link to headingPlayground
Try out S2.1 Pro by Fish Audio. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated audio will appear here
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Copy link to headingAbout S2.1 Pro
S2.1 Pro is Fish Audio's recommended production text-to-speech model and an improved version of S2 Pro, with better quality, latency, and throughput across 83 languages.
Prosody control is the distinguishing feature. You write direction inline in square brackets, and the model interprets it as description rather than matching against a fixed vocabulary, so [whispers sweetly] and [laughing nervously] both work without either being a predefined tag. Thousands of distinct tags are recognised, and phrasing outside that set still lands because the model learned the mapping from description to acoustics rather than from a lookup table.
Multi-speaker dialogue runs in a single request. You write both sides of a conversation in one text input, tag each turn with a speaker index, and get back one audio file with both voices rendered. Two speakers are supported per request.
In head-to-head listening comparisons against S2 Pro, S2.1 Pro was preferred in roughly three of every five judgements.
Integration uses the AI SDK's speech generation function.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Dialogue is capped at two speakers per request. A three-way conversation needs separate requests stitched together, which means you handle the timing between turns yourself.
- Configuration: Fish Audio also publishes a free development tier serving the same model quality and language coverage, without latency or availability guarantees. Use that for evaluation and prototyping, and this model where a production workload needs those guarantees.
- Configuration: Bracket direction is interpreted, not parsed. That flexibility is the point, but it means the same tag can land slightly differently across generations. Where a specific delivery matters, generate a few takes and pick, rather than assuming one tag produces one fixed result.
- Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use S2.1 Pro
Best for
- Production Voice Workloads: Latency and availability guarantees included
- Multilingual Narration: 83 languages from a single model
- Expressive Direction: Plain-language control instead of a fixed tag list
- Two-Speaker Dialogue: One request, one audio file, both voices
- Upgrades From S2 Pro: Favoured in head-to-head listening comparisons
Consider alternatives when
- Evaluation And Prototyping: The free development tier serves the same quality
- Three Or More Speakers: Exceeds the two-speaker per-request cap
- Open Weights Requirement: S2 Pro is the open-source generation
- Fixed Emotional Presets: S1 exposes an explicit expression vocabulary
Copy link to headingConclusion
S2.1 Pro is Fish Audio's production voice model, with 83 languages, plain-language prosody direction, and two-speaker dialogue in a single request. Point fish-audio/s2.1-pro at AI Gateway for production traffic, and prototype against the free tier while you are still choosing voices.