Skip to content

fish-audio-sdk: v1.9.0

Choose a tag to compare

@fishaudio-bot fishaudio-bot released this 03 Dec 14:31
1d03711

1.9.0 (2026-12-03)

Features

  • asr: send the Pro model options from transcribe() (#209) (65846ae)
  • asr: warn when a transcription is sent without a model (#208) (8784f88)
  • tts: add language option for text normalization (#210) (55df986)

Bug Fixes

  • errors: keep validation entries' input out of error messages and bound them to one line (#211) (3318a39)
  • py.typed, error pickling and messages, stream() typing, and doc fixes (#206) (1ff9170)

Upgrade notes

Nothing is removed and no signature changes in a way that breaks a call. Three things behave differently.

1. An API error's message is one line of at most 300 characters. APIError.message and str(error) now hold a short summary. The full response is always in error.body.

  • Validation errors show the field and the reason, and no longer include the value that was sent:
    • before: HTTP 422: [{'loc': ['body', 'text'], 'msg': 'Field required', 'input': {...}}]
    • after: HTTP 422: body.text: Field required
  • A JSON error the SDK does not recognize shows the HTTP status phrase. Read the JSON from json.loads(error.body).
    • before: HTTP 400: {"status":400,"info":{"a":1}}
    • after: HTTP 400: Bad Request
  • A code-only error shows the code:
    • before: HTTP 403: {"code":"account_pending_closure"}
    • after: HTTP 403: account_pending_closure
  • Plain-text and HTML bodies are shown on one line, cut to 300 characters, with line breaks as \n:
    • before: HTTP 502: <html> followed by a line break and the whole page
    • after: HTTP 502: <html>\n<body>… on one line, ending with …
  • A body that is neither JSON nor plain text or HTML (MessagePack, an event stream, no Content-Type) shows the status phrase:
    • before: HTTP 422: ��detail���input�…
    • after: HTTP 422: Unprocessable Entity
  • Errors the API sends with a string message, which is every error seen live, read the same as before. For example: HTTP 422: page_size: Must be at least 1.
  • If your code parsed str(error) or error.message for details, read error.body instead.

2. Transcribing without a model emits a FutureWarning. asr.transcribe() without model= runs on transcribe-1, which is retired on December 31, 2026. Pass model= to choose the model and silence the warning.

  • before: no warning
  • after: FutureWarning: No speech-to-text model was specified, so this request runs on the API's default model. …

3. A server error during tts.stream_websocket() raises instead of waiting. Before, the call kept waiting after the server reported an error. Now it raises WebSocketError with the server's reason.

  • before (unknown reference_id): the call was still waiting after 45 s
  • after: WebSocketError: WebSocket stream failed: Reference not found within about a second

New, no action needed

  • language= on every TTS method and on TTSConfig, for text normalization.
  • The transcribe-2-pro options on asr.transcribe(): diarize, tag_audio_events, num_speakers, min_speakers, max_speakers, text_format, verbatim, keyterms.
  • py.typed, so type checkers use the SDK's types.