Skip to content

Instantly share code, notes, and snippets.

@gaelfoppolo
Created September 25, 2016 22:45
Show Gist options
  • Save gaelfoppolo/c4188dfbb424235b46c699ba508f6438 to your computer and use it in GitHub Desktop.
Save gaelfoppolo/c4188dfbb424235b46c699ba508f6438 to your computer and use it in GitHub Desktop.
@IBAction func recordButtonTapped() {
if audioEngine.isRunning {
audioEngine.stop()
recognitionRequest?.endAudio()
recordButton.isEnabled = false
} else {
try! startRecording()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment