kevinwang676's picture
Update runtime/python/grpc/cosyvoice.proto
3043352 verified
syntax = "proto3";
package cosyvoice;
option go_package = "protos/";
// ───────────────────────────────────────────────────────────────────────────────
// Service
// ───────────────────────────────────────────────────────────────────────────────
service CosyVoice {
rpc Inference(Request) returns (stream Response) {}
}
// ───────────────────────────────────────────────────────────────────────────────
// Top‑level wrapper
// ───────────────────────────────────────────────────────────────────────────────
message Request {
oneof RequestPayload {
sftRequest sft_request = 1;
zeroshotRequest zero_shot_request = 2;
crosslingualRequest cross_lingual_request = 3;
instructRequest instruct_request = 4;
}
}
// ───────────────────────────────────────────────────────────────────────────────
// Individual request messages
// ───────────────────────────────────────────────────────────────────────────────
message sftRequest {
string spk_id = 1;
string tts_text = 2;
}
message zeroshotRequest {
string tts_text = 1;
string prompt_text = 2;
bytes prompt_audio = 3; // URL (utf‑8) or raw bytes
float speed = 4; // ⎯ optional, 1β€―=β€―normal speed
}
message crosslingualRequest {
string tts_text = 1;
bytes prompt_audio = 2;
float speed = 3; // optional
}
message instructRequest {
string tts_text = 1;
string instruct_text = 2;
bytes prompt_audio = 3; // URL (utf‑8) or raw bytes
float speed = 4; // optional
}
// ───────────────────────────────────────────────────────────────────────────────
message Response {
bytes tts_audio = 1;
}