Skip to content

Commit

Permalink
docs(dialogflow-v2): Clarify some of the reference documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored Oct 25, 2021
1 parent b3c69da commit 719c421
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,14 @@ module Tier
# Not specified. This value should never be used.
TIER_UNSPECIFIED = 0

# Standard tier.
# Trial Edition, previously known as Standard Edition.
TIER_STANDARD = 1

# Enterprise tier (Essentials).
# Essentials Edition, previously known as Enterprise Essential Edition.
TIER_ENTERPRISE = 2

# Enterprise tier (Plus).
# Essentials Edition (same as TIER_ENTERPRISE), previously known as
# Enterprise Plus Edition.
TIER_ENTERPRISE_PLUS = 3
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,11 @@ class StreamingDetectIntentRequest
#
# Multiple response messages can be returned in order:
#
# 1. If the input was set to streaming audio, the first one or more messages
# contain `recognition_result`. Each `recognition_result` represents a more
# complete transcript of what the user said. The last `recognition_result`
# has `is_final` set to `true`.
# 1. If the `StreamingDetectIntentRequest.input_audio` field was
# set, the `recognition_result` field is populated for one
# or more messages.
# See the {::Google::Cloud::Dialogflow::V2::StreamingRecognitionResult StreamingRecognitionResult} message for details
# about the result message sequence.
#
# 2. The next message contains `response_id`, `query_result`
# and optionally `webhook_status` if a WebHook was called.
Expand Down Expand Up @@ -450,35 +451,39 @@ class StreamingDetectIntentResponse
# that is currently being processed or an indication that this is the end
# of the single requested utterance.
#
# Example:
#
# 1. transcript: "tube"
#
# 2. transcript: "to be a"
#
# 3. transcript: "to be"
#
# 4. transcript: "to be or not to be"
# is_final: true
#
# 5. transcript: " that's"
#
# 6. transcript: " that is"
#
# 7. message_type: `END_OF_SINGLE_UTTERANCE`
#
# 8. transcript: " that is the question"
# is_final: true
#
# Only two of the responses contain final results (#4 and #8 indicated by
# `is_final: true`). Concatenating these generates the full transcript: "to be
# or not to be that is the question".
#
# In each response we populate:
#
# * for `TRANSCRIPT`: `transcript` and possibly `is_final`.
#
# * for `END_OF_SINGLE_UTTERANCE`: only `message_type`.
# While end-user audio is being processed, Dialogflow sends a series of
# results. Each result may contain a `transcript` value. A transcript
# represents a portion of the utterance. While the recognizer is processing
# audio, transcript values may be interim values or finalized values.
# Once a transcript is finalized, the `is_final` value is set to true and
# processing continues for the next transcript.
#
# If `StreamingDetectIntentRequest.query_input.audio_config.single_utterance`
# was true, and the recognizer has completed processing audio,
# the `message_type` value is set to `END_OF_SINGLE_UTTERANCE and the
# following (last) result contains the last finalized transcript.
#
# The complete end-user utterance is determined by concatenating the
# finalized transcript values received for the series of results.
#
# In the following example, single utterance is enabled. In the case where
# single utterance is not enabled, result 7 would not occur.
#
# ```
# Num | transcript | message_type | is_final
# --- | ----------------------- | ----------------------- | --------
# 1 | "tube" | TRANSCRIPT | false
# 2 | "to be a" | TRANSCRIPT | false
# 3 | "to be" | TRANSCRIPT | false
# 4 | "to be or not to be" | TRANSCRIPT | true
# 5 | "that's" | TRANSCRIPT | false
# 6 | "that is | TRANSCRIPT | false
# 7 | unset | END_OF_SINGLE_UTTERANCE | unset
# 8 | " that is the question" | TRANSCRIPT | true
# ```
#
# Concatenating the finalized transcripts with `is_final` set to true,
# the complete utterance becomes "to be or not to be that is the question".
# @!attribute [rw] message_type
# @return [::Google::Cloud::Dialogflow::V2::StreamingRecognitionResult::MessageType]
# Type of the result message.
Expand Down

0 comments on commit 719c421

Please sign in to comment.