Tomtom84 commited on
Commit
195748c
·
verified ·
1 Parent(s): 8fc2ed8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -18
app.py CHANGED
@@ -11,10 +11,6 @@ if __name__ == "__main__":
11
  logging.basicConfig(level=logging.WARNING)
12
 
13
 
14
- HF_TOKEN = os.getenv("HF_TOKEN")
15
- if HF_TOKEN:
16
- print("🔑 Logging in to Hugging Face Hub...")
17
- login(HF_TOKEN)
18
 
19
  from RealtimeTTS import (
20
  TextToAudioStream,
@@ -37,24 +33,21 @@ import wave
37
  import io
38
  import os
39
 
40
- PORT = int(os.environ.get("TTS_FASTAPI_PORT", 7860))
41
-
42
- register_engine("orpheus", OrpheusEngine)
 
43
 
44
- ORPHEUS_API_URL = "https://huggingface.co/spaces/Tomtom84/dev-mode-realtts-orpheus/"
45
 
46
- engines["orpheus"] = OrpheusEngine(api_url=ORPHEUS_API_URL)
47
 
48
 
49
- SUPPORTED_ENGINES = [
50
- "azure",
51
- "openai",
52
- "elevenlabs",
53
- "system",
54
- # "coqui", #multiple queries are not supported on coqui engine right now, comment coqui out for tests where you need server start often,
55
- "kokoro",
56
- "orpheus"
57
- ]
58
 
59
  # change start engine by moving engine name
60
  # to the first position in SUPPORTED_ENGINES
 
11
  logging.basicConfig(level=logging.WARNING)
12
 
13
 
 
 
 
 
14
 
15
  from RealtimeTTS import (
16
  TextToAudioStream,
 
33
  import io
34
  import os
35
 
36
+ HF_TOKEN = os.getenv("HF_TOKEN")
37
+ if HF_TOKEN:
38
+ print("🔑 Logging in to Hugging Face Hub...")
39
+ login(HF_TOKEN)
40
 
 
41
 
42
+ register_engine("orpheus", OrpheusEngine)
43
 
44
 
45
+ PORT = int(os.getenv("TTS_FASTAPI_PORT", 7860)) # Zahl kongruent halten
46
+ SUPPORTED_ENGINES = ["orpheus"]
47
+ engines["orpheus"] = OrpheusEngine(
48
+ api_url=os.getenv("ORPHEUS_API_URL"), # http://127.0.0.1:1234/v1/completions
49
+ model=os.getenv("ORPHEUS_MODEL") # Kartoffel-ID
50
+ )
 
 
 
51
 
52
  # change start engine by moving engine name
53
  # to the first position in SUPPORTED_ENGINES