File size: 1,412 Bytes
41979e6
e4a7287
6a4e9e3
fe4903b
41979e6
6a4e9e3
fe4903b
 
e4a7287
fe4903b
 
 
 
e4a7287
 
2c358c1
0ac6d59
e4a7287
 
6a4e9e3
 
fe4903b
 
e4a7287
fe4903b
 
 
e4a7287
 
fe4903b
6a4e9e3
e4a7287
 
fe4903b
6a4e9e3
fe4903b
6a4e9e3
 
 
fe4903b
 
 
 
6a4e9e3
 
fe4903b
41979e6
 
0ac6d59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import os
from pathlib import Path
from pydantic_settings import BaseSettings
from typing import ClassVar, Optional

class Settings(BaseSettings):
    """Uygulama genelinde kullanılan ayarlar."""
    
    # Temel ayarlar
    ENVIRONMENT: str = "production"
    DEBUG: bool = False
    ENCRYPTION_KEY: str = os.environ.get("ENCRYPTION_KEY", "your-secret-key-here")
    API_PREFIX: str = "/api/v1"
    
    # Hugging Face ayarları
    HF_TOKEN: str = ""  # Hugging Face API token'ı
    HF_CACHE_DIR: Path = Path("/root/.cache/huggingface")  # Hugging Face cache dizini
    
    # ASR ayarları
    ASR_MODEL: str = "openai/whisper-small"
    DIARIZATION_MODEL: str = "pyannote/speaker-diarization-3.0"
    ANONYMIZE_DATA: bool = True
    ENHANCE_AUDIO: bool = True
    
    # Dosya ayarları
    MAX_UPLOAD_SIZE: int = 25 * 1024 * 1024  # 25 MB
    ALLOWED_EXTENSIONS: set[str] = {"wav", "mp3", "m4a", "ogg"}
    
    # Dil ayarları
    LANGUAGE: str = "tr"
    SPACY_MODEL: str = "tr_core_news_sm"
    
    # Özel tıbbi terimler dosyası
    MEDICAL_TERMS_FILE: str = "medical_terms.json"
    
    # Diarization ayarları
    MIN_SPEAKER_DURATION: float = 1.0
    MAX_SPEAKERS: int = 5
    SAMPLE_RATE: int = 16000
    
    # Cache ayarları
    CACHE_DIR: Path = Path("/tmp/voice_to_write_cache")
    
    class Config:
        env_file = ".env"
        env_file_encoding = "utf-8"

settings = Settings()