Giter Club home page Giter Club logo

Comments (7)

ludlows avatar ludlows commented on September 6, 2024 1

PESQ results principally model mean opinion scores (MOS) that cover a scale from 1 (bad) to 5 (excellent). A mapping function to MOS-LQO is outlined under P.862.1

from pesq.

ludlows avatar ludlows commented on September 6, 2024 1

@arunraj-sandeza thanks for using our code.

regarding your question, the narrow and wide bands are distinguished by the upper frequency bound. the narrow band has a lower frequancy bound 8000Hz. while the wide one has a higher bound 16000Hz. in other words, we could use the sampling rate of your raw audio samples to help you choose the mode.

from pesq.

leo19941227 avatar leo19941227 commented on September 6, 2024

Standard implementation in pesqmain.c (C code)
P.862: Software/P862_annex_A_2005_CD/source/pesqmain.c

if ( err_info->mode == NB_MODE )
{
    err_info->mapped_mos = 0.999f+4.0f/(1.0f+(float)exp((-1.4945f*err_info->pesq_mos+4.6607f)));
}
else
{
    err_info->mapped_mos = 0.999f+4.0f/(1.0f+(float)exp((-1.3669f*err_info->pesq_mos+3.8224f)));
    err_info->pesq_mos = -1.0;
}

Little experiment (correction is highly appreciated if I made any mistake!)

import numpy as np

def mapping(pesq_value, mode='NB'):
    if mode == 'NB':
        return 0.999 + 4.0 / (1.0 + np.exp(-1.4945 * pesq_value + 4.6607))
    else:
        return 0.999 + 4.0 / (1.0 + np.exp(-1.3669 * pesq_value + 3.8224))

nb_min, nb_max = mapping(-0.5, 'NB'), mapping(4.5, 'NB')
wb_min, wb_max = mapping(-0.5, 'WB'), mapping(4.5, 'WB')

print(f'NB range: ({nb_min}, {nb_max})')
print(f'WB range: ({wb_min}, {wb_max})')

Result

NB range: (1.016843313292765, 4.548638319075995)
WB range: (1.0426942267891948, 4.643888749336258)

from pesq.

MinMolang avatar MinMolang commented on September 6, 2024

Thank you for let me know NB range and WB range!
And I checked P.862.1 in here https://www.itu.int/rec/T-REC-P.862.1-200311-I/en
And It said "In addition, the mapping ensures a domain rescaling from –0.5 ... 4.5 to
1.02 ... 4.56. "
So now I understand this range is not exactly 1.0 to 4.5. I totally didn't know about P.862 or MOS-LQO these things..!
My result is exactly same with @leo19941227 's result. So I will keep in mind that this is P.862.2!
Thanks. XD

from pesq.

leo19941227 avatar leo19941227 commented on September 6, 2024

I am sorry for a small mistake. Actually the code is provided in P.862, however it did follow the mapping function described in P862.1 and P862.2 when it was amended in P862 Amendment 2.

In conclusion, P862.1 proposes a mapping function for narrow band raw pesq value -> MOS-LQO, and P862.2 proposes another one for the wide band case. They are two similar but different mapping functions. Finally, P.862 Amendment 2 implements these two functions in C code.

from pesq.

arunraj-sandeza avatar arunraj-sandeza commented on September 6, 2024

At the present moment i'm using your code for PESQ, but can someone help me with usage of narrow band and wide band in the code, like why we use nb and wb?

from pesq.

zdj97 avatar zdj97 commented on September 6, 2024

what is the smallest value of pesq?

from pesq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.