top of page
Writer's pictureJian Soo

SpeechRecogniser: Classes n' Stuff

Updated: Feb 27, 2019



I thought I was done with the Snowboy part of the program, but boy was I wrong.

Here's the code for the recogniser.py I made:


And here's what Athena.py looks like now:


I added a detector.terminate() before calling the interpreter.py's Recogniser() module, stopping the two audio streams from recording from the same device. All was fine and dandy, before I realised one thing - it refused to work once detector.terminate() triggered once. Which is a huge no-no.

I searched on the github, and found a man with a similar problem. Someone had suggested to shuffle around some lines of code in the snowboydecoder.py, and I thought 'why not?' - so I tried it.

It worked! The code is now at the point where I can give it a hotword and say something to it, and it will reply with what I said.

Example output:


I learned how to use methods and classes, but the details are still a little hazy,

I learned that 2 audio streams recording at the same time is a no-no.

Next up is getting the program to understand my input, and maybe some dabbling in the last step of the flowchart: performing actions.


2 views0 comments

Recent Posts

See All

A massive update.

It's been a bit over a year since I've posted on this blog... GCSE revision, schoolwork and a massive project was on my mind, and I just...

bottom of page