faster_whisper
faster_whisper
¶
Faster-Whisper speech-to-text backend (local, CTranslate2-based).
Classes¶
FasterWhisperBackend
¶
FasterWhisperBackend(
model_size: str = "base",
device: str = "auto",
compute_type: str = "float16",
use_dictionary_hints: bool = True,
language: str = "",
realtime: bool = False,
)
Bases: SpeechBackend
Local speech-to-text using Faster-Whisper (CTranslate2).
Source code in src/diapason/speech/faster_whisper.py
Methods:¶
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.
Source code in src/diapason/speech/faster_whisper.py
transcribe
¶
transcribe(
audio: bytes,
*,
format: str = "wav",
language: Optional[str] = None,
) -> TranscriptionResult
Transcribe audio bytes using Faster-Whisper.
Source code in src/diapason/speech/faster_whisper.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | |
health
¶
Check if model is loaded or loadable.
Source code in src/diapason/speech/faster_whisper.py
last_error
¶
supported_formats
¶
Functions:¶
est_hallucination
¶
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.