Talk Analytics API, gRPC: TalkService.UploadAsStream
rpc for streaming talk documents. First message should contain Talk related metadata,
second - audio metadata, others should contain audio bytes in chunks
gRPC request
rpc UploadAsStream (stream StreamTalkRequest) returns (UploadTalkResponse)
StreamTalkRequest
{
// Includes only one of the fields `metadata`, `audio`
"metadata": {
"connectionId": "string",
"fields": "string",
"users": [
{
"id": "string",
"role": "UserRole",
"fields": "string"
}
]
},
"audio": {
// Includes only one of the fields `audioMetadata`, `chunk`
"audioMetadata": {
// Includes only one of the fields `rawAudio`, `containerAudio`
"rawAudio": {
"audioEncoding": "AudioEncoding",
"sampleRateHertz": "int64",
"audioChannelCount": "int64"
},
"containerAudio": {
"containerAudioType": "ContainerAudioType"
}
// end of the list of possible fields
},
"chunk": {
"data": "bytes"
}
// end of the list of possible fields
}
// end of the list of possible fields
}
streaming request to create audio dialog
Field |
Description |
metadata |
talk document metadata containing channel id and channel field values Includes only one of the fields |
audio |
audio metadata or chunk Includes only one of the fields |
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 |
AudioStreamingRequest
Streaming audio request
First message should be audio metadata.
The next messages are audio data chunks.
Field |
Description |
audioMetadata |
Session options. Should be the first message from user. Includes only one of the fields |
chunk |
Chunk with audio data. Includes only one of the fields |
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 |
int64 PCM sample rate |
audioChannelCount |
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 |
bytes Bytes with audio data. |
UploadTalkResponse
{
"talkId": "string"
}
Field |
Description |
talkId |
string id of created talk document |