Is there a python version? because all the ones I have seen are js. All I'm looking for is to be able to get a speech input from the user and turn that into text I can analyze
thank you so much for your help, but not exactly. from this link "twilio.com/blog/2017/06/how-to-use..." I am looking for the python version of the line "event.SpeechResult.toLowerCase();" If you don't know, its alright, I appreciate the support.
Oh, I see! You're using <Gather input="speech"> to get the text. Sorry, for my misunderstanding.
There's quite a bit going on in that line of your question. event comes from how you would respond to an incoming request to a Twilio Function (which is what the original blog post uses). toLowerCase() in JavaScript is lower() in Python. SpeechResult is a parameter that is sent to your application as part of the webhook request. To deal with those two bits depends on the web app framework you use in Python.
If, for example, you are using Flask. You could do something like this:
Is there a python version? because all the ones I have seen are js. All I'm looking for is to be able to get a speech input from the user and turn that into text I can analyze
There is a tutorial right here on how to use Twilio Media Streams in Python. Does that help?
thank you so much for your help, but not exactly. from this link "twilio.com/blog/2017/06/how-to-use..." I am looking for the python version of the line "event.SpeechResult.toLowerCase();" If you don't know, its alright, I appreciate the support.
Oh, I see! You're using
<Gather input="speech">
to get the text. Sorry, for my misunderstanding.There's quite a bit going on in that line of your question.
event
comes from how you would respond to an incoming request to a Twilio Function (which is what the original blog post uses).toLowerCase()
in JavaScript islower()
in Python.SpeechResult
is a parameter that is sent to your application as part of the webhook request. To deal with those two bits depends on the web app framework you use in Python.If, for example, you are using Flask. You could do something like this:
In this example, the direct translation of
event.SpeechResult.toLowerCase();
isrequest.values['SpeechResult'].lower()
.Hope that helps!
GAANGGGGG, THANK YOU FOR YOUR HELP BRO!
stay blessed!