ComfyUI-Whisper icon indicating copy to clipboard operation
ComfyUI-Whisper copied to clipboard

other language

Open Tobe2d opened this issue 1 year ago • 4 comments

Is there a way to utalize this in other languages?

Tobe2d avatar Feb 22 '24 17:02 Tobe2d

yes, whisper supports various languages by default. You might need to add new fonts in the fonts directory depending on the target language, to display the subtitles properly @Tobe2d

yuvraj108c avatar Mar 03 '24 08:03 yuvraj108c

Thanks for the reply 🙏

I have tested this but the text is broken thats why I came here to ask in case someghing withn the code need to support UTF-8 Unicode encoding

Tobe2d avatar Mar 03 '24 14:03 Tobe2d

If you print the transcription to terminal, it should be correct, the issue is most likely with PIL not rendering other fonts properly.

Perhaps I'm incorrectly loading the font here: font = ImageFont.truetype(os.path.join(FONT_DIR,font_family), font_size)

You can try to create 1 image with your font using PIL in an external python script & see if it works as expected. I'll also look into the issue.

yuvraj108c avatar Mar 04 '24 05:03 yuvraj108c

Hey, thanks for the sugesstion but I'm actually not sure how to implement the changes you've suggested. Would it be possible for you to help me out by testing it? here is link to the font I was testing on https://fonts.google.com/noto/specimen/Noto+Sans+Arabic

Tobe2d avatar Mar 04 '24 15:03 Tobe2d