moved transcriber in worker process #27
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Is your Pull Request request related to another issue in this repository ?
mostly #5 but also a bit #18
Describe what the PR does
The react client render process, sends a request to the main process to get a transcription done.
The main process, sends the request to a hidden worker process window to offload the workload.
State whether the PR is ready for review or whether it needs extra work
Kind of ready, there's some more tweaks and fix that could be done, like creating a new window for every request, but that could be a subsequent optimization. For another PR.
Additional context
More details here How to run background worker processes in an Electron App
worker_threads
. Cannot find module 'worker threads' using electron v5 and node v12 electron/electron#16611 - seems like it might not be compatible Pocketsphinx STT Multithread in electron DPE #26 (comment)Side note. For now this seems to offload some of the computation eg when running Mozilla Deepspeech STT it doesn’t freeze the UI anymore(#5) but for scaling it to batch multiple transcripts together, I am wondering whether should just use the same window over and over, or whether should open a new window per task and what’s the max amount of windows you can open in electron etc... or whether you'd need some kind of queue system etc.. (?)