Search…
Transcription API
Review the following links for sample use cases of when a company might benefit from the Transcription API or detailed examples that explain how to call the Transcription API across Plum's product suite.

Transcription API Description

Attention! Our queue transcription API method has reached its End of Life (EOL). Please use our AI-powered transcription method instead.
Plum offers two services for its Transcription REST API:
Please note that each of the Transcription REST APIs use HTTP AUTH for authentication. Please contact your account manager to get access credentials.
All of the Transcription REST APIs have the same return format that includes a status (success or failure), error message, and the result data.

Sample Responses

XML (success)
XML (failure)
JSON (success)
JSON (failure)
1
<sample>
2
<status>success</status>
3
<error/>
4
<result>
5
<!-- SAMPLE RESULT DATA -->
6
</result>
7
</sample>
Copied!
1
<sample>
2
<status>failure</status>
3
<error>Unauthorized access to sample service</error>
4
</sample>
Copied!
1
{
2
"status":"success",
3
"error":"",
4
"result": {
5
// SAMPLE RESULT DATA
6
}
7
}
Copied!
1
{
2
"status":"failure",
3
"error":"Unauthorized access to sample service",
4
}
Copied!
get
https://hosting.plumvoice.com
/ws/transcription/{resource_type}/{transcription_id}
Transcription Status
Sample Code
checkstatus.php
CURL (command line)
1
<?php
2
header("Content-type: text/xml");
3
4
// for this example, our transcription_id is f85bd7682c9f71b60e216f2f6d39e95d
5
$transcription_id = 'f85bd7682c9f71b60e216f2f6d39e95d';
6
7
// initialize curl
8
$ch = curl_init();
9
10
// set necessary curl options
11
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
12
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
13
curl_setopt($ch, CURLOPT_URL, "https://hosting.plumvoice.com/ws/transcription/status.xml/".$transcription_message_id);
14
15
echo(curl_exec($ch));
16
17
curl_close($ch);
18
?>
Copied!
1
curl -u username:password https://hosting.plumvoice.com/ws/transcription/status.json/f85bd7682c9f71b60e216f2f6d39e95d
Copied!
post
https://hosting.plumvoice.com
/ws/transcription/{resource_type}
Real-Time Transcription
Sample Code
transcribe.xml
CURL (command line)
1
<?xml version="1.0"?>
2
<vxml version="2.0">
3
<form>
4
<record name="recording1" beep="true">
5
<prompt bargein="false">Record your message after the beep.</prompt>
6
</record>
7
<block>
8
<var name="language" expr="'en-US'"/>
9
<var name="audio" expr="recording1"/>
10
<data name="transcribe" src="https://username:[email protected]/ws/transcription/transcribe.json" namelist="language audio" method="post" enctype="multipart/form-data" accept="application/json"/>
11
<if cond="transcribe.status == 'success'">
12
<log expr="'transcription_id: '+transcribe.result.transcription_id"/>
13
<prompt>You said: <value expr="transcribe.result.message"/></prompt>
14
<else/>
15
<log expr="'error: '+transcribe.error"/>
16
</if>
17
</block>
18
</form>
19
</vxml>
Copied!
1
curl -u username:password -F language=en-US -F [email protected]/path/to/audio https://hosting.plumvoice.com/ws/transcription/transcribe.json
Copied!

Supported Language Codes

Language Code
Language
Country
de-DE
German
Germany
*
en-AU
English
Australia
en-GB
English
United Kingdom
en-US
English
United States
es-ES
Spanish
Spain
*
es-MX
Spanish
Mexico
*
es-US
Spanish
United States
*
fr-CA
French
Canada
fr-FR
French
France
ja-JP
Japanese
Japan
pt-BR
Portuguese
Brazil
zh-CN
Mandarin
China
Note: Languages marked with an asterisk (*) are currently in Beta release and may not be ready for production use and are subject to change. They are initial offerings that are expected to improve in quality with time and usage.
Last modified 9mo ago