Skip to main content

Overview

This guide will walk you through generating your first text-to-speech audio with Fish Audio. By the end, you’ll have converted text into natural-sounding speech using our API.

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.

Your First TTS Request

Choose your preferred method to generate speech:
1

Set your API key

Store your API key as an environment variable (recommended approach):
2

Make the TTS request

Run this cURL command to generate your first speech:
3

Play your audio

The audio has been saved as welcome.mp3. You can play it by:
  • Double-clicking the file or opening it in any media player
  • Or using the command line:

Customizing Your Voice

The examples above use the default voice. To use a different voice, add the reference_id parameter with a model ID from fish.audio. You can find the model ID in the URL or use the copy button when viewing any voice. Choose a voice to try:
From: https://fish.audio/m/8ef4a238714b45718ce04243307c57a7
Then generate speech with your chosen voice:

Support

Need help? Check out these resources: