Files
VoiceType/config.py
2025-08-29 20:19:16 +03:00

30 lines
1.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Конфигурационные параметры
import os
# Горячие клавиши
HOTKEY_START = 'ctrl+shift+space' # Активация прослушивания
HOTKEY_STOP = 'ctrl+shift+enter' # Деактивация прослушивания
# Языки распознавания
LANGUAGES = {
'ru': 'ru-RU',
'en': 'en-US'
}
DEFAULT_LANGUAGE = 'ru' # Язык по умолчанию
# Параметры аудио
SAMPLE_RATE = 16000
CHUNK_SIZE = 4096
# Путь к модели Vosk (указываем конкретную модель)
MODEL_PATH = os.path.join(os.path.dirname(__file__), "model") # Базовый путь к папке с моделями
# Файл с пользовательскими командами
COMMANDS_FILE = "commands.json"
# Модели для разных языков
LANGUAGE_MODELS = {
'ru': os.path.join(os.path.dirname(__file__), "model", "vosk-model-small-ru-0.22"),
'en': os.path.join(os.path.dirname(__file__), "model", "vosk-model-small-en-us-0.15")
}