File object fields
Audio files of a call are returned in the files attribute of the call object.
Each file is a JSON object with the following attributes:
| Attribute | Type | Description |
|---|---|---|
file_id |
string | ID of the file, for example 01. It is unique within the call only. Pass it in the file_id parameter of Retrieve file for playback. |
start_time |
datetime | Date and time when the recording of this file started. ISO 8601 with time zone, for example 2024-06-05T01:35:55+03:00. |
stop_time |
datetime | Date and time when the recording of this file stopped. |
file_size |
integer | Size of the audio file in bytes. |
| watermark | string or null | SHA-1 hash of the audio file content. Use it to verify data integrity. |
encrypt_key |
string or null | Public encryption key. Set only when the audio is encrypted. |
encrypt_tag |
string or null | Encryption tag. Required to play back the encrypted audio. Set only when the audio is encrypted. |
encrypt_fingerprint |
string or null | Fingerprint of the encryption key. Required to play back the encrypted audio. Set only when the audio is encrypted. |
speech_analytics |
list of objects | Transcripts of the file. Empty when the file has no transcript. Returned only when the API user has the Call transcript view permission. See Transcript object. |
Note
The location of the file on the storage is not exposed by the REST API. To retrieve the audio, use Retrieve file for playback.
Transcript object
| Attribute | Type | Description |
|---|---|---|
transcript_id |
UUID | Unique ID of the transcript. |
| engine | string | Speech engine that produced the transcript, for example miarec_v2. |
| language | string or null | Language of the transcript. |
ts_language |
string or null | Full-text search language of the transcript. |
| status | string | Status of the transcript: UPLOADING (uploading audio), PROCESSING (in progress), RUNNING (waiting), COMPLETE, or FAILED. |
transcript_plain |
string | Plain text of the transcript. Empty until the status is COMPLETE. |
transcript_json |
string | Transcript with timing and speaker information, serialized as a JSON string. See Transcript JSON format. |
created_at |
datetime | Date and time when the transcript record was created. |
updated_at |
datetime | Date and time of the last modification of the transcript record. |
Transcript JSON format
transcript_json is a JSON document encoded as a string. Parse it with a JSON parser to get a list
of phrases. Each phrase has:
| Attribute | Type | Description |
|---|---|---|
| side | integer | Speaker: 1 for the left channel (usually the agent), 2 for the right channel. |
| s | integer | Start time of the phrase, in milliseconds from the beginning of the file. |
| e | integer | End time of the phrase, in milliseconds. |
| c | number | Confidence of the recognition, when reported by the engine. |
| words | list of objects | Words of the phrase. |
Each word has:
| Attribute | Type | Description |
|---|---|---|
| w | string | The word, or a punctuation mark. |
| s | integer | Start time of the word, in milliseconds. |
| e | integer | End time of the word, in milliseconds. |
| sn | integer | Sentiment of the word, when sentiment analysis is enabled. |
| m | string | punc when the item is a punctuation mark. Absent for regular words. |
| sp | string | Spoken form of the word, when it differs from the written form (for example, a number). |
| ner | string | Named entity type, when named entity recognition is enabled. |
ner_c |
number | Confidence of the named entity recognition. |
Older transcripts may also carry a per-word confidence c; new transcripts store confidence per
phrase only.
Example (formatted for readability):
[
{
"side": 1,
"s": 2880,
"e": 6520,
"c": 0.92,
"words": [
{"w": "Hi", "s": 2880, "e": 2920, "sn": 4},
{"w": ",", "s": 2920, "e": 2920, "sn": 4, "m": "punc"},
{"w": "I'm", "s": 3400, "e": 3520, "sn": 4},
{"w": "calling", "s": 3520, "e": 3800, "sn": 4},
{"w": "from", "s": 3800, "e": 3920, "sn": 4},
{"w": "Delta", "s": 3920, "e": 4320, "sn": 4},
{"w": "Air", "s": 4320, "e": 4600, "sn": 4},
{"w": "Lines", "s": 4600, "e": 4920, "sn": 4},
{"w": ".", "s": 4920, "e": 4920, "sn": 4, "m": "punc"}
]
},
{
"side": 2,
"s": 8480,
"e": 9320,
"c": 0.88,
"words": [
{"w": "Yes", "s": 8480, "e": 8520, "sn": 6},
{"w": ",", "s": 8520, "e": 8520, "sn": 6, "m": "punc"},
{"w": "this", "s": 8920, "e": 8960, "sn": 6},
{"w": "is", "s": 8960, "e": 9080, "sn": 6},
{"w": "she", "s": 9080, "e": 9320, "sn": 6},
{"w": ".", "s": 9320, "e": 9320, "sn": 6, "m": "punc"}
]
}
]