bdc-divya commited on
Commit
2b03e6f
·
1 Parent(s): 9ebc50e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -15,11 +15,11 @@ def generate_music(description):
15
  # Generate music based on the provided description
16
  wav = model.generate([description])
17
 
18
- # Save the generated audio as "output.wav" with loudness normalization at -14 dB LUFS.
19
- audio_write("output.wav", wav[0].cpu(), model.sample_rate, strategy="loudness")
20
 
21
- # Return the path to the generated audio file
22
- return "Audio generated and saved as 'output.wav'"
23
 
24
  # Define a Gradio interface
25
  iface = gr.Interface(
 
15
  # Generate music based on the provided description
16
  wav = model.generate([description])
17
 
18
+ # # Save the generated audio as "output.wav" with loudness normalization at -14 dB LUFS.
19
+ # audio_write("output.wav", wav[0].cpu(), model.sample_rate, strategy="loudness")
20
 
21
+ # Return the generated audio for playback
22
+ return wav[0].cpu().numpy()
23
 
24
  # Define a Gradio interface
25
  iface = gr.Interface(