Giter Club home page Giter Club logo

alexa_audioplay's Introduction

Alexa AudioPlayerで音楽を再生する

AlexaのAudioPlayer機能を試してみました。
Pythonとjsonを使ってます。

AudioPlayerって?

Alexaちゃんが音楽を再生してくれる機能

動作イメージ

①ユーザ 「Alexa、天空のカウントダウンをスタートして」
②Alexa  「3分間待ってやる。ぼう」
***ここで音楽が再生される***  
***止めたい場合は以下***
③ユーザ 「Alexa、キャンセル」

 

必要なもの

1.スキル作成(ASK)
 AudioPlayerの機能をONにすること忘れずに。
 サンプルコードはintent_schema.txtになります。
2.再生する音楽
 mp3をインターネット上にあげる必要があります。
 AWS使っているのでS3上に置くのが楽チン
3.AWS Lambdaでコード作成
 sky_timer.pyをコピぺ
 コード上の「music_URL(ex.https://example.org/hoge.mp3)」に②で設定されたURLを指定

その他

 jsonに入っている日本語類は適宜変えていただいても大丈夫です。
 "outputSpeech":Alexaに喋らせたい声になります。
 "Card":Alexaアプリ(スマホで見れるやつ)に表示される内容
sky_timer2.pyを作成。sky_timer.pyを少し見やすくしたもの。

alexa_audioplay's People

Contributors

colombo0611 avatar

Watchers

 avatar  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.