Logo

int _tmain int  argc,
TCHAR *  argv[],
TCHAR *  envp[]
 

main entry point of the program

This program will process the command line arguments pulling the audio file and pulling the text transcription (if any)

It will then use the appropriate engine to perform the lipsync.

Definition at line 244 of file sapi_lipsync_main.cpp.

00245 {
00246     
00247 
00248     CoInitialize(NULL);
00249     std::wstring strAudioFile;
00250     TCHAR *strTextFile = NULL;
00251     if (argc >= 2)
00252     {
00253         strAudioFile = TCHAR_2_wstring(argv[1]);
00254     }
00255     if (argc == 3)
00256     {
00257         strTextFile = argv[2];
00258     }
00259 
00260     if (argc < 2 || argc > 3)
00261     {
00262         usage(std::cerr);
00263         return (-1);
00264     }
00265     banner(std::cerr, strAudioFile, strTextFile);   
00266 
00267     // lipsync!
00268     if (strAudioFile.size() && strTextFile)
00269     {
00270         run_sapi_textbased_lipsync(strAudioFile, strTextFile);
00271     }
00272     else if (strAudioFile.size())
00273     {
00274         run_sapi_textless_lipsync(strAudioFile);
00275     }       
00276     else
00277     {
00278         usage(std::cerr);
00279     }
00280     return (0);
00281 }


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