[英]How to get the average pitch of a .wav file without using Aubio?
所以,我正在開發一個程序來比較不同.wav 文件的平均音高。 我找到了一個解決方案,它使用 aubio 在 repl.it 上工作,但由於某種原因,每次我執行pip install aubio
時都會出現大約 50 條紅線錯誤。 關於車輪構造的一些東西不起作用。 那么,沒有奧比奧有什么辦法嗎?
這是我的錯誤信息:
C:\Users\GUNDERSON\Desktop\Tourretty>pip3.8 install aubio
Collecting aubio
Using cached aubio-0.4.9.tar.gz (479 kB)
Requirement already satisfied: numpy in c:\users\gunderson\appdata\local\programs\python\python38-32\lib\site-packages (from aubio) (1.19.0)
Building wheels for collected packages: aubio
Building wheel for aubio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\gunderson\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GUNDERSON\\AppData\\Local\\Temp\\pip-install-7tmi21r0\\aubio\\setup.py'"'"'; __file__='"'"'C:\\Users\\GUNDERSON\\AppData\\Local\\Temp\\pip-install-7tmi21r0\\aubio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\GUNDERSON\AppData\Local\Temp\pip-wheel-6_sc7w7f'
cwd: C:\Users\GUNDERSON\AppData\Local\Temp\pip-install-7tmi21r0\aubio\
Complete output (32 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\aubio
copying python\lib\aubio\cmd.py -> build\lib.win32-3.8\aubio
copying python\lib\aubio\cut.py -> build\lib.win32-3.8\aubio
copying python\lib\aubio\midiconv.py -> build\lib.win32-3.8\aubio
copying python\lib\aubio\slicing.py -> build\lib.win32-3.8\aubio
copying python\lib\aubio\__init__.py -> build\lib.win32-3.8\aubio
running build_ext
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
checking for aubio = 0.4.9
Running "pkg-config --libs --cflags aubio = 0.4.9" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
Info: aubio 0.4.9 was not found by pkg-config
Info: looking for *optional* additional packages
checking for libavcodec
Running "pkg-config --libs --cflags libavcodec" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libavformat
Running "pkg-config --libs --cflags libavformat" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libavutil
Running "pkg-config --libs --cflags libavutil" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libswresample
Running "pkg-config --libs --cflags libswresample" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libavresample
Running "pkg-config --libs --cflags libavresample" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for sndfile
Running "pkg-config --libs --cflags sndfile" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for samplerate
Running "pkg-config --libs --cflags samplerate" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
Info: libaubio was not installed or built locally with waf, adding src/
----------------------------------------
ERROR: Failed building wheel for aubio
Running setup.py clean for aubio
Failed to build aubio
Installing collected packages: aubio
Running setup.py install for aubio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\gunderson\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GUNDERSON\\AppData\\Local\\Temp\\pip-install-7tmi21r0\\aubio\\setup.py'"'"'; __file__='"'"'C:\\Users\\GUNDERSON\\AppData\\Local\\Temp\\pip-install-7tmi21r0\\aubio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\GUNDERSON\AppData\Local\Temp\pip-record-nxsy7j61\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\gunderson\appdata\local\programs\python\python38-32\Include\aubio'
cwd: C:\Users\GUNDERSON\AppData\Local\Temp\pip-install-7tmi21r0\aubio\
Complete output (24 lines):
running install
running build
running build_py
running build_ext
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
checking for aubio = 0.4.9
Running "pkg-config --libs --cflags aubio = 0.4.9" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
Info: aubio 0.4.9 was not found by pkg-config
Info: looking for *optional* additional packages
checking for libavcodec
Running "pkg-config --libs --cflags libavcodec" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libavformat
Running "pkg-config --libs --cflags libavformat" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libavutil
Running "pkg-config --libs --cflags libavutil" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libswresample
Running "pkg-config --libs --cflags libswresample" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for libavresample
Running "pkg-config --libs --cflags libavresample" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for sndfile
Running "pkg-config --libs --cflags sndfile" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
checking for samplerate
Running "pkg-config --libs --cflags samplerate" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
Info: libaubio was not installed or built locally with waf, adding src/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\gunderson\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GUNDERSON\\AppData\\Local\\Temp\\pip-install-7tmi21r0\\aubio\\setup.py'"'"'; __file__='"'"'C:\\Users\\GUNDERSON\\AppData\\Local\\Temp\\pip-install-7tmi21r0\\aubio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\GUNDERSON\AppData\Local\Temp\pip-record-nxsy7j61\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\gunderson\appdata\local\programs\python\python38-32\Include\aubio' Check the logs for full command output.
一些附加信息:
您不應該只是嘗試使用 pip 命令,因為它並沒有真正構建文件。
步驟 1) 下載 aubio 的 tar.gz。 最新版本是 0.4.9,所以一定要下載。
步驟 2) 提取 tar.gz
步驟 3) Go 到您的命令提示符/終端,然后 cd 進入解壓創建的文件夾。
步驟 4) 執行 python./waf 配置命令提示符。 這使您的文件准備好進行配置。 確保已經有 C++ 編譯器。 我使用了 Visual Studio 的 MSVC。 接下來,在命令提示符下執行 python./waf build。
第 5 步)您現在應該可以毫無問題地執行 pip 安裝 aubio,並且它應該正確安裝到您的計算機上。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.