Ejemplo n.º 1
0
 def __init__(self):
     if( system.isOnNao() ):
         self.strFileName = "/home/nao/www/blog/index.html";
     elif( system.isOnWin32() ):
         self.strFileName = "D:/ApacheRootWebSite2/htdocs/naoblog/index.html";
     else:
         self.strFileName = "/www/blog";
         
     self.strImgFolderAbs = os.path.dirname( self.strFileName ) + "/img/";
     self.strImgFolderLocal = "img/";        
     self.strEmoFolderAbs = os.path.dirname( self.strFileName ) + "/emo/";
     self.strEmoFolderLocal = "emo/";
     
     self.logMutex = mutex.mutex();
     self.logLastTime = None;
     
     # constants:
     self.none = 0;
     self.happy = 1;
     self.sad = 2;
     self.proud = 3;
     self.excitement = 4;
     self.fear = 5;
     self.anger = 6;
     self.neutral = 7;
     self.hot= 8;
Ejemplo n.º 2
0
def autoTest():
    if( test.isAutoTest() or False ):
        test.activateAutoTestOption();        
        if( not system.isOnNao() ):
            analyseSpeakSound( "d:/pythonscript/TestSoundEnergy_16bit_mono.raw" );
        playSoundHearing();
        playSound( "warning.wav", bDirectPlay = True );
        playSound( "hello.wav" );
        playSound( "ho1.wav" );
Ejemplo n.º 3
0
def getDefaultSpeakLanguage():
  "return the default speak language"
  #return constants.LANG_EN; # TODO: better things ! # CB : gets the real language
  if( not system.isOnNao() ):
    return 0;
  try:
    tts = naoqitools.myGetProxy("ALTextToSpeech");
  except:
    # no tts => anglais
    debug.debug( "WRN: speech.getDefaultSpeakLanguage: no tts found" );
    return constants.LANG_EN;
  if( tts == None ):
    return constants.LANG_EN;
  lang =  tts.getLanguage()
  if lang == "French":
    return constants.LANG_FR;
  else:
    return constants.LANG_EN;