Harmonic to noise ratio calculation

Réponses (3)

Chinmay Anand
Chinmay Anand le 28 Juin 2019

0 votes

You can look into this link for this.

2 commentaires

Khandaker Noman
Khandaker Noman le 28 Juin 2019
Actually this calculates SNR, is there any function to calculate HNR?
KALYAN ACHARJYA
KALYAN ACHARJYA le 28 Juin 2019
This is SNR, HNR is different.

Connectez-vous pour commenter.

KALYAN ACHARJYA
KALYAN ACHARJYA le 28 Juin 2019
Modifié(e) : KALYAN ACHARJYA le 16 Nov 2019

0 votes

You can use this custom function to calculate harmonic to noise ratio (HNR)
To understand in detail theory, read here

5 commentaires

Li feng
Li feng le 16 Nov 2019
what is noOfFrames?
KALYAN ACHARJYA
KALYAN ACHARJYA le 16 Nov 2019
Hyla Fourie
Hyla Fourie le 27 Oct 2020
Hmm I am not sure whether you are still active on this feed but I have read the resources and am still a bit confused as to what should be entered in to the noOfFrames variable...
mariem khrissi
mariem khrissi le 25 Nov 2020
does noofframes correspond to the number of frames ??
Manuel Brandner
Manuel Brandner le 19 Déc 2020
Modifié(e) : Manuel Brandner le 19 Déc 2020
noofframes equals signalblocks. in matlab you can use buffer to chop the signal into blocks with or without a certain overlap. Each signal block is then used in the HNR code to calculate the autocorrelation. After that the first zero crossing of the normalized autocorrelation is searched for. The maximum peak value is searched for with the max function and the sample position is then used (in the best case this gives you also the underlying fundamental frequency = fs/samplepos).
the energy at this position compared to the overall energy (value of the autocorrelation at index = 1) gives you the harmonic to noise ratio.
or for the normalized autocorrelation:
drawbacks as far as I understand it are:
  • pitch dependency
  • accuracy decreases if the signal gets more complex (in speech for example formants)
  • SNR has an influence on the values in terms of comparison of several measurement situations

Connectez-vous pour commenter.

Li feng
Li feng le 16 Nov 2019

0 votes

what is noOfFrames?

1 commentaire

KALYAN ACHARJYA
KALYAN ACHARJYA le 16 Nov 2019
Please write the comment in comment section only (Just below the answer).

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by