-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
727 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* Copyright 2016-2099 Ailemon.net | ||
This file is part of ASRT Speech Recognition Tool. | ||
ASRT is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
ASRT is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with ASRT. If not, see <https://www.gnu.org/licenses/>. | ||
============================================================================ */ | ||
|
||
syntax = "proto3"; | ||
package asrt; | ||
|
||
//定义服务接口 | ||
service AsrtGrpcService { | ||
rpc Speech (SpeechRequest) returns (SpeechResponse) {} //一个服务中可以定义多个接口,也就是多个函数功能 | ||
rpc Language (LanguageRequest) returns (TextResponse) {} | ||
rpc All (SpeechRequest) returns (TextResponse) {} | ||
rpc Stream (stream SpeechRequest) returns (stream TextResponse) {} | ||
} | ||
|
||
message SpeechRequest { | ||
WavData wav_data = 1; | ||
} | ||
|
||
message SpeechResponse { | ||
int32 status_code = 1; | ||
string status_message = 2; | ||
repeated string result_data = 3; // 拼音结果 | ||
} | ||
|
||
message LanguageRequest { | ||
repeated string pinyins = 1; | ||
} | ||
|
||
message TextResponse { | ||
int32 status_code = 1; | ||
string status_message = 2; | ||
string text_result = 3; | ||
} | ||
|
||
message WavData{ | ||
bytes samples = 1; // wav样本点字节 | ||
int32 sample_rate = 2; // wav采样率 | ||
int32 channels = 3; // wav通道数 | ||
int32 byte_width = 4; // wav样本字节宽度 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.