pszemraj / vid2cleantxt

Python API & command-line tool to easily transcribe speech-based video files into clean text
Apache License 2.0
185 stars 26 forks source link

Error when transcribing #15

Closed pearl-yu closed 1 year ago

pearl-yu commented 2 years ago

Here it is: UnboundLocalError: local variable 'PL_out' referenced before assignment

I was running the Colab notebook only changing the video URL to a google drive link.

pszemraj commented 2 years ago

hey, thanks for reporting that! Sorry, that error is somewhat vague. nothing was transcribed because it (likely) didn't find any videos to transcribe. Currently, no error is thrown when vid2cleantxt tries to transcribe a directory and finds nothing, but UnboundLocalError: local variable 'PL_out' referenced before assignment is thrown during post-processing (PL_out doesn't exist because nothing was transcribed)

core problem/solution

example:

in Colab:

drive_id = "1c-VJfq-qNSy8DQaxkx_yiopGidxhauGG"
!gdown $drive_id 

so basically, replace !wget -O $local_path $url_to_video with the above (except for your file), and it should work. Outside of that, you can see this medium post or this stack overflow for other ways of loading video files to Colab


EDIT: actually, you don't even need to provide the -O arg, so I removed it from the code block above.

colab-screen

pszemraj commented 1 year ago

hey! let me know if the above solved your problem or if you need further help. Otherwise, I'll close this issue in a few days :)