UNPKG

@google-cloud/speech

Version:
1,209 lines (1,208 loc) 282 kB
{ "nested": { "google": { "nested": { "cloud": { "nested": { "speech": { "nested": { "v1": { "options": { "cc_enable_arenas": true, "go_package": "cloud.google.com/go/speech/apiv1/speechpb;speechpb", "java_multiple_files": true, "java_outer_classname": "SpeechAdaptationProto", "java_package": "com.google.cloud.speech.v1", "objc_class_prefix": "GCS" }, "nested": { "Speech": { "options": { "(google.api.default_host)": "speech.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, "methods": { "Recognize": { "requestType": "RecognizeRequest", "responseType": "RecognizeResponse", "options": { "(google.api.http).post": "/v1/speech:recognize", "(google.api.http).body": "*", "(google.api.method_signature)": "config,audio" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/speech:recognize", "body": "*" } }, { "(google.api.method_signature)": "config,audio" } ] }, "LongRunningRecognize": { "requestType": "LongRunningRecognizeRequest", "responseType": "google.longrunning.Operation", "options": { "(google.api.http).post": "/v1/speech:longrunningrecognize", "(google.api.http).body": "*", "(google.api.method_signature)": "config,audio", "(google.longrunning.operation_info).response_type": "LongRunningRecognizeResponse", "(google.longrunning.operation_info).metadata_type": "LongRunningRecognizeMetadata" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/speech:longrunningrecognize", "body": "*" } }, { "(google.api.method_signature)": "config,audio" }, { "(google.longrunning.operation_info)": { "response_type": "LongRunningRecognizeResponse", "metadata_type": "LongRunningRecognizeMetadata" } } ] }, "StreamingRecognize": { "requestType": "StreamingRecognizeRequest", "requestStream": true, "responseType": "StreamingRecognizeResponse", "responseStream": true } } }, "RecognizeRequest": { "fields": { "config": { "type": "RecognitionConfig", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "audio": { "type": "RecognitionAudio", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, "LongRunningRecognizeRequest": { "fields": { "config": { "type": "RecognitionConfig", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "audio": { "type": "RecognitionAudio", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "outputConfig": { "type": "TranscriptOutputConfig", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, "TranscriptOutputConfig": { "oneofs": { "outputType": { "oneof": [ "gcsUri" ] } }, "fields": { "gcsUri": { "type": "string", "id": 1 } } }, "StreamingRecognizeRequest": { "oneofs": { "streamingRequest": { "oneof": [ "streamingConfig", "audioContent" ] } }, "fields": { "streamingConfig": { "type": "StreamingRecognitionConfig", "id": 1 }, "audioContent": { "type": "bytes", "id": 2 } } }, "StreamingRecognitionConfig": { "fields": { "config": { "type": "RecognitionConfig", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "singleUtterance": { "type": "bool", "id": 2 }, "interimResults": { "type": "bool", "id": 3 }, "enableVoiceActivityEvents": { "type": "bool", "id": 5 }, "voiceActivityTimeout": { "type": "VoiceActivityTimeout", "id": 6 } }, "nested": { "VoiceActivityTimeout": { "fields": { "speechStartTimeout": { "type": "google.protobuf.Duration", "id": 1 }, "speechEndTimeout": { "type": "google.protobuf.Duration", "id": 2 } } } } }, "RecognitionConfig": { "fields": { "encoding": { "type": "AudioEncoding", "id": 1 }, "sampleRateHertz": { "type": "int32", "id": 2 }, "audioChannelCount": { "type": "int32", "id": 7 }, "enableSeparateRecognitionPerChannel": { "type": "bool", "id": 12 }, "languageCode": { "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "alternativeLanguageCodes": { "rule": "repeated", "type": "string", "id": 18 }, "maxAlternatives": { "type": "int32", "id": 4 }, "profanityFilter": { "type": "bool", "id": 5 }, "adaptation": { "type": "SpeechAdaptation", "id": 20 }, "transcriptNormalization": { "type": "TranscriptNormalization", "id": 24, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "speechContexts": { "rule": "repeated", "type": "SpeechContext", "id": 6 }, "enableWordTimeOffsets": { "type": "bool", "id": 8 }, "enableWordConfidence": { "type": "bool", "id": 15 }, "enableAutomaticPunctuation": { "type": "bool", "id": 11 }, "enableSpokenPunctuation": { "type": "google.protobuf.BoolValue", "id": 22 }, "enableSpokenEmojis": { "type": "google.protobuf.BoolValue", "id": 23 }, "diarizationConfig": { "type": "SpeakerDiarizationConfig", "id": 19 }, "metadata": { "type": "RecognitionMetadata", "id": 9 }, "model": { "type": "string", "id": 13 }, "useEnhanced": { "type": "bool", "id": 14 } }, "nested": { "AudioEncoding": { "values": { "ENCODING_UNSPECIFIED": 0, "LINEAR16": 1, "FLAC": 2, "MULAW": 3, "AMR": 4, "AMR_WB": 5, "OGG_OPUS": 6, "SPEEX_WITH_HEADER_BYTE": 7, "MP3": 8, "WEBM_OPUS": 9 } } } }, "SpeakerDiarizationConfig": { "fields": { "enableSpeakerDiarization": { "type": "bool", "id": 1 }, "minSpeakerCount": { "type": "int32", "id": 2 }, "maxSpeakerCount": { "type": "int32", "id": 3 }, "speakerTag": { "type": "int32", "id": 5, "options": { "deprecated": true, "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "RecognitionMetadata": { "options": { "deprecated": true }, "fields": { "interactionType": { "type": "InteractionType", "id": 1 }, "industryNaicsCodeOfAudio": { "type": "uint32", "id": 3 }, "microphoneDistance": { "type": "MicrophoneDistance", "id": 4 }, "originalMediaType": { "type": "OriginalMediaType", "id": 5 }, "recordingDeviceType": { "type": "RecordingDeviceType", "id": 6 }, "recordingDeviceName": { "type": "string", "id": 7 }, "originalMimeType": { "type": "string", "id": 8 }, "audioTopic": { "type": "string", "id": 10 } }, "nested": { "InteractionType": { "values": { "INTERACTION_TYPE_UNSPECIFIED": 0, "DISCUSSION": 1, "PRESENTATION": 2, "PHONE_CALL": 3, "VOICEMAIL": 4, "PROFESSIONALLY_PRODUCED": 5, "VOICE_SEARCH": 6, "VOICE_COMMAND": 7, "DICTATION": 8 } }, "MicrophoneDistance": { "values": { "MICROPHONE_DISTANCE_UNSPECIFIED": 0, "NEARFIELD": 1, "MIDFIELD": 2, "FARFIELD": 3 } }, "OriginalMediaType": { "values": { "ORIGINAL_MEDIA_TYPE_UNSPECIFIED": 0, "AUDIO": 1, "VIDEO": 2 } }, "RecordingDeviceType": { "values": { "RECORDING_DEVICE_TYPE_UNSPECIFIED": 0, "SMARTPHONE": 1, "PC": 2, "PHONE_LINE": 3, "VEHICLE": 4, "OTHER_OUTDOOR_DEVICE": 5, "OTHER_INDOOR_DEVICE": 6 } } } }, "SpeechContext": { "fields": { "phrases": { "rule": "repeated", "type": "string", "id": 1 }, "boost": { "type": "float", "id": 4 } } }, "RecognitionAudio": { "oneofs": { "audioSource": { "oneof": [ "content", "uri" ] } }, "fields": { "content": { "type": "bytes", "id": 1 }, "uri": { "type": "string", "id": 2 } } }, "RecognizeResponse": { "fields": { "results": { "rule": "repeated", "type": "SpeechRecognitionResult", "id": 2 }, "totalBilledTime": { "type": "google.protobuf.Duration", "id": 3 }, "speechAdaptationInfo": { "type": "SpeechAdaptationInfo", "id": 7 }, "requestId": { "type": "int64", "id": 8 } } }, "LongRunningRecognizeResponse": { "fields": { "results": { "rule": "repeated", "type": "SpeechRecognitionResult", "id": 2 }, "totalBilledTime": { "type": "google.protobuf.Duration", "id": 3 }, "outputConfig": { "type": "TranscriptOutputConfig", "id": 6 }, "outputError": { "type": "google.rpc.Status", "id": 7 }, "speechAdaptationInfo": { "type": "SpeechAdaptationInfo", "id": 8 }, "requestId": { "type": "int64", "id": 9 } } }, "LongRunningRecognizeMetadata": { "fields": { "progressPercent": { "type": "int32", "id": 1 }, "startTime": { "type": "google.protobuf.Timestamp", "id": 2 }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", "id": 3 }, "uri": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "StreamingRecognizeResponse": { "fields": { "error": { "type": "google.rpc.Status", "id": 1 }, "results": { "rule": "repeated", "type": "StreamingRecognitionResult", "id": 2 }, "speechEventType": { "type": "SpeechEventType", "id": 4 }, "speechEventTime": { "type": "google.protobuf.Duration", "id": 8 }, "totalBilledTime": { "type": "google.protobuf.Duration", "id": 5 }, "speechAdaptationInfo": { "type": "SpeechAdaptationInfo", "id": 9 }, "requestId": { "type": "int64", "id": 10 } }, "nested": { "SpeechEventType": { "values": { "SPEECH_EVENT_UNSPECIFIED": 0, "END_OF_SINGLE_UTTERANCE": 1, "SPEECH_ACTIVITY_BEGIN": 2, "SPEECH_ACTIVITY_END": 3, "SPEECH_ACTIVITY_TIMEOUT": 4 } } } }, "StreamingRecognitionResult": { "fields": { "alternatives": { "rule": "repeated", "type": "SpeechRecognitionAlternative", "id": 1 }, "isFinal": { "type": "bool", "id": 2 }, "stability": { "type": "float", "id": 3 }, "resultEndTime": { "type": "google.protobuf.Duration", "id": 4 }, "channelTag": { "type": "int32", "id": 5 }, "languageCode": { "type": "string", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "SpeechRecognitionResult": { "fields": { "alternatives": { "rule": "repeated", "type": "SpeechRecognitionAlternative", "id": 1 }, "channelTag": { "type": "int32", "id": 2 }, "resultEndTime": { "type": "google.protobuf.Duration", "id": 4 }, "languageCode": { "type": "string", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "SpeechRecognitionAlternative": { "fields": { "transcript": { "type": "string", "id": 1 }, "confidence": { "type": "float", "id": 2 }, "words": { "rule": "repeated", "type": "WordInfo", "id": 3 } } }, "WordInfo": { "fields": { "startTime": { "type": "google.protobuf.Duration", "id": 1 }, "endTime": { "type": "google.protobuf.Duration", "id": 2 }, "word": { "type": "string", "id": 3 }, "confidence": { "type": "float", "id": 4 }, "speakerTag": { "type": "int32", "id": 5, "options": { "deprecated": true, "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "speakerLabel": { "type": "string", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "SpeechAdaptationInfo": { "fields": { "adaptationTimeout": { "type": "bool", "id": 1 }, "timeoutMessage": { "type": "string", "id": 4 } } }, "CustomClass": { "options": { "(google.api.resource).type": "speech.googleapis.com/CustomClass", "(google.api.resource).pattern": "projects/{project}/locations/{location}/customClasses/{custom_class}" }, "fields": { "name": { "type": "string", "id": 1 }, "customClassId": { "type": "string", "id": 2 }, "items": { "rule": "repeated", "type": "ClassItem", "id": 3 } }, "nested": { "ClassItem": { "fields": { "value": { "type": "string", "id": 1 } } } } }, "PhraseSet": { "options": { "(google.api.resource).type": "speech.googleapis.com/PhraseSet", "(google.api.resource).pattern": "projects/{project}/locations/{location}/phraseSets/{phrase_set}" }, "fields": { "name": { "type": "string", "id": 1 }, "phrases": { "rule": "repeated", "type": "Phrase", "id": 2 }, "boost": { "type": "float", "id": 4 } }, "nested": { "Phrase": { "fields": { "value": { "type": "string", "id": 1 }, "boost": { "type": "float", "id": 2 } } } } }, "SpeechAdaptation": { "fields": { "phraseSets": { "rule": "repeated", "type": "PhraseSet", "id": 1 }, "phraseSetReferences": { "rule": "repeated", "type": "string", "id": 2, "options": { "(google.api.resource_reference).type": "speech.googleapis.com/PhraseSet" } }, "customClasses": { "rule": "repeated", "type": "CustomClass", "id": 3 }, "abnfGrammar": { "type": "ABNFGrammar", "id": 4 } }, "nested": { "ABNFGrammar": { "fields": { "abnfStrings": { "rule": "repeated", "type": "string", "id": 1 } } } } }, "TranscriptNormalization": { "fields": { "entries": { "rule": "repeated", "type": "Entry", "id": 1 } }, "nested": { "Entry": { "fields": { "search": { "type": "string", "id": 1 }, "replace": { "type": "string", "id": 2 }, "caseSensitive": { "type": "bool", "id": 3 } } } } }, "Adaptation": { "options": { "(google.api.default_host)": "speech.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, "methods": { "CreatePhraseSet": { "requestType": "CreatePhraseSetRequest", "responseType": "PhraseSet", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/phraseSets", "(google.api.http).body": "*", "(google.api.method_signature)": "parent,phrase_set,phrase_set_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*}/phraseSets", "body": "*" } }, { "(google.api.method_signature)": "parent,phrase_set,phrase_set_id" } ] }, "GetPhraseSet": { "requestType": "GetPhraseSetRequest", "responseType": "PhraseSet", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/phraseSets/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v1/{name=projects/*/locations/*/phraseSets/*}" } }, { "(google.api.method_signature)": "name" } ] }, "ListPhraseSet": { "requestType": "ListPhraseSetRequest", "responseType": "ListPhraseSetResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/phraseSets", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*}/phraseSets" } }, { "(google.api.method_signature)": "parent" } ] }, "UpdatePhraseSet": { "requestType": "UpdatePhraseSetRequest", "responseType": "PhraseSet", "options": { "(google.api.http).patch": "/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}", "(google.api.http).body": "phrase_set", "(google.api.method_signature)": "phrase_set,update_mask" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}", "body": "phrase_set" } }, { "(google.api.method_signature)": "phrase_set,update_mask" } ] }, "DeletePhraseSet": { "requestType": "DeletePhraseSetRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/phraseSets/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/phraseSets/*}" } }, { "(google.api.method_signature)": "name" } ] }, "CreateCustomClass": { "requestType": "CreateCustomClassRequest", "responseType": "CustomClass", "options": { "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/customClasses", "(google.api.http).body": "*", "(google.api.method_signature)": "parent,custom_class,custom_class_id" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{parent=projects/*/locations/*}/customClasses", "body": "*" } }, { "(google.api.method_signature)": "parent,custom_class,custom_class_id" } ] }, "GetCustomClass": { "requestType": "GetCustomClassRequest", "responseType": "CustomClass", "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/customClasses/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v1/{name=projects/*/locations/*/customClasses/*}" } }, { "(google.api.method_signature)": "name" } ] }, "ListCustomClasses": { "requestType": "ListCustomClassesRequest", "responseType": "ListCustomClassesResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/customClasses", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { "get": "/v1/{parent=projects/*/locations/*}/customClasses" } }, { "(google.api.method_signature)": "parent" } ] }, "UpdateCustomClass": { "requestType": "UpdateCustomClassRequest", "responseType": "CustomClass", "options": { "(google.api.http).patch": "/v1/{custom_class.name=projects/*/locations/*/customClasses/*}", "(google.api.http).body": "custom_class", "(google.api.method_signature)": "custom_class,update_mask" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v1/{custom_class.name=projects/*/locations/*/customClasses/*}", "body": "custom_class" } }, { "(google.api.method_signature)": "custom_class,update_mask" } ] }, "DeleteCustomClass": { "requestType": "DeleteCustomClassRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/customClasses/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { "delete": "/v1/{name=projects/*/locations/*/customClasses/*}" } }, { "(google.api.method_signature)": "name" } ] } } }, "CreatePhraseSetRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).child_type": "speech.googleapis.com/PhraseSet" } }, "phraseSetId": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "phraseSet": { "type": "PhraseSet", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, "UpdatePhraseSetRequest": { "fields": { "phraseSet": { "type": "PhraseSet", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "updateMask": { "type": "google.protobuf.FieldMask", "id": 2 } } }, "GetPhraseSetRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "speech.googleapis.com/PhraseSet" } } } }, "ListPhraseSetRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).child_type": "speech.googleapis.com/PhraseSet" } }, "pageSize": { "type": "int32", "id": 2 }, "pageToken": { "type": "string", "id": 3 } } }, "ListPhraseSetResponse": { "fields": { "phraseSets": { "rule": "repeated", "type": "PhraseSet", "id": 1 }, "nextPageToken": { "type": "string", "id": 2 } } }, "DeletePhraseSetRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "speech.googleapis.com/PhraseSet" } } } }, "CreateCustomClassRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).child_type": "speech.googleapis.com/CustomClass" } }, "customClassId": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "customClass": { "type": "CustomClass", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, "UpdateCustomClassRequest": { "fields": { "customClass": { "type": "CustomClass", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "updateMask": { "type": "google.protobuf.FieldMask", "id": 2 } } }, "GetCustomClassRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "speech.googleapis.com/CustomClass" } } } }, "ListCustomClassesRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).child_type": "speech.googleapis.com/CustomClass" } }, "pageSize": { "type": "int32", "id": 2 }, "pageToken": { "type": "string", "id": 3 } } }, "ListCustomClassesResponse": { "fields": { "customClasses": { "rule": "repeated", "type": "CustomClass", "id": 1 }, "nextPageToken": { "type": "string", "id": 2 } } }, "DeleteCustomClassRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "speech.googleapis.com/CustomClass" } } } } } }, "v1p1beta1": { "options": { "go_package": "cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb",