Skip to content

Commit

Permalink
fixed interrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
matt200-ok committed Dec 27, 2024
1 parent fac1739 commit 846fb3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ class AudioPlayerStream {
func stopStreamPCM() {
isStopped = true
pcmBuffers.removeAll()
playerNode.stop()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ You can download directly to your device or airdrop from a Mac.
let keywordIndex = try self.porcupine!.process(pcm: frame)
if keywordIndex == 0 {
DispatchQueue.main.async { [self] in
self.interrupt()
statusText = "Listening..."
chatText.append(Message(speaker: "You:", msg: ""))
chatState = .STT
Expand Down

0 comments on commit 846fb3c

Please sign in to comment.