stop method

Future<void> stop()

Closes audio stream and stops Picovoice processing

Implementation

Future<void> stop() async {
  if (_voiceProcessor?.isRecording ?? false) {
    await _voiceProcessor!.stop();
  }
  _removeVoiceProcessorListener?.call();
  _removeErrorListener?.call();

  _picovoice?.delete();
  _picovoice = null;
}