NaomiProject / Naomi

The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
https://projectnaomi.com/
MIT License
242 stars 47 forks source link

Added a very simple implementation of Vosk STT - Needs Work #369

Closed Akul2010 closed 1 year ago

Akul2010 commented 1 year ago

Description

I added a function called 'listen()' that can be called so that vosk will listen to you. Needs work, I just provided the base for @AaronC's discussion with me about it on discord.

Related Issue

280

Please do NOT leave this as is, I have little to no idea how the whole naomi system works, so my code may not work. I literally just copied off of the google-stt plugin and changed the code so it fit vosk.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

:white_check_mark: Akul2010
:x: CODEOWNERS.com Bot
:x: codeowners-com[bot]


CODEOWNERS.com Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Akul2010 commented 1 year ago

I've looked over the plugin docs and it doesn't seem like I need to add anything else for it to work. However, I'd like you to take a look at the code, and see for yourself if it is good.

aaronchantrill commented 1 year ago

@Akul2010 Sorry to leave this for so long, but I've got a few things going on and it might take a while. I want to collaborate with you on this, and use this pull request to add VOSK support.

The documentation on creating plugins appears to be incomplete at the moment, and the STT plugin guide is missing, so I need to update that. You can see a skeleton for a new STT plugin at https://github.com/NaomiProject/naomi_plugin_skeletons/blob/master/STTPlugin.py

The only method you must create for a STT plugin is transcribe(), which takes a pointer to a wav file and returns a transcription. The audio is already captured by the VAD system, so you don't have to worry about that, just process the wav file and return a transcription.

In the settings() method, we would return a setting allowing you to set the location of the vosk model, with a default value somewhere in the paths.sub() directory (usually ~/.config/naomi). If the model does not exist during the init method, then we would normally download the model to that location for the user. I can add all that.

We may also want to add VOSK as a standalone module to download through the NPE at first. Once it seems stable, I would like to add it to the main repository as the default active STT engine.

Akul2010 commented 1 year ago

Isn't the config path for user settings? Also, what is your progress in making the custom VOSK model?

aaronchantrill commented 1 year ago

Yes, you are correct that the config path is for user settings. Naomi runs in userspace, so we try to keep all our changes in the user's home directory, including downloaded models. The pocketsphinx model lives at ~/.config/naomi/pocketsphinx, for example.

Akul2010 commented 1 year ago

I've signed the CLA agreement multiple times now, but it keeps asking me to do it again.

aaronchantrill commented 1 year ago

@Akul2010 That's annoying. I'm not an expert on the CLA agreement setup. Usually when I have a problem with it, it is because I used a different email address in Git when I did the commits and have not added that specific email address to my github profile yet.

It also might want the Codeowners bot to sign the agreement. I'm not really sure what codeowners is.

I think @AustinCasteel set up the CLA agreement, so he might have some idea why it's not working

aaronchantrill commented 1 year ago

Ah, yes, it is definitely the two codeowners bots that are hanging up the CLA.

AustinCasteel commented 1 year ago

Yes, the codeowners bot is the issue here. It is not from our end, it appears that the bots adjusted the code on your fork (specifically .github/CODEOWNERS at first glance) therefore CLA wants everyone that contributed to the code to sign. If all else is good and only the CLA is holding the PR we can force it through, however, I would prefer not to commit an empty file that is not utilized which in turn would also alleviate the CLA issue as well.

Akul2010 commented 1 year ago

Did the pull bot push all the commits? Because there are no more commits in the history anymore.

AustinCasteel commented 1 year ago

It appears that the pull bot synced your forked branch with the current Naomi dev branch so there are no longer any changes that you made in your branch associated with PR.

Akul2010 commented 1 year ago

Oh, ok. I am closing this, then.