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.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| runapi_fish_audio-0.7.0.tar.gz | 4.7 kB | Without provenance | Details for runapi_fish_audio-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runapi_fish_audio-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for runapi_fish_audio-0.7.0-py3-none-any.whl |
Total release size: 11.1 kB
Release files / runapi_fish_audio-0.7.0.tar.gz
| Download URL | runapi_fish_audio-0.7.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ac2e1dc8a40668b9dc6ebdc0c3f80f5a914db6880d99a63d3d16f1c6ca71909
|
|
BLAKE2b-256 checksum How to use checksums |
13d69dfa1a3894abf5c296ed74eed08ded362eb832b2990242996a94e7b9788e
|
| 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.7.0-py3-none-any.whl
| Download URL | runapi_fish_audio-0.7.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6d6b1961297be8635d19d1af6099939caf27927b50b2c16867f80324e7f6786
|
|
BLAKE2b-256 checksum How to use checksums |
73685d1217c78c2665c58a408cd89e6d7ad07608f9b3a9b265fd49d1abfb9781
|
| 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.7.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.