Bot that listens & talk back, powered by dialogflow
- Recognise the input voice using SpeechRecognition api
- Send the recognised text to the express server using socket.io
- Server uses API.AI's node sdk wrapper apiai-nodejs-client to find relevant response for the input provided.
- Server sends the response back using socket emit.
- Client captures the response & Use SpeechSynthesis api to convert the text to voice.
Resulting in a conversation. 🗣
Rename the .env-test
to .env
and fill the env vars:
APIAI_TOKEN=your_token
APIAI_SESSION_ID=some_unique_session_id
The first one is an API.ai API key (Please get one by sign up with dialogflow), and the second one is a session ID, which is an arbitrary string.