Spaces:
Runtime error
Runtime error
Simon Stolarczyk
commited on
Commit
•
a973402
1
Parent(s):
1b92886
Testing local directory.
Browse files- .ipynb_checkpoints/app-checkpoint.py +6 -2
- app.py +6 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -7,14 +7,18 @@ from pathlib import Path
|
|
7 |
from midi2audio import FluidSynth
|
8 |
|
9 |
import subprocess
|
|
|
10 |
|
11 |
-
|
|
|
|
|
12 |
|
13 |
def process_midi(midi_file):
|
14 |
name = Path(midi_file.name)
|
15 |
# stream = midiFileToStream(midi_file)
|
16 |
# output_wav = play_wav(stream)
|
17 |
-
|
|
|
18 |
return output_wav
|
19 |
|
20 |
iface = gr.Interface(
|
|
|
7 |
from midi2audio import FluidSynth
|
8 |
|
9 |
import subprocess
|
10 |
+
import os
|
11 |
|
12 |
+
print(os.getcwd())
|
13 |
+
print(os.listdir())
|
14 |
+
# subprocess.run(['fluidsynth'])
|
15 |
|
16 |
def process_midi(midi_file):
|
17 |
name = Path(midi_file.name)
|
18 |
# stream = midiFileToStream(midi_file)
|
19 |
# output_wav = play_wav(stream)
|
20 |
+
# FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
|
21 |
+
FluidSynth("FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
|
22 |
return output_wav
|
23 |
|
24 |
iface = gr.Interface(
|
app.py
CHANGED
@@ -7,14 +7,18 @@ from pathlib import Path
|
|
7 |
from midi2audio import FluidSynth
|
8 |
|
9 |
import subprocess
|
|
|
10 |
|
11 |
-
|
|
|
|
|
12 |
|
13 |
def process_midi(midi_file):
|
14 |
name = Path(midi_file.name)
|
15 |
# stream = midiFileToStream(midi_file)
|
16 |
# output_wav = play_wav(stream)
|
17 |
-
|
|
|
18 |
return output_wav
|
19 |
|
20 |
iface = gr.Interface(
|
|
|
7 |
from midi2audio import FluidSynth
|
8 |
|
9 |
import subprocess
|
10 |
+
import os
|
11 |
|
12 |
+
print(os.getcwd())
|
13 |
+
print(os.listdir())
|
14 |
+
# subprocess.run(['fluidsynth'])
|
15 |
|
16 |
def process_midi(midi_file):
|
17 |
name = Path(midi_file.name)
|
18 |
# stream = midiFileToStream(midi_file)
|
19 |
# output_wav = play_wav(stream)
|
20 |
+
# FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
|
21 |
+
FluidSynth("FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
|
22 |
return output_wav
|
23 |
|
24 |
iface = gr.Interface(
|