LXC-Frontend (FastAPI + HTML/JS): - Audio-Upload (MP3/WAV/M4A/MP4/OGG/FLAC, max. 500 MB) - SQLite Job-Store, BackgroundTask-Pipeline - Job-Liste mit Live-Status, Downloads (DOCX + JSON) - Mac-Health-Indicator im UI Mac-Worker (FastAPI): - /api/transcribe (lightning-whisper-mlx | faster-whisper | mock) - /api/summarize + /api/protocol via Ollama (llama3.1:8b) - /api/export/docx via python-docx Deploy: - systemd-Service, Nginx Reverse-Proxy - deploy/install.sh: idempotentes LXC-Setup Doku: README.md, lxc-frontend/README.md, mac-worker/README.md
30 lines
950 B
Python
30 lines
950 B
Python
from pathlib import Path
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
app_name: str = "Voice-Agent"
|
|
app_host: str = "0.0.0.0"
|
|
app_port: int = 8000
|
|
|
|
upload_dir: Path = Path("/var/lib/voice-agent/uploads")
|
|
result_dir: Path = Path("/var/lib/voice-agent/results")
|
|
db_url: str = "sqlite:////var/lib/voice-agent/voice-agent.db"
|
|
|
|
mac_api_url: str = "http://192.168.85.10:8080"
|
|
mac_api_timeout: int = 1800
|
|
|
|
max_upload_mb: int = 500
|
|
allowed_exts: str = "mp3,wav,m4a,mp4,ogg,flac"
|
|
|
|
@property
|
|
def allowed_ext_set(self) -> set[str]:
|
|
return {e.strip().lower().lstrip(".") for e in self.allowed_exts.split(",") if e.strip()}
|
|
|
|
|
|
settings = Settings()
|
|
settings.upload_dir.mkdir(parents=True, exist_ok=True)
|
|
settings.result_dir.mkdir(parents=True, exist_ok=True)
|