I need to get a note or tone of audio using python. I know about librosa.estimate_tuning, but I don't know how to convert it into hz. And maybe someone could say me another possible solution to my problem.
Asked
Active
Viewed 303 times
1 Answers
1
Maybe using 'aubio / pitch_tracking'. It has a python interface, and pitch tracking can be done in several unit including freqency(hz) or note (midi).
may be you can find some example here: https://github.com/aubio/aubio/tree/master/python/demos
pip install aubio
aubio pitch /myfile/Audio_6.wav
0.000000 474.987762
0.005805 450.682312
0.011610 445.780945
0.017415 443.593994
0.023220 442.287903
0.029025 441.431763
0.034830 440.940826
0.040635 440.775452
0.046440 440.760834
0.052245 440.760803
0.058050 440.760773
0.063855 440.760742
0.069660 440.760773
0.075465 440.760773
0.081270 440.760803
0.087075 440.760803
0.092880 440.760803
0.098685 440.760773
0.104490 440.760773
0.110295 440.760834
0.116100 440.760803
0.121905 440.760773
0.127710 440.760773
0.133515 440.760742
0.139320 440.760834
as you can see its judging my input audio wav file to be 440 Hz which is spot on

Scott Stensland
- 26,870
- 12
- 93
- 104

Terry Wu
- 178
- 9