Update tts_script.py
Browse files- tts_script.py +4 -2
tts_script.py
CHANGED
@@ -11,8 +11,10 @@ app = Flask(__name__)
|
|
11 |
# ElevenLabs API Configuration
|
12 |
ELEVENLABS_API_URL = "https://api.elevenlabs.io/v1/text-to-speech"
|
13 |
HEADERS = {"User-Agent": "TTSApp"}
|
14 |
-
|
15 |
-
CACHE_DIR.
|
|
|
|
|
16 |
|
17 |
# Available Voices
|
18 |
ALL_VOICES = {
|
|
|
11 |
# ElevenLabs API Configuration
|
12 |
ELEVENLABS_API_URL = "https://api.elevenlabs.io/v1/text-to-speech"
|
13 |
HEADERS = {"User-Agent": "TTSApp"}
|
14 |
+
# Change cache directory to a writable location
|
15 |
+
CACHE_DIR = pathlib.Path("/tmp/audio_cache")
|
16 |
+
CACHE_DIR.mkdir(parents=True, exist_ok=True)
|
17 |
+
|
18 |
|
19 |
# Available Voices
|
20 |
ALL_VOICES = {
|