Last active
August 27, 2018 11:46
-
-
Save dev-aritra/26f32de791d86b467b4203e3e0a92209 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void StopRecordingAndRecognition(AVAudioSession aVAudioSession = null) | |
{ | |
if (_audioEngine.Running) | |
{ | |
_audioEngine.Stop(); | |
_audioEngine.InputNode.RemoveTapOnBus(0); | |
_recognitionTask?.Cancel(); | |
_recognitionRequest.EndAudio(); | |
_recognitionRequest = null; | |
_recognitionTask = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment