Talk Analytics API, gRPC: TalkService.UploadBadge
rpc for streaming document that contains combined talks. First message should contain Talk related metadata,
second - audio metadata, others should contain audio bytes in chunks
gRPC request
rpc UploadBadge (stream StreamTalkRequest) returns (operation.Operation)
StreamTalkRequest
{
// Includes only one of the fields `metadata`, `audio`
"metadata": {
"connection_id": "string",
"fields": "map<string, string>",
"users": [
{
"id": "string",
"role": "UserRole",
"fields": "map<string, string>"
}
]
},
"audio": {
// Includes only one of the fields `audio_metadata`, `chunk`
"audio_metadata": {
// Includes only one of the fields `raw_audio`, `container_audio`
"raw_audio": {
"audio_encoding": "AudioEncoding",
"sample_rate_hertz": "int64",
"audio_channel_count": "int64"
},
"container_audio": {
"container_audio_type": "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 |
|
connection_id |
string id of connection this talk belongs too |
|
fields |
object (map<string, string>) channel defined fields |
|
users[] |
per user specific metadata |
UserMetadata
|
Field |
Description |
|
id |
string |
|
role |
enum UserRole
|
|
fields |
object (map<string, string>) |
AudioStreamingRequest
Streaming audio request
First message should be audio metadata.
The next messages are audio data chunks.
|
Field |
Description |
|
audio_metadata |
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 |
|
raw_audio |
Audio without container. Includes only one of the fields |
|
container_audio |
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 |
|
audio_encoding |
enum AudioEncoding Type of audio encoding
|
|
sample_rate_hertz |
int64 PCM sample rate |
|
audio_channel_count |
int64 PCM channel count. |
ContainerAudio
Audio with fixed type in container. Used in AudioFormat options.
|
Field |
Description |
|
container_audio_type |
enum ContainerAudioType Type of audio container.
|
AudioChunk
Data chunk with audio.
|
Field |
Description |
|
data |
bytes Bytes with audio data. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"badge_id": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"badge_id": "string",
"talk_ids": [
"string"
]
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
UploadBadgeMetadata
|
Field |
Description |
|
badge_id |
string id of uploaded badge |
UploadBadgeResponse
|
Field |
Description |
|
badge_id |
string id of uploaded badge |
|
talk_ids[] |
string id of created talks related to badge |