Tropo is part of CiscoLearn More

Transcribing Caller Input

Note
Transcription is not available in the tropo.eu environment. See API Differences for details.

Adding transcription to a recording really only needs one additional parameter - transcriptionOutURI. There are, however, a couple of optional parameters you can include: transcriptionID (a user definable ID that can be included when the transcription is posted) and transcriptionOutFormat (the formatting for the transcription that will be sent to your transcription URI - either 'xml' or 'json'). We'll set the callerID as the transcriptionID so we have a unique identifier and use a mailto for our transcriptionURI.

Transcription is a paid feature and is not included in the per-minute rate for phone calls. Transcription is billed for each minute of transcribed recording. See Tropo Pricing for current rates.

Although the record function will allow extremely long recordings, transcription is limited to three hours. If you attempt to transcribe something longer than that, you will not receive a transcription. Your best bet is to set the maxTime value for less than three hours - since it's in seconds, we defined it as 900 in the example to get 15 minutes maximum recording and transcription time.

This example is an expanded version of the example shown in the Recording Audio subsection of the Answering Incoming Calls QuickStart:

var callerID = currentCall.callerID;

say("Welcome to speed therapy!");
record("Tell us how you feel in fifteen minutes or less!", {
    beep:true,
    maxTime:900,
    recordURI:"http://example.com/recording.js",
    transcriptionOutURI: "mailto:you@example.com",
    transcriptionID:callerID
    }
);
callerID = $currentCall.callerID

say "Welcome to speed therapy!"
record "Tell us how you feel in fifteen minutes or less!", {
    :beep => true,
    :maxTIme => 900,
    :recordURI => "http://example.com/recording.rb",
    :transcriptionOutURI => "mailto:you@example.com",
    :transcriptionID => callerID
    }
<?php
$callerID = $currentCall->callerID;

say("Welcome to speed therapy!");
record("Tell us how you feel in fifteen minutes or less!", array (
    "beep" => true,
    "maxTime" => 900,
    "recordURI"=>"http://example.com/recording.php",
    "transcriptionOutURI" => "mailto:you@example.com",
    "transcriptionID" => $callerID
    )
);
?>
callerID = currentCall.callerID

say("Welcome to speed therapy!")
record("Tell us how you feel in fifteen minutes or less!", {
    "beep":True,
    "maxTime":900,
    "recordURI":"http://example.com/recording.py",
    "transcriptionOutURI": "mailto:you@example.com",
    "transcriptionID": callerID
    }
)
callerID = currentCall.callerID

say("Welcome to speed therapy!")
record("Tell us how you feel in fifteen minutes or less!", [
    beep:true,
    maxTime:900,
    recordURI:"http://example.com/recording.groovy",
    transcriptionOutURI: "mailto:you@example.com",
    transcriptionID: callerID
    ]
)

If you wanted to send the transcription via HTTP POST, it's only a small change to the code - change the mailto to an HTTP/HTTPS URL:

var callerID = currentCall.callerID;

say("Welcome to speed therapy!");
record("Tell us how you feel in fifteen minutes or less!", {
    beep:true,
    maxTime:900,
    recordURI:"http://example.com/recording.js",
    transcriptionOutURI: "http://example.com/destination",
    transcriptionID:callerID
    }
);
callerID = $currentCall.callerID

say "Welcome to speed therapy!"
record "Tell us how you feel in fifteen minutes or less!", {
    :beep => true,
    :maxTIme => 900,
    :recordURI => "http://example.com/recording.rb",
    :transcriptionOutURI => "http://example.com/destination",
    :transcriptionID => callerID
    }
<?php
$callerID = $currentCall->callerID;

say("Welcome to speed therapy!");
record("Tell us how you feel in fifteen minutes or less!", array (
    "beep" => true,
    "maxTime" => 900,
    "recordURI"=>"http://example.com/recording.php",
    "transcriptionOutURI" => "http://example.com/destination",
    "transcriptionID" => $callerID
    )
);
?>
callerID = currentCall.callerID

say("Welcome to speed therapy!")
record("Tell us how you feel in fifteen minutes or less!", {
    "beep":True,
    "maxTime":900,
    "recordURI":"http://example.com/recording.py",
    "transcriptionOutURI": "http://example.com/destination",
    "transcriptionID": callerID
    }
)
callerID = currentCall.callerID

say("Welcome to speed therapy!")
record("Tell us how you feel in fifteen minutes or less!", [
    beep:true,
    maxTime:900,
    recordURI:"http://example.com/recording.groovy",
    transcriptionOutURI: "http://example.com/destination",
    transcriptionID: callerID
    ]
)

Once the call finished, we'd likely see something like this in our email:

    Result: The color yellow makes me sad.

    Identifier: 4075551212

Comfortable with recording and transcribing? Move on to "Controlling Calls".