Closed asigalov61 closed 3 years ago
Finally got a chance to try this out on colab. In the second line of your code you have to use apt
- the aptitude package manager - as this is installing the fluidsynth software synthesizer, which is a binary package written in C. The last line of your code gives me a "ValueError: could not convert string to float: 'output_wav.wav'" - I think you probably have to open
the _outputwav.wav file first and read its contents into a list of floats
, then pass that list to Audio()
.
This is interesting, but your python code doesn't actually use pyfluidsynth. You install it using pip
on line 1 but you never import
it in your python code - you've instead imported a FluidSynth
module that's part of the midi2audio library.
Hey guys,
Since the fluidsynth and pyfluidsynth can't play output on Windows/Google Colabs, here is a little code that works just fine. Reposting here from fluidsynth issues as recommended by fluidsynth contributors. I hope it is ok.
Its actually more of a hack/workaround but it does the job. Enjoy :)