SpeechListenOptions constructor

SpeechListenOptions({
  1. dynamic cancelOnError = false,
  2. dynamic partialResults = true,
  3. dynamic onDevice = false,
  4. ListenMode listenMode = ListenMode.confirmation,
  5. dynamic sampleRate = 0,
  6. dynamic autoPunctuation = false,
  7. dynamic enableHapticFeedback = false,
})

Implementation

SpeechListenOptions(
    {
    /// If true the listen session will automatically be canceled on a permanent error.
    this.cancelOnError = false,

    /// If true the listen session will report partial results as they
    /// are recognized. When false only the final results will be reported.
    this.partialResults = true,

    /// If true the listen session will only use on device recognition. If
    /// it cannot do this the listen attempt will fail. This is usually only
    /// needed for sensitive content where privacy or security is a concern.
    /// If false the listen session will use both on device and network
    /// recognition.
    this.onDevice = false,

    /// The listen mode to use, currently only supported on iOS.
    this.listenMode = ListenMode.confirmation,

    /// The sample rate to use, currently only needed on iOS for some use
    /// cases. Occasionally some devices crash with `sampleRate != device's
    /// supported sampleRate`, try 44100 if seeing crashes.
    this.sampleRate = 0,

    /// If true the listen session will automatically add punctuation to
    /// the recognized text. This is only supported on iOS.
    this.autoPunctuation = false,

    /// If true haptic feedback will be enabled during the listen session.
    /// Usually haptics are suppressed during speech recognition to avoid
    /// interference with the microphone. Currently only supported on iOS.
    this.enableHapticFeedback = false});