ClipsAI / clipsai

Clips AI is an open-source Python library that automatically converts long videos into clips.
https://www.clipsai.com
MIT License
132 stars 22 forks source link

Some bug or something... #1

Open HeroVinRus opened 8 months ago

HeroVinRus commented 8 months ago

I'm sorry, but I really need help. I couldn't figure out these errors even with chat gpt. Here is my code: from clipsai import clip, transcribe

transcripiton = transcribe("F:\pycharm\video.mp4") clips = clip(transcripiton)

print("StartTime: ", clips[0].start_time) print("EndTime: ", clips[0].end_time)

The video is actually located at this address.

Here is mistakes: F:\pycharm\venv\Scripts\python.exe F:\pycharm\venv\my_script.py [nltk_data] Downloading package punkt to [nltk_data] C:\Users\Artyom1\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date! F:\pycharm\venv\lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") F:\pycharm\venv\lib\site-packages\torch_audiomentations\utils\io.py:27: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call. torchaudio.set_audio_backend("soundfile") The torchaudio backend is switched to 'soundfile'. Note that 'sox_io' is not supported on Windows. The torchaudio backend is switched to 'soundfile'. Note that 'sox_io' is not supported on Windows. ERROR:root:ERROR INFO FOR FAILED REQUESTR: {'success': False, 'status': 3, 'message': '[WinError 2] Не удается найти указанный файл', 'stackTraceInfo': ["Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\transcribe\transcribe.py | Stack Name: transcribe | Line Number: 61 | Line of Code Responsible: 'media_file = editor.instantiate_as_temporal_media_file(media_file_path)' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\media\editor.py | Stack Name: instantiate_as_temporal_media_file | Line Number: 1249 | Line of Code Responsible: 'media_file.assert_exists()' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\filesys\object.py | Stack Name: assert_exists | Line Number: 157 | Line of Code Responsible: 'msg = self.check_exists()' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\media\temporal_media_file.py | Stack Name: check_exists | Line Number: 71 | Line of Code Responsible: 'if not media_file.has_audio_stream() and not media_file.has_video_stream():' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\media\media_file.py | Stack Name: has_audio_stream | Line Number: 350 | Line of Code Responsible: 'return self.check_has_audio_stream() is None' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\media\media_file.py | Stack Name: check_has_audio_stream | Line Number: 330 | Line of Code Responsible: 'if len(self.get_audio_streams()) == 0:' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\media\media_file.py | Stack Name: get_audio_streams | Line Number: 282 | Line of Code Responsible: 'streams = self.get_streams()' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: F:\pycharm\clipsai\media\media_file.py | Stack Name: get_streams | Line Number: 236 | Line of Code Responsible: 'result = subprocess.run(' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: C:\Users\Artyom1\AppData\Local\Programs\Python\Python39\lib\subprocess.py | Stack Name: run | Line Number: 501 | Line of Code Responsible: 'with Popen(*popenargs, **kwargs) as process:' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: C:\Users\Artyom1\AppData\Local\Programs\Python\Python39\lib\subprocess.py | Stack Name: init | Line Number: 947 | Line of Code Responsible: 'self._execute_child(args, executable, preexec_fn, close_fds,' | Error Message: [WinError 2] Не удается найти указанный файл | ########## ", "Error Type: FileNotFoundError | Filename: C:\Users\Artyom1\AppData\Local\Programs\Python\Python39\lib\subprocess.py | Stack Name: _execute_child | Line Number: 1416 | Line of Code Responsible: 'hp, ht, pid, tid = _winapi.CreateProcess(executable, args,' | Error Message: [WinError 2] Не удается найти указанный файл | ########## "]} ERROR:root:DATA FOR FAILED REQUEST: {'mediaFilePath': 'F:\pycharm\video.mp4', 'computeDevice': None, 'precision': None, 'languageCode': None, 'whisperModelSize': None} Traceback (most recent call last): File "F:\pycharm\venv\my_script.py", line 4, in clips = clip(transcripiton) File "F:\pycharm\clipsai\clip\clip.py", line 87, in clip clip_infos = clip_finder.find_clips(transcription) File "F:\pycharm\clipsai\clip\texttile.py", line 111, in find_clips sentences_info = transcription.get_sentence_info() AttributeError: 'dict' object has no attribute 'get_sentence_info'

Process finished with exit code 1

armeltalla commented 8 months ago

Thanks for raising this issue. We'll try to resolve this, but it may take time.