Giter Club home page Giter Club logo

alexa's Introduction

Alexa

To use Alexe Voice Service with ReSpeaker.

Requirements

  • CherryPy
  • Requests
  • PyAudio
  • ReSpeaker python library
  • webrtcvad - for Voice Activity Detection, available on ReSpeaker by default
  • PocketSphinx - for Keyword Spotting, available on ReSpeaker
  • ffplay, part of ffmpeg

On Ubuntu

  1. Register for an Amazon Developer Account.

  2. Run git clone https://github.com/respeaker/Alexa.git && cd Alexa

  3. Rename example_creds.py to creds.py and fill ProductID, Security_Profile_Description, Security_Profile_ID, Client_ID and Client_Secret with your Alexa device information.

  4. Run sudo pip install cherrypy requests pyaudio webrtcvad pocketsphinx respeaker to get required python packages.

  5. You might also need these depdencies if you got errors at the above step: sudo apt-get install python-dev portaudio19-dev swig libpulse-dev. Then re-run step 4.

  6. Run python auth_web.py and open http://localhost:3000

    It will redirect you to Amazon to sign in. Make sure you have whitelisted the the above URL (with http:// not https:// in your app profile)

  7. Run python alexa.py to interact with Alexa.

On ReSpeaker

Alexa will be installed at the lasest firmware of ReSpeaker. If the command alexa is available, skip step 1.

  1. Download alexa ipk and install it.
cd /tmp
wget https://github.com/respeaker/get_started_with_respeaker/raw/master/files/alexa_2017-01-18_ramips_24kec.ipk
opkg install alexa_2017-01-18_ramips_24kec.ipk
  1. Run alexa or /etc/init.d/alexa start to start Alexa Voice Service

  2. At the first time, you need to authorize the application.

Connect ReSpeaker's Access Point, go to http://192.168.100.1:3000 and tt will redirect you to Amazon to sign up or login in.

  1. Run python alexa.py to interact with Alexa.

Note: if you get error IOError: [Errno -9998] Invalid number of channels, It's likely that mopidy-hallo or alexa is running and using the audio input channel. You can stop mopidy by running /etc/init.d/mopidy stop. /etc/init.d/mopidy disable will disable it to auto-run. /etc/init.d/alexa start will run alexa on background.

Credits

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.