2

I have implemented MFCC algorithm and want to implement BFCC. What are the differences between them and is it enough just to use another function instead of frequency to mel (2595 * Math.log10(1 + frequency / 700) ) and mel to frequency functions (700 * (Math.pow(10, mel / 2595) - 1) ) I follow that code: MFCC

PS: Does it need to change the code for triangular filters?

kamaci
  • 72,915
  • 69
  • 228
  • 366

2 Answers2

5

These are just different scales of representing the frequency spacings of the filters. MFCC uses filters whose center frequencies are spaced along the mel scale, while BFCC will use filters with center frequencies spaced along the bark scale.

The bark scale would simply be represented as:

  Bark(f)=13*arctan(0.00076*f)+3.5*arctan((f/(7500))*(f/(7500)))   

where f is the frequency in Hz.
Though you can use the bark scale to represent the center frequency spacings, research shows that using either mfcc or bfcc to represent feature vectors of an input speech sample has very little effect on ASR systems performance. The industry standard remains MFCC. In fact, I have not heard much of the BFCC.

If the code for the computation of filter coefficients is relatively generic and it takes in center frequencies as an input parameter, then I would say that you are OK. But, it is always best to double-check. Use MATLAB and plot frequency responses and check! You can check the [following paper][1] out for a comparison between MFCC, BFCC and uniform scale frequency spacings.

Update 1: The center frequency of a filter is either the arithmetic/geometric mean between the upper and lower cutoff frequencies of a band-pass/band-stop filter. Also, the reverse equation to solve for f given the Bark frequencies is not trivial. It will be a quadratic equation that will need to be solved. One way would be to have a table constructed for different values of f and Bark and then do a table lookup. But I have not been able to find any links to the reverse equation.

[1]: http://148.204.64.201/paginas%20anexas/voz/articulos%20interesantes/front%20end/MFCC/a-comparative-study-of.pdf
Hitesh Sahu
  • 41,955
  • 17
  • 205
  • 154
Sriram
  • 10,298
  • 21
  • 83
  • 136
  • so helpful information and voting up, thanks. I want to ask something to make some point more clear. What is the center frequency concept? I ask that because while calculating mel filters some implementations use logarithmic and linear filters. I have a related question here: http://stackoverflow.com/questions/6212923/mfcc-with-java-linear-and-logarithmic-filters Last question is how about the formula of inverse bark equation as like mel's (700 * (Math.pow(10, mel / 2595) - 1) ) ? – kamaci Jun 02 '11 at 19:21
  • +1 the link to the paper you mentioned is broken. Can you please fix it, or at least add its name instead ? – concept3d Nov 04 '14 at 08:40
  • @concept3d: It has been long since I looked at that paper, but I think it might have been this: http://148.204.64.201/paginas%20anexas/voz/articulos%20interesantes/front%20end/MFCC/a-comparative-study-of.pdf – Sriram Nov 04 '14 at 13:27
0

You could just instead select the frequencies by hand of each bark critical band (a bounch of if's and else's), since there is no exact equation for bark critical bands (for mel's either, but there is a pretty close one), then get the logarithm of the value for each band, and then apply dct, remember this is for each frame, mel scale uses also logarithmic scale, so there is not much point between doing mfcc or bfcc.