natrys / whisper.el

Speech-to-Text interface for Emacs using OpenAI's whisper model and whisper.cpp as inference engine.
140 stars 10 forks source link

ask for whisper spoken language every time for audio #24

Open stardiviner opened 3 months ago

stardiviner commented 3 months ago

Ask user for spoken language instead of always use the hardcoded whisper-language for user who will touch different languages content.

natrys commented 3 months ago

Hi, thanks for this. I am sympathetic to needs of people who have to switch languages a lot, but I note that this will come at the UX cost where people who don't switch language often (who I presume are majority) will still have to choose (same) one every time. I think at least this needs to be behind a new variable (like whisper-always-ask-language).

But before that, I am curious, have you tried setting whisper-language to "auto"? This is supposed to auto detect language (and do a reasonably good job so long as we have a clip >30 seconds). Shouldn't that render manual setup unnecessary?

stardiviner commented 3 months ago

I have tried the "auto", but I hope can reduce this delay time. You're right, we need to have another custom option like (setq whisper-always-ask-language nil) which nil by default. WDYT?

stardiviner commented 3 months ago

I updated the patch, and put the whisper-language asking in let-binding to limit every change in function local scope without affect user custom option whisper-language value.

natrys commented 3 months ago

Sorry, I am held up because all my headsets are dead so can't do any functional testing. Hopefully will get to it in a week.