Prerequisites
Create a Fish Audio account
Create a Fish Audio account
Sign up for a free Fish Audio account to get started with our API.
- Sign up on fish.audio
- Fill in your details to create an account, complete steps to verify your account.
- Log in to your account and open Get Started
Get your API key
Get your API key
Once you have an account, you’ll need an API key to authenticate your requests.
- Log in and open Get Started
- Click “Get your API key”: the key is created in one click and shown only once
- Copy your key and store it securely
Recipe
Phone networks carry narrowband audio at 8 kHz. Generating at a higher rate just forces the carrier to downsample on the way through, wasting bandwidth and often softening the result. Synthesize at 8 kHz directly and the bytes are ready to hand to your IVR or SIP stack. Set the sample rate onTTSConfig (it is not a top-level argument) and write the WAV to disk.
Install the Python SDK first: pip install fish-audio-sdk.
format="pcm"; the sample rate stays on TTSConfig.
API (curl)

