stardate69 commited on
Commit
d1feff4
·
verified ·
1 Parent(s): 256f384

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -47,9 +47,10 @@ def generate_audio():
47
  ).audios
48
 
49
  # Create a temporary file to store the generated audio
 
50
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmpfile:
51
  # Write the audio to the temporary file
52
- sf.write(tmpfile.name, audio_output.T.cpu().numpy(), pipe.vae.sampling_rate)
53
 
54
  # Store the temporary file path
55
  temp_file_path = tmpfile.name
 
47
  ).audios
48
 
49
  # Create a temporary file to store the generated audio
50
+ output_audio = audio_output[0].T.float().cpu().numpy()
51
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmpfile:
52
  # Write the audio to the temporary file
53
+ sf.write(tmpfile.name, output_audio, pipe.vae.sampling_rate)
54
 
55
  # Store the temporary file path
56
  temp_file_path = tmpfile.name