Pikurrot / whisper-gui

A simple GUI to use Whisper.
MIT License
89 stars 6 forks source link

saving error unicode charmap #2

Closed fznx922 closed 9 months ago

fznx922 commented 10 months ago

Hey mate trying to transcribe japanese, when it gets to the end and goes to save it errors with this message

File "C:\Users\fznx\whisper-gui\main.py", line 113, in transcribe_audio save_transcription_to_txt(joined_text, save_dir) File "C:\Users\fznx\whisper-gui\main.py", line 46, in save_transcription_to_txt f.write(text_str) File "C:\Python\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-56: character maps to

i assume because its using japanese and the default is looking for english characaters? but im not sure on how to fix it

thanks :)

Pikurrot commented 10 months ago

Hi, as you said, I guess it's because it's trying to save Japanese characters into a plain text file (.txt). I will look into it, thanks pointing it out.

fznx922 commented 9 months ago

had any luck with it?

Pikurrot commented 9 months ago

Hi, sorry, I have been busy. I will take a look as soon as I can, I didn't forget it :)

Pikurrot commented 9 months ago

It seems to work now. git pull the last changes and check if it works fine now!