aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/speechsense/v1/talk_service.proto
blob: 76455850a9c2a88f670869960e2ef9f01f569b61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
syntax = "proto3";

package yandex.cloud.speechsense.v1;

option java_package = "yandex.cloud.api.speechsense.v1";
option java_outer_classname = "TalkProto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/speechsense/v1;speechsense";

import "yandex/cloud/speechsense/v1/audio.proto";
import "yandex/cloud/speechsense/v1/text.proto";

service TalkService {

  // rpc for streaming talk documents. First message should contain Talk related metadata,
  // second - audio metadata, others should contain audio bytes in chunks
  rpc UploadAsStream(stream StreamTalkRequest) returns (UploadTalkResponse);

  // rpc for uploading talk document as single message
  rpc Upload(UploadTalkRequest) returns (UploadTalkResponse);

  // rpc for uploading text talk document
  rpc UploadText(UploadTextRequest) returns (UploadTextResponse);
}

// streaming request to create audio dialog
message StreamTalkRequest {
  oneof Event {

    // talk document metadata containing channel id and channel field values
    TalkMetadata metadata = 1;

    // audio metadata or chunk
    AudioStreamingRequest audio = 2;
  }
}

// request to create audio dialog
message UploadTalkRequest {
  TalkMetadata metadata = 1;

  // audio payload
  AudioRequest audio = 2;
}

message UploadTalkResponse {

  // id of created talk document
  string talk_id = 1;
}

// request to create text based dialog
message UploadTextRequest {
  TalkMetadata metadata = 1;

  TextContent text_content = 2;
}

message UploadTextResponse {
  // id of created talk document
  string talk_id = 1;
}

message TalkMetadata {
  // id of connection this talk belongs too
  string connection_id = 1;

  // channel defined fields
  map<string, string> fields = 2;
}