Spaces:
Running
Running
Update api/audio.py
Browse files- api/audio.py +3 -1
api/audio.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import io
|
|
|
2 |
import wave
|
3 |
import numpy as np
|
4 |
import requests
|
@@ -303,7 +304,8 @@ class TTSManager:
|
|
303 |
|
304 |
stream = self.streaming if stream is None else stream
|
305 |
|
306 |
-
|
|
|
307 |
data = {"model": self.config.tts.name, "input": text, "voice": "alloy", "response_format": "opus"}
|
308 |
|
309 |
try:
|
|
|
1 |
import io
|
2 |
+
import os
|
3 |
import wave
|
4 |
import numpy as np
|
5 |
import requests
|
|
|
304 |
|
305 |
stream = self.streaming if stream is None else stream
|
306 |
|
307 |
+
kex =os.get('TTS_KEY')
|
308 |
+
headers = {"Authorization": f"Bearer {kex}"}
|
309 |
data = {"model": self.config.tts.name, "input": text, "voice": "alloy", "response_format": "opus"}
|
310 |
|
311 |
try:
|