DSatishchandra commited on
Commit
d6571b7
·
verified ·
1 Parent(s): 2bb76c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -51,7 +51,9 @@ def get_menu_items(sf):
51
  def generate_audio_prompt(text, filename):
52
  try:
53
  tts = gTTS(text)
54
- tts.save(os.path.join("static", filename))
 
 
55
  except gtts.tts.gTTSError as e:
56
  print(f"Error: {e}")
57
  print("Retrying after 5 seconds...")
 
51
  def generate_audio_prompt(text, filename):
52
  try:
53
  tts = gTTS(text)
54
+ file_path = os.path.join("static", filename)
55
+ tts.save(file_path)
56
+ print(f"Audio saved to {file_path}") # Log the saved file path
57
  except gtts.tts.gTTSError as e:
58
  print(f"Error: {e}")
59
  print("Retrying after 5 seconds...")