How to extract specific MFCC from .wav files?
3 ビュー (過去 30 日間)
古いコメントを表示
When I use the "audioFeatureExtractor" to extract MFCC, since there are 13 MFCC features, I am not sure how to use the setExtractorParams function to pick specific MFCC features? For example, MFCC 1, 4 , 6, and 11.
aFE = audioFeatureExtractor("SampleRate",fs, ...
"mfcc",true);
idx = info(aFE) % output below.
setExtractorParams(aFE,"mfcc",) % not sure how to pick the MFCC features. I don't need all of them.
idx = struct with fields:
mfcc: [1 2 3 4 5 6 7 8 9 10 11 12 13]
0 件のコメント
採用された回答
jibrahim
2019 年 11 月 7 日
Hi Ibrahim,
Here you go:
setExtractorParams(aFE,"mfcc","NumCoeffs",11)
2 件のコメント
jibrahim
2020 年 12 月 17 日
Sorry, let me clarify.
You use setExtractorParams to set the number of MFCC coefficients to compute. NumCoeffs is a scalar value. This function does not enable you to "pick" specific coefficients But that is easy to do by simply indexing into the output of the audioFeatureExtractor.
[audioIn,fs] = audioread('speech_dft.wav');
aFE = audioFeatureExtractor("SampleRate",fs, ...
"mfcc",true);
% Set the max number of mfccs to compute
setExtractorParams(aFE,"mfcc","NumCoeffs",11)
features = extract(aFE,audioIn);
% Extract the coefficients you are interested in
mfccs = features(:,[1 4 6 11])
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Measurements and Spatial Audio についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!