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 a publicly accessible HTTPS audio URL 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.

Temporary voice matching

For s1, s2-pro, and s2.1-pro, supply at most one references item containing a publicly accessible HTTPS audio URL in audio and a nonempty, verbatim transcript in text. Do not send voice_id with a reference. Omit references when selecting an existing voice. The transcript is forwarded unchanged; callers must ensure it matches the audio.

For local audio or Base64, first upload through POST /api/v1/files, then use the returned url as references[0].audio. Keep only one sample and remove voice_id. The URL must remain valid while the request waits and the audio is fetched. Files URLs expire by default after one hour; storing a reference does not extend that lifetime. For longer waits, use an external HTTPS URL with enough validity. If a URL expires, upload again and submit a new request.

Metadata

Release files for runapi-fish-audio 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runapi-fish-audio 0.9.0
File Size Uploaded Provenance Actions
runapi_fish_audio-0.9.0.tar.gz 4.8 kB Without provenance Details for runapi_fish_audio-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for runapi-fish-audio 0.9.0
File Interpreter ABI Platform Actions
runapi_fish_audio-0.9.0-py3-none-any.whl Python 3 none any Details for runapi_fish_audio-0.9.0-py3-none-any.whl

Total release size: 11.3 kB

Release files / runapi_fish_audio-0.9.0.tar.gz

Download URL runapi_fish_audio-0.9.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
92ed0a95b042aed9e5e2a5c45a7599c653dfcaf5b61e005dc03c0ab3766c5e73
BLAKE2b-256 checksum
How to use checksums
897cd8437e7a08f7aa63aac07e35929249a6d8d15a93f1c488e071d06a5e38ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / runapi_fish_audio-0.9.0-py3-none-any.whl

Download URL runapi_fish_audio-0.9.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2a5e7422692ec388fcbf8c4e7099121504239a7ea4668ec6a6b68a2ff530732
BLAKE2b-256 checksum
How to use checksums
82c4e6fc1176e2f0870d6a0dc14c20079502af91fcb4b9667311a445f13d81d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for runapi-fish-audio 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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