Skip to content

Commit a51c341

Browse files
Google APIscopybara-github
authored andcommitted
docs: clarified meaning of the legacy editions
docs: clarified semantic of the streaming APIs PiperOrigin-RevId: 405426307
1 parent 974ad5b commit a51c341

3 files changed

Lines changed: 68 additions & 62 deletions

File tree

google/cloud/dialogflow/v2beta1/agent.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,15 @@ message Agent {
293293
// Not specified. This value should never be used.
294294
TIER_UNSPECIFIED = 0;
295295

296-
// Standard tier.
296+
// Trial Edition, previously known as Standard Edition.
297297
TIER_STANDARD = 1;
298298

299-
// Enterprise tier (Essentials).
299+
// Essentials Edition, previously known as Enterprise Essential Edition.
300300
TIER_ENTERPRISE = 2;
301301

302-
// Enterprise tier (Plus).
303-
TIER_ENTERPRISE_PLUS = 3;
302+
// Essentials Edition (same as TIER_ENTERPRISE), previously known as
303+
// Enterprise Plus Edition.
304+
TIER_ENTERPRISE_PLUS = 3 [deprecated = true];
304305
}
305306

306307
// Required. The project of this agent.

google/cloud/dialogflow/v2beta1/audio_config.proto

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,36 @@ option java_outer_classname = "AudioConfigProto";
3131
option java_package = "com.google.cloud.dialogflow.v2beta1";
3232
option objc_class_prefix = "DF";
3333

34+
// Hints for the speech recognizer to help with recognition in a specific
35+
// conversation state.
36+
message SpeechContext {
37+
// Optional. A list of strings containing words and phrases that the speech
38+
// recognizer should recognize with higher likelihood.
39+
//
40+
// This list can be used to:
41+
//
42+
// * improve accuracy for words and phrases you expect the user to say,
43+
// e.g. typical commands for your Dialogflow agent
44+
// * add additional words to the speech recognizer vocabulary
45+
// * ...
46+
//
47+
// See the [Cloud Speech
48+
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
49+
// limits.
50+
repeated string phrases = 1;
51+
52+
// Optional. Boost for this context compared to other contexts:
53+
//
54+
// * If the boost is positive, Dialogflow will increase the probability that
55+
// the phrases in this context are recognized over similar sounding phrases.
56+
// * If the boost is unspecified or non-positive, Dialogflow will not apply
57+
// any boost.
58+
//
59+
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
60+
// find a value that fits your use case with binary search.
61+
float boost = 2;
62+
}
63+
3464
// Audio encoding of the audio content sent in the conversational query request.
3565
// Refer to the
3666
// [Cloud Speech API
@@ -80,36 +110,6 @@ enum AudioEncoding {
80110
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
81111
}
82112

83-
// Hints for the speech recognizer to help with recognition in a specific
84-
// conversation state.
85-
message SpeechContext {
86-
// Optional. A list of strings containing words and phrases that the speech
87-
// recognizer should recognize with higher likelihood.
88-
//
89-
// This list can be used to:
90-
//
91-
// * improve accuracy for words and phrases you expect the user to say,
92-
// e.g. typical commands for your Dialogflow agent
93-
// * add additional words to the speech recognizer vocabulary
94-
// * ...
95-
//
96-
// See the [Cloud Speech
97-
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
98-
// limits.
99-
repeated string phrases = 1;
100-
101-
// Optional. Boost for this context compared to other contexts:
102-
//
103-
// * If the boost is positive, Dialogflow will increase the probability that
104-
// the phrases in this context are recognized over similar sounding phrases.
105-
// * If the boost is unspecified or non-positive, Dialogflow will not apply
106-
// any boost.
107-
//
108-
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
109-
// find a value that fits your use case with binary search.
110-
float boost = 2;
111-
}
112-
113113
// Information for a word recognized by the speech recognizer.
114114
message SpeechWordInfo {
115115
// The word this info is for.

google/cloud/dialogflow/v2beta1/session.proto

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,11 @@ message StreamingDetectIntentRequest {
582582
//
583583
// Multiple response messages can be returned in order:
584584
//
585-
// 1. If the input was set to streaming audio, the first one or more messages
586-
// contain `recognition_result`. Each `recognition_result` represents a more
587-
// complete transcript of what the user said. The last `recognition_result`
588-
// has `is_final` set to `true`.
585+
// 1. If the `StreamingDetectIntentRequest.input_audio` field was
586+
// set, the `recognition_result` field is populated for one
587+
// or more messages.
588+
// See the [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] message for details
589+
// about the result message sequence.
589590
//
590591
// 2. The next message contains `response_id`, `query_result`,
591592
// `alternative_query_results` and optionally `webhook_status` if a WebHook
@@ -639,35 +640,39 @@ message StreamingDetectIntentResponse {
639640
// that is currently being processed or an indication that this is the end
640641
// of the single requested utterance.
641642
//
642-
// Example:
643+
// While end-user audio is being processed, Dialogflow sends a series of
644+
// results. Each result may contain a `transcript` value. A transcript
645+
// represents a portion of the utterance. While the recognizer is processing
646+
// audio, transcript values may be interim values or finalized values.
647+
// Once a transcript is finalized, the `is_final` value is set to true and
648+
// processing continues for the next transcript.
643649
//
644-
// 1. transcript: "tube"
650+
// If `StreamingDetectIntentRequest.query_input.audio_config.single_utterance`
651+
// was true, and the recognizer has completed processing audio,
652+
// the `message_type` value is set to `END_OF_SINGLE_UTTERANCE and the
653+
// following (last) result contains the last finalized transcript.
645654
//
646-
// 2. transcript: "to be a"
655+
// The complete end-user utterance is determined by concatenating the
656+
// finalized transcript values received for the series of results.
647657
//
648-
// 3. transcript: "to be"
658+
// In the following example, single utterance is enabled. In the case where
659+
// single utterance is not enabled, result 7 would not occur.
649660
//
650-
// 4. transcript: "to be or not to be"
651-
// is_final: true
661+
// ```
662+
// Num | transcript | message_type | is_final
663+
// --- | ----------------------- | ----------------------- | --------
664+
// 1 | "tube" | TRANSCRIPT | false
665+
// 2 | "to be a" | TRANSCRIPT | false
666+
// 3 | "to be" | TRANSCRIPT | false
667+
// 4 | "to be or not to be" | TRANSCRIPT | true
668+
// 5 | "that's" | TRANSCRIPT | false
669+
// 6 | "that is | TRANSCRIPT | false
670+
// 7 | unset | END_OF_SINGLE_UTTERANCE | unset
671+
// 8 | " that is the question" | TRANSCRIPT | true
672+
// ```
652673
//
653-
// 5. transcript: " that's"
654-
//
655-
// 6. transcript: " that is"
656-
//
657-
// 7. message_type: `END_OF_SINGLE_UTTERANCE`
658-
//
659-
// 8. transcript: " that is the question"
660-
// is_final: true
661-
//
662-
// Only two of the responses contain final results (#4 and #8 indicated by
663-
// `is_final: true`). Concatenating these generates the full transcript: "to be
664-
// or not to be that is the question".
665-
//
666-
// In each response we populate:
667-
//
668-
// * for `TRANSCRIPT`: `transcript` and possibly `is_final`.
669-
//
670-
// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`.
674+
// Concatenating the finalized transcripts with `is_final` set to true,
675+
// the complete utterance becomes "to be or not to be that is the question".
671676
message StreamingRecognitionResult {
672677
// Type of the response message.
673678
enum MessageType {

0 commit comments

Comments
 (0)