Speech-to-text: transcription

Speech-to-text: transcription

Transcription works just like Audio Recording with only difference that a text file is created alongside an audio file.

In order to use transcription, call the record method with the transcribe parameter set to true and the language parameter set to one of the supported languages.


VoxEngine.addEventListener(AppEvents.CallAlerting, e => {
    const outbound = VoxEngine.callPSTN("+15559000800", e.call.callerid());
    VoxEngine.easyProcess(e.call, outbound);
    e.call.record({transcribe: true, language: ASRLanguage.ENGLISH_US});

Unlike audio and video recording, transcription results are available only after a call ends, so it should be retrieved via the the GetCallHistory method of the HTTP API. You have to call this method with the with_records=true parameter specified. For example:

curl "https://api.voximplant.com/platform_api/GetCallHistory/?account_id=1&api_key=4hip5000e-4666-253a-95e8-3f8f8481287c&from_date=2019-08-01%2000%3A00%3A00&to_date=2019-08-07%2000%3A00%3A00&with_records=true"

There will be records in the response JSON with the transcription_url field. This fields' value returns the transcription as a plain text:

Left 00:00:03 - 00:00:05 : Hello, this is a transcription test.
Right 00:00:15 - 00:00:23 : Hello.. The test is. Successful. Bye.

By default, each line in transcription file is prefixed "Left" for an audio stream from a call endpoint to the Voximplant cloud, and "Right" for an audio stream from the Voximplant cloud to a call endpoint (same logic as with left and right audio channel for stereo recording). "Left" and "Right" names can be changed via the labels parameter. The dict parameter allows to specify an array of words that the transcriber will try to match in case of recognition problems. Specifying domain-specific words can improve transcription results a lot.

B6A24216-9891-45D1-9D1D-E7359CEB8282 Created with sketchtool.


Aaron Kaneti
2018-07-26 13:21:54
Hi! I'm trying to access my transcriptions via the app I was creating. Is there a way for this? Thank you.

Yes, transcription information is available via our HTTP API

Add your comment

Please complete this field.


Sign up for a free Voximplant developer account or talk to our experts