Need help with word identification using fft()

조회 수: 2 (최근 30일)
Wynand
Wynand 2023년 10월 23일
답변: Shivansh 2023년 11월 15일
I am writing a program to listen to a voice and then return the most probable matching word. The issue I am running into is the fft() returns such similar frequency bands that comparisons are wildly similar and as such, inaccurate. I have attached a function I wrote for this goal. Any hints to get me more accurate analysis would be greatly appreciated
My database is 10 words with 10 versions each in a 10x10 cell matrix. From comparison I get get total difference between all the database words and the recorded word and the lowest value difference is assumed to be the closest match
FFT_Output was the first iteration
I tried to rewrite it more cleanly with FFT_Output_2 but I think it's mostly, functionally the same but easier to digest.
Thank you
  댓글 수: 2
Star Strider
Star Strider 2023년 10월 24일
You would need to use either spectrogram or pspectrum (with the 'spectrogram' option), and then use relatively sophisticated pattern-matching. See Formant Estimation with LPC Coefficients for a representative approach. Using fft alone is not going to be sufficient.
Wynand
Wynand 2023년 10월 24일
Thank you for the reply. Unfortunately our objective was to use fft and not other built in functions of matlab

댓글을 달려면 로그인하십시오.

답변 (1개)

Shivansh
Shivansh 2023년 11월 15일
Hi Wynand,
I understand that you are using FFT to transform the voice signal into the frequency domain and then finding the peaks to differentiate between words. The issue with this approach is that it focuses mainly on the frequency content of the signal, which may not be sufficient to differentiate between different words pronounced by different people with different voice characteristics.
You can try “mfcc()” or some machine learning techniques as they can provide significantly better results.
Since you want to experiment with fft(), you can still improve your results by refining your FFT-based approach. You can work on following suggestions:
  1. You can try using a larger number of bins and base them on any other scale instead dividing the FFT output into bins of equal width.
  2. You are currently using the “findpeaks” function with fixed parameters which might not be optimal for every word. You can consider using a more sophisticated peak detection algorithm for audio signals.
  3. You are currently only using the magnitude of the FFT output. You can try including phase outputs for distinguishing between different words.
  4. You can also experiment with different windows other than Blackman window.
  5. You might want to use overlapping frames instead of dividing your signal into non-overlapping frames. This can provide a smoother representation of the signal and might improve your results.
You can refer to the following link for more information regarding “fft()” https://in.mathworks.com/help/matlab/ref/fft.html.
Hope it helps!

카테고리

Help CenterFile Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by