Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,9 @@ wav = model.generate_unconditional(1) # generates 4 unconditional audio sampl
|
|
10 |
def AudioGenie(Prompt):
|
11 |
descriptions = [Prompt]
|
12 |
wav = model.generate(descriptions) # generates 3 samples.
|
13 |
-
for idx, one_wav in enumerate(wav)
|
|
|
|
|
14 |
return wav
|
15 |
|
16 |
gr.Interface(fn=AudioGenie, inputs= 'text', outputs= 'audio').launch(debug=True)
|
|
|
10 |
def AudioGenie(Prompt):
|
11 |
descriptions = [Prompt]
|
12 |
wav = model.generate(descriptions) # generates 3 samples.
|
13 |
+
for idx, one_wav in enumerate(wav):
|
14 |
+
# Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
|
15 |
+
audio_write(f'{idx}', one_wav.cpu(), model.sample_rate, strategy="loudness", loudness_compressor=True)
|
16 |
return wav
|
17 |
|
18 |
gr.Interface(fn=AudioGenie, inputs= 'text', outputs= 'audio').launch(debug=True)
|