Simon Stolarczyk commited on
Commit
387b0e3
1 Parent(s): 03a706d

Try local folder and look for other sound font locations.

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +4 -4
  2. app.py +4 -4
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -35,9 +35,9 @@ print(os.getcwd())
35
  # subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
- # subprocess.run(['apt-get install fluidsynth'], shell=True)
39
- # results = subprocess.run(['find / | grep "fluidsynth"'], capture_output=True, shell=True)
40
- # print(results.stdout)
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
@@ -48,7 +48,7 @@ def process_midi(midi_file):
48
  # stream = midiFileToStream(midi_file)
49
  # output_wav = play_wav(stream)
50
  # FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
51
- FluidSynth().midi_to_audio(name, 'test.wav')
52
  return 'test.wav'
53
 
54
  iface = gr.Interface(
 
35
  # subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
+ # subprocess.run(['apt-get install fluidsynth'], shell=True) # do not have the right perms
39
+ results = subprocess.run(['find / | grep "fluidsynth"'], capture_output=True, shell=True)
40
+ print(results.stdout)
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
 
48
  # stream = midiFileToStream(midi_file)
49
  # output_wav = play_wav(stream)
50
  # FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
51
+ FluidSynth(".fluidsynth/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
52
  return 'test.wav'
53
 
54
  iface = gr.Interface(
app.py CHANGED
@@ -35,9 +35,9 @@ print(os.getcwd())
35
  # subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
- # subprocess.run(['apt-get install fluidsynth'], shell=True)
39
- # results = subprocess.run(['find / | grep "fluidsynth"'], capture_output=True, shell=True)
40
- # print(results.stdout)
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
@@ -48,7 +48,7 @@ def process_midi(midi_file):
48
  # stream = midiFileToStream(midi_file)
49
  # output_wav = play_wav(stream)
50
  # FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
51
- FluidSynth().midi_to_audio(name, 'test.wav')
52
  return 'test.wav'
53
 
54
  iface = gr.Interface(
 
35
  # subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
+ # subprocess.run(['apt-get install fluidsynth'], shell=True) # do not have the right perms
39
+ results = subprocess.run(['find / | grep "fluidsynth"'], capture_output=True, shell=True)
40
+ print(results.stdout)
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
 
48
  # stream = midiFileToStream(midi_file)
49
  # output_wav = play_wav(stream)
50
  # FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
51
+ FluidSynth(".fluidsynth/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
52
  return 'test.wav'
53
 
54
  iface = gr.Interface(