huyanxin / python_pesq_with_pybind11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An easy python's wrapper for pesq with pybind11

How to use

1 clone current project and cd it

git clone https://github.com/huyanxin/python_pesq_with_pybind11.git
cd python_pesq_with_pybind11

2. clone pybind11 or ln -s already exit dir

git clone  https://github.com/pybind/pybind11.git

Or

ln -s your_exit_pybind11_dir .

3. Compile project

mkdir build && cd build
cmake ..
make 

4. use it

import soundfile as sf
import sys
sys.path.append(the pwd of the python_pesq.cpython-36m-x86_64-linux-gnu.so)
from python_pesq import pesq

ref, fs = sf.read('ref.wav')
deg, fs = sf.read('deg.wav')

print(pesq(ref,deg,fs))

Thanks And Reference

pybind11

ITU P.862

vBaicai's python-pesq

About


Languages

Language:C++ 78.2%Language:Objective-C 12.4%Language:C 8.9%Language:CMake 0.4%Language:Python 0.2%