python - pyFluidsynth 'module' 对象没有属性 'Synth'

标签 python audio fluidsynth

我有两个 fluidsynth

sudo apt-get install fluidsynth

和pyfluidsynth

sudo pip install pyfluidsynth

已安装。

但是,当我运行标准导入命令时,出现以下错误:

>>> import fluidsynth
>>> fs = fluidsynth.Synth()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Synth'

最佳答案

无论出于何种原因,似乎按照您的安装说明下载了 fluidsynth 0.2 版,而不是最新的 1.2.4 版。

要安装正确的包,请卸载 fluidsynth 并手动安装正确的包(来自 fluidsynth 的 pypi 页面的 tar.gz 文件):

pip uninstall pyfluidsynth
pip install -Iv https://pypi.python.org/packages/source/p/pyFluidSynth/pyFluidSynth-1.2.4.tar.gz#md5=60079310701d0b9298b65a8b6728ffcc

关于python - pyFluidsynth 'module' 对象没有属性 'Synth',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20022160/

相关文章:

audio - 有什么方法可以从CDN流式传输音频以便无法下载音频?

python - WinError 2:系统找不到在Python中用FluidSynth指定的文件吗?

python - gdb python : Can anyone explain me how to use this script written in this post?

Python - 使用 decorator.py 来保存方法文档字符串

python - Levenshtein 距离给出奇怪的值

python - 在 Python 中从 MIDI 到扬声器(声音合成)的真实音频的最简单方法是什么?

python - 如何通过Python+Mingus设置多个乐器?

python - PyDBG Python 2.7错误: "TypeError: ' module' object is not callable"

android - 单击几次后 SoundPool 不播放声音

android - Android 手机可以使用 iLBC 编解码器解码和播放 *.caf 文件吗?