Salesforce

Create export requests

« Go Back
Information
Create export requests
000004013
Public
Product Selection
aiWare - aiWare
Article Details

Export requests can be made to export data out of aiWARE in specific formats.

They are requested via the createExportRequest mutation.

Example

mutation createExportRequest {
 createExportRequest(input: {
   includeMedia: true
   tdoData: [{tdoId: "96972470"}, {tdoId: "77041379"}]
   outputConfigurations:[
     {
       engineId:"<engine ID>"
       categoryId:"67cd4dd0-2f75-445d-a6f0-2f297d6cd182"
       formats:[
         {
           extension:"ttml"
           options: {
             maxCharacterPerLine:32
             newLineOnPunctuation: true
           }
         }
       ]
     }
   ]
 }) {
   id
   status
   organizationId
   createdDateTime
   modifiedDateTime
   requestorId
   assetUri
 }
}

Supported formats

Below are the supported formats, as well as the options that affect them. Multiple formats can be requested in the same operation by including multiple specifications in the formats array. Defaults for the options are provided in square brackets.

Plain text

  • Extension to request: txt
  • Format: Plain Text
  • Options:
    • maxCharacterPerLine [60]
    • newLineOnPunctuation [false]
    • timeGapToSeparateParagraphMs [0]
    • fileExtension [txt]

Microsoft Word

  • Extension to request: docx
  • Format: Microsoft Word
  • Options:
    • maxCharacterPerLine [60]
    • newLineOnPunctuation [false]
    • timeGapToSeparateParagraphMs [0]
    • fileExtension [docx]

Avid DS Subtitle

  • Extension to request: txtAvid
  • Format: Avid DS subtitle
  • Options:
    • maxCharacterPerLine [30]
    • newLineOnPunctuation [false]
    • timeGapToSeparateParagraphMs [1000]
    • linesPerScreen [3]
    • timeGapToSeparateScreenMs [5000]
    • withSpeakerData [false]
    • fileExtension [txtAvid]

SubRip

  • Extension to request: srt
  • Format: SubRip
  • Options:
    • maxCharacterPerLine [32]
    • newLineOnPunctuation [false]
    • timeGapToSeparateParagraphMs [1000]
    • linesPerScreen [2]
    • timeGapToSeparateScreenMs [5000]
    • withSpeakerData [false]
    • fileExtension [srt]

Timed Text Markup Language (TTML)

  • Extension to request: ttml
  • Format: Timed Text Markup Language
  • Options:
    • maxCharacterPerLine [80]
    • newLineOnPunctuation [false]
    • timeGapToSeparateParagraphMs [1000]
    • linesPerScreen [1]
    • timeGapToSeparateScreenMs [5000]
    • withSpeakerData [false]
    • fileExtension [ttml]

WebVTT

  • Extension to request: vtt
  • Format: WebVTT
  • Options:
    • maxCharacterPerLine [32]
    • newLineOnPunctuation [false]
    • timeGapToSeparateParagraphMs [1000]
    • linesPerScreen [2]
    • timeGapToSeparateScreenMs [5000]
    • withSpeakerData [false]
    • fileExtension [vtt]

Veritone standard (AION)

  • Extension to request: aion
  • Format: JSON: Veritone standard
    • The series data array (and only the series data) from the requested engine's output file.
  • Options:
    • fileExtension [aion]

The createExportRequest is almost exclusively used to export caption files, so most of the formats only work with outputs from transcription engines (specifically: engine outputs that contain series.words). The exception to this is the Veritone standard (aion) export which will export any engine's series data as raw JSON.

Options

The (optional) options block for each format configures specific parameters for each requested export. Not all options apply to all formats. See the list of supported formats above for which options you can use for which format.

OptionEffect on export
maxCharacterPerLineLimits the maximum number of characters that fit on a single line.
newLineOnPunctuationWhen true, a new line will be started after punctuation that indicates a sentence has ended. This includes period ., question mark ?, or exclamation point !.
timeGapToSeparateParagraphMsThe maximum length of time (in milliseconds) there can be a pause in speaking before a new line is started.
linesPerScreenFor formats that display blocks of lines as captions, this limits the maximum number of lines that can be in a block.
timeGapToSeparateScreenMsThe maximum length of time (in milliseconds) there can be a pause in speaking before a new block of text is started.
withSpeakerDataWhen true and speaker data is provided, this will force a new line to start whenever the speaker changes. It will also cause the output to include the current speaker's name.
fileExtensionOverrides the default extension for the output file. By default, the output file uses the extension that was requested in the export. However, if this option is provided then the fileExtension will be used for the output file instead. This is useful for formats like TTML where some applications require that TTML files have a .ttml extension, but others require that TTML files have a .xml extension.

Include speaker data

If withSpeakerData:true is specified in a request, then speaker data will be included in the output files. Speaker data will be looked for in the following locations:

Speaker data included with transcription

If the transcription engine exports speaker data along with the words, it is assumed to be in the object.label field of the series.

For example, the transcription might contain a series like the following:

{
  "series": [
    {
      "startTimeMs":36600,
      "stopTimeMs":39300,
      "language":"en",
      "words":
      [
        { 
          "word":"legume",
          "confidence":0.78,
          "bestPath":true,
          "utteranceLength":1
        }
      ],
      "object": {
        "type": "speaker",
        "label": "Hammurabi"
      }
    }
  ]
}

In this case, the speaker of the word "legume" is "Hammurabi", and the export might contain something like

SPEAKER: Hammurabi (00:00:28:18 - 00:00:39:09)
Bring me a legume!

Of course, this assumes that the speaker for "Bring", "me" and "a" is also Hammurabi.

Speaker data from a different engine

Most often, the transcription engine will not include the speaker data, and a separate engine from the "Speaker Detection" category (ID a856c447-1030-4fb0-917f-08179f949c4e) will also be run. In this case, the output from these engines will need to be merged to create the export. However, the export code needs to know which speaker detection data should be used, since there could be data from multiple speaker detection engines available.

To identify the speaker detection data which should be used, a configuration for the desired engine must be specified.

The configuration for the Speaker Detection engine might not have any formats fields defined. Formats for the speaker detection engine aren't normally requested in practice since the speaker data is already in the export. For example, if the transcription data is from engine c0e55cde-340b-44d7-bb42-2e0d65e98255 and the Speaker Detection data is from engine 06c3f1d7-7424-407b-a3b5-6ef61154fc0b, the following would request a SRT export which includes the speaker data. This assumes that the TDO has both engine's output in it.

mutation createExportRequest {
  createExportRequest(
    input: {
      includeMedia: true
      tdoData: [ {tdoId: "1230863020"} ]
      outputConfigurations: [
        {
          # transcription engine with the words
          engineId: "c0e55cde-340b-44d7-bb42-2e0d65e98255"
          categoryId: "67cd4dd0-2f75-445d-a6f0-2f297d6cd182"
          formats: [
            {
              extension: "srt"
              options: {
                newLineOnPunctuation: true
                withSpeakerData: true
              }
            }
          ]
        }
        {
          # speaker detection engine with the speaker data
          engineId: "06c3f1d7-7424-407b-a3b5-6ef61154fc0b"
          categoryId: "a856c447-1030-4fb0-917f-08179f949c4e"
          formats: [
            # formats is a required field, but we can leave it empty
          ]
        }
      ]
    }
  ) {
   id
   status
   organizationId
   createdDateTime
   modifiedDateTime
   requestorId
   assetUri
 }
}
[Note] The engine that generated the speaker detection data must be in category "Speaker Detection" (ID a856c447-1030-4fb0-917f-08179f949c4e) to be identified as containing speaker data.
Additional Technical Documentation Information
Properties
1/8/2024 6:05 PM
1/8/2024 6:05 PM
1/8/2024 6:05 PM
Documentation
Documentation
000004013
Translation Information
English

Powered by