kevinwang676 commited on
Commit
3043352
Β·
verified Β·
1 Parent(s): f660b4b

Update runtime/python/grpc/cosyvoice.proto

Browse files
Files changed (1) hide show
  1. runtime/python/grpc/cosyvoice.proto +31 -18
runtime/python/grpc/cosyvoice.proto CHANGED
@@ -3,41 +3,54 @@ syntax = "proto3";
3
  package cosyvoice;
4
  option go_package = "protos/";
5
 
6
- service CosyVoice{
 
 
 
7
  rpc Inference(Request) returns (stream Response) {}
8
  }
9
 
10
- message Request{
 
 
 
11
  oneof RequestPayload {
12
- sftRequest sft_request = 1;
13
- zeroshotRequest zero_shot_request = 2;
14
  crosslingualRequest cross_lingual_request = 3;
15
- instructRequest instruct_request = 4;
16
  }
17
  }
18
 
19
- message sftRequest{
20
- string spk_id = 1;
 
 
 
21
  string tts_text = 2;
22
  }
23
 
24
- message zeroshotRequest{
25
- string tts_text = 1;
26
  string prompt_text = 2;
27
- bytes prompt_audio = 3;
 
28
  }
29
 
30
- message crosslingualRequest{
31
- string tts_text = 1;
32
- bytes prompt_audio = 2;
 
33
  }
34
 
35
- message instructRequest{
36
- string tts_text = 1;
37
- string spk_id = 2;
38
- string instruct_text = 3;
 
39
  }
40
 
41
- message Response{
 
42
  bytes tts_audio = 1;
43
  }
 
3
  package cosyvoice;
4
  option go_package = "protos/";
5
 
6
+ // ───────────────────────────────────────────────────────────────────────────────
7
+ // Service
8
+ // ───────────────────────────────────────────────────────────────────────────────
9
+ service CosyVoice {
10
  rpc Inference(Request) returns (stream Response) {}
11
  }
12
 
13
+ // ───────────────────────────────────────────────────────────────────────────────
14
+ // Top‑level wrapper
15
+ // ───────────────────────────────────────────────────────────────────────────────
16
+ message Request {
17
  oneof RequestPayload {
18
+ sftRequest sft_request = 1;
19
+ zeroshotRequest zero_shot_request = 2;
20
  crosslingualRequest cross_lingual_request = 3;
21
+ instructRequest instruct_request = 4;
22
  }
23
  }
24
 
25
+ // ───────────────────────────────────────────────────────────────────────────────
26
+ // Individual request messages
27
+ // ───────────────────────────────────────────────────────────────────────────────
28
+ message sftRequest {
29
+ string spk_id = 1;
30
  string tts_text = 2;
31
  }
32
 
33
+ message zeroshotRequest {
34
+ string tts_text = 1;
35
  string prompt_text = 2;
36
+ bytes prompt_audio = 3; // URL (utf‑8) or raw bytes
37
+ float speed = 4; // ⎯ optional, 1β€―=β€―normal speed
38
  }
39
 
40
+ message crosslingualRequest {
41
+ string tts_text = 1;
42
+ bytes prompt_audio = 2;
43
+ float speed = 3; // optional
44
  }
45
 
46
+ message instructRequest {
47
+ string tts_text = 1;
48
+ string instruct_text = 2;
49
+ bytes prompt_audio = 3; // URL (utf‑8) or raw bytes
50
+ float speed = 4; // optional
51
  }
52
 
53
+ // ───────────────────────────────────────────────────────────────────────────────
54
+ message Response {
55
  bytes tts_audio = 1;
56
  }