Mel-frequency cepstral coefficients for speech and speaker recognition.
Details
MFCCs are widely used features in speech and speaker recognition systems. They represent the short-term power spectrum of a sound on a mel scale, which approximates human auditory perception. Uses a shared dispatch table for minimal memory per object.
Query methods
get_number_of_frames()- number of analysis framesget_time_step()- time step between framesget_max_num_coefficients()- maximum number of coefficientsget_fmin(),get_fmax()- frequency range (mel)get_c0_at_frame(frame)- C0 (energy) for a specific frameget_value_in_frame(frame, coef)- coefficient value at a frameget_coefficients_at_frame(frame)- all coefficients for a frameget_all_coefficients()- matrix of all coefficientsget_all_c0()- vector of all C0 values
Export
as_data_frame(include_c0)- convert to a data.frame/data.tableto_matrix()- convert to a Matrix object
Examples
sound <- Sound$create_tone(frequency = 150, duration = 0.3)
mfcc <- sound$to_mfcc(
num_coefficients = 13,
analysis_width = 0.025,
time_step = 0.01,
f1_mel = 100,
fmax_mel = 7800,
df_mel = 100
)
n_frames <- mfcc$get_number_of_frames()
coefs <- mfcc$get_all_coefficients()
mfcc$lifter(22)
df <- mfcc$as_data_frame(include_c0 = TRUE)