Skip to main content

Fish Audio STT

FishAudioSTT targets the Fish Audio ASR endpoint (POST https://api.fish.audio/v1/asr). It buffers incoming PCM, uploads it as a WAV once the window fills, and emits the returned text as a final transcript.
Fish transcription is batch-only — there is no streaming socket. This adapter therefore emits one final transcript per ~2 s window and no interim partials, exactly like WhisperSTT. If turn latency is what you are optimising, use a genuinely streaming provider: Deepgram, Soniox, AssemblyAI or Speechmatics.Reach for Fish ASR when you want a single vendor (and a single key) for both directions of the call, or for its language coverage.

Install

Authentication

The same key covers ASR and Fish Audio TTS.

Usage

Plug it into an agent:

Language detection

Leave language unset (None / undefined) and Fish auto-detects. Pass an ISO code to pin it — pinning is usually more accurate and slightly faster on short windows.

Timestamps

ignore_timestamps defaults to True, which Fish documents as the lower-latency path for clips under 30 s. Set it to False to receive per-segment timings.
Python surfaces segments on Transcript.words (the shared frozen dataclass’s provider-specific field); TypeScript exposes a dedicated segments array. Same data, same order — the field name differs because the Python Transcript shape is shared across every STT provider.

Buffering and the 1-second floor

Fish rejects clips shorter than 1 second and longer than 60 minutes / 20 MB. The adapter handles both ends:
  • The steady-state window is ~2 s (64,000 bytes of 16 kHz PCM16), comfortably clear of the floor and half the request count of a 1 s window.
  • On close() a short tail is padded with digital silence up to the 1 s minimum rather than dropped — otherwise the last words of an utterance would vanish, which is the exact bug that was fixed on the Whisper adapter.
  • An oversized buffer is truncated to the most recent 20 MB with a warning.
Tune the window with buffer_size_bytes / bufferSize if you want lower latency at the cost of more requests:

Failure behaviour

A non-2xx response or an unreachable host is logged at ERROR and yields no transcript — it never raises into the call. A live call degrades to silence on that window rather than dropping.

Options

Pricing

Fish bills ASR at **0.36peraudiohour,roundeduptothenearestsecondPatterrecords0.36 per audio hour**, rounded up to the nearest second — Patter records `0.006 / minute`. See Fish Audio pricing and rate limits for the authoritative numbers and the concurrency tiers.
Beta. This provider is validated against the Fish Audio API specification but has not yet been exercised on a live phone call end to end.