Switch to faster-whisper
This commit is contained in:
parent
ae557afc50
commit
bb7780c461
4 changed files with 51 additions and 21 deletions
11
src/leld.py
11
src/leld.py
|
|
@ -11,7 +11,7 @@ from pathlib import Path
|
|||
|
||||
from config import Config, load, redacted_dict
|
||||
from recorder import start_recording, stop_recording
|
||||
from stt import WhisperSTT
|
||||
from stt import FasterWhisperSTT, STTConfig
|
||||
from aiprocess import AIConfig, build_processor
|
||||
from inject import inject
|
||||
from x11_hotkey import listen
|
||||
|
|
@ -34,7 +34,14 @@ class Daemon:
|
|||
self.proc = None
|
||||
self.record = None
|
||||
self.timer = None
|
||||
self.stt = WhisperSTT(cfg.whisper_model, cfg.whisper_lang, cfg.whisper_device)
|
||||
self.stt = FasterWhisperSTT(
|
||||
STTConfig(
|
||||
model=cfg.whisper_model,
|
||||
language=cfg.whisper_lang,
|
||||
device=cfg.whisper_device,
|
||||
vad_filter=True,
|
||||
)
|
||||
)
|
||||
self.ai = None
|
||||
if cfg.ai_enabled:
|
||||
self.ai = build_processor(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue