StreamingRecognitionResult constructor

StreamingRecognitionResult({
  1. StreamingRecognitionResult_MessageType? messageType,
  2. String? transcript,
  3. bool? isFinal,
  4. double? confidence,
  5. TelephonyDtmfEvents? dtmfDigits,
  6. double? stability,
  7. Iterable<SpeechWordInfo>? speechWordInfo,
  8. Duration? speechEndOffset,
})

Implementation

factory StreamingRecognitionResult({
  StreamingRecognitionResult_MessageType? messageType,
  $core.String? transcript,
  $core.bool? isFinal,
  $core.double? confidence,
  $20.TelephonyDtmfEvents? dtmfDigits,
  $core.double? stability,
  $core.Iterable<$20.SpeechWordInfo>? speechWordInfo,
  $16.Duration? speechEndOffset,
}) {
  final _result = create();
  if (messageType != null) {
    _result.messageType = messageType;
  }
  if (transcript != null) {
    _result.transcript = transcript;
  }
  if (isFinal != null) {
    _result.isFinal = isFinal;
  }
  if (confidence != null) {
    _result.confidence = confidence;
  }
  if (dtmfDigits != null) {
    _result.dtmfDigits = dtmfDigits;
  }
  if (stability != null) {
    _result.stability = stability;
  }
  if (speechWordInfo != null) {
    _result.speechWordInfo.addAll(speechWordInfo);
  }
  if (speechEndOffset != null) {
    _result.speechEndOffset = speechEndOffset;
  }
  return _result;
}