Class: Google::Cloud::Speech::Result
- Inherits:
-
Object
- Object
- Google::Cloud::Speech::Result
- Defined in:
- lib/google/cloud/speech/result.rb
Overview
Result
A speech recognition result corresponding to a portion of the audio.
See Project#recognize and Operation#results.
Defined Under Namespace
Classes: Alternative, Word
Instance Attribute Summary collapse
-
#alternatives ⇒ Array<Result::Alternative>
readonly
Additional recognition hypotheses (up to the value specified in
max_alternatives
). -
#confidence ⇒ Float
readonly
The confidence estimate between 0.0 and 1.0.
-
#transcript ⇒ String
readonly
Transcript text representing the words that the user spoke.
-
#words ⇒ Array<Result::Word>
readonly
A list of words with additional information about each word.
Instance Attribute Details
#alternatives ⇒ Array<Result::Alternative> (readonly)
Additional
recognition hypotheses (up to the value specified in
max_alternatives
). The server may return fewer than
max_alternatives
.
63 64 65 |
# File 'lib/google/cloud/speech/result.rb', line 63 def alternatives @alternatives end |
#confidence ⇒ Float (readonly)
The confidence estimate between 0.0 and 1.0. A higher number means the system is more confident that the recognition is correct. This field is typically provided only for the top hypothesis. A value of 0.0 is a sentinel value indicating confidence was not set.
63 64 65 |
# File 'lib/google/cloud/speech/result.rb', line 63 def confidence @confidence end |
#transcript ⇒ String (readonly)
Transcript text representing the words that the user spoke.
63 64 65 |
# File 'lib/google/cloud/speech/result.rb', line 63 def transcript @transcript end |
#words ⇒ Array<Result::Word> (readonly)
A list of words with additional
information about each word. Currently, the only additional
information provided is the the start and end time offsets. Available
when using the words
argument in relevant methods.
63 64 65 |
# File 'lib/google/cloud/speech/result.rb', line 63 def words @words end |