Talk Analytics API, REST: Talk.Upload
rpc for uploading talk document as single message
HTTP request
POST https://rest-api.speechsense.yandexcloud.net/speechsense/v1/talks/upload
Body parameters
{
"metadata": {
"connectionId": "string",
"fields": "string",
"users": [
{
"id": "string",
"role": "string",
"fields": "string"
}
]
},
"audio": {
"audioMetadata": {
// Includes only one of the fields `rawAudio`, `containerAudio`
"rawAudio": {
"audioEncoding": "string",
"sampleRateHertz": "string",
"audioChannelCount": "string"
},
"containerAudio": {
"containerAudioType": "string"
}
// end of the list of possible fields
},
"audioData": {
"data": "string"
}
}
}
request to create audio dialog
Field |
Description |
metadata |
|
audio |
audio payload |
TalkMetadata
Field |
Description |
connectionId |
string id of connection this talk belongs too |
fields |
string channel defined fields |
users[] |
per user specific metadata |
UserMetadata
Field |
Description |
id |
string |
role |
enum (UserRole)
|
fields |
string |
AudioRequest
request for sending small audios (< 128 mb) in one go
Field |
Description |
audioMetadata |
audio metadata |
audioData |
Bytes with audio data. |
AudioMetadata
Audio format options.
Field |
Description |
rawAudio |
Audio without container. Includes only one of the fields |
containerAudio |
Audio is wrapped in container. Includes only one of the fields |
RawAudio
RAW Audio format spec (no container to infer type). Used in AudioFormat options.
Field |
Description |
audioEncoding |
enum (AudioEncoding) Type of audio encoding
|
sampleRateHertz |
string (int64) PCM sample rate |
audioChannelCount |
string (int64) PCM channel count. |
ContainerAudio
Audio with fixed type in container. Used in AudioFormat options.
Field |
Description |
containerAudioType |
enum (ContainerAudioType) Type of audio container.
|
AudioChunk
Data chunk with audio.
Field |
Description |
data |
string (bytes) Bytes with audio data. |
Response
HTTP Code: 200 - OK
{
"talkId": "string"
}
Field |
Description |
talkId |
string id of created talk document |