google-cloud-speech-v1 0.12.1 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd90faff3789e7c9cc393e0755527f1a5bb539899de50556f65107fcb1ef689f
4
- data.tar.gz: 12d5189b4db77194d80dcde4b3ab3a30b355426d33bdbfef7ac000511c3bc368
3
+ metadata.gz: 6ebfda8adf3a8581db66e188089b6577002805411cd40c6e21792b97c13a2bc8
4
+ data.tar.gz: c4546d08b8e32355d37440d546221411392f75797599da4a5f47628c94b163f6
5
5
  SHA512:
6
- metadata.gz: 0cd711980438d378bdc449d14d1752917ded710c069e07fbb97503505689e4f804287f6d87e62afd693ffe4c8b3cd06bd4ca4a6336e436b4265fa7171a796f04
7
- data.tar.gz: e3a7c4e24511a8c734a02e8184d2ed9bfcee1a749328ad1e60d2d838ce4cb8634a60164af3a63c8399b68d15d5f1e2e95f9707194d4150368647dd5b63c0dfef
6
+ metadata.gz: 2b952c2630d77df6805fde6cb5761d42921db744f781f59c4407981737c7b2e96c362b1f337a1f124c432095676322265cb3932c229fb58b61016bd0a7e8f084
7
+ data.tar.gz: 134c687b57210458b4eda9104a83691459a7b100dc7a9d964f3d47a30d292c5fe158a4c3c5ed42855103125a24cd598ac4b99b1ef6ef2a9f6fb1b8efc3308026
@@ -123,7 +123,7 @@ module Google
123
123
  credentials = @config.credentials
124
124
  # Use self-signed JWT if the endpoint is unchanged from default,
125
125
  # but only if the default endpoint does not have a region prefix.
126
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
126
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
127
127
  !@config.endpoint.split(".").first.include?("-")
128
128
  credentials ||= Credentials.default scope: @config.scope,
129
129
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -1206,7 +1206,9 @@ module Google
1206
1206
  class Configuration
1207
1207
  extend ::Gapic::Config
1208
1208
 
1209
- config_attr :endpoint, "speech.googleapis.com", ::String
1209
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
1210
+
1211
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1210
1212
  config_attr :credentials, nil do |value|
1211
1213
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1212
1214
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -119,7 +119,7 @@ module Google
119
119
  credentials = @config.credentials
120
120
  # Use self-signed JWT if the endpoint is unchanged from default,
121
121
  # but only if the default endpoint does not have a region prefix.
122
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
122
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
123
123
  !@config.endpoint.split(".").first.include?("-")
124
124
  credentials ||= Credentials.default scope: @config.scope,
125
125
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -950,7 +950,9 @@ module Google
950
950
  class Configuration
951
951
  extend ::Gapic::Config
952
952
 
953
- config_attr :endpoint, "speech.googleapis.com", ::String
953
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
954
+
955
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
954
956
  config_attr :credentials, nil do |value|
955
957
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
956
958
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_set_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_set_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_set_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_set_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_set_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_class_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -287,7 +287,7 @@ module Google
287
287
 
288
288
  verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_class_request request_pb
289
289
  query_string_params = if query_string_params.any?
290
- query_string_params.to_h { |p| p.split("=", 2) }
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
291
  else
292
292
  {}
293
293
  end
@@ -325,7 +325,7 @@ module Google
325
325
 
326
326
  verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_classes_request request_pb
327
327
  query_string_params = if query_string_params.any?
328
- query_string_params.to_h { |p| p.split("=", 2) }
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
329
  else
330
330
  {}
331
331
  end
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_class_request request_pb
365
365
  query_string_params = if query_string_params.any?
366
- query_string_params.to_h { |p| p.split("=", 2) }
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
367
  else
368
368
  {}
369
369
  end
@@ -401,7 +401,7 @@ module Google
401
401
 
402
402
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_class_request request_pb
403
403
  query_string_params = if query_string_params.any?
404
- query_string_params.to_h { |p| p.split("=", 2) }
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
405
  else
406
406
  {}
407
407
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/speech/v1/cloud_speech_adaptation.proto
3
4
 
@@ -11,57 +12,33 @@ require 'google/cloud/speech/v1/resource_pb'
11
12
  require 'google/protobuf/empty_pb'
12
13
  require 'google/protobuf/field_mask_pb'
13
14
 
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_file("google/cloud/speech/v1/cloud_speech_adaptation.proto", :syntax => :proto3) do
16
- add_message "google.cloud.speech.v1.CreatePhraseSetRequest" do
17
- optional :parent, :string, 1
18
- optional :phrase_set_id, :string, 2
19
- optional :phrase_set, :message, 3, "google.cloud.speech.v1.PhraseSet"
20
- end
21
- add_message "google.cloud.speech.v1.UpdatePhraseSetRequest" do
22
- optional :phrase_set, :message, 1, "google.cloud.speech.v1.PhraseSet"
23
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
24
- end
25
- add_message "google.cloud.speech.v1.GetPhraseSetRequest" do
26
- optional :name, :string, 1
27
- end
28
- add_message "google.cloud.speech.v1.ListPhraseSetRequest" do
29
- optional :parent, :string, 1
30
- optional :page_size, :int32, 2
31
- optional :page_token, :string, 3
32
- end
33
- add_message "google.cloud.speech.v1.ListPhraseSetResponse" do
34
- repeated :phrase_sets, :message, 1, "google.cloud.speech.v1.PhraseSet"
35
- optional :next_page_token, :string, 2
36
- end
37
- add_message "google.cloud.speech.v1.DeletePhraseSetRequest" do
38
- optional :name, :string, 1
39
- end
40
- add_message "google.cloud.speech.v1.CreateCustomClassRequest" do
41
- optional :parent, :string, 1
42
- optional :custom_class_id, :string, 2
43
- optional :custom_class, :message, 3, "google.cloud.speech.v1.CustomClass"
44
- end
45
- add_message "google.cloud.speech.v1.UpdateCustomClassRequest" do
46
- optional :custom_class, :message, 1, "google.cloud.speech.v1.CustomClass"
47
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
48
- end
49
- add_message "google.cloud.speech.v1.GetCustomClassRequest" do
50
- optional :name, :string, 1
51
- end
52
- add_message "google.cloud.speech.v1.ListCustomClassesRequest" do
53
- optional :parent, :string, 1
54
- optional :page_size, :int32, 2
55
- optional :page_token, :string, 3
56
- end
57
- add_message "google.cloud.speech.v1.ListCustomClassesResponse" do
58
- repeated :custom_classes, :message, 1, "google.cloud.speech.v1.CustomClass"
59
- optional :next_page_token, :string, 2
60
- end
61
- add_message "google.cloud.speech.v1.DeleteCustomClassRequest" do
62
- optional :name, :string, 1
15
+
16
+ descriptor_data = "\n4google/cloud/speech/v1/cloud_speech_adaptation.proto\x12\x16google.cloud.speech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/cloud/speech/v1/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa9\x01\n\x16\x43reatePhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x1a\n\rphrase_set_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\nphrase_set\x18\x03 \x01(\x0b\x32!.google.cloud.speech.v1.PhraseSetB\x03\xe0\x41\x02\"\x85\x01\n\x16UpdatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v1.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"v\n\x14ListPhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x15ListPhraseSetResponse\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v1.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\xb3\x01\n\x18\x43reateCustomClassRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x1c\n\x0f\x63ustom_class_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0c\x63ustom_class\x18\x03 \x01(\x0b\x32#.google.cloud.speech.v1.CustomClassB\x03\xe0\x41\x02\"\x8b\x01\n\x18UpdateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v1.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"|\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x19ListCustomClassesResponse\x12;\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32#.google.cloud.speech.v1.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass2\x8e\x0f\n\nAdaptation\x12\xc1\x01\n\x0f\x43reatePhraseSet\x12..google.cloud.speech.v1.CreatePhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"[\x82\xd3\xe4\x93\x02\x33\"./v1/{parent=projects/*/locations/*}/phraseSets:\x01*\xda\x41\x1fparent,phrase_set,phrase_set_id\x12\x9d\x01\n\x0cGetPhraseSet\x12+.google.cloud.speech.v1.GetPhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"=\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/phraseSets/*}\xda\x41\x04name\x12\xad\x01\n\rListPhraseSet\x12,.google.cloud.speech.v1.ListPhraseSetRequest\x1a-.google.cloud.speech.v1.ListPhraseSetResponse\"?\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/phraseSets\xda\x41\x06parent\x12\xcc\x01\n\x0fUpdatePhraseSet\x12..google.cloud.speech.v1.UpdatePhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"f\x82\xd3\xe4\x93\x02G29/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\xda\x41\x16phrase_set,update_mask\x12\x98\x01\n\x0f\x44\x65letePhraseSet\x12..google.cloud.speech.v1.DeletePhraseSetRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/phraseSets/*}\xda\x41\x04name\x12\xce\x01\n\x11\x43reateCustomClass\x12\x30.google.cloud.speech.v1.CreateCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"b\x82\xd3\xe4\x93\x02\x36\"1/v1/{parent=projects/*/locations/*}/customClasses:\x01*\xda\x41#parent,custom_class,custom_class_id\x12\xa6\x01\n\x0eGetCustomClass\x12-.google.cloud.speech.v1.GetCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"@\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/customClasses/*}\xda\x41\x04name\x12\xbc\x01\n\x11ListCustomClasses\x12\x30.google.cloud.speech.v1.ListCustomClassesRequest\x1a\x31.google.cloud.speech.v1.ListCustomClassesResponse\"B\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/customClasses\xda\x41\x06parent\x12\xdb\x01\n\x11UpdateCustomClass\x12\x30.google.cloud.speech.v1.UpdateCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"o\x82\xd3\xe4\x93\x02N2>/v1/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\xda\x41\x18\x63ustom_class,update_mask\x12\x9f\x01\n\x11\x44\x65leteCustomClass\x12\x30.google.cloud.speech.v1.DeleteCustomClassRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/customClasses/*}\xda\x41\x04name\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBr\n\x1a\x63om.google.cloud.speech.v1B\x15SpeechAdaptationProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError => e
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.cloud.speech.v1.PhraseSet", "google/cloud/speech/v1/resource.proto"],
32
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
33
+ ]
34
+ imports.each do |type_name, expected_filename|
35
+ import_file = pool.lookup(type_name).file_descriptor
36
+ if import_file.name != expected_filename
37
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
63
38
  end
64
39
  end
40
+ warn "Each proto file must use a consistent fully-qualified name."
41
+ warn "This will become an error in the next major version."
65
42
  end
66
43
 
67
44
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/speech/v1/cloud_speech.proto
3
4
 
@@ -13,195 +14,36 @@ require 'google/protobuf/timestamp_pb'
13
14
  require 'google/protobuf/wrappers_pb'
14
15
  require 'google/rpc/status_pb'
15
16
 
16
- Google::Protobuf::DescriptorPool.generated_pool.build do
17
- add_file("google/cloud/speech/v1/cloud_speech.proto", :syntax => :proto3) do
18
- add_message "google.cloud.speech.v1.RecognizeRequest" do
19
- optional :config, :message, 1, "google.cloud.speech.v1.RecognitionConfig"
20
- optional :audio, :message, 2, "google.cloud.speech.v1.RecognitionAudio"
21
- end
22
- add_message "google.cloud.speech.v1.LongRunningRecognizeRequest" do
23
- optional :config, :message, 1, "google.cloud.speech.v1.RecognitionConfig"
24
- optional :audio, :message, 2, "google.cloud.speech.v1.RecognitionAudio"
25
- optional :output_config, :message, 4, "google.cloud.speech.v1.TranscriptOutputConfig"
26
- end
27
- add_message "google.cloud.speech.v1.TranscriptOutputConfig" do
28
- oneof :output_type do
29
- optional :gcs_uri, :string, 1
30
- end
31
- end
32
- add_message "google.cloud.speech.v1.StreamingRecognizeRequest" do
33
- oneof :streaming_request do
34
- optional :streaming_config, :message, 1, "google.cloud.speech.v1.StreamingRecognitionConfig"
35
- optional :audio_content, :bytes, 2
36
- end
37
- end
38
- add_message "google.cloud.speech.v1.StreamingRecognitionConfig" do
39
- optional :config, :message, 1, "google.cloud.speech.v1.RecognitionConfig"
40
- optional :single_utterance, :bool, 2
41
- optional :interim_results, :bool, 3
42
- optional :enable_voice_activity_events, :bool, 5
43
- optional :voice_activity_timeout, :message, 6, "google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout"
44
- end
45
- add_message "google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout" do
46
- optional :speech_start_timeout, :message, 1, "google.protobuf.Duration"
47
- optional :speech_end_timeout, :message, 2, "google.protobuf.Duration"
48
- end
49
- add_message "google.cloud.speech.v1.RecognitionConfig" do
50
- optional :encoding, :enum, 1, "google.cloud.speech.v1.RecognitionConfig.AudioEncoding"
51
- optional :sample_rate_hertz, :int32, 2
52
- optional :audio_channel_count, :int32, 7
53
- optional :enable_separate_recognition_per_channel, :bool, 12
54
- optional :language_code, :string, 3
55
- repeated :alternative_language_codes, :string, 18
56
- optional :max_alternatives, :int32, 4
57
- optional :profanity_filter, :bool, 5
58
- optional :adaptation, :message, 20, "google.cloud.speech.v1.SpeechAdaptation"
59
- repeated :speech_contexts, :message, 6, "google.cloud.speech.v1.SpeechContext"
60
- optional :enable_word_time_offsets, :bool, 8
61
- optional :enable_word_confidence, :bool, 15
62
- optional :enable_automatic_punctuation, :bool, 11
63
- optional :enable_spoken_punctuation, :message, 22, "google.protobuf.BoolValue"
64
- optional :enable_spoken_emojis, :message, 23, "google.protobuf.BoolValue"
65
- optional :diarization_config, :message, 19, "google.cloud.speech.v1.SpeakerDiarizationConfig"
66
- optional :metadata, :message, 9, "google.cloud.speech.v1.RecognitionMetadata"
67
- optional :model, :string, 13
68
- optional :use_enhanced, :bool, 14
69
- end
70
- add_enum "google.cloud.speech.v1.RecognitionConfig.AudioEncoding" do
71
- value :ENCODING_UNSPECIFIED, 0
72
- value :LINEAR16, 1
73
- value :FLAC, 2
74
- value :MULAW, 3
75
- value :AMR, 4
76
- value :AMR_WB, 5
77
- value :OGG_OPUS, 6
78
- value :SPEEX_WITH_HEADER_BYTE, 7
79
- value :WEBM_OPUS, 9
80
- end
81
- add_message "google.cloud.speech.v1.SpeakerDiarizationConfig" do
82
- optional :enable_speaker_diarization, :bool, 1
83
- optional :min_speaker_count, :int32, 2
84
- optional :max_speaker_count, :int32, 3
85
- optional :speaker_tag, :int32, 5
86
- end
87
- add_message "google.cloud.speech.v1.RecognitionMetadata" do
88
- optional :interaction_type, :enum, 1, "google.cloud.speech.v1.RecognitionMetadata.InteractionType"
89
- optional :industry_naics_code_of_audio, :uint32, 3
90
- optional :microphone_distance, :enum, 4, "google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance"
91
- optional :original_media_type, :enum, 5, "google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType"
92
- optional :recording_device_type, :enum, 6, "google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType"
93
- optional :recording_device_name, :string, 7
94
- optional :original_mime_type, :string, 8
95
- optional :audio_topic, :string, 10
96
- end
97
- add_enum "google.cloud.speech.v1.RecognitionMetadata.InteractionType" do
98
- value :INTERACTION_TYPE_UNSPECIFIED, 0
99
- value :DISCUSSION, 1
100
- value :PRESENTATION, 2
101
- value :PHONE_CALL, 3
102
- value :VOICEMAIL, 4
103
- value :PROFESSIONALLY_PRODUCED, 5
104
- value :VOICE_SEARCH, 6
105
- value :VOICE_COMMAND, 7
106
- value :DICTATION, 8
107
- end
108
- add_enum "google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance" do
109
- value :MICROPHONE_DISTANCE_UNSPECIFIED, 0
110
- value :NEARFIELD, 1
111
- value :MIDFIELD, 2
112
- value :FARFIELD, 3
113
- end
114
- add_enum "google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType" do
115
- value :ORIGINAL_MEDIA_TYPE_UNSPECIFIED, 0
116
- value :AUDIO, 1
117
- value :VIDEO, 2
118
- end
119
- add_enum "google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType" do
120
- value :RECORDING_DEVICE_TYPE_UNSPECIFIED, 0
121
- value :SMARTPHONE, 1
122
- value :PC, 2
123
- value :PHONE_LINE, 3
124
- value :VEHICLE, 4
125
- value :OTHER_OUTDOOR_DEVICE, 5
126
- value :OTHER_INDOOR_DEVICE, 6
127
- end
128
- add_message "google.cloud.speech.v1.SpeechContext" do
129
- repeated :phrases, :string, 1
130
- optional :boost, :float, 4
131
- end
132
- add_message "google.cloud.speech.v1.RecognitionAudio" do
133
- oneof :audio_source do
134
- optional :content, :bytes, 1
135
- optional :uri, :string, 2
136
- end
137
- end
138
- add_message "google.cloud.speech.v1.RecognizeResponse" do
139
- repeated :results, :message, 2, "google.cloud.speech.v1.SpeechRecognitionResult"
140
- optional :total_billed_time, :message, 3, "google.protobuf.Duration"
141
- optional :speech_adaptation_info, :message, 7, "google.cloud.speech.v1.SpeechAdaptationInfo"
142
- optional :request_id, :int64, 8
143
- end
144
- add_message "google.cloud.speech.v1.LongRunningRecognizeResponse" do
145
- repeated :results, :message, 2, "google.cloud.speech.v1.SpeechRecognitionResult"
146
- optional :total_billed_time, :message, 3, "google.protobuf.Duration"
147
- optional :output_config, :message, 6, "google.cloud.speech.v1.TranscriptOutputConfig"
148
- optional :output_error, :message, 7, "google.rpc.Status"
149
- optional :speech_adaptation_info, :message, 8, "google.cloud.speech.v1.SpeechAdaptationInfo"
150
- optional :request_id, :int64, 9
151
- end
152
- add_message "google.cloud.speech.v1.LongRunningRecognizeMetadata" do
153
- optional :progress_percent, :int32, 1
154
- optional :start_time, :message, 2, "google.protobuf.Timestamp"
155
- optional :last_update_time, :message, 3, "google.protobuf.Timestamp"
156
- optional :uri, :string, 4
157
- end
158
- add_message "google.cloud.speech.v1.StreamingRecognizeResponse" do
159
- optional :error, :message, 1, "google.rpc.Status"
160
- repeated :results, :message, 2, "google.cloud.speech.v1.StreamingRecognitionResult"
161
- optional :speech_event_type, :enum, 4, "google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType"
162
- optional :speech_event_time, :message, 8, "google.protobuf.Duration"
163
- optional :total_billed_time, :message, 5, "google.protobuf.Duration"
164
- optional :speech_adaptation_info, :message, 9, "google.cloud.speech.v1.SpeechAdaptationInfo"
165
- optional :request_id, :int64, 10
166
- end
167
- add_enum "google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType" do
168
- value :SPEECH_EVENT_UNSPECIFIED, 0
169
- value :END_OF_SINGLE_UTTERANCE, 1
170
- value :SPEECH_ACTIVITY_BEGIN, 2
171
- value :SPEECH_ACTIVITY_END, 3
172
- value :SPEECH_ACTIVITY_TIMEOUT, 4
173
- end
174
- add_message "google.cloud.speech.v1.StreamingRecognitionResult" do
175
- repeated :alternatives, :message, 1, "google.cloud.speech.v1.SpeechRecognitionAlternative"
176
- optional :is_final, :bool, 2
177
- optional :stability, :float, 3
178
- optional :result_end_time, :message, 4, "google.protobuf.Duration"
179
- optional :channel_tag, :int32, 5
180
- optional :language_code, :string, 6
181
- end
182
- add_message "google.cloud.speech.v1.SpeechRecognitionResult" do
183
- repeated :alternatives, :message, 1, "google.cloud.speech.v1.SpeechRecognitionAlternative"
184
- optional :channel_tag, :int32, 2
185
- optional :result_end_time, :message, 4, "google.protobuf.Duration"
186
- optional :language_code, :string, 5
187
- end
188
- add_message "google.cloud.speech.v1.SpeechRecognitionAlternative" do
189
- optional :transcript, :string, 1
190
- optional :confidence, :float, 2
191
- repeated :words, :message, 3, "google.cloud.speech.v1.WordInfo"
192
- end
193
- add_message "google.cloud.speech.v1.WordInfo" do
194
- optional :start_time, :message, 1, "google.protobuf.Duration"
195
- optional :end_time, :message, 2, "google.protobuf.Duration"
196
- optional :word, :string, 3
197
- optional :confidence, :float, 4
198
- optional :speaker_tag, :int32, 5
199
- end
200
- add_message "google.cloud.speech.v1.SpeechAdaptationInfo" do
201
- optional :adaptation_timeout, :bool, 1
202
- optional :timeout_message, :string, 4
17
+
18
+ descriptor_data = "\n)google/cloud/speech/v1/cloud_speech.proto\x12\x16google.cloud.speech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a%google/cloud/speech/v1/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\x90\x01\n\x10RecognizeRequest\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12<\n\x05\x61udio\x18\x02 \x01(\x0b\x32(.google.cloud.speech.v1.RecognitionAudioB\x03\xe0\x41\x02\"\xe7\x01\n\x1bLongRunningRecognizeRequest\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12<\n\x05\x61udio\x18\x02 \x01(\x0b\x32(.google.cloud.speech.v1.RecognitionAudioB\x03\xe0\x41\x02\x12J\n\routput_config\x18\x04 \x01(\x0b\x32..google.cloud.speech.v1.TranscriptOutputConfigB\x03\xe0\x41\x01\":\n\x16TranscriptOutputConfig\x12\x11\n\x07gcs_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0boutput_type\"\x99\x01\n\x19StreamingRecognizeRequest\x12N\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.speech.v1.StreamingRecognitionConfigH\x00\x12\x17\n\raudio_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\xa7\x03\n\x1aStreamingRecognitionConfig\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12\x18\n\x10single_utterance\x18\x02 \x01(\x08\x12\x17\n\x0finterim_results\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_voice_activity_events\x18\x05 \x01(\x08\x12g\n\x16voice_activity_timeout\x18\x06 \x01(\x0b\x32G.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xe9\x07\n\x11RecognitionConfig\x12I\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32\x37.google.cloud.speech.v1.RecognitionConfig.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x1b\n\x13\x61udio_channel_count\x18\x07 \x01(\x05\x12/\n\'enable_separate_recognition_per_channel\x18\x0c \x01(\x08\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x1a\x61lternative_language_codes\x18\x12 \x03(\t\x12\x18\n\x10max_alternatives\x18\x04 \x01(\x05\x12\x18\n\x10profanity_filter\x18\x05 \x01(\x08\x12<\n\nadaptation\x18\x14 \x01(\x0b\x32(.google.cloud.speech.v1.SpeechAdaptation\x12>\n\x0fspeech_contexts\x18\x06 \x03(\x0b\x32%.google.cloud.speech.v1.SpeechContext\x12 \n\x18\x65nable_word_time_offsets\x18\x08 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x0f \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x0b \x01(\x08\x12=\n\x19\x65nable_spoken_punctuation\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x38\n\x14\x65nable_spoken_emojis\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12L\n\x12\x64iarization_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.speech.v1.SpeakerDiarizationConfig\x12=\n\x08metadata\x18\t \x01(\x0b\x32+.google.cloud.speech.v1.RecognitionMetadata\x12\r\n\x05model\x18\r \x01(\t\x12\x14\n\x0cuse_enhanced\x18\x0e \x01(\x08\"\x9a\x01\n\rAudioEncoding\x12\x18\n\x14\x45NCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x08\n\x04\x46LAC\x10\x02\x12\t\n\x05MULAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x0c\n\x08OGG_OPUS\x10\x06\x12\x1a\n\x16SPEEX_WITH_HEADER_BYTE\x10\x07\x12\r\n\tWEBM_OPUS\x10\t\"\x90\x01\n\x18SpeakerDiarizationConfig\x12\"\n\x1a\x65nable_speaker_diarization\x18\x01 \x01(\x08\x12\x19\n\x11min_speaker_count\x18\x02 \x01(\x05\x12\x19\n\x11max_speaker_count\x18\x03 \x01(\x05\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\"\xa4\x08\n\x13RecognitionMetadata\x12U\n\x10interaction_type\x18\x01 \x01(\x0e\x32;.google.cloud.speech.v1.RecognitionMetadata.InteractionType\x12$\n\x1cindustry_naics_code_of_audio\x18\x03 \x01(\r\x12[\n\x13microphone_distance\x18\x04 \x01(\x0e\x32>.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance\x12Z\n\x13original_media_type\x18\x05 \x01(\x0e\x32=.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType\x12^\n\x15recording_device_type\x18\x06 \x01(\x0e\x32?.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType\x12\x1d\n\x15recording_device_name\x18\x07 \x01(\t\x12\x1a\n\x12original_mime_type\x18\x08 \x01(\t\x12\x13\n\x0b\x61udio_topic\x18\n \x01(\t\"\xc5\x01\n\x0fInteractionType\x12 \n\x1cINTERACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDISCUSSION\x10\x01\x12\x10\n\x0cPRESENTATION\x10\x02\x12\x0e\n\nPHONE_CALL\x10\x03\x12\r\n\tVOICEMAIL\x10\x04\x12\x1b\n\x17PROFESSIONALLY_PRODUCED\x10\x05\x12\x10\n\x0cVOICE_SEARCH\x10\x06\x12\x11\n\rVOICE_COMMAND\x10\x07\x12\r\n\tDICTATION\x10\x08\"d\n\x12MicrophoneDistance\x12#\n\x1fMICROPHONE_DISTANCE_UNSPECIFIED\x10\x00\x12\r\n\tNEARFIELD\x10\x01\x12\x0c\n\x08MIDFIELD\x10\x02\x12\x0c\n\x08\x46\x41RFIELD\x10\x03\"N\n\x11OriginalMediaType\x12#\n\x1fORIGINAL_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x12\t\n\x05VIDEO\x10\x02\"\xa4\x01\n\x13RecordingDeviceType\x12%\n!RECORDING_DEVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nSMARTPHONE\x10\x01\x12\x06\n\x02PC\x10\x02\x12\x0e\n\nPHONE_LINE\x10\x03\x12\x0b\n\x07VEHICLE\x10\x04\x12\x18\n\x14OTHER_OUTDOOR_DEVICE\x10\x05\x12\x17\n\x13OTHER_INDOOR_DEVICE\x10\x06:\x02\x18\x01\"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\"D\n\x10RecognitionAudio\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"\xed\x01\n\x11RecognizeResponse\x12@\n\x07results\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x16speech_adaptation_info\x18\x07 \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\x08 \x01(\x03\"\xe9\x02\n\x1cLongRunningRecognizeResponse\x12@\n\x07results\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.speech.v1.TranscriptOutputConfig\x12(\n\x0coutput_error\x18\x07 \x01(\x0b\x32\x12.google.rpc.Status\x12L\n\x16speech_adaptation_info\x18\x08 \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\t \x01(\x03\"\xb0\x01\n\x1cLongRunningRecognizeMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xd1\x04\n\x1aStreamingRecognizeResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x43\n\x07results\x18\x02 \x03(\x0b\x32\x32.google.cloud.speech.v1.StreamingRecognitionResult\x12]\n\x11speech_event_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType\x12\x34\n\x11speech_event_time\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11total_billed_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x16speech_adaptation_info\x18\t \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\n \x01(\x03\"\x9d\x01\n\x0fSpeechEventType\x12\x1c\n\x18SPEECH_EVENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\x12\x1b\n\x17SPEECH_ACTIVITY_TIMEOUT\x10\x04\"\xf2\x01\n\x1aStreamingRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v1.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xca\x01\n\x17SpeechRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v1.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"w\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12/\n\x05words\x18\x03 \x03(\x0b\x32 .google.cloud.speech.v1.WordInfo\"\xa2\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x18\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"K\n\x14SpeechAdaptationInfo\x12\x1a\n\x12\x61\x64\x61ptation_timeout\x18\x01 \x01(\x08\x12\x17\n\x0ftimeout_message\x18\x04 \x01(\t2\xd1\x04\n\x06Speech\x12\x90\x01\n\tRecognize\x12(.google.cloud.speech.v1.RecognizeRequest\x1a).google.cloud.speech.v1.RecognizeResponse\".\x82\xd3\xe4\x93\x02\x19\"\x14/v1/speech:recognize:\x01*\xda\x41\x0c\x63onfig,audio\x12\xe4\x01\n\x14LongRunningRecognize\x12\x33.google.cloud.speech.v1.LongRunningRecognizeRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02$\"\x1f/v1/speech:longrunningrecognize:\x01*\xda\x41\x0c\x63onfig,audio\xca\x41<\n\x1cLongRunningRecognizeResponse\x12\x1cLongRunningRecognizeMetadata\x12\x81\x01\n\x12StreamingRecognize\x12\x31.google.cloud.speech.v1.StreamingRecognizeRequest\x1a\x32.google.cloud.speech.v1.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1a\x63om.google.cloud.speech.v1B\x0bSpeechProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3"
19
+
20
+ pool = Google::Protobuf::DescriptorPool.generated_pool
21
+
22
+ begin
23
+ pool.add_serialized_file(descriptor_data)
24
+ rescue TypeError => e
25
+ # Compatibility code: will be removed in the next major version.
26
+ require 'google/protobuf/descriptor_pb'
27
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
+ parsed.clear_dependency
29
+ serialized = parsed.class.encode(parsed)
30
+ file = pool.add_serialized_file(serialized)
31
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
+ imports = [
33
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
34
+ ["google.cloud.speech.v1.SpeechAdaptation", "google/cloud/speech/v1/resource.proto"],
35
+ ["google.protobuf.BoolValue", "google/protobuf/wrappers.proto"],
36
+ ["google.rpc.Status", "google/rpc/status.proto"],
37
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
38
+ ]
39
+ imports.each do |type_name, expected_filename|
40
+ import_file = pool.lookup(type_name).file_descriptor
41
+ if import_file.name != expected_filename
42
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
203
43
  end
204
44
  end
45
+ warn "Each proto file must use a consistent fully-qualified name."
46
+ warn "This will become an error in the next major version."
205
47
  end
206
48
 
207
49
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/speech/v1/resource.proto
3
4
 
@@ -5,35 +6,31 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/api/resource_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/cloud/speech/v1/resource.proto", :syntax => :proto3) do
10
- add_message "google.cloud.speech.v1.CustomClass" do
11
- optional :name, :string, 1
12
- optional :custom_class_id, :string, 2
13
- repeated :items, :message, 3, "google.cloud.speech.v1.CustomClass.ClassItem"
14
- end
15
- add_message "google.cloud.speech.v1.CustomClass.ClassItem" do
16
- optional :value, :string, 1
17
- end
18
- add_message "google.cloud.speech.v1.PhraseSet" do
19
- optional :name, :string, 1
20
- repeated :phrases, :message, 2, "google.cloud.speech.v1.PhraseSet.Phrase"
21
- optional :boost, :float, 4
22
- end
23
- add_message "google.cloud.speech.v1.PhraseSet.Phrase" do
24
- optional :value, :string, 1
25
- optional :boost, :float, 2
26
- end
27
- add_message "google.cloud.speech.v1.SpeechAdaptation" do
28
- repeated :phrase_sets, :message, 1, "google.cloud.speech.v1.PhraseSet"
29
- repeated :phrase_set_references, :string, 2
30
- repeated :custom_classes, :message, 3, "google.cloud.speech.v1.CustomClass"
31
- optional :abnf_grammar, :message, 4, "google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar"
32
- end
33
- add_message "google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar" do
34
- repeated :abnf_strings, :string, 1
9
+
10
+ descriptor_data = "\n%google/cloud/speech/v1/resource.proto\x12\x16google.cloud.speech.v1\x1a\x19google/api/resource.proto\"\xfc\x01\n\x0b\x43ustomClass\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x63ustom_class_id\x18\x02 \x01(\t\x12<\n\x05items\x18\x03 \x03(\x0b\x32-.google.cloud.speech.v1.CustomClass.ClassItem\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t:l\xea\x41i\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}\"\xf2\x01\n\tPhraseSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x07phrases\x18\x02 \x03(\x0b\x32(.google.cloud.speech.v1.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02:e\xea\x41\x62\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}\"\xbd\x02\n\x10SpeechAdaptation\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v1.PhraseSet\x12\x43\n\x15phrase_set_references\x18\x02 \x03(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12;\n\x0e\x63ustom_classes\x18\x03 \x03(\x0b\x32#.google.cloud.speech.v1.CustomClass\x12J\n\x0c\x61\x62nf_grammar\x18\x04 \x01(\x0b\x32\x34.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar\x1a#\n\x0b\x41\x42NFGrammar\x12\x14\n\x0c\x61\x62nf_strings\x18\x01 \x03(\tBp\n\x1a\x63om.google.cloud.speech.v1B\x13SpeechResourceProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
35
30
  end
36
31
  end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
37
34
  end
38
35
 
39
36
  module Google
@@ -135,7 +135,7 @@ module Google
135
135
  credentials = @config.credentials
136
136
  # Use self-signed JWT if the endpoint is unchanged from default,
137
137
  # but only if the default endpoint does not have a region prefix.
138
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
138
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
139
139
  !@config.endpoint.split(".").first.include?("-")
140
140
  credentials ||= Credentials.default scope: @config.scope,
141
141
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -506,7 +506,9 @@ module Google
506
506
  class Configuration
507
507
  extend ::Gapic::Config
508
508
 
509
- config_attr :endpoint, "speech.googleapis.com", ::String
509
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
510
+
511
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
510
512
  config_attr :credentials, nil do |value|
511
513
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
512
514
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -656,7 +656,9 @@ module Google
656
656
  class Configuration
657
657
  extend ::Gapic::Config
658
658
 
659
- config_attr :endpoint, "speech.googleapis.com", ::String
659
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
660
+
661
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
660
662
  config_attr :credentials, nil do |value|
661
663
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
662
664
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -126,7 +126,7 @@ module Google
126
126
  credentials = @config.credentials
127
127
  # Use self-signed JWT if the endpoint is unchanged from default,
128
128
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
129
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
130
130
  !@config.endpoint.split(".").first.include?("-")
131
131
  credentials ||= Credentials.default scope: @config.scope,
132
132
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -367,7 +367,9 @@ module Google
367
367
  class Configuration
368
368
  extend ::Gapic::Config
369
369
 
370
- config_attr :endpoint, "speech.googleapis.com", ::String
370
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
371
+
372
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
371
373
  config_attr :credentials, nil do |value|
372
374
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
373
375
  allowed.any? { |klass| klass === value }
@@ -446,7 +446,9 @@ module Google
446
446
  class Configuration
447
447
  extend ::Gapic::Config
448
448
 
449
- config_attr :endpoint, "speech.googleapis.com", ::String
449
+ DEFAULT_ENDPOINT = "speech.googleapis.com"
450
+
451
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
452
  config_attr :credentials, nil do |value|
451
453
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
454
  allowed.any? { |klass| klass === value }
@@ -567,7 +569,7 @@ module Google
567
569
 
568
570
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
571
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
572
+ query_string_params.to_h { |p| p.split "=", 2 }
571
573
  else
572
574
  {}
573
575
  end
@@ -605,7 +607,7 @@ module Google
605
607
 
606
608
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
609
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
610
+ query_string_params.to_h { |p| p.split "=", 2 }
609
611
  else
610
612
  {}
611
613
  end
@@ -643,7 +645,7 @@ module Google
643
645
 
644
646
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
647
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
648
+ query_string_params.to_h { |p| p.split "=", 2 }
647
649
  else
648
650
  {}
649
651
  end
@@ -681,7 +683,7 @@ module Google
681
683
 
682
684
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
685
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
686
+ query_string_params.to_h { |p| p.split "=", 2 }
685
687
  else
686
688
  {}
687
689
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_recognize_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_long_running_recognize_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Speech
23
23
  module V1
24
- VERSION = "0.12.1"
24
+ VERSION = "0.13.1"
25
25
  end
26
26
  end
27
27
  end
@@ -83,7 +83,7 @@ module Google
83
83
  # long-running operation pattern.
84
84
  # @!attribute [rw] new_issue_uri
85
85
  # @return [::String]
86
- # Link to a place that API users can report issues. Example:
86
+ # Link to a *public* URI where users can report issues. Example:
87
87
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
88
88
  # @!attribute [rw] documentation_uri
89
89
  # @return [::String]
@@ -209,9 +209,57 @@ module Google
209
209
  # @!attribute [rw] common
210
210
  # @return [::Google::Api::CommonLanguageSettings]
211
211
  # Some settings.
212
+ # @!attribute [rw] renamed_services
213
+ # @return [::Google::Protobuf::Map{::String => ::String}]
214
+ # Map from original service names to renamed versions.
215
+ # This is used when the default generated types
216
+ # would cause a naming conflict. (Neither name is
217
+ # fully-qualified.)
218
+ # Example: Subscriber to SubscriberServiceApi.
219
+ # @!attribute [rw] renamed_resources
220
+ # @return [::Google::Protobuf::Map{::String => ::String}]
221
+ # Map from full resource types to the effective short name
222
+ # for the resource. This is used when otherwise resource
223
+ # named from different services would cause naming collisions.
224
+ # Example entry:
225
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
226
+ # @!attribute [rw] ignored_resources
227
+ # @return [::Array<::String>]
228
+ # List of full resource types to ignore during generation.
229
+ # This is typically used for API-specific Location resources,
230
+ # which should be handled by the generator as if they were actually
231
+ # the common Location resources.
232
+ # Example entry: "documentai.googleapis.com/Location"
233
+ # @!attribute [rw] forced_namespace_aliases
234
+ # @return [::Array<::String>]
235
+ # Namespaces which must be aliased in snippets due to
236
+ # a known (but non-generator-predictable) naming collision
237
+ # @!attribute [rw] handwritten_signatures
238
+ # @return [::Array<::String>]
239
+ # Method signatures (in the form "service.method(signature)")
240
+ # which are provided separately, so shouldn't be generated.
241
+ # Snippets *calling* these methods are still generated, however.
212
242
  class DotnetSettings
213
243
  include ::Google::Protobuf::MessageExts
214
244
  extend ::Google::Protobuf::MessageExts::ClassMethods
245
+
246
+ # @!attribute [rw] key
247
+ # @return [::String]
248
+ # @!attribute [rw] value
249
+ # @return [::String]
250
+ class RenamedServicesEntry
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+ end
254
+
255
+ # @!attribute [rw] key
256
+ # @return [::String]
257
+ # @!attribute [rw] value
258
+ # @return [::String]
259
+ class RenamedResourcesEntry
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+ end
215
263
  end
216
264
 
217
265
  # Settings for Ruby client libraries.
@@ -305,6 +353,15 @@ module Google
305
353
 
306
354
  # Street View Org.
307
355
  STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
308
365
  end
309
366
 
310
367
  # To where should client libraries be published?
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example:
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-speech-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-23 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.0
19
+ version: 0.19.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.18.0
29
+ version: 0.19.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a