Skip to content

Commit 5f4e990

Browse files
authored
Merge pull request #1 from mtorcoli/master
rename package pesq -> pesqc2
2 parents 6791b3e + a7d62ea commit 5f4e990

File tree

16 files changed

+12497
-123
lines changed

16 files changed

+12497
-123
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 81 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# pesq
1+
# pesqc2
22

33
[![DOI](https://zenodo.org/badge/939487338.svg)](https://doi.org/10.5281/zenodo.14938543)
44

5-
PESQ (Perceptual Evaluation of Speech Quality) Wrapper for Python [Updated for P.862 Corrigendum 2 (03/18)]
5+
This project forks from [ludlows/PESQ](https://github.com/ludlows/PESQ/), updating the PESQ implementation to include its latest correction addressed in [P.862 Corrigendum 2 (03/18)](https://www.itu.int/rec/T-REC-P.862-201803-W!Cor2/en).
66

7-
# Description
8-
This code is an updated version of /ludlows/pesq/ which implements the Corrigendum 2 of the ITU-T P.862 recommendation (PESQ). The correction addresses the under-prediction of subjective scores (by 0.8 MOS on average) by correcting the level of the loudness model.
7+
The correction addresses the under-prediction of subjective scores (by 0.8 MOS on average) by correcting the level of the loudness model.
98

109

1110
This code is designed for numpy array specially.
@@ -21,7 +20,7 @@ This code is designed for numpy array specially.
2120

2221
```bash
2322
# PyPi Repository
24-
$ pip install pesq
23+
$ pip install pesqc2
2524

2625
# The Latest Version
2726
$ pip install https://github.com/audiolabs/pesq/archive/master.zip
@@ -33,7 +32,7 @@ Please note that the sampling rate (frequency) should be 16000 or 8000 (Hz).
3332

3433
A sample rate of 8000 Hz is supported only in narrowband mode.
3534

36-
The code supports error-handling behaviors now.
35+
The code supports error-handling behaviors.
3736

3837
```python
3938
def pesq(fs, ref, deg, mode='wb', on_error=PesqError.RAISE_EXCEPTION):
@@ -45,7 +44,7 @@ def pesq(fs, ref, deg, mode='wb', on_error=PesqError.RAISE_EXCEPTION):
4544
mode: 'wb' (wide-band) or 'nb' (narrow-band)
4645
on_error: error-handling behavior, it could be PesqError.RETURN_VALUES or PesqError.RAISE_EXCEPTION by default
4746
Returns:
48-
pesq_score: float, P.862.2 Prediction (MOS-LQO)
47+
pesq_score: float, P.862.2 Prediction (MOS-LQO) including Corrigendum 2
4948
"""
5049
```
5150
Once you select `PesqError.RETURN_VALUES`, the `pesq` function will return -1 when an error occurs.
@@ -56,7 +55,7 @@ It now supports the following errors: `InvalidSampleRateError`, `OutOfMemoryErro
5655

5756
```python
5857
from scipy.io import wavfile
59-
from pesq import pesq
58+
from pesqc2 import pesq
6059

6160
rate, ref = wavfile.read("./audio/speech.wav")
6261
rate, deg = wavfile.read("./audio/speech_bab_0dB.wav")
@@ -94,24 +93,16 @@ When the `ref` is a 2-D numpy array and `deg` is a 2-D numpy array, the result o
9493

9594
The correctness is verified by running samples in the audio folder.
9695

97-
PESQ computed by this code in wideband mode is 1.5128041505813599 ~~1.0832337141036987~~ [due to Corrigendum 2]
96+
PESQ computed by this code in wideband mode is 1.5128041505813599
97+
(instead of 1.0832337141036987 which you would obtain without Corrigendum 2)
9898

99-
PESQ computed by this code in narrowband mode is 1.6072081327438354
99+
PESQ computed by this code in narrowband mode is 1.6072081327438354
100+
(no differences with or without Corrigendum 2)
100101

101102
# Note
102103

103104
Sampling rate (fs|rate) - No default. You must select either 8000Hz or 16000Hz.
104105

105106
Note that narrowband (nb) mode is only available when the sampling rate is 8000Hz.
106107

107-
The original C source code is modified.
108-
109-
# Who is using `pesq`
110-
111-
Please click [here](https://github.com/ludlows/python-pesq/network/dependents) to see these repositories, whose owners include `Facebook Research`, `SpeechBrain`, `NVIDIA` .etc.
112-
113-
# Acknowledgement
114-
115-
The work at /ludlows/pesq was funded by the Natural Sciences and Engineering Research Council of Canada.
116-
117-
The work at /ludlows/pesq was also funded by the Concordia University, Montreal, Canada.
108+
The original C source code is modified.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)