savbell / whisper-writer

💬📝 A small dictation app using OpenAI's Whisper speech recognition model.
GNU General Public License v3.0
327 stars 52 forks source link

Feature request: use shortcut to end recording #21

Open danshapiro opened 9 months ago

danshapiro commented 9 months ago

I propose a use_shortcut_to_end config setting. If True, it would ignore silence_duration, and end the recording when the user presses the shortcut key a second time.

savbell commented 9 months ago

Thanks for the feature request! I just made a Roadmap section in the Readme and added it as something I plan on investigating :)

danshapiro commented 9 months ago

I hacked together a version of it - in case it's helpful.

https://github.com/danshapiro/whisper-writer

thfrei commented 9 months ago

Dear both. Thank you for providing the software. I second the request and also looked at the code. Looks good to me. I also like the logging additions in knowing, which sound device was selected, what the reason for ending is/was.

When having the shortcut, one can extend the timeout time and thus, continue talking and making breaks when thinking. It is a nice workaround for "live/continous" transcribing.

@savbell What do you mean in your Roadmap with "Pipelining audio files"? Is this like "continous" transcribing...? I think it would be nice to have like a batch mode..., whenever there is like 500ms or something of silence it can start transcribing and record to a new temp file? Or what should we call this feature?

thfrei commented 8 months ago

I have created a new branch in my fork that let's you end recording when pressing shortcut, but also: does continous recording, transcribing and typing. This improved at least for me the usability, since I need to think while "dictating".

https://github.com/thfrei/whisper-writer

Thanks both of you for your inspiration and code! It made me finally dive into python and multi-processing :-)

savbell commented 8 months ago

Hi, thank you both for your comments and code! It's super cool to see people using the tool and being inspired to modify it :) Sorry for being a bit absent -- I'm busy with school so haven't been checking here!

I just approved a PR for push-to-talk, although this implementation is more hold-down-to-talk: https://github.com/savbell/whisper-writer/pull/28

I definitely want to take the time to look through the code you shared and add these additional features. I'll try to get to it within the next week. If you want to merge your changes into main, feel free to create a PR! :)

danshapiro commented 8 months ago

That's awesome! I'm looking forward to trying some of the updates.

My Book http://hotseatbook.com | My Twitter http://www.twitter.com/danshapiro | My Turtles http://www.robotturtles.com/ | My, it'd be nice to work together http://glowforge.com/jobs

On Thu, Jan 25, 2024 at 5:24 PM Sav Bell @.***> wrote:

Hi, thank you both for your comments and code! It's super cool to see people using the tool and being inspired to modify it :) Sorry for being a bit absent -- I'm busy with school so haven't been checking here!

I just approved a PR for push-to-talk, although this implementation is more hold-down-to-talk: #28 https://github.com/savbell/whisper-writer/pull/28

I definitely want to take the time to look through the code you shared and add these additional features. I'll try to get to it within the next week. If you want to merge your changes into main, feel free to create a PR! :)

— Reply to this email directly, view it on GitHub https://github.com/savbell/whisper-writer/issues/21#issuecomment-1911261502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4PK6T6VGRLWLPC7WNKT5TYQMAWDAVCNFSM6AAAAABBJHQYJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGI3DCNJQGI . You are receiving this because you authored the thread.Message ID: @.***>