6851b26923
FastAPI + Celery + Svelte app for English→Danish video translation with voice cloning. Includes diarization, STT, translation, TTS, and audio mixing pipeline.
35 lines
914 B
Python
35 lines
914 B
Python
from pydantic_settings import BaseSettings
|
|
from typing import Optional
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
video_dir: str = "/data/videos"
|
|
app_data_dir: str = "/data/app"
|
|
database_url: str = "sqlite+aiosqlite:////data/app/bornetime.db"
|
|
|
|
redis_url: str = "redis://redis:6379/0"
|
|
|
|
stt_model_id: str = "bosonai/higgs-audio-v3-stt"
|
|
stt_device: str = "cuda:0"
|
|
stt_dtype: str = "bfloat16"
|
|
|
|
translate_model_path: str = "/models/translategemma-12b-q8_0.gguf"
|
|
translate_n_gpu_layers: int = -1
|
|
translate_device: str = "cuda:0"
|
|
|
|
tts_model_id: str = "bosonai/higgs-tts-3-4b"
|
|
tts_device: str = "cuda:1"
|
|
|
|
diarization_model: str = "pyannote/speaker-diarization-3.1"
|
|
diarization_device: str = "cuda:0"
|
|
|
|
hf_token: Optional[str] = None
|
|
temp_dir: str = "/data/app/tmp"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|