Git Product home page Git Product logo

hchiam / code-tutor Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 1.25 MB

Let's help people who can't use their hands to learn to code by talking to the Google Assistant (voice assistant).

Home Page: https://assistant.google.com/services/a/uid/000000668d1fb538

License: MIT License

JavaScript 100.00%
google-assistant voice education app dialogflow actions-on-google api-ai chat chatbot voice-assistant

code-tutor's Introduction

Ok Google, Talk to Code Tutor version

2023 news: Conversational Actions are scheduled to sunset in 2023.


Try it now: 🅖 Ask Code Tutor to teach me

Code Tutor is listed in the Google Assistant web directory.

Code Tutor listed on the Google Assistant web directory

Long-term goal: Let's help people who can't use their hands to learn to code by talking to the Google Assistant.

For now: Conversationally teach simple coding concepts. Code hands-free.

Made possible thanks to support from family and friends.

Built using lessons learned from my mental-temp-converter backend and a Zeitspace workshop I attended. (EDIT: Now updated to use API V2.)

Privacy policy: https://goo.gl/PMwsDW

Use the Google Assistant on Your Phone:

Code Tutor on mobile

This app works great on a device with a screen. You can get the Google Assistant on your device:

Files:

I'm open-sourcing my code to help others learn faster (just please change the author in package.json before you publish). It also enables you to help me improve the app faster by contributing on GitHub.

  • START HERE: Screenshots for reference. Use them to get a quick overview of the app's conversation flow. Start at "1.0 Default Welcome intent". I think I followed best practice by treating each intent name as a numbered bullet point (or sub-point). This makes it easier to navigate them all when Dialogflow alphabetically sorts them.
  • index.js is my inline editor code in Dialogflow. Use it to figure out how to use the inline editor to add extra functionality to the intents. For it to work, my code requires the imports listed in package.json
  • package.json (you’ll see a tab for this in the inline editor in Dialogflow).
  • The CodeTutor folder is an un-zipped export of my agent from Dialogflow, which may contain the app’s intents, entities, and other info besides the other 2 files. NOTE: If you're importing the zip file into your own Dialogflow project, make sure to set the "-1.0 No/Bye" intent's response as end of conversation in the Dialogflow interface. This option does not appear to be stored in the intents .json files, so you'll have to set this option manually.

Hidden Features:

Hint: try a number over 9000 :)

Want to Create Your Own Google Assistant App?

Check out these AoG codelabs: https://developers.google.com/actions/codelabs/

Related:

https://github.com/hchiam/code-tutor-sandbox-test and https://code-tutor-sandbox-test.glitch.me/

Previous Work:

Newer Experiments:

You Might Also Like:

https://github.com/hchiam/sourcefetch-server

code-tutor's People

Contributors

hchiam avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

code-tutor's Issues

app is down

possibly due to efforts to update/migrate to v2

UX: rephrase some of the follow-up questions?

Don't ask what would you like to create, change all to ask which would you like to create?

And maybe change all intros accordingly? (Variations are still possible, and would be good for keeping things fresh for repeat users.)

for [] to []

(needs to be an extra intent - not because of different recognition pattern but because of an extra value extracted)

Google Assistant Directory still pending update

Awaiting the Google Assistant app directory to update. The app's already approved. Talked to AoG support already and they're still working on it. For now, the quick links in this repo are down until they get finish reviewing.

Action item once they're done: double-check both quick links in this repo work.

Fix Odd Bug

Apparently the mic is sometimes still on with no prompt when the user says "nothing" or "no".

From feedback: (not sure if this is the good/bad example)

  • Action: What's the secret word?
  • User: Nothing
  • Action: Code Tutor version 4, signing out. Come again for updates.
  • Code Tutor left the conversation

Or:

  • Action: What's the secret word?
  • User: No
  • Action: Code Tutor version 4, signing out. Come again for updates.
  • Code Tutor left the conversation

Things to check:

  • does the secret word request actually respond with nothing and still is listening to "nothing"/"no"? (might be timing bug, not my code's problem)
  • otherwise, if it responds with "Code Tutor version 4, signing out. Come again for updates.", then that is intended. but if the mic is still on, then check if it properly exits. might need to set custom js fulfillment code to exit.
  • are there other intents that are listening for "nothing"/"no"?
  • if it does properly exit (i.e. with message and with mic off), then get more info/feedback

How might we improve user experience regardless of previous exposure to programming?

(Based on some of the feedback I've gotten so far.)

Idea 1:

Give a code example to set expectations?

Right when a user "opens" the app, set expectations by showing an example of code?
(So change the intro?)

For Example:

Hi! This is Code Tutor.
Here's an example of what you can make:

let greeting = "hi there ";
let name = "someone";
let message = greeting + name;
if (name == "someone")
  say("What's your name?");
for (let i=0; i<3; i++)
  say(message);

Voiceover:

Hi! This is Code Tutor. Here's an example of what you can make:
Let greeting equal hi there.
Let name equal someone.
Let message equal greeting plus name.
If name equals someone, then say what's your name.
And then, while counting from 0, and stopping before 3, say message.

run code

need to implement "run code"

Some cases to consider (not exhaustive):
ignore code without say
ignore code after last say

1) sandbox flow:

Here's what you can say: (read the list out loud)
(show list of things, including run code)
If you need this list again, just say "what's on the list?"
V
(repeat fill and transpile)
V
(run code? interpreter runner!)

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.