Skip to main content

Fish Audio Python SDK for RunAPI

Install runapi-fish-audio and create a FishAudioClient.

created = client.create_voice.run(name="Narrator", source_audio_url="https://cdn.runapi.ai/public/samples/voice.mp3")
voice = client.get_voice.run(voice_id=created.voice.voice_id)
if voice.voice.state != "trained":
    raise RuntimeError(f"Voice is {voice.voice.state}")
result = client.text_to_speech.run(model="s2.1-pro", text="Hello [excited]", voice_id=created.voice.voice_id, output_format="wav", sample_rate_hz=44100)

Pass optional references entries with base64-encoded raw audio bytes and exact transcripts for request-scoped voice matching.

create_voice.run() and text_to_speech.run() return the same typed terminal result whether the request completes directly or is accepted for background processing. To resume an accepted request from its opaque Task Result URL, call subscribe(location) on the same resource.

Use list_voices and get_voice to inspect account-owned voice resources. Only trained voices can be submitted for speech generation; a returned voice_id is a best-effort reference and may stop working later. Update, delete, revoke, or voice-library management methods are not provided; voice retention is not promised.

The output defaults to MP3. Select WAV with output_format; bitrate_kbps applies only to MP3.

Model details and pricing: https://runapi.ai/models/fish-audio/s2.1-pro

Licensed under the Apache License, Version 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runapi_fish_audio-0.5.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runapi_fish_audio-0.5.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file runapi_fish_audio-0.5.0.tar.gz.

File metadata

  • Download URL: runapi_fish_audio-0.5.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for runapi_fish_audio-0.5.0.tar.gz
Algorithm Hash digest
SHA256 070723f5463197090c464e29a6e1c7c7cbf4431d55a9cac648cb93c6c53e25cb
MD5 843f932c85e45a53f0fb5bd0bd6bbaf6
BLAKE2b-256 ef9aa1e85c41c69b1e963c1cdf65e9e8d70989c940f79be03e8e788be4413d32

See more details on using hashes here.

File details

Details for the file runapi_fish_audio-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: runapi_fish_audio-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for runapi_fish_audio-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef936d334f479067da5fb1fa8ad5feaafcf588d4bef2460d4d42ceb20bbcd467
MD5 59759b6f21fa3811135d1cbf600ae57a
BLAKE2b-256 66b8d8a9bd9f008489ca60a67e63bcd021fb8fe895af438007f68f118028fc74

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page