123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899 |
- syntax = "proto3";
- package google.cloud.speech.v1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/cloud/speech/v1/resource.proto";
- import "google/longrunning/operations.proto";
- import "google/protobuf/duration.proto";
- import "google/protobuf/timestamp.proto";
- import "google/protobuf/wrappers.proto";
- import "google/rpc/status.proto";
- option cc_enable_arenas = true;
- option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1;speech";
- option java_multiple_files = true;
- option java_outer_classname = "SpeechProto";
- option java_package = "com.google.cloud.speech.v1";
- option objc_class_prefix = "GCS";
- service Speech {
- option (google.api.default_host) = "speech.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
-
-
- rpc Recognize(RecognizeRequest) returns (RecognizeResponse) {
- option (google.api.http) = {
- post: "/v1/speech:recognize"
- body: "*"
- };
- option (google.api.method_signature) = "config,audio";
- }
-
-
-
-
-
-
- rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/speech:longrunningrecognize"
- body: "*"
- };
- option (google.api.method_signature) = "config,audio";
- option (google.longrunning.operation_info) = {
- response_type: "LongRunningRecognizeResponse"
- metadata_type: "LongRunningRecognizeMetadata"
- };
- }
-
-
- rpc StreamingRecognize(stream StreamingRecognizeRequest) returns (stream StreamingRecognizeResponse) {
- }
- }
- // The top-level message sent by the client for the `Recognize` method.
- message RecognizeRequest {
- // Required. Provides information to the recognizer that specifies how to
- // process the request.
- RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED];
-
- RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED];
- }
- message LongRunningRecognizeRequest {
-
-
- RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED];
-
- RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED];
-
- TranscriptOutputConfig output_config = 4 [(google.api.field_behavior) = OPTIONAL];
- }
- message TranscriptOutputConfig {
- oneof output_type {
-
-
-
- string gcs_uri = 1;
- }
- }
- message StreamingRecognizeRequest {
-
- oneof streaming_request {
-
-
-
- StreamingRecognitionConfig streaming_config = 1;
-
-
-
-
-
-
-
-
- bytes audio_content = 2;
- }
- }
- message StreamingRecognitionConfig {
-
-
- RecognitionConfig config = 1 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- bool single_utterance = 2;
-
-
-
-
- bool interim_results = 3;
- }
- message RecognitionConfig {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- enum AudioEncoding {
-
- ENCODING_UNSPECIFIED = 0;
-
- LINEAR16 = 1;
-
-
-
-
-
-
- FLAC = 2;
-
- MULAW = 3;
-
- AMR = 4;
-
- AMR_WB = 5;
-
-
-
- OGG_OPUS = 6;
-
-
-
-
-
-
-
-
-
-
-
-
-
- SPEEX_WITH_HEADER_BYTE = 7;
-
-
-
- WEBM_OPUS = 9;
- }
-
-
-
- AudioEncoding encoding = 1;
-
-
-
-
-
-
-
- int32 sample_rate_hertz = 2;
-
-
-
-
-
-
-
-
-
- int32 audio_channel_count = 7;
-
-
-
-
-
-
- bool enable_separate_recognition_per_channel = 12;
-
-
-
-
-
-
- string language_code = 3 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
-
-
-
-
-
-
-
- repeated string alternative_language_codes = 18;
-
-
-
-
-
-
- int32 max_alternatives = 4;
-
-
-
-
- bool profanity_filter = 5;
-
-
-
-
-
- SpeechAdaptation adaptation = 20;
-
-
-
-
-
- repeated SpeechContext speech_contexts = 6;
-
-
-
-
- bool enable_word_time_offsets = 8;
-
-
-
- bool enable_word_confidence = 15;
-
-
-
-
- bool enable_automatic_punctuation = 11;
-
-
-
-
-
-
-
- google.protobuf.BoolValue enable_spoken_punctuation = 22;
-
-
-
-
-
- google.protobuf.BoolValue enable_spoken_emojis = 23;
-
-
-
-
-
-
-
-
- SpeakerDiarizationConfig diarization_config = 19;
-
- RecognitionMetadata metadata = 9;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- string model = 13;
-
-
-
-
-
-
-
-
- bool use_enhanced = 14;
- }
- message SpeakerDiarizationConfig {
-
-
-
- bool enable_speaker_diarization = 1;
-
-
-
- int32 min_speaker_count = 2;
-
-
-
- int32 max_speaker_count = 3;
-
- int32 speaker_tag = 5 [
- deprecated = true,
- (google.api.field_behavior) = OUTPUT_ONLY
- ];
- }
- message RecognitionMetadata {
- option deprecated = true;
-
-
- enum InteractionType {
-
-
- INTERACTION_TYPE_UNSPECIFIED = 0;
-
-
-
-
- DISCUSSION = 1;
-
-
- PRESENTATION = 2;
-
-
- PHONE_CALL = 3;
-
- VOICEMAIL = 4;
-
- PROFESSIONALLY_PRODUCED = 5;
-
- VOICE_SEARCH = 6;
-
- VOICE_COMMAND = 7;
-
-
- DICTATION = 8;
- }
-
- enum MicrophoneDistance {
-
- MICROPHONE_DISTANCE_UNSPECIFIED = 0;
-
-
-
- NEARFIELD = 1;
-
- MIDFIELD = 2;
-
- FARFIELD = 3;
- }
-
- enum OriginalMediaType {
-
- ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0;
-
- AUDIO = 1;
-
- VIDEO = 2;
- }
-
- enum RecordingDeviceType {
-
- RECORDING_DEVICE_TYPE_UNSPECIFIED = 0;
-
- SMARTPHONE = 1;
-
- PC = 2;
-
- PHONE_LINE = 3;
-
- VEHICLE = 4;
-
- OTHER_OUTDOOR_DEVICE = 5;
-
- OTHER_INDOOR_DEVICE = 6;
- }
-
- InteractionType interaction_type = 1;
-
-
-
-
- uint32 industry_naics_code_of_audio = 3;
-
- MicrophoneDistance microphone_distance = 4;
-
- OriginalMediaType original_media_type = 5;
-
- RecordingDeviceType recording_device_type = 6;
-
-
-
- string recording_device_name = 7;
-
-
-
-
- string original_mime_type = 8;
-
-
- string audio_topic = 10;
- }
- message SpeechContext {
-
-
-
-
-
-
-
-
-
-
-
-
- repeated string phrases = 1;
-
-
-
-
-
-
-
-
- float boost = 4;
- }
- message RecognitionAudio {
-
-
- oneof audio_source {
-
-
-
- bytes content = 1;
-
-
-
-
-
-
-
- string uri = 2;
- }
- }
- message RecognizeResponse {
-
-
- repeated SpeechRecognitionResult results = 2;
-
- google.protobuf.Duration total_billed_time = 3;
- }
- message LongRunningRecognizeResponse {
-
-
- repeated SpeechRecognitionResult results = 2;
-
- google.protobuf.Duration total_billed_time = 3;
-
- TranscriptOutputConfig output_config = 6;
-
- google.rpc.Status output_error = 7;
- }
- message LongRunningRecognizeMetadata {
-
-
- int32 progress_percent = 1;
-
- google.protobuf.Timestamp start_time = 2;
-
- google.protobuf.Timestamp last_update_time = 3;
-
-
- string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
- message StreamingRecognizeResponse {
-
- enum SpeechEventType {
-
- SPEECH_EVENT_UNSPECIFIED = 0;
-
-
-
-
-
-
-
- END_OF_SINGLE_UTTERANCE = 1;
- }
-
-
- google.rpc.Status error = 1;
-
-
-
-
- repeated StreamingRecognitionResult results = 2;
-
- SpeechEventType speech_event_type = 4;
-
-
- google.protobuf.Duration total_billed_time = 5;
- }
- message StreamingRecognitionResult {
-
-
-
-
- repeated SpeechRecognitionAlternative alternatives = 1;
-
-
-
-
-
- bool is_final = 2;
-
-
-
-
-
- float stability = 3;
-
-
- google.protobuf.Duration result_end_time = 4;
-
-
-
- int32 channel_tag = 5;
-
-
-
- string language_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
- message SpeechRecognitionResult {
-
-
-
-
- repeated SpeechRecognitionAlternative alternatives = 1;
-
-
-
- int32 channel_tag = 2;
-
-
- google.protobuf.Duration result_end_time = 4;
-
-
-
- string language_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
- message SpeechRecognitionAlternative {
-
-
-
-
- string transcript = 1;
-
-
-
-
-
-
-
- float confidence = 2;
-
-
-
- repeated WordInfo words = 3;
- }
- message WordInfo {
-
-
-
-
-
-
- google.protobuf.Duration start_time = 1;
-
-
-
-
-
-
- google.protobuf.Duration end_time = 2;
-
- string word = 3;
-
-
-
-
-
-
-
- float confidence = 4;
-
-
-
-
-
- int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
|