Can I upload a wav file to twilio and get it transcribed? - twilio

We currently use twilio to send out SMS messages to our employees on the field. I see that twilio has a transcription service. We have many voicemails in-house which are wav files that needs to converted to text. I was looking at a way of uploading these voicemails into twilio and get it transcribed. Would it be possible?

Are these voicemails actually connected in any way to Twilio? It sounds like you have just some regular WAV audio files and are wondering if you can use the Twilio transcription API to convert audio files to text?
If this is the case then it looks like you might be better off using a more pure transcription-as-a-service API.
Maybe something like Speechmatics?
If these audio files are in fact from a Twilio received call then it looks like you can use the Twilio Transcription API to receive the text. Check out their API docs page: https://www.twilio.com/docs/api/rest/transcription

Related

Cannot receive media attachment file in Twilio Flex

Project description:
Currently we have our customers using various chat platforms such as whatsapp , and slack where our contact center is forced to use the same. However, we would like to give Twilio flex platform to our contact service team so that they can reply messages coming from whatsapp, slack.
Query regarding media messages:
I use Javascript Client SDK for front end and connect Twilio Flex as an agent. Chat is working fine. I can send / Receive messages. But, when I send media files through SDK, 'Media messages are not supported' is displaying in Twilio Flex. When I use get All Messages from API able to get that media file as message with type = media. Also media SID is created for the uploaded file. But not able to view the same file in twilio flex.
This is a very old OLD question, but there's a bit better answer now.
https://github.com/jprix/mms2FlexChat/tree/master/function
Twilio Flex Plugin SAMPLE that shows media use with Flex and WhatsApp. Caveat: even the sample is somewhat old at this point, but should at least be educational.
HTH
You are correct, Flex does not support media attachments. You could possibly work on some logic to pass in the media URL to the agent via chat, but I have not seen any code examples to share.

Twilio: Where to upload an audio file

On this Twilio page: https://support.twilio.com/hc/en-us/articles/223180588-Best-Practices-for-Audio-Recordings
It talks about uploading an audio file to twilio and allowing twilio to do the audio conversion. I have not found a way to upload the file on the website. Where is this done?
Twilio developer evangelist here.
That is a slightly misleading article and I apologise. There's no direct way to upload audio files to Twilio. However, when you use the <Play> verb in TwiML that points to the location of an audio file then technically it will get uploaded to Twilio and converted as that article describes.
When using <Play> you do need to host the original audio file somewhere online first.
Update
There is now a way to upload assets to Twilio so that they can be used with <Play>. Check out the documentation on Twilio Assets here.

Twilio: How do I always place a "All calles are being monitored message" for incoming calls?

For incoming calls:
1) I am new to twilio, but I always want a "All calls are being monitored or recorded" to play for all incoming calls. What is the best way to do this?
2) I would like to create two messages after the "monitoring" message is played. one message during open hours and a second message during closed hours.
What is the best way to do this? Any good documentation?
Twilio developer evangelist here.
Welcome to using Twilio! I'll give you a quick overview of how incoming calls to Twilio work then point you to some useful parts of our documentation that will help you achieve what you are working towards.
When a Twilio phone number receives an incoming call, Twilio will send an HTTP request to your web application, asking for instructions on how to handle the call. Your web application will respond with an XML document containing TwiML. That TwiML contains the instruction that Twilio will follow to say some arbitrary text, play an MP3 file, make a recording and much more.
In your case you want to read messages to the caller, you could either do that by returning TwiML that uses <Say> to read out the messages using our text to speech engine. Or you could record yourself reading the message and play that to the caller using the <Play> TwiML.
To learn more:
Follow the Programmable Voice Quickstart
If you need more specific instruction on a particular Twilio feature, check out the Twilio Guides
If you need to see Twilio features as part of a complete application, check out the Twilio Tutorials which cover more specific use cases
Let me know if that helps at all.

Speech to Text using Twilio

We use microsoft botframework for our chatbots. We would want to enable Voice channel to our bot. Is there a way to solution this? Does Twilio have anything that can add speech capabilities to our bot. Our bots are exposed via webchat components, skype, facebook messenger etc.
Twilio developer evangelist here.
There's no way within Botframework to add voice capabilities from Twilio, however receiving calls works in a similar way. When someone calls your Twilio number you receive a webhook which you can respond to with TwiML to tell Twilio what to do with the call.
To then perform things by voice action you can <Record> the caller's response and set the transcribe parameter to true. You also need to set a transcribeCallback URL as the transcription is done asynchronously. Once you receive that callback, the text of the transcription will be available as a parameter in the request. You could also perform the transcription yourself with a third party service by just taking the recording and sending it off.
Once you receive the transcription you can then make your decision as the the next step of the conversation and redirect the live call to the next step of your process using the REST API.
This is just a high level overview of how you might accomplish this. Let me know if it is of any help.
Voximal offers as Twillo a similar product but based on VoiceXML. The difference is that Voximal integrates natively most of STT engines (Microsoft, Google, Watson, iSpeech) in the solution (you only need to set the key or the user/password to configure them). You use a builtin grammar "text" to translate. Then the processing is very similar to the Twilio. You need to push the content to a chatbot engine (HTTP/XML/JSON), and you have a way to play the result with a TTS engine.
Have a look to the Parrot example (a script that repeats all you said using the STT and TTS) :
https://github.com/voximal/voicexml-examples/blob/master/parrot/parrot.vxml

Change voice of text to speech openvbx/twilio

I am not satisfy with voice of text to speech in twilio. Currently twilio has provided men, women and Alice in voice for read text. Which is not clear sound. So i want to use my custom voice . Or is there any option to make clear sound while reading text to speech in openvbx to twilio.
Thanks in advance.
Twilio evangelist here.
Currently there is no way via the API to integrate your own custom TTS into Twilio. If what you want your callers to hear is fairly static you could create recordings of those messages and use the <Play> verb to play them to the caller.
https://www.twilio.com/docs/api/twiml/play
It might be possible for you to use your own TTS if you can have the TTS system save its output to WAV or MP3. Then you can use the <Play> verb to have Twilio play those audio files.
Hope that helps.

Resources