double-web-face

Put a talking face on the Double telepresence robot using web technologies and control the robot using the official Double app.

View the Project on GitHub

Full Installation Guide

  1. Install all of the dependencies.
  2. Clone/download this repository.
  3. Make sure your Python install location is properly included in your Windows PATH.
    • The batch file calls the command “python36” executable, depending on your system, this executable might be named differently.
      • Simply edit the batch file as neccessary.
  4. Make sure Google Chrome is set as your default browser (Chrome is required for the Double web app).
  5. Set the virtual audio cable as your default microphone device in Windows.
  6. Create an account with VoiceRSS and obtain a free API key.
    • Save the API key in a file called “api_key” (no extension).
      • The python program will read the API key from this file.
      • Audio from the service will be saved as MP3 files in the ./audio folder.
        • Phrases that have been previously spoken are cached in this folder.
          • When speaking a phrase the cached version will be used (if avaliable), otherwise we request the mp3 from the API.
  7. Make sure VLC is running in “single instance mode”. More info.
  8. Start the “RUN.bat” file.
    • Answer “Y” to all the prompts (on first run of the application).
      • This will start all of the neccessary applications in the appropriate order.
  9. Set the Audio Router application to route VLC’s audio to the virtual audio cable.
  10. Optional: disable your webcam in the device manager.
  11. Now you can use the Double web app to control the robot, and the Python GUI to speak phrases and show questions.
    • In the Double web app set it to display a webpage. The address of that page being, the IP/Hostname of your machine with the port number 51234.
      • Example: http://192.168.0.8:51234/

Full Usage Guide

  1. There are some hotkeys built in:
    • The CapsLock key will switch the window focus between Chrome and the Python GUI, this allows for easier control.
    • Pressing Ctrl + 1-5, will cause the robot to speak some basic commonly used phrases.
    • Ctrl + Y, N, and M are for saying “Yes”, “No”, and “Maybe” respectively.
    • The buttons on the GUI, only show a select few phrases and all of the phrases can be found using the search box.
    • Custom phrases can be spoken by typing it in the search box and hitting enter, if nothing is found during the search, the custom phrase will be sent to the API.
  2. Displaying questions to the user:
    • Create a JSON file in this format and save it into the /questions folder:
        {
            "Question": "Enter the question for the user to see here.",
            "Options": [
              "You can type any number of options here.",
              "These will be shown as bullet points in the web page.",
              "Maybe we want a third option."
            ]
        }
      
    • In the Python GUI select: “Pick Question File” and select the newly created JSON file.
    • Select “Show Question” and “Hide Question” as desired.
    • You can select a new question file after hiding the question.
  3. Similar to how you can display a question to the user, you can also display any webpage in an iframe to the user:
    • Create a JSON file in this format and save it into the /questions folder:
        {
          "Web": "http://example.com/"
        }
      
    • In the Python GUI select: “Pick Question File” and select the newly created JSON file.
    • Select “Show Question” and “Hide Question” as desired.
    • You can select a new question file after hiding the question.