ORACLE: My 'AI' Assistant (est. Early 2025)

[UNDER CONSTRUCTION]

Things to Add

ADD A VIDEO OVERVIEW OF THE AI

ORACLE may have been my longest project, involving many hours of searching for inspiration, registering for APIs and powering through syntax errors. It started off pretty simple though.

I found an article on freeCodeCamp that walked me through the basics of APIs and requests and JSON. It walked me through coding ORACLE’s more basic functions, such as, weather reports, jokes, advice, Wikipedia summaries and browsing the internet (These were all pretty easy, since the API documentation was right on their websites).

So far, my ORACLE was nothing but a mimic. Dissatisfied, I took things to the next level.

My Cute Extensions to ORACLE

Before I went on to my more difficult extensions, I wanted to do something about as easy as what the website taught me. And I thought an AI that can find sound effects could be funny. So I set up an API to Freesound, and now it can search for a sound effect the user’s keyword

I also explored options for a more human sounding voice for the AI, from downloading more espeak files to scouring the internet for voices. This took a while, for most of the tools I found had limited free uses for the API. ElevenLabs worked out for me, so I set up authentication. This was harder than my other APIs, since I had to - in a sense - rewrite my code (from printing messages to speaking them). But in the end, it was worth it hearing a melodious voice come from my machine

My Less Cute Extension: Book Reading

This is easily the biggest part of ORACLE; it took the most time, it has the most lines of code, and I define 4 or 5 functions within this function. It was new ground for me, since this wasn’t an API, but a passion project built completely from scratch.

I looked for databases with public domain books, because I knew trying to access newer books would take more authentication. So I came across StandardEbooks, which had the crucial “one-page” feature. Because of this, I could see the entire ebook printed out on one page.

Having found this source, I needed some way to have my machine read the text on the page. So I copied the URLs to every single book in the database and put them in a file near my project. Now ORACLE could search for the right URL in that file based on the user’s wants. But when I ran the code for the first time, an ugly mess of text came up in my terminal, and another problem came my way: HTML.

I had to find a way to get rid of every instance of “h1”, “z3998”, “section id=”, “epub:type” and even HTML with no specific text. So I forced myself to learn regular expressions.

I used websites on the internet to learn all of the special characters, and my dad walked me through a little bit of it. And after a couple weeks I finally programmed a way to clean up the text, and it looked like it came straight off the website page.

I kept some of the HTML so I could split the text by paragraphs and chapters, and then got rid of it. But that introduced the question: how should ORACLE read the text?

I decided to have the AI just read it line by line, clearing the screen after every sentence is uttered by its voice. But there are still some bugs:

I just recently picked up the project again, trying to fix these bugs. But despite of its problems, every time I open the hundreds of lines of code I am proud of my work. Despite having to read the preface first, I can now have a voice - that I programmed - read Dostoevsky to me. This was my biggest project, in code, effort, pride and challenge.


OVERALL ORACLE BUGS