nwhitehead / pyfluidsynth

Python bindings for FluidSynth
GNU Lesser General Public License v2.1
197 stars 56 forks source link

AttributeError: module 'fluidsynth' has no attribute 'Synth' #36

Closed enosjeba closed 1 year ago

enosjeba commented 2 years ago

def display_audio(pm: pretty_midi.PrettyMIDI, seconds=30): waveform = pm.fluidsynth(fs=sampling_rate) waveform_short = waveform[:seconds*sampling_rate] return display.Audio(waveform_short, rate=sampling_rate)

This is the Code, I installed fluidsynth by pip install --upgrade pyfluidsynth

snhobbs commented 1 year ago

There is a package on pypi named fluidsynth that will raise that error. If you somehow installed that package you will get that error.

You can run the following to see if the other fluidsynth package is installed.

pip show fluidsynth
Name: fluidsynth
Version: 0.2
Summary: Fluidsynth bindings
Home-page: http://corbinsimpson.com/
Author: Corbin Simpson
Author-email: MostAwesomeDude@gmail.com
License: UNKNOWN
Location: /usr/local/lib/python3.8/dist-packages
Requires: 
Required-by: