VoiceFocus / constants.py
mariesig
refactor streaming pipeline
b22fd96
Raw History Blame
939 Bytes
from typing import Final
from unittest.mock import DEFAULT
from stt_streamers import DeepgramStreamer, SonioxStreamer
CHUNK_SIZE: Final = 1024
TIMEOUT_FACTOR_MB: Final = 60
BASE_TIMEOUT_SECONDS: Final = 120
MODEL_ID: Final = "quail-vf-2.0-l-16khz"
MINUTES_KEEP: Final = 60
# All app temp files (spectrograms, audio, etc.) go here so we only purge our own files.
APP_TMP_DIR: Final = "/tmp/voicefocus"
DATASET_NAME: Final = "ai-coustics/dawn_chorus_en"
DEFAULT_SPLIT: Final = "eval"
DEFAULT_SAMPLE_ID: Final = "en_00412_i_h_36"
MIX_DIR: Final = "mix"
SPEECH_DIR: Final = "speech"
TRANS_DIR: Final = "transcripts"
STREAM_EVERY: Final = 0.2
WARMUP_SECONDS: Final = 2 # seconds before "recording ready" light turns on
TARGET_LOUDNESS: Final = -17.0
TARGET_TP: Final = -1.5
STREAMER_CLASSES: Final = {
"Deepgram Nova-3 RT": DeepgramStreamer,
"Soniox STT-RT v3": SonioxStreamer,
}
VAD_ON: Final = "🟢"
VAD_OFF: Final = "⚫"