Inspiration

There is a very painful stage (for parents) after a kid learns the format of a knock-knock joke and before she learns what makes knock-knock jokes FUNNY. This voice-enabled bot takes one for the team.

What it does

Knock-Knock Jokebot provides a simple interface for pre-literate kids to tell their knock-knock jokes. Through a basic turn-based voice conversation, it applies the classic knock-knock joke format and laughs at every joke, regardless of whether it makes sense.

How I built it

I used Wit.ai to do the language processing, and Wit.ai's Microphone Web SDK to accept speech input. I used the reasonably well-supported browser-based SpeechSynthesis interface of the Web Speech API to speak the bot's side of the conversation.

Challenges I ran into

Kids are hard to understand, and the phrase "knock-knock" is often interpreted as other repetitive phrases, like "not not" and "no no." It took a lot of training to identify most of these variants.

Accomplishments that I'm proud of

The result works well enough for my kid (no longer a preschooler, but still very fond of telling knock-knock jokes) to use! I'm also very fond of the interface, which is fun and supports kids who are learning to read by displaying the text that's spoken.

What I learned

I had never worked with Wit.ai or any similar service, and I'd never worked with microphones or text-to-speech, so the entire project was a great learning experience.

What's next for Knock-Knock Jokebot

The obvious next step would be to flip it around and have the bot tell the joke.

Built With

Share this project:

Updates