decky-plugin-database icon indicating copy to clipboard operation
decky-plugin-database copied to clipboard

update decky-dictation to 1.1.0

Open cboiangiu opened this issue 11 months ago • 18 comments

Decky Dictation

Allows speech to text input using Vosk and Nerd Dictation

  • update dependencies
  • change hotkeys
  • add enable toggle
  • various fixes

Checklist:

Developer Checklist

  • [x] I am the original author or an authorized maintainer of this plugin.
  • [x] I have abided by the licenses of the libraries I am utilizing, including attaching license notices where appropriate.

Plugin Checklist

  • [x] I have verified that my plugin works properly on the Stable and Beta update channels of SteamOS.
  • [x] I have verified my plugin is unique or alternatively provides more/alternative functionality to a similar plugin already on the store.

Plugin Backend Checklist

  • No: I am using a custom backend other than Python.
  • No: I am using a tool or software from a 3rd party FOSS project that does not have it's dependencies statically linked.
  • No: I am using a custom binary that has all of it's dependencies statically linked.

Testing

  • [ ] Tested on SteamOS Preview Update Channel.

cboiangiu avatar Mar 15 '24 02:03 cboiangiu

The installation hangs (greyed out installing button on the modal) on the testing store. Tested on stable 3.5.17 and decky v2.11.1.

The plugin seems to download correctly with the remote binary in its place, although it doesn't show up in decky. After a system restart, the plugin seems to show up in decky. However, when testing, I come to find out that my zip extraction of the remote binary (which should happen for the first plugin run) failed due to permission errors 😔

Traceback (most recent call last):
  File "/home/deck/homebrew/plugins/decky-dictation/main.py", line 59, in _main
    zip_ref.extractall(f"{plugin_path}/bin")
  File "zipfile.py", line 1645, in extractall
  File "zipfile.py", line 1695, in _extract_member
PermissionError: [Errno 13] Permission denied: '/home/deck/homebrew/plugins/decky-dictation/bin/vosk-model-small-en-us-0.15'

Strangely enough, when I tried to reinstall the plugin from decky settings -> plugins, it also seemed to hang. But after closing the modal manually, checking to see if decky picked it up and testing out the plugin, it seems to have worked. Come to find out the permissions allowed writing drwxrwxrwx 5 deck deck 4096 Mar 16 01:14 bin after the install.

I guess the plugin has the necessary permissions to make changes before a certain point (restart?). My first attempt likely failed because the plugin hadn't yet shown up and been loaded in by decky. The second time was successful because the plugin was previously/already loaded and able to initialize itself properly due to the post install permissions, even though the installation hung up in the modal.

cboiangiu avatar Mar 15 '24 23:03 cboiangiu

The installation hangs (greyed out installing button on the modal) on the testing store. Tested on stable 3.5.17 and decky v2.11.1.

The plugin seems to download correctly with the remote binary in its place, although it doesn't show up in decky. After a system restart, the plugin seems to show up in decky. However, when testing, I come to find out that my zip extraction of the remote binary (which should happen for the first plugin run) failed due to permission errors 😔

Traceback (most recent call last):
  File "/home/deck/homebrew/plugins/decky-dictation/main.py", line 59, in _main
    zip_ref.extractall(f"{plugin_path}/bin")
  File "zipfile.py", line 1645, in extractall
  File "zipfile.py", line 1695, in _extract_member
PermissionError: [Errno 13] Permission denied: '/home/deck/homebrew/plugins/decky-dictation/bin/vosk-model-small-en-us-0.15'

Strangely enough, when I tried to reinstall the plugin from decky settings -> plugins, it also seemed to hang. But after closing the modal manually, checking to see if decky picked it up and testing out the plugin, it seems to have worked. Come to find out the permissions allowed writing drwxrwxrwx 5 deck deck 4096 Mar 16 01:14 bin after the install.

I guess the plugin has the necessary permissions to make changes before a certain point (restart?). My first attempt likely failed because the plugin hadn't yet shown up and been loaded in by decky. The second time was successful because the plugin was previously/already loaded and able to initialize itself properly due to the post install permissions, even though the installation hung up in the modal.

If you are able to get a consistent behavior and file an issue on the Loader github page I will try to coordinate triage on this.

TrainDoctor avatar Mar 17 '24 18:03 TrainDoctor

@TrainDoctor Not sure if a new issue would count as a duplicate for this currently open one. I also had other people reporting the same issue described above in regard to this update to decky-dictation while downloading from the testing store.

cboiangiu avatar Mar 25 '24 16:03 cboiangiu

@TrainDoctor Upon further reading it seems like the already open issue seems to have a problem in regard to the downloading of the remote binary. For me the actual problem seems to happen somewhere after that since the zip file seems to be present. Also I see that a PR modified the way this whole remote binary thing works anyway. I will look into the decky-loader logs to gain more info and will move forward with opening a new issue.

cboiangiu avatar Mar 25 '24 17:03 cboiangiu

@TrainDoctor The issue has been opened here.

cboiangiu avatar Mar 27 '24 12:03 cboiangiu

@TrainDoctor Could you please help with a triage for this issue?

cboiangiu avatar Apr 02 '24 13:04 cboiangiu

@PartyWumpus Any help with a triage for this or some next steps in moving forward with this update?

cboiangiu avatar Apr 10 '24 20:04 cboiangiu

@PartyWumpus Any help with a triage for this or some next steps in moving forward with this update?

i've taken a look at the code and posted some thoughts in the issue, i'll investigate properly when i have time. sorry this is taking so long, but you know how it is in a volunteer project.

PartyWumpus avatar Apr 11 '24 14:04 PartyWumpus

Trying without remote binary.

cboiangiu avatar Jun 11 '24 19:06 cboiangiu

The upload appears to have worked :) Sorry I still haven't got around to fixing that issue.

PartyWumpus avatar Jun 11 '24 19:06 PartyWumpus

Amazing 🎉 Have also updated some deps. Hope it still passes. Gonna go dust off my SD and check it out :)

cboiangiu avatar Jun 11 '24 20:06 cboiangiu

@PartyWumpus Just tested. Seems to install just fine. Made some fixes to the model asset path and will test again. It should all work now.

cboiangiu avatar Jun 11 '24 21:06 cboiangiu

pushed to testing again :+1:

PartyWumpus avatar Jun 11 '24 21:06 PartyWumpus

All seems to work as intended from the get-go.

cboiangiu avatar Jun 11 '24 21:06 cboiangiu

good to hear :)

PartyWumpus avatar Jun 11 '24 22:06 PartyWumpus

@PartyWumpus This should be ready for review. Changes are small. Mostly migration to the latest template version.

cboiangiu avatar Jun 15 '24 08:06 cboiangiu

Found a bug while trying this out that triggers a double dictation:

  1. Inside a game (FF14 in my case) enable the plugin from the toggle
  2. Inside a text box press L5
  3. A second after the notification appears informing the dictation has started press L5
  4. Say "one"
  5. See "11" or similar double-dictation printed out.

Probably not a deal breaker for an early version as it does work with this in mind but reporting so you know.

grimkor avatar Jul 02 '24 12:07 grimkor

@cboiangiu in light of recent changes to SteamOS UI etc (please accept my apologies for the wait!) it's probably best that this submission get a looking at and see if it needs an update. @SteamDeckHomebrew/decky-testers please give this a shot with the expectation that it may not work.

TrainDoctor avatar Jul 31 '24 22:07 TrainDoctor

@cboiangiu PRs with no action on them were given a deadline of until August 31st for developers to respond and indicate whether they could continue work on the plugin/PR. I am delisting the plugin from testing store and production store until this PR is updated or a new PR is submitted etc. A new PR can be submitted at any time at your convenience and the plugin is not blacklisted. It just cannot be guaranteed to be working by the Loader team right now so it cannot be made available as if it is.

TrainDoctor avatar Sep 03 '24 21:09 TrainDoctor

@TrainDoctor what more would I need to do to launch this? From what I understand, the plugin needs to be looked at by the testers. I have been using the plugin without issues. Also the last update was successfully released on testing and the installation works fine.

cboiangiu avatar Sep 04 '24 06:09 cboiangiu

@TrainDoctor @PartyWumpus I would personally get this current version past testing (I have also tested on beta and prerelease) and into production. Small fixes and enhancements will be handled in a future 1.1.1 or 1.2.0. Been one year and a half and this plugin has seen no presence in prod.

cboiangiu avatar Sep 05 '24 09:09 cboiangiu

@TrainDoctor @PartyWumpus I would personally get this current version past testing (I have also tested on beta and prerelease) and into production. Small fixes and enhancements will be handled in a future 1.1.1 or 1.2.0. Been one year and a half and this plugin has seen no presence in prod.

@TrainDoctor @PartyWumpus Anything in regards to this?

cboiangiu avatar Sep 18 '24 07:09 cboiangiu