HMKnapp / slim-bazarr-subgen

Create subtitles with Whisper AI for your media files in Bazarr
4 stars 1 forks source link

Feature Request: Custom models from HF or custom preconverted models #1

Open Deathproof76 opened 5 months ago

Deathproof76 commented 5 months ago

Hello there! πŸ‘‹ And thank you very much for this slimmed down version, it's been a truly great addition to my setup! πŸ™

I've tried it myself, but I'm an amateur regarding coding and failed to do so. But might it be possible to integrate downloading custom models via Huggingface and converting them via the ct2-transformers-converter to use them with slim-bazarr-subgen?

For example: Keep the usual evironment mechanism so that if - "WHISPER_MODEL=distil-large-v3" is set in the compose one of https://huggingface.co/Systran models would be downloaded, but if I'd set it to "WHISPER_MODEL=bofenghuang/whisper-small-cv11-german" (for example), this version bofenghuang/whisper-small-cv11-german would be downloaded, converted for faster whisper and used?

Another possibility: one would be able to set an already converted custom model via env, which has been put into the model folder beforehand, could be more simple.

Would be glad if you could share your sentiment regarding this idea!
Anyways, kind regards and thank you again for sharing! β™₯️

HMKnapp commented 3 days ago

I think it's a great idea! Probably won't have the time to dig into it. I made this mainly to fulfill a personal use and published it because others might find it useful as well.

If anyone wants to implement this, any PR is greatly appreciated.