Skip to main content
This guide helps you migrate from the legacy fish_audio_sdk (Session-based API) to the new fishaudio (client-based API) available in fish-audio-sdk v1.0+.

Quick Migration

1

Uninstall and reinstall the package

The package name stays the same, but the import changes from fish_audio_sdk to fishaudio.You can still keep using the fish_audio_sdk package if you’d like though. Just be aware that it will not receive any new features or updates.Since this is a versioning jump from v2025.6.3 to v1.0.0, you may need to pin the version explicitly with fish-audio-sdk==1.0.0.
2

Update imports

3

Replace Session with Client

4

Update API calls

See the quick reference below for common operations.

Key Changes at a Glance

Text-to-Speech Migration

The new SDK’s convert() returns complete audio bytes instead of chunks. Use stream() for chunk-by-chunk transfer or stream_websocket() for real-time streaming.

Voice Cloning Migration

Speech-to-Text Migration

ASR timestamps changed from seconds to milliseconds. Divide by 1000 to convert: seconds = segment.start / 1000

WebSocket Streaming Migration

Error Handling Migration

Async Support

The new SDK has full async support with AsyncFishAudio:

Breaking Changes Summary

Before: Iterator of chunks
After: Complete audio bytes
Use stream() or stream_websocket() if you need chunks.
Before:
After:
Pass parameters directly to methods.
Before: segment.start in seconds (e.g., 1.5)After: segment.start in milliseconds (e.g., 1500)Convert: seconds = segment.start / 1000
  • session.create_model()client.voices.create()
  • session.list_models()client.voices.list()
  • session.get_model()client.voices.get()
Plus new methods: client.voices.update() and client.voices.delete()

Common Issues

Upgrade the package:
The new convert() returns complete audio. Use stream() for chunks:
Remove the empty text. Just pass your generator:
New SDK uses milliseconds instead of seconds:

Next Steps

Python SDK Guide

Complete guide for the new SDK

API Reference

Detailed API documentation

Text-to-Speech

TTS features and examples

Voice Cloning

Clone voices and manage models

Need Help?