pietrop / digital-paper-edit-electron

Work in progress - digital paper edit project - Electron, Cross Platform Desktop app - Mac, Windows, Linux
https://pietropassarelli.net/autoedit
Other
103 stars 17 forks source link

Mozilla DeepSpeech - Program appears to hang on long transcript #59

Open almcnicoll opened 3 years ago

almcnicoll commented 3 years ago

Describe the bug Working on a long transcript (> 40 mins) and Mozilla DeepSpeech, AutoEdit initially appears to be hard at work, but then continues to show "in progress" while apparently idle.

To Reproduce Steps to reproduce the behavior:

  1. Load audio file of e.g. 45 mins into new project
  2. Choose Mozilla DeepSpeech as default engine
  3. Set project running

Expected behavior Initial high CPU load indicated program was hard at work. After approx 1 hour, CPU usage drops to 0 but AutoEdit still indicates that project is "in progress" with spinning icon.

Screenshots https://imgur.com/RsQzy2S https://imgur.com/g9W9p3O

Desktop (please complete the following information): Windows 10 AutoEdit 3 1.3.1

It might be that it's still working on a low-CPU task, but if there was a way to interrogate it that'd be great. I can't see any log files with more than a line or two in the %appdata% folder, nor can I see anything looking like a partial transcript.

pietrop commented 3 years ago

Hi @almcnicoll

Where you able to transcribe something shorter with Deepspeech on autoEdit on Windows?

tbh I am not sure if that Deepspeech integration works on Windows

almcnicoll commented 3 years ago

I'll try now. Good to know there might be issues with the DeepSpeech engine on Windows. Do you know which back-end does work with Windows? I saw another ticket (though haven't read it) saying that PocketSphinx didn't.

pietrop commented 3 years ago

Yeah, PocketSphinx, in current implementation, also doesn't work on Windows. AssemblyAI should work well.

almcnicoll commented 3 years ago

Cheapskate me was looking for a free option! Good news is - for a short transcript, DeepSpeech certainly does work. I just did a successful run on a 2-min mp3. Is there any logging I can enable to see where the longer project gets to?

pietrop commented 3 years ago

ahah, fair enough 😄

Yeah, so for DeepSpeech, I suspect something is happening where electron is running out of memory while running the deepspech node module. I am not quite sure why. I had tried moving the STT for DeepSpeech into a hidden browser window, as that seemed to be a pattern, to offload task that might block the UI. But that didn't change much, other not freezing the UI when it gets stuck.

Suggestions and ideas for improvements welcome 💡

for logging, there is no proper way of doing it yet, you'd have to clone the repo start it in dev mode (see instructions in README) and add some console.log in the code yourself. One probl is that, you'd have to un-hide the render window that is doing the STT process for deepspeech to be able to see that console as well, if that makes sense. Or maybe there's a better way to do the logs in electron apps.. 🤷‍♂️

Hope this helps

almcnicoll commented 3 years ago

OK, thanks. That sounds like a job to try in a week off! For info, AssemblyAI also hung when I plugged in the same audio file. I'm going to try splitting it down to smaller chunks, which hopefully will give better results. Given there's no clear diagnosis or obvious path to a fix, feel free to close this issue!

pietrop commented 3 years ago

@almcnicoll could you try the latest release? https://github.com/pietrop/digital-paper-edit-electron/releases

I did some changes that should have fix this 🤞

fabswt commented 2 years ago

New to Auto Edit 3. Running into the same issue... Got an 6 GB file (29min59sec), started a job over 3 hours again, Auto Edit is not using any CPU according to Activity Monitor. The loading icon is still running; no error message.

Status on what/how the program is doing would be welcome to know if it crashed.

(Running version Version 1.6.5-alpha.0 (1.6.5-alpha.0) on macOS 11.5.1.)

pietrop commented 2 years ago

For Mozilla DeepSpeech, there's something about how that modules works, and the integration with electron that makes it hang in autoEdit. Not quiet sure why. however Mozilla DeepSpeech is being taken over and re-worked by Coqui STT so I am mostly just waiting for them to have a stable enough node module to replace it with.

Having said that @fabswt was this only with DeepSpeech or also with AssemblyAi? and only on long files or also in shorter once?