Inspiration
There is no big inspiration behind this. I was just looking for something fun and challenging to try out during the hackathon. Or maybe, this?
What it does
It's supposed to detect when someone says your name on a call and send you an SMS. Getting Python to hear output from your speaker via loopbacks turned out to be challenging. So I built an MVP that detects it from your microphone.
How we built it
I used Porcupine, a key word detection product. I got it to be trained on an English transcription of my name "Okey Zie." I used pyaudio to record audio. And whenever pyaudio records a clip of my name, Porcupine detects it and asks Twilio to send me an SMS.
Challenges we ran into
The microphone version was my first MVP. I tried making it to work with audio from my speaker, since that is what it should normally use, but libraries for doing audio loopbacks and getting audio from speakers to work are hard to find and they're not highly maintained. I built a version that was supposed to work in listener_speaker.py, but for some reason, porcupine was unable to detect my name there.
A few limitations to this are that it works only on my name. To make it detect your name, you'll create a ppn file from the porcupine dashboard for your name and upload it to /bin.
Accomplishments that we're proud of
I had a lot of fun doing this. This has been in my idea backlog and I'm proud that I was able to build a not-so-good-but-kinda-working version during this hackathon.
What we learned
- How to use Pyaudio.
- How streams work.
- A little bit of numpy while trying to get the speakers to work.
- A little bit of how audio devices on computers function and the different parameters like channels, frame rates, etc.
- I learned how to use Twilio.
- This is actually my first time building an actual thing with python, and I think that was cool.
- How to use environment variables in Python
What's next for Lazzzy
- Getting the speaker input to actually work
Log in or sign up for Devpost to join the conversation.