, ,

K.A.R.E.N. A bot by lots of other names.

Introduction:

I should mention that while it looks like an acronym, K.A.R.E.N. stands for nothing at the moment, aside from the ultimately relatable character we all love to hate, always asking for the manager and screaming at customer service in her yoga pants, before going back to her mini van to pick the kids up from soccer practice. The stereotype Karen. There are lots of good Karens, so no, this isn’t a hate on everyone with that name, just the worst of the bunch. And this bot lives up to that name. But that will be described in more detail below!

The bot is scripted in Python. Because Python. There are many scripting languages to choose from, but this one is a good middle ground that can handle lots of other types of code too if need be. So Python. Immediately I remembered making some bots with yaml and aiml coding (stuff I’ve never got the hang of, just able to reuse existing code if I see it), but it didn’t cut the cake. Those were chatbots. K.A.R.E.N. needs to be something special. Instead of coding every single thing that happens in the bot I want it to be able to do some things by itself, by thinking somewhat by itself. Queue me learning lots of new things I’ve never been able to accomplish so far, and having to try to learn new things that, as far as I know now, could be outside my ability ever to achieve. All to have a bot named K.A.R.E.N. that hopefully starts to make a better stereotype with that name than the current one.

The rest of this post, past this introductory ramblings, will detail the process I’ve gone through, where I’m going, and what the bot is able to accomplish up to the last date updated. If you guys have any ideas on things to add please email me or something to let me know!

________________________________________

Part One

So this started a couple years ago technically when I wanted a bot to take “captain’s logs” like in Star Trek. Speak to the microphone, it would translate to a text file. I know programs like this exist already, but I figured it could be a fun coding exercise. Plus, if I make it myself, I can fix it if it doesn’t work instead of wait for updates or ever having to search for a new program. If it saves as a text file in my computer then it’s not stored on the cloud somewhere, where I may lose access due to lack of internet or forgetting my password, and it keeps it just a tiny bit more secure by being stored locally on my device. This early version of the program wasn’t so much speech recognition system, and more of a chat interface where I typed what I wanted to be saved, and it saved it. Eventually due to my lack of understanding when it came to the coding of the project I decided to put it to the side, and in the end I think that hard drive failed… or I failed to save the script accidentally during a system re-installation. Either way “karen” v.0001 was gone.

All of a sudden now look! Everyone is stuck home with nothing to do because of the global stuffs (stay safe everyone). Cue me starting up the project again! This time though I got speech recognition working! I used the basic speech_recognition module and everything wound up running hassle-free first try for once. The thing that was the most difficult thing for me to figure out how to setup a year ago was now the easiest and K.A.R.E.N. could take flight.

The script so far has evolved to include a discord module and a chatbot that uses tensorflow and some other modules for neural networks and some machine learning. I found the tutorials over at http://pythonprogramming.net and then all of the discord.py docs. Technically it’s now three separate scripts that need to run at the same time in order to get the full effect, but I’m working on being able to multiprocess. The speech_recognition side of the bot has a cool little library of custom modules I was able to implement that auto updates in the main script by searching for filenames in that folder with a .py extension and then removing the extension from the list.

Where am I at now? Just… everything else. My goal is to be able to have K.A.R.E.N. use the whole computer for me just by hearing a command and then doing it. We will see how far it goes.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply