whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

[Feature request] Prevent web page from being unresponsive during transcription

Open erkkimon opened this issue 1 year ago • 3 comments

Would it be possible to prevent web page (whisper.wasm) from being unresponsive during transcription or is it required outcome by the design of web browsers?

PS. Thank you for creating this, this is a great tool for transcribing on mobile devices which is exactly what I have needed for months!

erkkimon avatar Oct 25 '22 15:10 erkkimon

Hey - very cool that you gave it a try and thanks for the feedback!

It is relatively easy to make it run asynchronously without blocking the page. I just wanted to have a quick proof-of-concept and didn't put the effort to offload the computation from the render thread. There are a few other things with higher priority that I want to add to the project and after this I will update the whisper.wasm example to not block the page.

P.S. Curious - what device and browser did you try and how long did it take to process?

ggerganov avatar Oct 25 '22 15:10 ggerganov

Great to hear that it's possible! I was thinking it might be, I'm just not too familiar with emscripten and don't know if it causes some limitations. I think that it was great that you pushed the POC out before polishing that, since it is of course more a nice-to-have than must-have.

About transcribing with phone, I was using Android (One Plus Nord 2). I guess it took between 20–30 secs to transcribe the default sample audio file using tiny model.

erkkimon avatar Oct 25 '22 16:10 erkkimon

Definitely excited to see this too, with a slightly more graceful asynchronous behaviour I'm going to role a version out across our group to socialise it and see whether Whisper overall might be the game changer it appears to be (and it does, given a lot of Scottish accents amongst us!). Thanks for the efforts @ggerganov.

mark-beeby avatar Oct 27 '22 11:10 mark-beeby