I'm currently trying to integrate dialogflow with twilio. I want to be able to parse the voice response that my customer gives to the bot. How do I get the voice response; and send response back based on certain voice texts.
As of now; when someone calls the phone it replies Hello; then I want to be able to grab what customer replies; then respond it back appropriately. So far I am using the webhook "A call comes in". Would this require extra library that translates voice to text? Or does twilio offer it.
import os
from twilio.rest import Client
from flask import Flask
from twilio.twiml.voice_response import VoiceResponse
app = Flask(__name__)
# using os.environ['account_sid']
@app.route('/voice', methods=["GET","POST"])
def voice():
resp = VoiceResponse()
resp.say("hello")
return str(resp)
if __name__ == "__main__":
app.run(debug=True)