modelscope/FunClip

AttributeError: 'VideoClipper' object has no attribute 'lang'

CodeLyokoscj opened this issue · 3 comments

When running project in command line mode, an error was raised:
Traceback (most recent call last):
File "funclip/videoclipper.py", line 425, in
main()
File "funclip/videoclipper.py", line 421, in main
runner(**kwargs)
File "funclip/videoclipper.py", line 374, in runner
res_text, res_srt, state = audio_clipper.video_recog(file, sd_switch)
File "funclip/videoclipper.py", line 164, in video_recog
return self.recog((16000, wav), sd_switch, state, hotwords, output_dir)
File "funclip/videoclipper.py", line 64, in recog
pred_timestamp=self.lang=='en',
AttributeError: 'VideoClipper' object has no attribute 'lang'

Same issue here, windows 10, python 3.11.4.

Yokel Workaround

Assuming you're working with English - change to False otherwise I think?
Replace all instances of self.lang=='en' with True
And change line 220:
if self.lang == 'en' and isinstance(sentences, str):
to just
if isinstance(sentences, str):

trying to check whether this can help.!!
thanks

Same issue here, windows 10, python 3.11.4.

Yokel Workaround

Assuming you're working with English - change to False otherwise I think? Replace all instances of self.lang=='en' with True And change line 220: if self.lang == 'en' and isinstance(sentences, str): to just if isinstance(sentences, str):

using funclip with command line is no longer under support, i fix the bug upon but you may use funclip with gradio interface