chethansai / internet-archive-voice-apps

Voice Apps (Actions on Google, Alexa Skill) of Internet Archive. Just say: "Ok Google, Ask Internet Archive to Play Jazz" or "Alexa, Ask Internet Internet Archive to play Instrumental Music"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internet Archive Google Action Build Status Coverage Status

Watch Setup Tutorial video

Setup Tutorial - Internet Archive Voice Apps Google Action

Setup Instructions

See the developer guide and release notes at https://developers.google.com/actions/ for more details.

Steps for cloning project to your local machine

  1. Fork repository.
  2. Go to directory ::git clone <repository link>

Steps for testing with Google Assistant

Create and setup project in Actions Console

  1. Use the Actions on Google Console to add a new project with a name of your choosing and click Create Project.
  2. Click skip ["Actions Console" label on top left]
  3. Go to actions under build, and click Add your first action
  4. select custom intent, then build

Create Action for the project

  1. Click CREATE (continued from above step)
  2. Go to settings and click export and import, then click restore from zip.
  3. zip the contents of dialogflow in models/dialogflow/ and use that zip to restore the project.

Run Local Server

  1. Run server local with colorful logs
  2. Install node js if not installed before(Check for correct version of node by node -v.if not nvm install 8.16.0 and nvm use 8.16.0)
  3. npm install -g firebase-tools
  4. firebase login[On the opened tab in your browser,login with the same account you created project on google actions]
  5. touch functions/.runtimeconfig.json (For windows cli clone touch repository to use it git clone https://www.github.com/zacharyjbaldwin/touch-for-windows.git)
  6. firebase init (remove .firebaserc first)
  7. firebase projects:list[displays projects list with your account]
  8. firebase use --add (choose the project you created in actions console, give an alias name)
  9. add fake keys (temporary workaround) refer this 3.firebase deploy --only functions
  10. cd functions and npm install
  11. DEBUG=ia:* npm start (In windows set debug=<project alias name>then npm start)

Expose local server

To expose server to google assistant use ngrok its free plan should be enough.

To publish 5000 port use:

ngrok http 5000

you should find url https://<id>.ngrok.io/.

Connect webhook to dialogflow

Go to the fullfillment section of your dialogflow draft copy of our app and after that you should use this url:

https://<id>.ngrok.io/<your project name>/us-central1/assistant

Setup Env

Options

  • profile performance of requests Env Variable: PROFILE_REQUESTS=true (false by default) firebase functions:config:set performance.requests=true

How to check if the project is sucessfully synced

type welcome in google assistant test It reponds Welcome to the music at the Internet Archive. Want to listen to 78s, Live concerts, Unlocked Recordings or Christmas music?

Now go to

internet-archive-voice-apps\functions\src\strings.js Find the text: welcome change acknowledge >Welcome to music at the Internet Archive(removing the) type welcome in google assistant test You will find the changes reflected as:Welcome to music at the Internet Archive. Want to listen to 78s, Live concerts, Unlocked Recordings or Christmas music?

How to make contributions?

πŸ” get one good first issue assign yourself (if you have access) or write comment that you'd like to work on this issue. That's help to prevent work overlapping.

create git branch feature/<name-of-feature>, more

πŸ’» working on it

Use Mocha for continuous checking of your code quality and cover functionality by tests

npm run mocha -- --watch

β˜• Complete checking of code by run unit tests and code style checking

npm test

🌟 We follow standard javascript code style.

Automatic style fixing, it doesn't solve all problems but could be very helpful

npm run lint -- --fix

πŸŽ‰ Finally make Pull Request and give complete description what have you done and link the addressed issue.

Also it could be good practice to create your Pull Request earlier, but add WIP: at the beginning of its name! This way other developers could see what are you working right now.

About

Voice Apps (Actions on Google, Alexa Skill) of Internet Archive. Just say: "Ok Google, Ask Internet Archive to Play Jazz" or "Alexa, Ask Internet Internet Archive to play Instrumental Music"


Languages

Language:JavaScript 99.5%Language:Shell 0.5%