Seicas commited on
Commit
e4a7287
·
verified ·
1 Parent(s): d3f3af5

Update config.py

Browse files
Files changed (1) hide show
  1. config.py +28 -5
config.py CHANGED
@@ -1,10 +1,33 @@
1
  import os
 
2
 
3
  class Settings:
4
- ASR_MODEL = os.getenv("ASR_MODEL", "openai/whisper-small")
5
- UPLOAD_DIR = os.getenv("UPLOAD_DIR", "./data/uploads")
6
- OUTPUT_DIR = os.getenv("OUTPUT_DIR", "./data/outputs")
7
- SAMPLE_RATE = int(os.getenv("SAMPLE_RATE", 16000))
8
- DIAR_MODEL = os.getenv("DIAR_MODEL", "pyannote/speaker-diarization")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  settings = Settings()
 
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
8
+
9
+ # Hugging Face ayarları
10
+ HF_TOKEN = os.environ.get("HF_TOKEN", "")
11
+ HF_CACHE_DIR = Path("/root/.cache/huggingface")
12
+
13
+ # ASR ayarları
14
+ ASR_MODEL = "openai/whisper-large-v3"
15
+ DIAR_MODEL = "pyannote/speaker-diarization-3.1"
16
+ ANONYMIZE_DATA = True
17
+ ENHANCE_AUDIO = True
18
+
19
+ # Dosya boyutu limitleri
20
+ MAX_UPLOAD_SIZE = 25 * 1024 * 1024 # 25 MB
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"
28
+
29
+ # Önbellek ayarları
30
+ CACHE_DIR = Path("/tmp/voice_to_write_cache")
31
+ CACHE_DIR.mkdir(exist_ok=True)
32
 
33
  settings = Settings()