Search code examples
twiliotwilio-twiml

twilio: need to initiate a transcription of recorded calls after the call has ended


I have a small python program using the API that dials my voicemail, records the call, and transcribes the results.

The program checks at set intervals, e.g., 1 hour, 3 hours, etc., and all checks are recorded by twilio.

I know that a recording less than 25 seconds was the result of not having any new voicemail messages, and so I do not want to transcribe a recording unless it is longer than 25 seconds. (This will lower cost: checking 8 times without transcribing everything would have a minimum cost of $0.14/day if there are no new message. If I have to transcribe everything, that rises to a minimum of $0.54/day.

I do not see a method to initiate a transcription for a recording after the call has ended. Is this possible?


Solution

  • Twilio presently does not offer the ability to transcribe audio after the call has ended. Have you considered using the TwiML <Pause> tag to wait 25 seconds before starting your transcription recording? If the call disconnects before 25 seconds, the Record tag will not executed and no transcription will be made.

    Example:

    <?xml version="1.0" encoding="UTF-8" ?> <Response> <Play digits="wwwwww#ww1234wwww4321#wwwwww2"></Play> <Pause length="25"/> <Record transcribe="true" /> </Response>

    If this does not work, you can consider using Twilio's recording with another transcription API provider.