cosyvoice.proto 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu)
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. syntax = "proto3";
  15. package cosyvoice;
  16. option go_package = "protos/";
  17. service CosyVoice{
  18. rpc Inference(Request) returns (Response) {}
  19. }
  20. message Request{
  21. oneof RequestPayload {
  22. sftRequest sft_request = 1;
  23. zeroshotRequest zero_shot_request = 2;
  24. crosslingualRequest cross_lingual_request = 3;
  25. instructRequest instruct_request = 4;
  26. }
  27. }
  28. message sftRequest{
  29. string spk_id = 1;
  30. string tts_text = 2;
  31. }
  32. message zeroshotRequest{
  33. string tts_text = 1;
  34. string prompt_text = 2;
  35. bytes prompt_audio = 3;
  36. }
  37. message crosslingualRequest{
  38. string tts_text = 1;
  39. bytes prompt_audio = 2;
  40. }
  41. message instructRequest{
  42. string tts_text = 1;
  43. string spk_id = 2;
  44. string instruct_text = 3;
  45. }
  46. message Response{
  47. bytes tts_audio = 1;
  48. }