简体   繁体   中英

twilio API - how to get transcribed text from audio part of video call recording?

I know Twilio has possibility to transcribe Voice calls, however how to transcribe audio part of Video call using Twilio API? It doesn't have to be live - it can be done after Video call is over using recording.

Unfortunately, I have not found anything in "Programmable video" API ( https://www.twilio.com/docs/video/api/recordings-resource ) about transcribing video calls, but I believe there has to be some way to do it, since Twilio stores the video + audio separately.

I am able to get the existing audio recording by this PHP code:

/** @var \Twilio\Rest\Client $twilio */
$twilio->video->recordings($recording_sid)->read();

which returns me a instance of "\Twilio\Rest\Video\V1\RecordingInstance". However I am not sure how to get a transcribed text from this audio recording.

Twilio Video does not transcribe the audio in your recorded video calls. If you want to do that, you will have to send the recorded audio files to a separate service to perform the transcription.

In your case, once you have the RecordingInstance object you can download it from the media subresource .

You'll then need to send or upload it to a service that can do the audio transcription for you. Something like the Google Cloud Speech API or Azure Cognitive Services can likely do that for you. Do note that the raw audio recordings are in Matroska container format, .mka files. You will need to either check that the service you use to transcribe the audio can accept that format, and if it can't you'll need to translate the audio file yourself or have Twilio do that using the Video Recording Compositions API .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM