Skip to content

faster_whisper

diapason.speech.faster_whisper

Faster-Whisper speech-to-text backend (local, CTranslate2-based).

FasterWhisperBackend

Bases: SpeechBackend

Local speech-to-text using Faster-Whisper (CTranslate2).

health()

Check if model is loaded or loadable.

last_error()

Return the last model load or transcription error, if any.

preload()

Build the model now rather than on the user's first keypress.

Under the LaunchAgent the service starts at login and then sits idle, so without this the first dictation of the day pays several seconds of model construction while the user is already talking.

supported_formats()

Supported audio formats (same as ffmpeg/Whisper).

transcribe(audio, *, format='wav', language=None)

Transcribe audio bytes using Faster-Whisper.

est_hallucination(no_speech_prob, avg_logprob)

Vrai quand un segment a toutes les marques d'une hallucination.

Les valeurs passent par float() : un attribut absent ou exotique vaut « pas d'alarme » — on ne raye jamais de la parole sur un doute technique.