Logo

void phoneme_estimator::TrivialPhonemeAlignment alignment_result align  )  [static]
 

This static method estimates the phoneme durations given an alignment result.

This static method evenly spaces the phonemes across the word.

This is used when we don't have a model for the phonemes coming out of SAPI 5.1, but we'd still like to generate some time alignments for phonemes. It's actually not too bad.

This method will calculate the alignment_results::m_phonemeStartTimes given the specification for the phonemes. If there is a conversion process in the engine_phoneme_spec list, that conversion will also be done.

This method uses no signal processing, the estimation is based on the type of phoneme being timed out.

Parameters:
align -[in] the phoneme list and start and end time of the ortheme -[out] mapped phoneme list and estimated start and end times for the phonemes

Definition at line 246 of file phone_estimate.cpp.

00247 {
00248     float duration = float(align.m_msEnd - align.m_msStart);
00249     if (align.m_phonemes.size())
00250     {
00251         float inc = duration/float(align.m_phonemes.size());
00252 
00253         long pos = align.m_msStart;
00254         align.m_phonemeEndTimes.clear();
00255         for (unsigned long i = 0; i < align.m_phonemes.size(); i++)
00256         {
00257             long endTime = pos + (long)inc;
00258             align.m_phonemeEndTimes.push_back(pos);
00259             pos = endTime;
00260         }
00261     }
00262 }


Copyright (C) 2002-2005 Annosoft LLC. All Rights Reserved.
Visit us at www.annosoft.com