Sound analyzer class.
More...
#include <MASoundBasicAnalyzer.hpp>
|
static const int | MfccCount = 26 |
| Number of mfcc components.
|
|
|
static MC::FloatTable | CompactFeatureVectors (const MC::FloatTable &feature_vectors, const unsigned int window_size) |
| Compacting the feature vectors. More...
|
|
Sound analyzer class.
Definition at line 43 of file MASoundBasicAnalyzer.hpp.
MASoundBasicAnalyzer::MASoundBasicAnalyzer |
( |
unsigned int |
frequency, |
|
|
bool |
only_mfcc_components = false |
|
) |
| |
|
explicit |
Class constructor.
- Parameters
-
frequency | Sampling frequency of the audio data |
only_mfcc_components | Calculate only MFCC band components |
Definition at line 34 of file MASoundBasicAnalyzer.cpp.
void MASoundBasicAnalyzer::AddSamples |
( |
const MARobotState & |
robot_state | ) |
|
|
overridevirtual |
void MASoundBasicAnalyzer::AddSoundData |
( |
const MCBinaryData & |
raw_data | ) |
|
void MASoundBasicAnalyzer::AddSoundData |
( |
const MC::DoubleList & |
raw_data | ) |
|
MC::FloatList MASoundBasicAnalyzer::ApplyHorizontalFeatures |
( |
const MC::FloatList & |
vector | ) |
|
|
protected |
Add a feature vector to a sliding window to calculate horizontal features.
- Parameters
-
- Returns
- Horizontal features for the passed feature vector
Definition at line 742 of file MASoundBasicAnalyzer.cpp.
MC::DoubleTable MASoundBasicAnalyzer::GenerateHannWindows |
( |
const MC::DoubleList & |
audio_data, |
|
|
int & |
remaining_count |
|
) |
| |
|
protected |
Generate Hann windows from audio data.
- Parameters
-
audio_data | Audio data |
remaining_count | Remaining data count |
- Returns
- Hann windows
Definition at line 766 of file MASoundBasicAnalyzer.cpp.
MC::FloatList MASoundBasicAnalyzer::GetFeatureVector |
( |
| ) |
|
|
overridevirtual |
unsigned int MASoundBasicAnalyzer::GetFeatureVectorCount |
( |
| ) |
const |
Get the available feature vector count.
- Returns
- The feature vector count in the queue
Definition at line 140 of file MASoundBasicAnalyzer.cpp.
MC::FloatTable MASoundBasicAnalyzer::GetFeatureVectors |
( |
unsigned int |
desired_vector_count = 0 , |
|
|
unsigned int |
erased_vector_count = 0 |
|
) |
| |
Get all feature vectors.
- Parameters
-
desired_vector_count | Desired vector count or zero |
erased_vector_count | Preserved vector count |
- Returns
- All feature vectors in the queue otherwise empty table
Definition at line 118 of file MASoundBasicAnalyzer.cpp.
bool MASoundBasicAnalyzer::IsValid |
( |
| ) |
const |
|
overridevirtual |
Check if enough samples were added to the analyzer.
- Returns
- True if the analyzer can provide feature vectors otherwise false.
Implements MAAnalyzer.
Definition at line 94 of file MASoundBasicAnalyzer.cpp.
The documentation for this class was generated from the following files: