ASR transcript schema

Format JSON transcripts correctly to ensure accurate processing.

When Medallia Speech ingests audio via the Speech API, we create a transcript in JSON format containing utterances and attributes that are used by Text Analytics and Reporting. All metrics and insights are calculated from that transcript rather than directly from the audio.

If you wish to provide your own complete JSON transcript rather than raw audio or video, you must be careful to format the transcript exactly as the Speech pipeline would have formatted it, including all necessary attributes, so that services further along the pipeline can work with the data.

Example transcript

For your convenience, you can copy the template below or download an example JSON file.

{
  "request_id": "074b5760-a128-420f-b7e6-1cevn098765c",
  "confidence": 0.91,
  "duration": 166.38,
  "channels": 2,
  "utterances": [
    {
      "confidence": 0.88,
      "end": 7.03,
      "start": 5.85,
      "channel": 0,
      "speakerId": "spk_0",
      "emotion": null,
      "sentiment": null,
      "text": "How can I help you?",
      "events": [
        {
          "confidence": 0.95,
          "end": 6.01,
          "start": 5.85,
          "word": "How"
        },
        {
          "confidence": 0.93,
          "end": 6.19,
          "start": 6.01,
          "word": "can"
        },
        {
          "confidence": 0.92,
          "end": 6.27,
          "start": 6.19,
          "word": "I"
        },
        {
          "confidence": 0.94,
          "end": 6.91,
          "start": 6.71,
          "word": "help"
        },
        {
          "confidence": 0.91,
          "end": 7.03,
          "start": 6.91,
          "word": "you?"
        }
      ]
    },
    {
      "confidence": 0.92,
      "end": 70.56,
      "start": 69.96,
      "channel": 1,
      "speakerId": "spk_1",
      "emotion": null,
      "sentiment": null,
      "text": "Good morning.",
      "events": [
        {
          "confidence": 0.90,
          "end": 70.14,
          "start": 69.96,
          "word": "Good"
        },
        {
          "confidence": 0.92,
          "end": 70.30,
          "start": 70.14,
          "word": "morning."
        }
      ]
    }
  ],
  "language": "en_us"
}

Schema attributes

The following table describes the attributes that must be present in the schema:

AttributeData typeDescriptionNotes
request_idstringUnique identifier for the transcription request
confidencenumber (double)Overall model confidence score for the transcription, typically between 0 and 1
durationnumber (double)Total duration of the audio, in secondsRequired to populate the duration field
channelsintegerNumber of audio channels present in the source file
utterancesarray<utterance>Ordered list of utterances (speech segments) that make up the transcription
utterances.confidencenumber (double)Model confidence score for this utteranceRequired to calculate agent and customer clarity fields
utterances.endnumber (double)End time of the utterance, in seconds, from the beginning of the audioRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
utterances.startnumber (double)Start time of the utterance, in seconds, from the beginning of the audioRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
utterances.channelintegerAudio channel on which this utterance was detected
utterances.genderstringThe gender of the speaker
  • Required to populate agent and customer gender fields
  • Not available with Engine 2 languages

utterances.speakerIdstringIdentifier of the speaker attributed to this utteranceRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
utterances.emotionstring

Emotion detected for this specific utterance

Accepted values:

  • positive
  • mostly_positive
  • neutral
  • mostly_negative
  • negative
  • Required to populate agent and customer emotion fields
  • emotion must be true in the API request

  • Not available with Engine 2 languages

utterances.sentimentstring

Sentiment detected for this specific utterance

Accepted values:

  • positive
  • mostly_positive
  • neutral
  • mostly_negative
  • negative
  • mixed

utterances.textstringThe transcribed text of the utterance
utterances.eventsarray<event>Ordered list of word-level events within this utterance
utterances.events.confidencenumber (double)Model confidence score for this wordRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
utterances.events.endnumber (double)End time of the word, in seconds, from the beginning of the audioRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
utterances.events.startnumber (double)Start time of the word, in seconds, from the beginning of the audioRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
utterances.events.wordstringThe recognized word or tokenRequired to calculate silence, overtalk, words per minute, talk rate, and talk streak fields
languagestringDetected or specified language of the audio (a language/locale code)For a list of supported language codes, see Supported languages.