Skip to content

Commit

Permalink
feat(speech): Add WordInfo#speaker_tag
Browse files Browse the repository at this point in the history
* Update documentation
  * Update bucket name in code examples
  • Loading branch information
yoshi-automation authored and quartzmo committed Nov 13, 2019
1 parent 886b1c5 commit c51fe29
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion google-cloud-speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ config = {
sample_rate_hertz: sample_rate_hertz,
encoding: encoding
}
uri = "gs://gapic-toolkit/hello.flac"
uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac"
audio = { uri: uri }
response = speech_client.recognize(config, audio)
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
sample_rate_hertz: sample_rate_hertz,
encoding: encoding
}
uri = "gs://gapic-toolkit/hello.flac"
uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac"
audio = { uri: uri }
response = speech_client.recognize(config, audio)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
sample_rate_hertz: sample_rate_hertz,
encoding: encoding
}
uri = "gs://gapic-toolkit/hello.flac"
uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac"
audio = { uri: uri }
response = speech_client.recognize(config, audio)
end
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-speech/lib/google/cloud/speech.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module Cloud
# sample_rate_hertz: sample_rate_hertz,
# encoding: encoding
# }
# uri = "gs://bucket-name/hello.flac"
# uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac"
# audio = { uri: uri }
# response = speech_client.recognize(config, audio)
# ```
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-speech/lib/google/cloud/speech/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module Speech
# sample_rate_hertz: sample_rate_hertz,
# encoding: encoding
# }
# uri = "gs://bucket-name/hello.flac"
# uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac"
# audio = { uri: uri }
# response = speech_client.recognize(config, audio)
# ```
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,7 @@ module AudioEncoding
# number of speakers. If not set, the default value is 6.
# @!attribute [rw] speaker_tag
# @return [Integer]
# A distinct integer value is assigned for every speaker within
# the audio. This field specifies which one of those speakers was detected to
# have spoken this word. Value ranges from '1' to diarization_speaker_count.
# speaker_tag is set if enable_speaker_diarization = 'true' and only in the
# top alternative.
# Unused.
class SpeakerDiarizationConfig; end

# Description of audio data to be recognized.
Expand Down Expand Up @@ -688,6 +684,13 @@ class SpeechRecognitionAlternative; end
# @!attribute [rw] word
# @return [String]
# The word corresponding to this set of information.
# @!attribute [rw] speaker_tag
# @return [Integer]
# A distinct integer value is assigned for every speaker within
# the audio. This field specifies which one of those speakers was detected to
# have spoken this word. Value ranges from '1' to diarization_speaker_count.
# speaker_tag is set if enable_speaker_diarization = 'true' and only in the
# top alternative.
class WordInfo; end
end
end
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-speech/lib/google/cloud/speech/v1p1beta1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module Speech
# sample_rate_hertz: sample_rate_hertz,
# encoding: encoding
# }
# uri = "gs://bucket-name/hello.flac"
# uri = "gs://cloud-samples-data/speech/brooklyn_bridge.flac"
# audio = { uri: uri }
# response = speech_client.recognize(config, audio)
# ```
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-speech/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-10-29T10:43:43.756177Z",
"updateTime": "2019-11-12T11:45:49.214781Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.40.3",
"dockerImage": "googleapis/artman@sha256:c805f50525f5f557886c94ab76f56eaa09cb1da58c3ee95111fd34259376621a"
"version": "0.41.1",
"dockerImage": "googleapis/artman@sha256:545c758c76c3f779037aa259023ec3d1ef2d57d2c8cd00a222cb187d63ceac5e"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "532773acbed8d09451dafb3d403ab1823e6a6e1e",
"internalRef": "277177415"
"sha": "f69562be0608904932bdcfbc5ad8b9a22d9dceb8",
"internalRef": "279774957"
}
},
{
Expand Down

0 comments on commit c51fe29

Please sign in to comment.