feat(transcription): add meeting assistant micro-service v0.1.0
- Added FastAPI backend with FFmpeg and Gemini 2.0 integration - Added React frontend with upload and meeting list - Integrated into main docker-compose stack and dashboard
This commit is contained in:
27
transcription-tool/backend/config.py
Normal file
27
transcription-tool/backend/config.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
class Settings(BaseSettings):
|
||||
APP_NAME: str = "Transcription Engine"
|
||||
VERSION: str = "0.1.0"
|
||||
DATABASE_URL: str = "sqlite:////app/transcripts.db"
|
||||
UPLOAD_DIR: str = "/app/uploads_audio"
|
||||
GEMINI_API_KEY: Optional[str] = None
|
||||
CHUNK_DURATION_SEC: int = 1800 # 30 Minutes
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
settings = Settings()
|
||||
|
||||
# Auto-load API Key
|
||||
if not settings.GEMINI_API_KEY:
|
||||
key_path = "/app/gemini_api_key.txt"
|
||||
if os.path.exists(key_path):
|
||||
with open(key_path, "r") as f:
|
||||
settings.GEMINI_API_KEY = f.read().strip()
|
||||
|
||||
# Ensure Upload Dir exists
|
||||
os.makedirs(settings.UPLOAD_DIR, exist_ok=True)
|
||||
os.makedirs(os.path.join(settings.UPLOAD_DIR, "chunks"), exist_ok=True)
|
||||
Reference in New Issue
Block a user