-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstate.py
More file actions
60 lines (48 loc) · 1.42 KB
/
state.py
File metadata and controls
60 lines (48 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import queue
from rich.console import Console
# Global variables
startup_time = 0
console = Console()
print = console.print
DEBUG_MODE = False
# Model identifiers - source of truth for all model references in the codebase
MLX_PARAKEET_V3 = "mlx-community/parakeet-tdt-0.6b-v3"
MLX_PARAKEET_V2 = "mlx-community/parakeet-tdt-0.6b-v2"
NVIDIA_PARAKEET_V3 = "nvidia/parakeet-tdt-0.6b-v3"
NVIDIA_PARAKEET_V2 = "nvidia/parakeet-tdt-0.6b-v2"
NVIDIA_CANARY_1B_FLASH = "nvidia/canary-1b-flash"
NVIDIA_CANARY_180M = "nvidia/canary-180m-flash"
NVIDIA_CANARY_V2 = "nvidia/canary-1b-v2"
NVIDIA_NEMOTRON_STREAMING = "nvidia/nemotron-speech-streaming-en-0.6b"
OPENAI_WHISPER_V3 = "openai/whisper-large-v3"
COHERE_TRANSCRIBE = "CohereLabs/cohere-transcribe-03-2026"
# Set of all known/supported models
KNOWN_MODELS = {
MLX_PARAKEET_V3,
MLX_PARAKEET_V2,
NVIDIA_PARAKEET_V3,
NVIDIA_PARAKEET_V2,
NVIDIA_CANARY_1B_FLASH,
NVIDIA_CANARY_180M,
NVIDIA_CANARY_V2,
NVIDIA_NEMOTRON_STREAMING,
OPENAI_WHISPER_V3,
COHERE_TRANSCRIBE,
}
audio_manager = None
stt_model = None
model_type = "parakeet"
model_loaded = False
transcribed_chunks = []
transcription_queue = queue.Queue()
transcription_worker_thread = None
main_loop_active = True
keyboard_manager = None
device = None
source_lang = "en"
target_lang = "en"
# Recording timing
recording_start_time = None
# History configuration
history_enabled = True
history_db_path = None