Giter VIP home page Giter VIP logo

alexaagent's Introduction

Alexa Voice Service Agent

Alexa Voice Service Agent is a tiny client program for Alexa Voice Service. It is written in C++.

Dependencies

How to Build

autoreconf -is
./configure
make
make install

How to Setup

Register the Product with Alexa Voice Service

Follow the Step 1 in the Getting Started page.

Configure the Product

Make a private key and a certificate for accepting SSL/TLS connections.

Prepare sound files for alerts.

Make a directiory for session files.

mkdir session

Edit session.json appropriately.

cp configuration/example.json configuration/session.json
vi configuration/session.json

Authorize the Product via Login With Amazon

Open the URL of the product (e.g. https://localhost:3000 as in example.json) with a web browser. You will be redirected to the Login With Amazon page.

Log in to Login With Amazon and authorize the product. You will be redirected back to the product and the console page will appear.

TODO

  • Separete the configuration into provider-side and user-side.
  • More instructions.

License

The MIT License (MIT)

Copyright (c) 2016 Shin-ichi MORITA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

alexaagent's People

Contributors

shin1m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

alexaagent's Issues

doesn't support playlist URL

When asked for tune-in stations, it will return a URL with content-type of "audio/x-mpegurl", then ffmpeg will fail to play it.

Also, it won't recover from this status. the AudioPlayer.PlaybackFailed event got a 200 response with new directive to play the same URL, repeated again and again, which I think might be a problem of alexa api.

sometimes, I got a segmentation fault with this.

Reproduce with "play economist radio on tune-in", then we got a url:
"http://opml.radiotime.com/Tune.ashx?id=s223220&formats=aac,mp3&partnerId=4JqugguZ&serial=AFPFRQBP3Y34KMJYVH6JHY4YL3UA&latlon=47.631863,-122.34427"
and this URL will return a playlist content.

some missing files

in order to compile this project, some changes must be made:
configure.ac
-AC_CONFIG_SRCDIR([alexaagent.cc])
+AC_CONFIG_SRCDIR([main.cc])

and the configuration folder is missing so I have to create a session.json from scratch.

memory leaks on playback

EDIT: the reconnecting issue might be my own fault, ignore it.


asio.ssl error, and then segmentation fault

when I leave the program running for a while, it will throw an error:

@session(0x7b82e8) on error: asio.ssl error |
reconnecting...
session(0x7b82e8) created
directives GET(0x82eb20) on close: 2
@session(0x7b82e8) on error: asio.ssl error |
reconnecting...
Segmentation fault

alert/timer won't run if restarts without internet connectivity

according to: https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/reference/timers-and-alarms-conceptual-overview

the product must have the ability to act on previously set timers or alarms if internet connectivity is lost, this works if we keep the alexaagent running. However, it won't check existed alerts when there is no internet.

BTW. When alexaagent starts without a good connection, it should retry until internet recovers.

capture_force & dialog_acquire conflicts

when capture_force is true, i think it means capture should start immediately and current dialog should stop as well. however now it will wait for active dialog ends.

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.