Giter Club home page Giter Club logo

my-assistant's Introduction

Google Assistant SDK for devices - C++

Requirements

This project is officially supported on Ubuntu 14.04. Other Linux distributions may be able to run this sample.

Refer to the Assistant SDK documentation for more information.

Setup instructions

Build Project

  1. Install dependencies
sudo apt-get install build-essential cmake libtool curl unzip pkg-config
sudo apt-get install libasound2-dev  # For ALSA sound output
sudo apt-get install libcurl4-openssl-dev # CURL development library
  1. Clone this project and submodules
git clone https://github.com/UltraCoderRU/my-assistant.git
cd my-assistant
git submodule update --init --recursive
  1. Configure and build project
mkdir build
cd build
cmake -DUSE_SYSTEM_SSL=OFF .. # Change to 'ON', if you want to link with system OpenSSL/LibreSSL/etc.
cmake --build . -- -jN # N = number of cores
  1. Get credentials file. It must be an end-user's credentials.
  • Go to the Actions Console and register your device model, following these instructions
  • Move it to project folder and rename it to client_secret.json
  • run get_credentials.sh in this folder. It will create the file credentials.json.
  1. Start one of the run_assistant samples:

On a Linux workstation, you can use ALSA for audio input:

./run_assistant_audio --credentials ../credentials.json

You can use a text-based query instead of audio. This allows you to continually enter text queries to the Assistant.

./run_assistant_text --credentials ../credentials.json

This takes input from cin, so you can send data to the program when it starts.

echo "what time is it" | ./run_assistant_text --credentials ../credentials.json

To change the locale, include a locale parameter:

echo "Привет" | ./run_assistant_text --credentials ./credentials.json --locale "ru-RU"

Enabling screen output

To get a visual output from the Assistant, provide a command to be run alongside every step of the conversation. It will execute that command along along with a provided argument of a temporary HTML file.

echo "what time is it" | ./run_assistant_text --credentials ../credentials.json --html_out google-chrome

After you enter text, it will run google-chrome /tmp/google-assistant-cpp-screen-out.html. If you prefer a different program, use that argument instead.

my-assistant's People

Contributors

fleker avatar mpoullet avatar rajveermalviya avatar rochefort8 avatar ultracoderru avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.