Skip to content

📢 Simple AI Chat Bot with Web Speech API 👨‍✈️

Notifications You must be signed in to change notification settings

SajidAnTechie/Webspeech-AI-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Speech AI Bot

This is a simple AI bot made with nodejs, web speech api and dialogflow

WebSpeechAiBOt

This is how web app works:

  1. Using the Web Speech API’s SpeechRecognition interface to listen your voice from a microphone.
  2. Send your message to dialogflow agent (the natural language processing platform) as a text string.
  3. Once the AI from the agent returns the reply text back, use the SpeechSynthesis interface to give it a synthetic voice.

The full tutorial can be found 👉 Here

Supported Browser

Project Setup

#install dependencies
npm install

#install nodemon
npm install -g nodemon

Setting Up Dialogflow

  1. To setup DialogFlow, you’ll need to create a DialogFlow Account.
  2. After creating an account, you would need to create an “agent”. The Getting Started guide illustrates all the relevant details
  3. Rather than opting for the complete customization method and creating entities and intents, you can just click Small Talk in the left menu.
  4. You can then toggle the switch for the service to be enabled.
  5. To use the API with our Nodejs application, you’ll need to go to the ‘General Settings’ page (click on the cog icon beside your agent’s name in the menu) and retrieve your Project Id.

Before You begin

  1. Enable the Dialogflow API
  2. Set up authentication with a service account so you can access the API from your local workstation.
  3. Click on create service account key page.
  4. Download your josn file credentials and put in your root directory.
  5. Replace the keyfilename of your json file name in app.js

Add config.env file inside the config folder and add the following:

PORT=5000
NODE_ENV=development
PROJECT_ID=your dialogflow project id

Run App

#Run in dev mode
npm run dev
#Run in prod mode
npm start
  • version: 1.0.0
  • License: MIT
  • author: Sajid Ansari

About

📢 Simple AI Chat Bot with Web Speech API 👨‍✈️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published