Piston AI banner

Piston AI

15 devlogs
119h 0m 45s

Piston AI (long form “Pi Assistant”) is an open-source voiced AI assistant with a dashboard! It’s basically inspired by Alexa, and HomePod just with a UI. Thanks to Workers AI!

This project uses AI

I used ChatGPT for debugging

Demo Repository

Loading README...

milo1004

Shipped this project!

In this new ship, I’ve updated many stuff!
Changelog:

  • Added a new font to Piston AI - Jetbrains Mono
  • Added data management that helps people with backing up, importing and erasing data safely
  • Built Piston AI in Wails instead of a webapp for more system privileges (there are currently no system accessing features yet)
  • Fixed some UI issues like element overlap
  • Changed the dull-colored and pure-text AI box into a conversation-like interface that has speech bubbles

I was really challenging as I actually had to solve many backend things like building Wails, and also requires patience when I had to update some of the functions to rendering better messages (renderResponse(output) in src.js)

milo1004

This time, I’ve updated the AI box to use speech bubbles instead of pure text, since there have been complaints about the ugliness of the old versions

Also, I’ve built the Linux version of Wails so ALMOST everyone (well Linux ARM64 haven’t been built yet) can use Piston AI locally!

You might wonder why there’s 36 hours, is because earlier, a glitch occurred, causing me to lose about 20 hours of work on this project. Luckily it’s a known issue (a staff told me), which the only way to solve is to reship the project

Attachment
0
milo1004

After many many hours of work, I’ve finally successfully turned Piston AI from a website to a real webapp!

The reason why it took so long, is because of Tauri. I tried many ways to just embed the image files, changing the src.js to src.ts, and many other things.

But, I’ve decided to scrap the Tauri plan, and use Wails instead (uses Go instead of Rust). And in just 2-3 hours, I’ve finally embedded all the image files and modules to Piston AI with a working fetching system between the backend and the frontend!

What I will be working on in Piston AI, is creating a introduction page for Piston AI, for downloading the Piston AI binaries and also moving the original Piston AI website to a sub-page which will no longer be maintained since I’m moving on to the local version.

And compiling for Linux

Now it’s prepared to be shipped as a binary!!

Attachment
0
milo1004

In this ~4.5 hours of developing, I’ve added

  • a new font to Piston AI, which is Jetbrains Mono!
  • data management, e.g.: Export, Import data and Erase data. Can be found in the settings tab
  • Fixed weather fetching mechanism on backend by adding CORS headers and using Workers as the proxy server
  • Added credits to sources like wallpapers and fonts to README.md

Below are the official GitHub commits:

Attachment
Attachment
0
milo1004

Shipped this project!

Hours: 23.9
Cookies: 🍪 373
Multiplier: 15.61 cookies/hr

In this new update of shipping, I’ve added many stuff that made Piston AI better and more stable!

  • I’ve added a todo feature that lets you see the pending tasks, like homework, walk the dog, go to the supermarket, etc. You can also add a deadline to the tasks, so you actually know when you’re gonna do it (It automatically deletes the tasks after the deadline). The AI can read the tasks added to the todo list, so you can ask it for guidance, if… it’s homework or studying lol
  • Added themes, which lets you actually customize the UI, instead of just a dull background. AND, blurring to adapt with the background
  • Enhanced animations
  • Added the backend source code to GitHub
milo1004

In this new update, I’ve completed the todoList, which I was working on before. You can now add any tasks pending! You can also create a task with a deadline, so you’d actually know you’ll have to finish that task by a date! It also will delete itself after the deadline has passed.

The most important part, is that all the tasks can be viewed by the AI, so you can literally ask it for guidance if… the task is homework lol

0
milo1004

I’ve finally added the backend files to GitHub! It actually took a lot of time (about like 1.5 hours) since configuring Wrangler is PAINFUL!

And for the rest of the 1.5 hours, I’ve added a TODO list to the website. Also, no logic yet, and UI only (also painful for me to configure the position of the box). I also removed the alarm feature, since web-based alarms are… not convenient. You won’t see the box yet, since I’ve hidden it, but you can figure out the code and make it visible yourself!

The image below is the version of a visible TODO Box, which is just a preview (do this by pressing F12 to the dev console, make it in a separate window, type in
todoBox.style.visibility = “visible”
and hit enter. After that you will be able to see the box! (Bare minimal UI lol)

Attachment
0
milo1004

In this 3 hours of work, I’ve enhanced animations. But, most importantly. I’ve added the memory management back to Piston AI!! Now, just ask Piston like “Remember that my locker key is in my wallet”, and it will add the memory to your localStorage!!

Attachment
0
milo1004

I’ve worked on a theming function in Piston AI! Now, you can set wallpapers freely, instead of a dull black backdrop.

Attachment
0
milo1004

Shipped this project!

Hours: 39.24
Cookies: 🍪 404
Multiplier: 10.3 cookies/hr

In this new update, I’ve added motivative stuff, like daily quotes, better styling, like adding some linear gradient themes on widgets (inspired by iOS lol), and most importantly, I’ve placed the JavaScript scripts from the HTML file to another file “src.js” for easier debugging.

milo1004

In this new update, I’ve made the hardcoded “Welcome back, (username)” to better greeting words like “Hey”, “Evening” and others, depending on the time!

I’ve also moved the JS code from index.html to an independent file “src.js”!

Btw the 23hrs of work, some of them is because I forgot to add them to this project when coding in Vim. It’s not a scam.

Attachment
0
milo1004

In this new update, I’ve added a quoting system (quote of the day), so every time the page refreshes, you get a valuable quote!

Attachment
0
milo1004

In this new update, I’ve been working on a new feature, the alarms function. Just like the older Python builds!! But, it’s still in-dev, so there’s only UI elements, not the logic and stuff. (Haven’t linked them yet)

Ofc, since this is a BETA build, I haven’t deployed the files to CloudFlare as a website yet, so stay tuned! Check the beta version out by downloading the source code from GitHub, and I’d recommend you to run it locally with Live Server (VSCode)

Attachment
0
milo1004

Shipped this project!

Hours: 10.84
Cookies: 🍪 135
Multiplier: 12.46 cookies/hr

I’ve remade, literally every single thing! Everything is now shifted from Python to HTML, JS and CSS, with CloudFlare’s Workers AI as both STT and the main AI assistant! This is not the most stable version yet. I haven’t implemented all the commands, but telling the weather, time, and date, as well as clearing the chat works for now.

But, if you find the AI container annoying, click on it, and it will minimize itself!

milo1004

Super Huge Update!!!!!
I’ve remade, basically every single thing. Everything is now shifted from Python to HTML, JS and CSS, with CloudFlare’s Workers AI as both STT and the main AI assistant! This is not the most stable version yet. I haven’t implemented all the commands, but telling the weather, time, and date, as well as clearing the chat works for now.
Btw, a container would pop up after you ask the AI. Click the container to minimize it.

Attachment
Attachment
0
milo1004

In this update, I’ve added support for macOS, and also persistent memory. It is different from history, which you can tell the AI to save data persistently.

Attachment
0
milo1004

I’ve replaced the plain STT engine with MicroWakeWord as the WakeWord engine. It’s more accurate, and prevents mis-detecting.
To train the model, you will first have to do “python setup.py”, and then it will guide you through training the model. You can either record “Hey Piston” as the wakeword, or choose your own wakeword. Just record your desired wakeword as it prompts you to.
Btw, don’t start saying the wakeword until “🔴 Recording… press ENTER to stop” pops up
And also, I’ve coded the script to abort the recognition when no one is talking. But if you said something, it would minus one in validCount, so the chat can go on.

Attachment
0
milo1004

In the previous 4.5 hours, I’ve rewritten the these things:

  • main.py -> To be less buggy
  • executeMessage in utils.py -> To make the execute smoother
  • AlarmGoOff.py -> Just to rewrite, and now it works

And yeah, I’ve also fixed the alarm.set.py, and tested to be successful. For AlarmGoOff.py, I’ve made it able to say the purpose (“label”) of alarm, and play a ringtone. Ringtone credit: pixabay.com

here’s an example format of an alarm in data/alarm/alarms.json. Feel free to edit anytime!

Attachment
0
milo1004

In the previous 7.5 hours of coding, I’ve added an alarm daemon, a weather app, and Piston’s main speech-to-text engine “VOSK” has been replaced by OpenAI’s FasterWhisper.
You can simply tell the AI to list, add and clear alarms in a natural way, e.g. “Wake me up at 8 in the morning.”

You can also ask the AI to tell you the weather like windspeed, temperature, and wind direction in your region.

For the STT model, it is now more accurate, and the recognition doesn’t suddenly stop when you’re still talking, by using the RMS technology to detect silence from the mic.

Attachment
2

Comments

nok
nok 3 months ago

Cooool!
Maybe add a dashboard showing those info?

milo1004
milo1004 3 months ago

I will try later, but first I need to finish the backend. I literally just messed up on the code execution part lol (subprocess.run())