Spaces:
Running
on
Zero
Running
on
Zero
hungchiayu
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ def gradio_generate(prompt, steps, guidance,duration=10):
|
|
35 |
#print(f"Saving audio to file: {unique_filename}")
|
36 |
|
37 |
# Save to file
|
|
|
38 |
torchaudio.save(filename, output, 44100)
|
39 |
|
40 |
|
|
|
35 |
#print(f"Saving audio to file: {unique_filename}")
|
36 |
|
37 |
# Save to file
|
38 |
+
output = output[:,:int(duration*44100)]
|
39 |
torchaudio.save(filename, output, 44100)
|
40 |
|
41 |
|