Chat bot or voice command via phone call.
https://www.youtube.com/watch?v=91-_yNYDetY
We could use recording feature in Twilio, where we would transcribe the audio file using Google Speech. And then we would send a reply accordingly. Inspired from VoiceIt and Twilio implementation.
Twilio has their own transcription engine but I think it is not very accurate, and they are charging $0.05/min for it, plus they are only limited to recording with a duration greater than 2 seconds and less than 120 seconds. Where as Google Speech is giving free first 60 minutes per month, and they are only charging $0.006 per 15 seconds.
https://cloud.google.com/speech/pricing
Aside from cost of USA phone number which is $1/month, they are charging $0.0075/min for incoming call, and $0.0025/min for recording.
Noted that they are also charging $0.0005/min/month for recording storage, but they are giving free first 10,000 minutes per month. So you might want to delete the recordings each month.
https://www.twilio.com/voice/pricing/nz
If you want to implement voice command, you might want to add voice authentication. Unlike other providers, we can use our own phrase instead of some pre-defined words. And they are giving $5 free credits upon signup.
-
Twilio account, duh
-
Google Cloud JSON key file; https://github.com/GoogleCloudPlatform/google-cloud-node#elsewhere
-
API.AI account, for chat bot demo
-
VoiceIt account, for voice authentication demo
-
git clone https://github.com/natsu90/twilio-echo.git
-
cd twilio-echo && npm install
-
Set your
.env
file -
node src/chat-demo.js
, ornode src/auth-demo.js
for voice authentication demo -
Set your Twilio Voice webhook to
your_IP_or_domain:1337/incoming_call
-
Transcription not accurate sometimes, probably due to poor quality of audio, or just my poor pronounciation
-
Recording URL from Twilio is not available immediately sometimes
-
A little delay between chat and reply, does not matter for voice command app
-
Delete recording automatically on transcribed chat or ended call
-
Implement with Nexmo
Licensed under the MIT license