confidence = $confidence; } /** * @return float */ public function getConfidence() { return $this->confidence; } /** * DTMF digits. Populated if and only if `message_type` = `DTMF_DIGITS`. * * @param GoogleCloudDialogflowV2beta1TelephonyDtmfEvents $dtmfDigits */ public function setDtmfDigits(GoogleCloudDialogflowV2beta1TelephonyDtmfEvents $dtmfDigits) { $this->dtmfDigits = $dtmfDigits; } /** * @return GoogleCloudDialogflowV2beta1TelephonyDtmfEvents */ public function getDtmfDigits() { return $this->dtmfDigits; } /** * If `false`, the `StreamingRecognitionResult` represents an interim result * that may change. If `true`, the recognizer will not return any further * hypotheses about this piece of the audio. May only be populated for * `message_type` = `TRANSCRIPT`. * * @param bool $isFinal */ public function setIsFinal($isFinal) { $this->isFinal = $isFinal; } /** * @return bool */ public function getIsFinal() { return $this->isFinal; } /** * Detected language code for the transcript. * * @param string $languageCode */ public function setLanguageCode($languageCode) { $this->languageCode = $languageCode; } /** * @return string */ public function getLanguageCode() { return $this->languageCode; } /** * Type of the result message. * * Accepted values: MESSAGE_TYPE_UNSPECIFIED, TRANSCRIPT, * END_OF_SINGLE_UTTERANCE, DTMF_DIGITS, PARTIAL_DTMF_DIGITS * * @param self::MESSAGE_TYPE_* $messageType */ public function setMessageType($messageType) { $this->messageType = $messageType; } /** * @return self::MESSAGE_TYPE_* */ public function getMessageType() { return $this->messageType; } /** * Time offset of the end of this Speech recognition result relative to the * beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. * * @param string $speechEndOffset */ public function setSpeechEndOffset($speechEndOffset) { $this->speechEndOffset = $speechEndOffset; } /** * @return string */ public function getSpeechEndOffset() { return $this->speechEndOffset; } /** * Word-specific information for the words recognized by Speech in transcript. * Populated if and only if `message_type` = `TRANSCRIPT` and * [InputAudioConfig.enable_word_info] is set. * * @param GoogleCloudDialogflowV2beta1SpeechWordInfo[] $speechWordInfo */ public function setSpeechWordInfo($speechWordInfo) { $this->speechWordInfo = $speechWordInfo; } /** * @return GoogleCloudDialogflowV2beta1SpeechWordInfo[] */ public function getSpeechWordInfo() { return $this->speechWordInfo; } /** * An estimate of the likelihood that the speech recognizer will not change * its guess about this interim recognition result: * If the value is * unspecified or 0.0, Dialogflow didn't compute the stability. In particular, * Dialogflow will only provide stability for `TRANSCRIPT` results with * `is_final = false`. * Otherwise, the value is in (0.0, 1.0] where 0.0 means * completely unstable and 1.0 means completely stable. * * @param float $stability */ public function setStability($stability) { $this->stability = $stability; } /** * @return float */ public function getStability() { return $this->stability; } /** * Transcript text representing the words that the user spoke. Populated if * and only if `message_type` = `TRANSCRIPT`. * * @param string $transcript */ public function setTranscript($transcript) { $this->transcript = $transcript; } /** * @return string */ public function getTranscript() { return $this->transcript; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(GoogleCloudDialogflowV2beta1StreamingRecognitionResult::class, 'Google_Service_Dialogflow_GoogleCloudDialogflowV2beta1StreamingRecognitionResult');