google-cloud-speech-v1 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/speech/v1/adaptation/client.rb +1347 -0
- data/lib/google/cloud/speech/v1/adaptation/credentials.rb +51 -0
- data/lib/google/cloud/speech/v1/adaptation/paths.rb +88 -0
- data/lib/google/cloud/speech/v1/adaptation.rb +49 -0
- data/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb +86 -0
- data/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb +65 -0
- data/lib/google/cloud/speech/v1/version.rb +1 -1
- data/lib/google/cloud/speech/v1.rb +1 -0
- data/proto_docs/google/cloud/speech/v1/cloud_speech.rb +28 -23
- data/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb +268 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +10 -2
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Speech
|
24
|
+
module V1
|
25
|
+
module Adaptation
|
26
|
+
# Credentials for the Adaptation API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
30
|
+
]
|
31
|
+
self.env_vars = [
|
32
|
+
"SPEECH_CREDENTIALS",
|
33
|
+
"SPEECH_KEYFILE",
|
34
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
35
|
+
"GOOGLE_CLOUD_KEYFILE",
|
36
|
+
"GCLOUD_KEYFILE",
|
37
|
+
"SPEECH_CREDENTIALS_JSON",
|
38
|
+
"SPEECH_KEYFILE_JSON",
|
39
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
40
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
41
|
+
"GCLOUD_KEYFILE_JSON"
|
42
|
+
]
|
43
|
+
self.paths = [
|
44
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
45
|
+
]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Speech
|
23
|
+
module V1
|
24
|
+
module Adaptation
|
25
|
+
# Path helper methods for the Adaptation API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified CustomClass resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/customClasses/{custom_class}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param custom_class [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def custom_class_path project:, location:, custom_class:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/customClasses/#{custom_class}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified Location resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
#
|
56
|
+
# @return [::String]
|
57
|
+
def location_path project:, location:
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/locations/#{location}"
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified PhraseSet resource string.
|
65
|
+
#
|
66
|
+
# The resource will be in the following format:
|
67
|
+
#
|
68
|
+
# `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
|
69
|
+
#
|
70
|
+
# @param project [String]
|
71
|
+
# @param location [String]
|
72
|
+
# @param phrase_set [String]
|
73
|
+
#
|
74
|
+
# @return [::String]
|
75
|
+
def phrase_set_path project:, location:, phrase_set:
|
76
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
77
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
78
|
+
|
79
|
+
"projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}"
|
80
|
+
end
|
81
|
+
|
82
|
+
extend self
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/speech/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/speech/v1/adaptation/credentials"
|
26
|
+
require "google/cloud/speech/v1/adaptation/paths"
|
27
|
+
require "google/cloud/speech/v1/adaptation/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Speech
|
32
|
+
module V1
|
33
|
+
##
|
34
|
+
# Service that implements Google Cloud Speech Adaptation API.
|
35
|
+
#
|
36
|
+
# To load this service and instantiate a client:
|
37
|
+
#
|
38
|
+
# require "google/cloud/speech/v1/adaptation"
|
39
|
+
# client = ::Google::Cloud::Speech::V1::Adaptation::Client.new
|
40
|
+
#
|
41
|
+
module Adaptation
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
helper_path = ::File.join __dir__, "adaptation", "helpers.rb"
|
49
|
+
require "google/cloud/speech/v1/adaptation/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/speech/v1/cloud_speech_adaptation.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/speech/v1/resource_pb'
|
11
|
+
require 'google/protobuf/empty_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
|
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
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
module Google
|
68
|
+
module Cloud
|
69
|
+
module Speech
|
70
|
+
module V1
|
71
|
+
CreatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CreatePhraseSetRequest").msgclass
|
72
|
+
UpdatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.UpdatePhraseSetRequest").msgclass
|
73
|
+
GetPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.GetPhraseSetRequest").msgclass
|
74
|
+
ListPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListPhraseSetRequest").msgclass
|
75
|
+
ListPhraseSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListPhraseSetResponse").msgclass
|
76
|
+
DeletePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.DeletePhraseSetRequest").msgclass
|
77
|
+
CreateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CreateCustomClassRequest").msgclass
|
78
|
+
UpdateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.UpdateCustomClassRequest").msgclass
|
79
|
+
GetCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.GetCustomClassRequest").msgclass
|
80
|
+
ListCustomClassesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListCustomClassesRequest").msgclass
|
81
|
+
ListCustomClassesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListCustomClassesResponse").msgclass
|
82
|
+
DeleteCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.DeleteCustomClassRequest").msgclass
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/speech/v1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2022 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/speech/v1/cloud_speech_adaptation_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Speech
|
25
|
+
module V1
|
26
|
+
module Adaptation
|
27
|
+
# Service that implements Google Cloud Speech Adaptation API.
|
28
|
+
class Service
|
29
|
+
|
30
|
+
include ::GRPC::GenericService
|
31
|
+
|
32
|
+
self.marshal_class_method = :encode
|
33
|
+
self.unmarshal_class_method = :decode
|
34
|
+
self.service_name = 'google.cloud.speech.v1.Adaptation'
|
35
|
+
|
36
|
+
# Create a set of phrase hints. Each item in the set can be a single word or
|
37
|
+
# a multi-word phrase. The items in the PhraseSet are favored by the
|
38
|
+
# recognition model when you send a call that includes the PhraseSet.
|
39
|
+
rpc :CreatePhraseSet, ::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet
|
40
|
+
# Get a phrase set.
|
41
|
+
rpc :GetPhraseSet, ::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet
|
42
|
+
# List phrase sets.
|
43
|
+
rpc :ListPhraseSet, ::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Google::Cloud::Speech::V1::ListPhraseSetResponse
|
44
|
+
# Update a phrase set.
|
45
|
+
rpc :UpdatePhraseSet, ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet
|
46
|
+
# Delete a phrase set.
|
47
|
+
rpc :DeletePhraseSet, ::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Google::Protobuf::Empty
|
48
|
+
# Create a custom class.
|
49
|
+
rpc :CreateCustomClass, ::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass
|
50
|
+
# Get a custom class.
|
51
|
+
rpc :GetCustomClass, ::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass
|
52
|
+
# List custom classes.
|
53
|
+
rpc :ListCustomClasses, ::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Google::Cloud::Speech::V1::ListCustomClassesResponse
|
54
|
+
# Update a custom class.
|
55
|
+
rpc :UpdateCustomClass, ::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass
|
56
|
+
# Delete a custom class.
|
57
|
+
rpc :DeleteCustomClass, ::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Google::Protobuf::Empty
|
58
|
+
end
|
59
|
+
|
60
|
+
Stub = Service.rpc_stub_class
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -133,8 +133,7 @@ module Google
|
|
133
133
|
# @return [::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding]
|
134
134
|
# Encoding of audio data sent in all `RecognitionAudio` messages.
|
135
135
|
# This field is optional for `FLAC` and `WAV` audio files and required
|
136
|
-
# for all other audio formats. For details, see
|
137
|
-
# {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
136
|
+
# for all other audio formats. For details, see {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
138
137
|
# @!attribute [rw] sample_rate_hertz
|
139
138
|
# @return [::Integer]
|
140
139
|
# Sample rate in Hertz of the audio data sent in all
|
@@ -143,8 +142,7 @@ module Google
|
|
143
142
|
# source to 16000 Hz. If that's not possible, use the native sample rate of
|
144
143
|
# the audio source (instead of re-sampling).
|
145
144
|
# This field is optional for FLAC and WAV audio files, but is
|
146
|
-
# required for all other audio formats. For details, see
|
147
|
-
# {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
145
|
+
# required for all other audio formats. For details, see {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}.
|
148
146
|
# @!attribute [rw] audio_channel_count
|
149
147
|
# @return [::Integer]
|
150
148
|
# The number of channels in the input audio data.
|
@@ -285,10 +283,6 @@ module Google
|
|
285
283
|
# <td>Best for short queries such as voice commands or voice search.</td>
|
286
284
|
# </tr>
|
287
285
|
# <tr>
|
288
|
-
# <td><code>command_and_search</code></td>
|
289
|
-
# <td>Best for short queries such as voice commands or voice search.</td>
|
290
|
-
# </tr>
|
291
|
-
# <tr>
|
292
286
|
# <td><code>phone_call</code></td>
|
293
287
|
# <td>Best for audio that originated from a phone call (typically
|
294
288
|
# recorded at an 8khz sampling rate).</td>
|
@@ -306,6 +300,16 @@ module Google
|
|
306
300
|
# For example, long-form audio. Ideally the audio is high-fidelity,
|
307
301
|
# recorded at a 16khz or greater sampling rate.</td>
|
308
302
|
# </tr>
|
303
|
+
# <tr>
|
304
|
+
# <td><code>medical_conversation</code></td>
|
305
|
+
# <td>Best for audio that originated from a conversation between a
|
306
|
+
# medical provider and patient.</td>
|
307
|
+
# </tr>
|
308
|
+
# <tr>
|
309
|
+
# <td><code>medical_dictation</code></td>
|
310
|
+
# <td>Best for audio that originated from dictation notes by a medical
|
311
|
+
# provider.</td>
|
312
|
+
# </tr>
|
309
313
|
# </table>
|
310
314
|
# @!attribute [rw] use_enhanced
|
311
315
|
# @return [::Boolean]
|
@@ -343,8 +347,7 @@ module Google
|
|
343
347
|
# an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the
|
344
348
|
# encoding configuration must match the encoding described in the audio
|
345
349
|
# header; otherwise the request returns an
|
346
|
-
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error
|
347
|
-
# code.
|
350
|
+
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error code.
|
348
351
|
module AudioEncoding
|
349
352
|
# Not specified.
|
350
353
|
ENCODING_UNSPECIFIED = 0
|
@@ -583,8 +586,8 @@ module Google
|
|
583
586
|
|
584
587
|
# Contains audio data in the encoding specified in the `RecognitionConfig`.
|
585
588
|
# Either `content` or `uri` must be supplied. Supplying both or neither
|
586
|
-
# returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
|
587
|
-
#
|
589
|
+
# returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See
|
590
|
+
# [content limits](https://cloud.google.com/speech-to-text/quotas#content).
|
588
591
|
# @!attribute [rw] content
|
589
592
|
# @return [::String]
|
590
593
|
# The audio data bytes encoded as specified in
|
@@ -597,9 +600,8 @@ module Google
|
|
597
600
|
# Currently, only Google Cloud Storage URIs are
|
598
601
|
# supported, which must be specified in the following format:
|
599
602
|
# `gs://bucket_name/object_name` (other URI formats return
|
600
|
-
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
|
601
|
-
#
|
602
|
-
# URIs](https://cloud.google.com/storage/docs/reference-uris).
|
603
|
+
# [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see
|
604
|
+
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
603
605
|
class RecognitionAudio
|
604
606
|
include ::Google::Protobuf::MessageExts
|
605
607
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -658,8 +660,8 @@ module Google
|
|
658
660
|
# Time of the most recent processing update.
|
659
661
|
# @!attribute [r] uri
|
660
662
|
# @return [::String]
|
661
|
-
# Output only. The URI of the audio file being transcribed. Empty if the
|
662
|
-
#
|
663
|
+
# Output only. The URI of the audio file being transcribed. Empty if the audio was sent
|
664
|
+
# as byte content.
|
663
665
|
class LongRunningRecognizeMetadata
|
664
666
|
include ::Google::Protobuf::MessageExts
|
665
667
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -784,9 +786,9 @@ module Google
|
|
784
786
|
# For audio_channel_count = N, its output values can range from '1' to 'N'.
|
785
787
|
# @!attribute [r] language_code
|
786
788
|
# @return [::String]
|
787
|
-
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
788
|
-
#
|
789
|
-
#
|
789
|
+
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
|
790
|
+
# of the language in this result. This language code was detected to have
|
791
|
+
# the most likelihood of being spoken in the audio.
|
790
792
|
class StreamingRecognitionResult
|
791
793
|
include ::Google::Protobuf::MessageExts
|
792
794
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -810,9 +812,9 @@ module Google
|
|
810
812
|
# beginning of the audio.
|
811
813
|
# @!attribute [r] language_code
|
812
814
|
# @return [::String]
|
813
|
-
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
|
814
|
-
#
|
815
|
-
#
|
815
|
+
# Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
|
816
|
+
# of the language in this result. This language code was detected to have
|
817
|
+
# the most likelihood of being spoken in the audio.
|
816
818
|
class SpeechRecognitionResult
|
817
819
|
include ::Google::Protobuf::MessageExts
|
818
820
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -822,6 +824,9 @@ module Google
|
|
822
824
|
# @!attribute [rw] transcript
|
823
825
|
# @return [::String]
|
824
826
|
# Transcript text representing the words that the user spoke.
|
827
|
+
# In languages that use spaces to separate words, the transcript might have a
|
828
|
+
# leading space if it isn't the first result. You can concatenate each result
|
829
|
+
# to obtain the full transcript without using a separator.
|
825
830
|
# @!attribute [rw] confidence
|
826
831
|
# @return [::Float]
|
827
832
|
# The confidence estimate between 0.0 and 1.0. A higher number
|