jbilcke-hf HF staff commited on
Commit
2b10ab2
1 Parent(s): c2cf399

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -632,11 +632,10 @@ def generate_story_and_speech(input_text, chatbot_role):
632
 
633
  synthesized_speech = generate_speech_for_sentence(history_tuples, chatbot_role, story_text, return_as_byte=True)
634
 
635
- if synthesized_speech:
636
  # Retrieve the base64 audio string from the tuple
637
  base64_audio = synthesized_speech[1]
638
  return {"text": story_text.strip(), "audio": base64_audio}
639
-
640
  else:
641
  return {"text": "Failed to generate story (no synthesized speech)", "audio": None}
642
 
 
632
 
633
  synthesized_speech = generate_speech_for_sentence(history_tuples, chatbot_role, story_text, return_as_byte=True)
634
 
635
+ if synthesized_speech:
636
  # Retrieve the base64 audio string from the tuple
637
  base64_audio = synthesized_speech[1]
638
  return {"text": story_text.strip(), "audio": base64_audio}
 
639
  else:
640
  return {"text": "Failed to generate story (no synthesized speech)", "audio": None}
641