Skip to main content

Prerequisites

Sign up for a free Fish Audio account to get started with our API.
  1. Go to fish.audio/auth/signup
  2. Fill in your details to create an account, complete steps to verify your account.
  3. Log in to your account and navigate to the API section
Once you have an account, you’ll need an API key to authenticate your requests.
  1. Log in to your Fish Audio Dashboard
  2. Navigate to the API Keys section
  3. Click β€œCreate New Key” and give it a descriptive name, set a expiration if desired
  4. Copy your key and store it securely
Keep your API key secret! Never commit it to version control or share it publicly.

Basic Usage

Transcribe audio to text:

Language Specification

Improve accuracy by specifying the language:
Common language codes: en (English), zh (Chinese), es (Spanish), fr (French), de (German), ja (Japanese), ko (Korean), pt (Portuguese)
Automatic language detection works well, but specifying the language improves accuracy and speed.

Working with Segments

Get detailed timing for each segment:

Timestamps Control

Control timestamp generation:
ignore_timestamps: false (default) includes segment timestamps. Set to true to skip timestamp processing for faster transcription when you only need the text.

Audio Formats

Supported audio formats:
  • MP3 (recommended)
  • WAV
  • M4A
  • OGG
  • FLAC
  • AAC
File requirements:
  • Maximum size: 100MB
  • Maximum duration: 60 minutes
  • Sample rate: 16kHz or higher recommended

Transcribing TTS Output

Transcribe generated speech:

Error Handling

Handle common errors:

Response Structure

The ASR response includes: Segment structure:
Note the timing units: duration and segment times are in seconds.

Request Parameters