1

I am working with choregraph to develop an application for Nao robot. I am trying to install a library that implements a speech to text functionality: it uses a simple HTTPS request. I am not able to make it work because it has a lot of dependencies and choregraph doesn't have a tool to import them properly. So my question is: how can I install any HTTPS library on choregraph without downloading every single dependency module of the library?

I would like to make it work also in the virtual robot.

ela
  • 104
  • 1
  • 10

1 Answers1

0

The only way to bring external Python modules is to embed them in your Choregraphe project and to append the path to those modules to the PYTHONPATH, from inside your behavior. You will be then able to import your external modules.

That is to say, from a Python box in your Choregraphe behavior, and according to the documentation:

import os
import sys
sys.path.append(os.path.join(self.behaviorAbsolutePath(), 'path/to/module'))

Please note that since behaviors are running in the process of NAOqi, messing with the PYTHONPATH may impact every behavior. So it is good to restore the path when your behavior stops.

Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27