python-pesq
PESQ (Perceptual Evaluation of Speech Quality) Wrapper for Python Users
This code is designed for numpy array specially.
Requirements
C compiler
numpy
cython
Build and Install
$ git clone https://github.com/ludlows/python-pesq.git
$ cd python-pesq
$ pip install . # for python 2
$ pip3 install . # for python 3
$ cd ..
$ rm -rf python-pesq # remove the code folder since it exists in the python package folder
Install with pip
# PyPi Repository
$ pip install pesq
# The Latest Version
$ pip install https://github.com/ludlows/python-pesq/archive/master.zip
# or
$ pip3 install https://github.com/ludlows/python-pesq/archive/master.zip
Example for narrow band and wide band
when using it, please note that the sampling rate (frequency) should be 16000 or 8000.
And using 8000 is supported for narrow band only.
from scipy.io import wavfile
from pesq import pesq
rate, ref = wavfile.read("./audio/speech.wav")
rate, deg = wavfile.read("./audio/speech_bab_0dB.wav")
print(pesq(rate, ref, deg, 'wb'))
print(pesq(rate, ref, deg, 'nb'))
Correctness
The correctness is verified by running samples in audio folder.
PESQ computed by this code in wide band mode is 1.0832337141036987
PESQ computed by this code in narrow band mode is 1.6072081327438354
Note
Sampling rate (fs|rate) - No default. Must select either 8000Hz or 16000Hz.
Note there is narrow band (nb) mode only when sampling rate is 8000Hz.
The original C soure code is modified.
Metadata
Release files for pesq 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pesq-0.0.2.tar.gz | 34.0 kB | Without provenance | Details |
Release files / pesq-0.0.2.tar.gz
| Download URL | pesq-0.0.2.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a33efaca4dfaaaca73d714adf954bd5cb7b2c9a27cfb64909e41053aa2a35c3c
|
|
BLAKE2b-256 checksum How to use checksums |
98791da494ca32ad9e57a76202f756b3b67e8a404904c7004d290c0063a845c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.7
|
Security for pesq 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.