first commit
This commit is contained in:
33
config.py
Normal file
33
config.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""
|
||||
Configuration module for smart speaker.
|
||||
Loads environment variables from .env file.
|
||||
"""
|
||||
import os
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables
|
||||
load_dotenv()
|
||||
|
||||
# Base paths
|
||||
BASE_DIR = Path(__file__).parent
|
||||
|
||||
# Perplexity API configuration
|
||||
PERPLEXITY_API_KEY = os.getenv("PERPLEXITY_API_KEY")
|
||||
PERPLEXITY_MODEL = os.getenv("PERPLEXITY_MODEL", "llama-3.1-sonar-small-online")
|
||||
PERPLEXITY_API_URL = "https://api.perplexity.ai/chat/completions"
|
||||
|
||||
# Porcupine configuration
|
||||
PORCUPINE_ACCESS_KEY = os.getenv("PORCUPINE_ACCESS_KEY")
|
||||
PORCUPINE_KEYWORD_PATH = BASE_DIR / "Alexandr_en_linux_v4_0_0.ppn"
|
||||
|
||||
# Vosk configuration
|
||||
VOSK_MODEL_PATH = BASE_DIR / "vosk-model-ru-0.42"
|
||||
|
||||
# Audio configuration
|
||||
SAMPLE_RATE = 16000
|
||||
CHANNELS = 1
|
||||
|
||||
# TTS configuration
|
||||
TTS_SPEAKER = "xenia" # Available: aidar, baya, kseniya, xenia, eugene
|
||||
TTS_SAMPLE_RATE = 48000
|
||||
Reference in New Issue
Block a user