Simon Stolarczyk commited on
Commit
a967d61
1 Parent(s): e0f6aa7

Remove debugging lines and correct return statement.

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +3 -3
  2. app.py +3 -3
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -32,7 +32,7 @@ print(os.getcwd())
32
  # subprocess.run(['/home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
33
  # subprocess.run(['cat /home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
34
 
35
- subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
  # subprocess.run(['apt-get install fluidsynth'], shell=True)
@@ -41,7 +41,7 @@ subprocess.run(['cat /root/packages.txt'], shell=True)
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
44
- subprocess.run(['fluidsynth'], shell=True)
45
 
46
  def process_midi(midi_file):
47
  name = Path(midi_file.name)
@@ -49,7 +49,7 @@ def process_midi(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("FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
52
- return output_wav
53
 
54
  iface = gr.Interface(
55
  fn=process_midi,
 
32
  # subprocess.run(['/home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
33
  # subprocess.run(['cat /home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
34
 
35
+ # subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
  # subprocess.run(['apt-get install fluidsynth'], shell=True)
 
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
44
+ # subprocess.run(['fluidsynth'], shell=True)
45
 
46
  def process_midi(midi_file):
47
  name = Path(midi_file.name)
 
49
  # output_wav = play_wav(stream)
50
  # FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
51
  FluidSynth("FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
52
+ return 'test.wav'
53
 
54
  iface = gr.Interface(
55
  fn=process_midi,
app.py CHANGED
@@ -32,7 +32,7 @@ print(os.getcwd())
32
  # subprocess.run(['/home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
33
  # subprocess.run(['cat /home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
34
 
35
- subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
  # subprocess.run(['apt-get install fluidsynth'], shell=True)
@@ -41,7 +41,7 @@ subprocess.run(['cat /root/packages.txt'], shell=True)
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
44
- subprocess.run(['fluidsynth'], shell=True)
45
 
46
  def process_midi(midi_file):
47
  name = Path(midi_file.name)
@@ -49,7 +49,7 @@ def process_midi(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("FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
52
- return output_wav
53
 
54
  iface = gr.Interface(
55
  fn=process_midi,
 
32
  # subprocess.run(['/home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
33
  # subprocess.run(['cat /home/user/.local/bin/install_fluidsynth_with_soundfonts_osx.sh'], shell=True)
34
 
35
+ # subprocess.run(['cat /root/packages.txt'], shell=True)
36
 
37
 
38
  # subprocess.run(['apt-get install fluidsynth'], shell=True)
 
41
 
42
  # subprocess.run(['PATH=$PATH:~/opt/bin'])
43
  # subprocess.run(['PATH=$PATH:~/opt/bin/fluidsynth'])
44
+ # subprocess.run(['fluidsynth'], shell=True)
45
 
46
  def process_midi(midi_file):
47
  name = Path(midi_file.name)
 
49
  # output_wav = play_wav(stream)
50
  # FluidSynth("../usr/share/sounds/sf2/FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
51
  FluidSynth("FluidR3_GM.sf2").midi_to_audio(name, 'test.wav')
52
+ return 'test.wav'
53
 
54
  iface = gr.Interface(
55
  fn=process_midi,