Main Page   Class Hierarchy   Compound List   File List   Compound Members  

VowelSample Class Reference

#include <VowelSample.h>

Collaboration diagram for VowelSample:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 VowelSample (bool record=false)
 ~VowelSample (void)
bool open (const char *filename, AudioPreprocessing &prep_template)
 VowelSample (VowelSample &source)
void setCorrectVowel (VowelSampleType type)
bool saveRawSample (const char *filename=0)
bool isValidUserInformation (void)

Public Attributes

VowelSampleType type_correct
vector< double > sample
vector< double > fft_energy
char * filename
AUFile * raw

Private Member Functions

bool convertUserinfoToC (void)
void convertCtoUserinfo (void)

Private Attributes

bool info_success
VowelSampleInformation info

Detailed Description

Representation of one vowel.

Used from the VowelSet class. Does the handling of audio files from the raw audio data to the neural network input.


Constructor & Destructor Documentation

VowelSample::VowelSample (  bool    record = false ) 
 

Standard constructor.

Parameters:
record When set to true, the VowelSample object is prepared for recording, i.e. its raw member is initialized.

VowelSample::~VowelSample (  void    ) 
 

Basic destructor.

VowelSample::VowelSample (  VowelSample &    source ) 
 

Copy constructor.


Member Function Documentation

void VowelSample::convertCtoUserinfo (  void    )  [private]
 

Convert the class elements into the packed 'info' structure.

bool VowelSample::convertUserinfoToC (  void    )  [private]
 

Convert the user information within the 'info' structure to the corresponding class elements.

Returns:
True on success, false on failure.

bool VowelSample::isValidUserInformation (  void    )  [inline]
 

Getter for the user information structure success.

Returns:
True when there was a userinfo structure in the file, false if there was none.

bool VowelSample::open (  const char *    filename,
AudioPreprocessing &    prep_template
) 
 

Open an audio file

Convert raw data raw using the audio preprocessor prep_template as processing template. All the conversion is done using the active settings of the template. Also extract the raw information structure stored with the AU file into a C level structure (VowelSampleInformation).

Parameters:
filename The raw audio input filename.
prep_template The conversion template which transforms the raw data into a windows energy vector.
Returns:
True on success, false on failure.

bool VowelSample::saveRawSample (  const char *    filename = 0 ) 
 

Save the raw data back to an AU file.

Parameters:
filename When non-zero, the filename the AU file will be written to. When zero, the original filename is used.
Returns:
True when the operation was successful, otherwise false.

void VowelSample::setCorrectVowel (  VowelSampleType    type ) 
 

Set the correct vowel type for this sample.

Parameters:
type The correct vowel for this sample.


Member Data Documentation

vector<double> VowelSample::fft_energy
 

The FFT energy array, showing the frequency based amplitude energy for the input sample.

char* VowelSample::filename
 

The original AU filename that produced the sample.

VowelSampleInformation VowelSample::info [private]
 

Userdata part of the AU file converted to a real structure. Only used temporarily, no real processing takes place here except conversion before and after AUFile read/write operations.

bool VowelSample::info_success [private]
 

Flag, when true there is valid userdata.

AUFile* VowelSample::raw
 

The original AU file associated with this sample.

Warning: can be NULL.

vector<double> VowelSample::sample
 

The processed audio sample.

Stored as windows vectors of energy levels in the frequency windows.

VowelSampleType VowelSample::type_correct
 

The correct type of vowel this sample represents. In case the vowel should be determined or is otherwise unknown, it can be set to 'unknown'.


The documentation for this class was generated from the following files:
Generated on Mon Feb 24 19:37:47 2003 by doxygen1.3-rc3