Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,7 @@ def midi_ddsp_synth(instrument, midi_file):
|
|
25 |
raise ValueError('Error: not an available instrument type')
|
26 |
instrument_id = INST_NAME_TO_ID_DICT[instrument]
|
27 |
sample_rate = 16000
|
28 |
-
|
29 |
-
midi_audio, midi_control_params, midi_synth_params, conditioning_df = synthesize_mono_midi(synthesis_generator, expression_generator, midi_file, instrument_id, output_dir=None, pitch_offset=0, speed_rate=1)
|
30 |
x = midi_audio[0].numpy()
|
31 |
return gr.Audio(sample_rate, x)
|
32 |
|
|
|
25 |
raise ValueError('Error: not an available instrument type')
|
26 |
instrument_id = INST_NAME_TO_ID_DICT[instrument]
|
27 |
sample_rate = 16000
|
28 |
+
midi_audio, midi_control_params, midi_synth_params, conditioning_df = synthesize_mono_midi(synthesis_generator, expression_generator, midi_file.name, instrument_id, output_dir=None, pitch_offset=0, speed_rate=1)
|
|
|
29 |
x = midi_audio[0].numpy()
|
30 |
return gr.Audio(sample_rate, x)
|
31 |
|