| |
3.5.2 MFCC Example:
Enhancements
The basic MFCC front end introduced in the previous section can be
enhanced by the use of two additional techniques:
energy normalization
and
cepstral mean subtraction.
In this section, we describe how to implement these using
transform builder. To run the examples described below,
go to the directory $ISIP_TUTORIAL/sections/s03/s03_05_02.
Here you'll see the recip files recipe_mfcc_p1.sof and
recipe_mfcc_p2.sof. These two recipes make up our
standard front end.
The first recipe file, recipe_mfcc_p1.sof, can be viewed as
an "intermediate" recipe. It
computes the maximum energy in the file and saves its value by a
Constant object in a file called "max_energy.sof." This recipe also
computes the mean cepstrum values needed to generate the
CMS-filtered features, and stores these in a file named
"mean_cepstrum.sof". The second recipe, recipe_mfcc_p2.sof,
uses the output files "max_enerfy.sof" and "mean_cepstrum.sof" from
the first recipe to get the maximum enery and the mean cepstrum through
constant classes.
This completes the feature extraction process.
You may use these front-end recipes to extract features with either
one of two methods:
- Sequential commands:
isip_transform -debug BRIEF -param recipe_mfcc_p1.sof -suffix _mfc speech.sof
isip_transform -debug BRIEF -param recipe_mfcc_p2.sof -suffix _mfc speech.sof
- Recipe list:
In this section's directory you'll also see the file
recipe_mfcc.sof. This
is a list containing the two recipes mentioned earlier. Using a list,
the feature extraction process can be reduced to one command:
isip_transform -debug BRIEF -param recipe_mfcc.sof -suffix _mfc speech.sof
To verify your results, compare your two intermediate files,
max_energy.sof and mean_cepstrum.sof to the files
max_energy_compare.sof
and
mean_cepstrum_compare.sof, respectivley.
You may also compare your new feature file, speech_mfc.sof, to the
file
speech_mfc.sof
Sometimes it is convenient to process raw files directly and transform
them into features. You can easily modify recipe files to
accomplish this. The files can be modified manually or by using
transform builder.
To modify the files using transform builder, you must
change a few simple parameters in the input block configuration.
First, open the file recipe_mfcc_p1.sof. Right click on the input
block and click configuration. From this window, open the
sub-configuration window by clicking the configure button. Click
the audio button to display the audio_input configuration window.
Make sure the sample_frequency is set to 8000 and change the
file_format to RAW. Click save on all of the configuration windows
and return to the transform_builder workspace. Save the file as
recipe_mfcc_raw_p1.sof. Repeat these steps for the file
recipe_mfcc_p2.sof.
To make sure you're files are correct, compare them to these files:
recipe_p1_raw_compare.sof
and
recipe_p2_raw_compare.sof
To modify the recipe files manually, open the files in a text editor.
Next, find the label @ FrontEnd @. Under this label, you will
see two parameters: sample_frequency and file_format. Change these two
parameters to the following:
sample_frequency = 8000.0;
file_format = RAW;
Now, save these new files as recipe_mfcc_p1_raw.sof and
recipe_mfcc_p2_raw.sof. This is just an alternate way of
changing the recipe files without using transform builder.
These recipe files can now be used with isip_tranform to process raw
files directly, instead of converting the raw files to Sof. See
Section 3.4.1
for details about using isip_tranform.
For further details on the implementation of this industry-standard
front end, see
front end laboratory
in our
on-line workshop notes.
|
| |
|