setExtractorParameters
Description
setExtractorParameters(
specifies parameters used to extract aFE
,featureName
,params
)featureName
.
setExtractorParameters(
returns the parameters used to extract aFE
,featureName
)featureName
to default
values.
Examples
Extract Pitch Using the LHS Method
Read in an audio signal.
[audioIn,fs] = audioread("Counting-16-44p1-mono-15secs.wav");
Create an audioFeatureExtractor
object to extract pitch. Set the method of pitch extraction to "LHS"
.
aFE = audioFeatureExtractor(SampleRate=fs,pitch=true); setExtractorParameters(aFE,"pitch",Method="LHS")
Call extract
and plot the results.
f0 = extract(aFE,audioIn); plot(f0)
Modify Spectral Rolloff Threshold and Mel Spectrum Parameters
Read in an audio signal.
[audioIn,fs] = audioread("Counting-16-44p1-mono-15secs.wav");
Create an audioFeatureExtractor
object to extract the melSpectrum
and spectralRolloffPoint
. Specify ten bands for the mel spectrum and set the threshold for the rolloff point to 50% of the total energy.
aFE = audioFeatureExtractor(SampleRate=fs,melSpectrum=true,spectralRolloffPoint=true); setExtractorParameters(aFE,"melSpectrum",NumBands=10) setExtractorParameters(aFE,"spectralRolloffPoint",Threshold=0.5)
Call extract
and plot the results.
features = extract(aFE,audioIn);
idx = info(aFE);
surf(10*log10(features(:,idx.melSpectrum)))
title("Mel Spectrum")
plot(features(:,idx.spectralRolloffPoint))
title("Spectral Rolloff Point")
To return individual audio feature extractors to their default values, call setExtractorParameters
without specifying any parameters to set.
setExtractorParameters(aFE,"melSpectrum") setExtractorParameters(aFE,"spectralRolloffPoint")
Call extract
and plot the results.
features = extract(aFE,audioIn);
idx = info(aFE);
surf(10*log10(features(:,idx.melSpectrum)))
title("Mel Spectrum")
plot(features(:,idx.spectralRolloffPoint))
title("Spectral Rolloff Point")
Input Arguments
aFE
— Input object
audioFeatureExtractor
object
Input object, specified as an audioFeatureExtractor
object.
featureName
— Name of feature extractor
character array | string
Name of feature extractor, specified as a character array or string.
Data Types: char
| string
params
— Parameters to set
name-value arguments | struct
Parameters to set, specified as name-value arguments or a struct.
Version History
Introduced in R2022aR2024a: Normalization
parameter of auditory spectrum features will be removed
Using the Normalization
parameter of the
melSpectrum
, barkSpectrum
, and
erbSpectrum
issues a warning that it will be removed in a future
release. Use the FilterBankNormalization
parameter for these features
instead.
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)