Seicas commited on
Commit
6a4e9e3
·
verified ·
1 Parent(s): 945218d

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +13 -4
config.py CHANGED
@@ -1,7 +1,8 @@
1
  import os
2
  from pathlib import Path
 
3
 
4
- class Settings:
5
  # Temel ayarlar
6
  ENVIRONMENT = os.environ.get("ENVIRONMENT", "production")
7
  DEBUG = False
@@ -11,8 +12,8 @@ class Settings:
11
  HF_CACHE_DIR = Path("/root/.cache/huggingface")
12
 
13
  # ASR ayarları
14
- ASR_MODEL = "large-v3"
15
- DIAR_MODEL = "pyannote/speaker-diarization-3.1"
16
  ANONYMIZE_DATA = True
17
  ENHANCE_AUDIO = True
18
 
@@ -21,7 +22,7 @@ class Settings:
21
 
22
  # Dil ayarları
23
  LANGUAGE = "tr"
24
- SPACY_MODEL = "tr_core_news_sm"
25
 
26
  # Özel tıbbi terimler dosyası
27
  MEDICAL_TERMS_FILE = "medical_terms.json"
@@ -29,5 +30,13 @@ class Settings:
29
  # Önbellek ayarları
30
  CACHE_DIR = Path("/tmp/voice_to_write_cache")
31
  CACHE_DIR.mkdir(exist_ok=True)
 
 
 
 
 
 
 
 
32
 
33
  settings = Settings()
 
1
  import os
2
  from pathlib import Path
3
+ from pydantic_settings import BaseSettings
4
 
5
+ class Settings(BaseSettings):
6
  # Temel ayarlar
7
  ENVIRONMENT = os.environ.get("ENVIRONMENT", "production")
8
  DEBUG = False
 
12
  HF_CACHE_DIR = Path("/root/.cache/huggingface")
13
 
14
  # ASR ayarları
15
+ ASR_MODEL: str = "openai/whisper-small"
16
+ DIARIZATION_MODEL: str = "pyannote/speaker-diarization-3.0"
17
  ANONYMIZE_DATA = True
18
  ENHANCE_AUDIO = True
19
 
 
22
 
23
  # Dil ayarları
24
  LANGUAGE = "tr"
25
+ SPACY_MODEL: str = "tr_core_news_sm"
26
 
27
  # Özel tıbbi terimler dosyası
28
  MEDICAL_TERMS_FILE = "medical_terms.json"
 
30
  # Önbellek ayarları
31
  CACHE_DIR = Path("/tmp/voice_to_write_cache")
32
  CACHE_DIR.mkdir(exist_ok=True)
33
+
34
+ # Yeni eklenen ayarlar
35
+ MIN_SPEAKER_DURATION: float = 1.0
36
+ MAX_SPEAKERS: int = 5
37
+ SAMPLE_RATE: int = 16000
38
+
39
+ class Config:
40
+ env_file = ".env"
41
 
42
  settings = Settings()