DictationManager.fromCustomSpeechURL constructor

DictationManager.fromCustomSpeechURL(
  1. String customSpeechURL, {
  2. dynamic onConnected()?,
  3. dynamic onError(
    1. DictationError
    )?,
  4. dynamic onDisconnected()?,
  5. dynamic onFinalResult(
    1. String transcription
    )?,
  6. dynamic onPartialResult(
    1. String hypothesis
    )?,
  7. dynamic onCommandResult(
    1. ActionRecipe actionRecipe
    )?,
  8. bool enableLogs = false,
})

Implementation

DictationManager.fromCustomSpeechURL(String customSpeechURL,
    {this.onConnected,
    this.onError,
    this.onDisconnected,
    this.onFinalResult,
    this.onPartialResult,
    this.onCommandResult,
    bool enableLogs = false}) {
  _logger = enableLogs ? AugnitoPrintLogger() : null;
  _augnitoAudioStream = AugnitoAudioStream(enableLogs: enableLogs);
  _augnitoWebClient = AugnitoWebClient(customSpeechURL,
      onMessage: _socketHandleMessage,
      onDisconnected: _onSocketDisconnected,
      onError: _onSocketError,
      enableLogs: enableLogs);
}