GenAILearniverse commited on
Commit
53a3094
·
verified ·
1 Parent(s): 15ca735

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,11 +33,11 @@ def generate_audio(text):
33
  narrated_text = narrator(text)
34
 
35
  # Save the audio to a WAV file
36
- wavfile.write("finetuned_output.wav", rate=narrated_text["sampling_rate"],
37
  data=narrated_text["audio"][0])
38
 
39
  # Return the path to the saved audio file
40
- return "finetuned_output.wav"
41
 
42
  # Could you please write me a python code that will take list of detection object as an input and it will give the response that will include all the objects (labels) provided in the input. For example if the input is like this: [{'score': 0.9996405839920044, 'label': 'person', 'box': {'xmin': 435, 'ymin': 282, 'xmax': 636, 'ymax': 927}}, {'score': 0.9995879530906677, 'label': 'dog', 'box': {'xmin': 570, 'ymin': 694, 'xmax': 833, 'ymax': 946}}]
43
  # The output should be, This pictuture contains 1 person and 1 dog. If there are multiple objects, do not add 'and' between every objects but 'and' should be at the end only
 
33
  narrated_text = narrator(text)
34
 
35
  # Save the audio to a WAV file
36
+ wavfile.write("output.wav", rate=narrated_text["sampling_rate"],
37
  data=narrated_text["audio"][0])
38
 
39
  # Return the path to the saved audio file
40
+ return "output.wav"
41
 
42
  # Could you please write me a python code that will take list of detection object as an input and it will give the response that will include all the objects (labels) provided in the input. For example if the input is like this: [{'score': 0.9996405839920044, 'label': 'person', 'box': {'xmin': 435, 'ymin': 282, 'xmax': 636, 'ymax': 927}}, {'score': 0.9995879530906677, 'label': 'dog', 'box': {'xmin': 570, 'ymin': 694, 'xmax': 833, 'ymax': 946}}]
43
  # The output should be, This pictuture contains 1 person and 1 dog. If there are multiple objects, do not add 'and' between every objects but 'and' should be at the end only