-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with plugin code? #44
Comments
What does freezes mean? Do you get any error messages? Why do you launch SOPARE via a subprocess and not directly as you can do all the startup stuff within the plugin? Beside all the questions: executing a process in a plugin should be avoided. Instead, start a thread and launch the process decoupled from the plugin. |
No error messages, just doesn't produce any output after launching. By process in the plugin you mean executing a shell command? It used to work quite good before, when there were less if-conditions. What is a better way? |
I recommend to start and use SOPARE directly to see output like warnings and error messages until you got a working system. A SOPARE plugin is part of the analysis thread. Each plugin gets initialized shortly after SOPARE starts. And it's called when something gets recognized. As it's part of SOPARE each and every slowdown/hickup/wait-time pulls down the SOPARE main thread. And invoking an external thread is time consuming and can pile up and therefore should be handled by a separate thread or invoked via a queue or whatever you can imagine to decouple it. Some interesting background information is served here: https://www.bishoph.org/sopare-architecture-and-plugins/ |
The plugin gets initialized and referenced when SOPARE starts once. On top of this the "run" function in the referenced plugin is called whenever there is a match. Maybe you find this plugin example helpful: This means you can declare what you want once and check for matches/follow up stuff in the "run" function. And I see that there is room for optimization and a more detailed explanation...thx for pointing out. |
I wrote a following plugin for rapiro voice control. Unforunately it doesn't seem to work.
I launch it with the following script
Sopare freezes right after start. If I use ./sopare.py -v -t test for training very often the following error starts appearing "[Errno -9988] Stream closed"
Does somebody else having similiar issues?
Before when i was using fewer commands(3-4) and no environmental variables everything was working fine.
The text was updated successfully, but these errors were encountered: