Changeset 10:6754b7b7f17b in rrlib_speech_synthesis


Ignore:
Timestamp:
25.11.2013 14:03:49 (7 years ago)
Author:
Michael Arndt <m_arndt@…>
Branch:
13.10
Children:
11:52cb0ca62c0d, 13:d6de8c2cfa62
Phase:
public
Message:

Add #ifdefs to be able to run the test_voices program if not all backends are available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_voices.cpp

    r7 r10  
    6666void Run() 
    6767{ 
     68#ifdef _LIB_RRLIB_SPEECH_SYNTHESIS_ESPEAK_PRESENT_ 
    6869  rrlib::speech_synthesis::tVoice *espeak_default = rrlib::speech_synthesis::tVoiceFactory::Instance().Create("espeak", "default"); 
    6970  for (unsigned int i = 1; i < 10; ++i) 
     
    7374    sleep(1); 
    7475  } 
     76#endif 
    7577} 
    7678 
     
    7981{ 
    8082 
     83#ifdef _LIB_RRLIB_SPEECH_SYNTHESIS_FESTIVAL_PRESENT_ 
    8184  rrlib::speech_synthesis::tVoice *festival_kal = rrlib::speech_synthesis::tVoiceFactory::Instance().Create("festival", "kal_diphone"); 
    8285  rrlib::speech_synthesis::tVoice *festival_don = rrlib::speech_synthesis::tVoiceFactory::Instance().Create("festival", "don_diphone"); 
     86#endif 
     87#ifdef _LIB_RRLIB_SPEECH_SYNTHESIS_ESPEAK_PRESENT_ 
    8388  rrlib::speech_synthesis::tVoice *espeak_mb_en1 = rrlib::speech_synthesis::tVoiceFactory::Instance().Create("espeak", "mb-en1"); 
     89#endif 
    8490 
    8591  std::thread thread2(Run); 
     
    8894  { 
    8995    std::string text = "Speaking from thread 1: line number " + std::to_string(i); 
     96#ifdef _LIB_RRLIB_SPEECH_SYNTHESIS_FESTIVAL_PRESENT_ 
    9097    festival_kal->Say(text); 
    9198    festival_don->Say(text); 
     99#endif 
     100#ifdef _LIB_RRLIB_SPEECH_SYNTHESIS_ESPEAK_PRESENT_ 
    92101    espeak_mb_en1->Say(text); 
     102#endif 
    93103    sleep(1); 
    94104  } 
Note: See TracChangeset for help on using the changeset viewer.