api.clarify.io
  1. bundles
api.clarify.io
  • bundles
    • List bundles
      GET
    • Create a bundle
      POST
    • Delete a bundle
      DELETE
    • Get a bundle
      GET
    • Update a bundle
      PUT
    • Get bundle insights
      GET
    • Request an insight to be run
      POST
    • Get bundle insight
      GET
    • Delete bundle metadata
      DELETE
    • Get bundle metadata
      GET
    • Update bundle metadata
      PUT
    • Delete bundle tracks
      DELETE
    • Get bundle tracks
      GET
    • Add a track for a bundle
      POST
    • Update a tracks for a bundle
      PUT
    • Delete a bundle track
      DELETE
    • Get bundle track
      GET
    • Add media to a track
      PUT
  • reports
    • Generate Group Report <span class="label">beta</span>
      GET
    • Generate Trends Report <span class="label">beta</span>
      GET
  • search
    • Search bundles
      GET
  1. bundles

Add media to a track

PUT
/v1/bundles/{bundle_id}/tracks/{track_id}
Add media to an existing track of a bundle. This can only be called on a track that currently has no media set or has parts pending.

Once all media parts have been added to a track it is immutable, meaning it cannot be modified. If you wish to modify a track, simply add a new one and delete the existing one.

media_url must be a publicly accessible url to a media file. It will be fetched asynchronously after the REST call returns. The audio can be mono or stereo.

audio_channel is used to specify audio channels if the media is a stereo file. A value of left or right signifies that only the specified channel will be used. If no value or an empty string is specified for audio_channel, all channels will be used in a single track. If your stereo channels were recorded separately with each channel containing distinct content (for example if 2 legs of a phone call were recorded separately and combined into a single stereo file), for best speech recognition, create two tracks with audio_channel to be left and right. If your stereo file is simply a recording made with a stereo microphone, audio_channel should be set to an empty string (or not be specified.)

audio_language can be used to specify the language of the audio media. This is an optional parameter and if not specified or an empty string, the language of the track will be automatically detected. If specified, it must be a language code as described in RFC5646 (see http://tools.ietf.org/html/rfc5646). Supported languages: en-US, en-UK, es, fr.

start_time a time in seconds that the media starts, relative to start time of the bundle. This allows you to specify sequential parts of media. If not specified, the default is 0.

parts_pending a boolean flag specifying if more media parts will subsequently be added to the track. If true, a subsequent API call must be made to signify that the track is complete. If not specified, the default is false.

If version specified, the track will only be added if the current version matches this parameter value. If the version doesn't match, a 409 Conflict error will be returned. If version not specified, the track will always be updated.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.clarify.io//v1/bundles//tracks/' \
--data-urlencode 'media_url='
Response Response Example
200 - Example 1
{}

Request

Path Params
bundle_id
string 
required
id of a bundle
track_id
string 
required
id of a track
Body Params application/x-www-form-urlencoded
media_url
string 
required
URL of a media file for this bundle. Up to 2083 characters.
audio_channel
string 
optional
The audio channel to use for the track ( "" | left | right ). Default is empty string which means all channels of audio in the media file are used for the track.
audio_language
string 
optional
Language of the audio in the track, specified with an RFC5646 code.
start_time
string 
optional
Time offset in seconds that the media starts relative to the bundle. Default is 0.
parts_pending
string 
optional
Set to true if more media parts will be added to the track. Default is false.
version
string 
optional
Object version.

Responses

🟢200No response was specified
application/json
Body
object {0}
🟢202Accepted
🟠400Bad request
🟠404Not found
🟠409Conflict
Modified at 2022-09-10 16:56:00
Previous
Get bundle track
Next
Generate Group Report <span class="label">beta</span>
Built with