{"startRecording":} object

Allows Tropo applications to begin recording the current session. The resulting recording may then be sent via FTP, an HTTP POST/Multipart Form, or to your Amazon S3 bucket.

Tips and Tricks

  • Recording files are 16 bit, 8KHz files, regardless of the audio type
  • If you record a conference or a transfer, you'll get a stereo recording. One channel contains the caller, the other contains the conference or transferred party.
  • Transcription results will be better if you use WAV as your audio type. The higher-quality audio gives more for the transcription engine to work with.

Fields

asyncUpload

Boolean
Default: 
false

Setting to true will instruct Tropo to upload the recording file in the background as soon as the recording is completed.

If this is set to false (the default behavior), Tropo will wait until the file is uploaded before returning or running the onRecord callback.

format

String
Default: 
audio/wav

This specifies the format for the audio recording; it can be 'audio/wav', 'audio/mp3' or 'audio/au'.

method

String
Default: 
POST

For HTTP or S3 recording upload, this parameter determines the method used. To upload to an Amazon S3 bucket, use "s3". For HTTP, this can be 'POST' (which is the default) or 'PUT'. When sending via POST, the file is sent as if you uploaded in a web form with a form field name of "filename".

url

String
(Required)

The S3 Bucket, FTP, or HTTP URL to send the recorded audio file. When sending via POST, the name of the form field is "filename". Accepts SSL (FTPS and HTTPS) and SFTP URLs as well.

The file will take a few moments to upload to your server. The exact amount of time depends on many factors, including the network connection of your server. If your application needs to play back the audio immediately after recording is completed, the object returned by the record method has a "value" property that contains a url of a temporary local copy of the file. This temporary copy will be deleted as soon as the call ends.

Please note this needs to be a fully realized URL, i.e. "http://website.com/folder/subfolder" vs "/folder/subfolder". If you don't have a complete URL, the file won't send at all or at the very least won't send correctly (0 byte file and similar unusable content).

For FTP or S3 destinations, include the full URl including the file name, i.e. "ftp://example.com/folder/my-recording.wav" or "https://s3.amazonaws.com/your_bucket_name/myrecordng.mp3".

username

String

Defines the username for uploading your recording. For HTTP, this is a Basic Auth user.

For FTP, this is your FTP server's user name.

For S3, this is your AWS Access Key ID.

Note: If user name contains @ or /, the character must be URL encoded.

password

String

Defines the password for uploading a file. When using HTTP, this will be used as a password for Basic Auth to your server.

For FTP, this is your FTP user name.

For S3, this is your AWS access key secret.

Note: If password contains @ or /, the character must be URL encoded.

transcriptionEmailFormat

String
Default: 
plain

Specifies the encoding used when delivering transcriptions via e-mail. Values can be "plain" or "encoded".

transcriptionID

String
Default: 
none

User definable ID that can be included when the transcription is posted to transcriptionOutURI.

transcriptionOutURI

String
Default: 
none

Setting this to anything enables transcription on this recording. The e-mail address or HTTP URL to send the transcription results to; the transcription arrives as the content of the HTTP POST, as opposed to a header, named field or variable, and is not sent as form data.

Note: Email addresses must be prefaced with mailto: if used (mailto:you@example.com)

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.

Examples

Example with stopRecording

{
   "tropo":[
      {
         "startRecording":{
            "name":"myrecording",
            "url":"http://example.com/getrecord.php"
         }
      },
      {
         "say":[
            {
               "value":"I am now recording!"
            }
         ]
      },
      {
         "stopRecording":null
      }
   ]
}