mallorbc / whisper_mic

Project that allows one to use a microphone with OpenAI whisper.
MIT License
674 stars 154 forks source link

Add pre-commit, poetry and use type hinting #78

Open BenWolfaardt opened 1 month ago

BenWolfaardt commented 1 month ago

Hey, thanks for the awesome project.

I was considering adding support to allow a keyboard shortcut to toggle the start and end of a transcription session as I find that the --loop flag often results in poor transcriptions as sentences are randomly split and the model looses a lot of context.

I created a PoC for this, but first wanted to tidy things up before making any major changes. I'm not sure you'll agree with the addition of poetry or all of y ruff rules, but it enforces homogeneity across the code as well as makes things easier to work with.

Please let me know your thoughts and suggestions.

Kind regards, Ben

mallorbc commented 3 weeks ago

Thanks for the PR. I will be dedicating time for this project this upcoming week to handle this and many other issues.

mallorbc commented 2 weeks ago

Finally doing a lot of work on this repo today. Not sure why you deleted init.py but the rest looks good. I am gonna test it out and see if its good.

mallorbc commented 2 weeks ago

With regard to your comments, I think a keyboard shortcut or something of the like would be great. Yeah, the current implementation sometimes loses some words and punctuation context.

mallorbc commented 2 weeks ago

I am not able to install this using poetry install. I am getting a message like: Installing dependencies from lock file

Package operations: 14 installs, 0 updates, 0 removals

Cannot install triton.

mallorbc commented 2 weeks ago

Also, is it possible to install in editable form?

Like pip install -e .

mallorbc commented 2 weeks ago

I really like the other changes though. Let me know if you want to proceed. Otherwise I might add them in other ways.