Niansuh commited on
Commit
68876da
·
verified ·
1 Parent(s): 8d4d0b1

Update tts_script.py

Browse files
Files changed (1) hide show
  1. 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
- CACHE_DIR = pathlib.Path("./audio_cache")
15
- CACHE_DIR.mkdir(exist_ok=True)
 
 
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 = {