Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,10 +24,10 @@ def midi_ddsp_synth(instrument, midi_file):
|
|
24 |
if instrument not in INST_NAME_LIST:
|
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=
|
29 |
-
x = midi_audio[0].numpy()
|
30 |
-
return
|
31 |
|
32 |
# def inference(audio):
|
33 |
# os.system("midi_ddsp_synthesize --midi_path "+audio.name)
|
|
|
24 |
if instrument not in INST_NAME_LIST:
|
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='./', pitch_offset=0, speed_rate=1)
|
29 |
+
# x = midi_audio[0].numpy()
|
30 |
+
return midi_file.name[:-4]+'.wav'
|
31 |
|
32 |
# def inference(audio):
|
33 |
# os.system("midi_ddsp_synthesize --midi_path "+audio.name)
|