Logo

void run_sapi_textless_lipsync std::wstring &  strAudioFile  ) 
 

This function demonstrates how to perform "Textless Lipsync".

Given an audio file, this method will use SAPI to guess at words and word timings and phoneme timings in the specified audio file. The results are printed to std::out.

This is the best code to look at first

Parameters:
strAudioFile - [in] audio file

Definition at line 208 of file sapi_lipsync_main.cpp.

00209 {
00210     // 1. [optional] declare the SAPI 5.1 estimator. 
00211     // NOTE: for different phoneme sets: create a new estimator
00212     phoneme_estimator sapi51Estimator;
00213 
00214     // 2. declare the sapi lipsync object and call the lipsync method to
00215     // start the lipsync process
00216     sapi_textless_lipsync lsp(&sapi51Estimator);
00217     if (lsp.lipsync(strAudioFile))
00218     {
00219         // 3. Run the message loop and wait till the lipsync is finished
00220         run_lipsync_message_loop(lsp);
00221         
00222         // 4. finalize the lipsync results for printing
00223         // this call will estimate phoneme timings 
00224         lsp.finalize_phoneme_alignment();
00225 
00226         // 5. print the results to the output stream
00227         lsp.print_results(std::cout);
00228     
00229     }
00230     else
00231     {
00232         std::wcerr << lsp.getErrorString() << std::endl;
00233     }
00234 }


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