POST /v1/asr to receive a transcript, its duration, and optional timestamped segments. Use transcribe-1-pro for multi-speaker conversations and transcripts that preserve emotion and vocal-event cues.
Use it in the web app
No code: upload audio, get a transcript.
API reference
Every parameter for
POST /v1/asr.Cookbooks
Captions, batch transcription, and more.
Choose an ASR model
Select the model with the
model HTTP header. Both models use the same endpoint and request fields; model is not a form field. See ASR pricing for usage costs.
Multi-speaker conversations
transcribe-1-pro supports recordings with multiple speakers, such as interviews, meetings, and calls. Send the recording as one audio file to transcribe the conversation.
Pro identifies speakers with inline <|speaker:N|> markers in the response’s text string, where N is a numeric speaker label. A marker assigns the following text to that speaker until the next marker. The same label can appear again when that speaker resumes talking.
For example, this illustrative response contains three turns from two speakers. It uses ignore_timestamps=true, so segments is empty:
Treat speaker labels as identifiers within that recording, not as names or identities you can match across separate requests. The response contains one annotated
text string, not a JSON array of speaker turns. To display turns separately, split the string at speaker markers, preserving any emotion cues in each turn. For example, after decoding the JSON response into result:
ignore_timestamps=false, text keeps the speaker markers, while segments contains aligned speech with text, start, and end. Speaker markers and emotion cues are excluded from timestamp alignment. There is no separate speaker list or per-segment speaker_id, so use the markers in text to read speaker turns; do not assume each segment corresponds to a turn.
Emotion and vocal-event cues
Pro can retain cues about how speech sounds alongside the spoken words. These appear as inline bracketed text, such as[高兴] (happy) or [laughter], in the response’s text field. For example, a transcript might contain:
emotion field or fixed emotion enum; preserve the returned text when your application needs these cues.
Timestamp alignment uses the spoken words with speaker, emotion, and event markers removed. Read text for the annotated transcript and segments for timed speech; the segment text may therefore differ from the full transcript.
When to use it
Captions & subtitles
Timed segments map straight to SRT/VTT cues.
Meeting & call notes
Use Pro to transcribe multi-speaker recordings for summaries and search.
Voice commands & notes
Turn short utterances into text your app can act on.
Accessibility
Make audio and video content readable.
Quick start
Create an API key and setFISH_API_KEY in your environment. For the Python examples, install the Fish Audio SDK.
The examples below select transcribe-1-pro and request timestamps. Set the header to transcribe-1 to use the standard model.
text, the audio duration in seconds, and segments. When available, it also includes the detected language_code and display name language.
The Python SDK selects Pro through
RequestOptions.additional_headers;
asr.transcribe() has no model argument. The JavaScript example calls the
REST API directly so the header is explicit. For multipart uploads, let your
HTTP client set Content-Type and its boundary.Read the timestamps
Each segment carriestext, start, and end, with times in seconds. With the API, request timestamps with ignore_timestamps=false. The default is true, which returns an empty segments array. Alignment adds processing time, and segments can also be empty when alignment is unavailable or no speech is detected.
In the Python SDK, segment timestamps are on by default. Pass
include_timestamps=False to skip them. That’s the inverse of the
API/JavaScript flag ignore_timestamps.Implementation details
Language
language is an optional hint, such as en, zh, or ja. Language detection still runs when you provide a hint; it does not force the returned language. Use the response’s language_code in application logic and language for display when those fields are available.
Input audio
Common formats work directly:wav, mp3, opus, and more. Send the raw file bytes; no pre-processing required. The endpoint accepts multipart/form-data (shown above) or application/msgpack.
Long recordings
One request transcribes one audio file. For long recordings, split the audio into shorter clips and transcribe each, then offset each chunk’sstart/end by where it began in the full recording. Check that each response covers the complete clip before combining transcripts.
Async transcription
The Python SDK ships an async client with the same surface, useful when you’re transcribing many files concurrently or already running inside an event loop. UseAsyncFishAudio and await the call:
Direct API (MessagePack)
POST /v1/asr also accepts a MessagePack body instead of multipart form data, the same path the API reference links to for low-overhead, server-side calls. Pack the audio bytes and options into one payload and set Content-Type: application/msgpack:
text, duration (seconds), segments, and optional detected-language fields. Model selection stays in the HTTP header for both formats.
Going further
Generate speech
The reverse direction: text to lifelike audio.
Full API parameters
Every field and the raw response schema.
Python reference
asr.transcribe options and the ASRResponse type.
