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 Center および File ExchangeMeasurements 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