Update app.py
Browse files
app.py
CHANGED
|
@@ -35,6 +35,11 @@ HF_TOKEN = os.getenv("HF_TOKEN")
|
|
| 35 |
if HF_TOKEN:
|
| 36 |
print("🔑 Logging in to Hugging Face Hub...")
|
| 37 |
login(HF_TOKEN)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
PORT = int(os.getenv("TTS_FASTAPI_PORT", 7860)) # Zahl kongruent halten
|
| 40 |
SUPPORTED_ENGINES = ["orpheus"]
|
|
@@ -70,10 +75,7 @@ origins = [
|
|
| 70 |
f"https://127.0.0.1:{PORT}",
|
| 71 |
]
|
| 72 |
|
| 73 |
-
|
| 74 |
-
engines = {}
|
| 75 |
-
voices = {}
|
| 76 |
-
current_engine = None
|
| 77 |
speaking_lock = threading.Lock()
|
| 78 |
tts_lock = threading.Lock()
|
| 79 |
gen_lock = threading.Lock()
|
|
|
|
| 35 |
if HF_TOKEN:
|
| 36 |
print("🔑 Logging in to Hugging Face Hub...")
|
| 37 |
login(HF_TOKEN)
|
| 38 |
+
|
| 39 |
+
engines = {}
|
| 40 |
+
voices = {}
|
| 41 |
+
current_engine = None
|
| 42 |
+
play_text_to_speech_semaphore = threading.Semaphore(1)
|
| 43 |
|
| 44 |
PORT = int(os.getenv("TTS_FASTAPI_PORT", 7860)) # Zahl kongruent halten
|
| 45 |
SUPPORTED_ENGINES = ["orpheus"]
|
|
|
|
| 75 |
f"https://127.0.0.1:{PORT}",
|
| 76 |
]
|
| 77 |
|
| 78 |
+
|
|
|
|
|
|
|
|
|
|
| 79 |
speaking_lock = threading.Lock()
|
| 80 |
tts_lock = threading.Lock()
|
| 81 |
gen_lock = threading.Lock()
|