ILikeAI / AlwaysReddy

AlwaysReddy is a LLM voice assistant that is always just a hotkey away.
MIT License
621 stars 61 forks source link

Enhance Linux Support and TTS Functionality #16

Closed atomwalk12 closed 5 months ago

atomwalk12 commented 5 months ago

Overview: This pull request introduces fixes to improve support for Linux. It focuses on updating the text-to-speech (TTS) functionality and improving system stability and setup on Linux environments.

Changes Made:

Additional Information: These changes were implemented to address specific issues encountered during development on my Linux machine. Windows uses may encounter some issues as a result of the integration of these Linux fixes, however decided to release them regardless, in order to streamline the Windows/Linux integration process.

ILikeAI commented 5 months ago

Thanks so much for submitting this! I can see you have out a lot of work into this! I'm very keen to get this working smoothly for all the Linux users so I'll dig into this asap 😁

atomwalk12 commented 5 months ago

Thanks for posting. Sure, if there is anything in particular you'd like to know about why I made these changes, let me know and I'll be happy to explain!

ArjenR commented 5 months ago

Hi, locally I have been working a bit on the same. I was wondering why you have piper in your source tree and are not using piper as installed by pip?

ILikeAI commented 5 months ago

On windows I was having all sorts of troubles with piper via pip, works fine for me on Linux though. Today I set up a system that should identify what OS you are on and it downloads the appropriate binaries, from my testing it works on both Linux and windows great. I hope to integrate it tomorrow

ILikeAI commented 5 months ago

If all goes smoothly I should have Linux support this time tomorrow

ArjenR commented 5 months ago

I also looked into importing piper and directly use it. Not really straight forward. It does not really properly expose methods/objects. I got quite far but then hit at issues with the underlying onnxruntime getting a 'sid' object and not knowing what to do with it.

ILikeAI commented 5 months ago

Sounds like you got further than I did. I am hoping the system i set up yesterday will simplify things. Ill be borrowing a mac over the next few days, ill test the system and if it works i may publish the piper functionality as a standalone repo so others dont have to go through the headache I had to haha

atomwalk12 commented 5 months ago

Hi, locally I have been working a bit on the same. I was wondering why you have piper in your source tree and are not using piper as installed by pip?

Sorry for the late reply. The Piper folder in the source tree is the executable binary which is used to convert text to speech audio files. There are two folders because 'piper' is the original version in the repository specifically designed for Windows. 'piper2' is the executable for Linux.

Regardless, @ILikeAI seems to be working on a version that gets rid of the necessity of having both executables in the sources tree. I wanted to set up something quick to get it working on Linux.

ILikeAI commented 5 months ago

Could be worth deleting your entire Always Reddy directory and starting a fresh, that should remove the unneeded piper binaries

ILikeAI commented 5 months ago

Thanks for the commit, i believe I have these changes integrated now, let me know if you see anything thats missing!