ilabsweden / pepperchat

A dialog system for the Aldebaran robots Pepper and Nao, based on ChatGPT.
MIT License
15 stars 6 forks source link

Can't find service: SpeechRecognition #8

Open BirkHintzeThisted opened 5 days ago

BirkHintzeThisted commented 5 days ago

From what I can tell this is an issue that is also present with the original contribution.

https://github.com/JBramauer/pepperspeechrecognition/issues

Considering this project obviously got it to work, maybe you have an idea?

Traceback (most recent call last):
  File "module_speechrecognition.py", line 90, in <module>
    main()
  File "module_speechrecognition.py", line 70, in main
    SpeechRecognition.start()
  File "C:\Users\user\pepperchat-master\pepperchat-master\pepperspeechrecognition\speechrecognition.py", line 125, in start
    audio.setClientPreferences( self.getName(),  SAMPLE_RATE, nNbrChannelFlag, nDeinterleave ) # setting same as default generate a bug !?!
  File "C:\Users\user\pepperchat-master\pynaoqi-python2.7-2.5.7.1-win32-vs2013\lib\naoqi.py", line 194, in __call__
    return self.__wrapped__.method_missing(self.__method__, *args, **kwargs)
  File "C:\Users\user\pepperchat-master\pynaoqi-python2.7-2.5.7.1-win32-vs2013\lib\naoqi.py", line 264, in method_missing
    raise e
RuntimeError:   ALAudioDevice::setClientPreferences
                ALProxy::ALProxy
        Can't find service: SpeechRecognition
INF: SpeechRecognitionModule.__del__: cleaning everything
INF: SpeechRecognitionModule.pause: stopping
INF: SpeechRecognitionModule: stopped!
BirkHintzeThisted commented 4 days ago

It fails at:

audio.setClientPreferences(self.getName(), SAMPLE_RATE, nNbrChannelFlag, nDeinterleave)

in the speecregonition.py file.

BirkHintzeThisted commented 4 days ago

From what I can tell, it fails because the service on my robot is called AISpeechRecognition and not SpeechRecognition.

Hardcoding it in the speechrecognition.py enables me to start the speech module on step two, but I cannot run the module dialog without several failures. I will dig deeper.