chidiwilliams / buzz

Buzz transcribes and translates audio offline on your personal computer. Powered by OpenAI's Whisper.
https://chidiwilliams.github.io/buzz
MIT License
12.63k stars 948 forks source link

Buzz crashed when the progress is at 100% #850

Closed thejonnyjon closed 3 months ago

thejonnyjon commented 4 months ago

Steps to recreate the problem:

  1. .m4a file is in a OneDrive folder.
  2. Open Buzz
  3. Run "transcribe" task for that particular .m4a file.
  4. Everything runs smoothly, but once it reaches 100%, Buzz will close by itself.
  5. Reopen Buzz and the status was "cancelled" and so it is not being transcribe.

The only solution is to move the audio file to the desktop and it works.

Uninstall Buzz and remove all Buzz-related files, reinstall everything back, but it's still the same problem.

raivisdejus commented 4 months ago

A workaround may be to see if un-selecting export formats helps. Buzz will save transcript to the same folder where the audio file is, so if there is some problem with permissions or something else it may fail.

If the transcription without export works you can double click the line with export file name and then a new window will open. Select "export" in this new window and select where to save the export file.

thejonnyjon commented 4 months ago

Just tested the workaround that @raivisdejus suggested, it won't work too. As long as the transcribed text file is being exported to a specific folder in OneDrive, Buzz will crash and it will not get exported.

The only way is still exporting it to desktop first then move it to OneDrive.

Weirdly, desktop is also under OneDrive. So not sure what's the problem...

raivisdejus commented 4 months ago

I will look into this.

@thejonnyjon data from your logs may help. Please paste %USERPROFILE%\AppData\Local\Buzz\Buzz\Logs into your address bar and check the end of logs file or post the whole file somewhere.

Also I assume you are using latest 1.0.1 version. If not, get it from https://github.com/chidiwilliams/buzz/releases

raivisdejus commented 4 months ago

@thejonnyjon Tried to replicate the setup:

Info from the logs might help, we need more info to do anything more.

thejonnyjon commented 3 months ago

I've cleared the logs so that I could have a fresh log. Apparently, it's working as it should be. All I can say is that not all the time, it will work as it should be.

However, I'll just paste the logs here for reference. Also, I've noticed some errors with regards to FFmpeg though.

[2024-07-27 01:30:37,675] locale.:12 DEBUG -> UI locales ['en-SG', 'en-Latn-SG', 'zh-Hans-SG', 'zh-SG'] [2024-07-27 01:30:37,679] model_loader.:40 DEBUG -> Model root directory: C:\Users\jonny\AppData\Local\Buzz\Buzz\Cache\models [2024-07-27 01:30:38,733] utils._find_ffmpeg_extension:114 DEBUG -> Loading FFmpeg6 [2024-07-27 01:30:38,733] utils._find_ffmpeg_extension:120 DEBUG -> Failed to load FFmpeg6 extension. Traceback (most recent call last): File "torio_extension\utils.py", line 116, in _find_ffmpeg_extension File "torio_extension\utils.py", line 105, in _find_versionsed_ffmpeg_extension File "", line 95, in find_spec ModuleNotFoundError: No module named 'torio.lib' [2024-07-27 01:30:38,741] utils._find_ffmpeg_extension:114 DEBUG -> Loading FFmpeg5 [2024-07-27 01:30:38,741] utils._find_ffmpeg_extension:120 DEBUG -> Failed to load FFmpeg5 extension. Traceback (most recent call last): File "torio_extension\utils.py", line 116, in _find_ffmpeg_extension File "torio_extension\utils.py", line 105, in _find_versionsed_ffmpeg_extension File "", line 95, in find_spec ModuleNotFoundError: No module named 'torio.lib' [2024-07-27 01:30:38,741] utils._find_ffmpeg_extension:114 DEBUG -> Loading FFmpeg4 [2024-07-27 01:30:38,741] utils._find_ffmpeg_extension:120 DEBUG -> Failed to load FFmpeg4 extension. Traceback (most recent call last): File "torio_extension\utils.py", line 116, in _find_ffmpeg_extension File "torio_extension\utils.py", line 105, in _find_versionsed_ffmpeg_extension File "", line 95, in find_spec ModuleNotFoundError: No module named 'torio.lib' [2024-07-27 01:30:38,741] utils._find_ffmpeg_extension:114 DEBUG -> Loading FFmpeg [2024-07-27 01:30:38,741] utils._find_ffmpeg_extension:120 DEBUG -> Failed to load FFmpeg extension. Traceback (most recent call last): File "torio_extension\utils.py", line 116, in _find_ffmpeg_extension File "torio_extension\utils.py", line 105, in _find_versionsed_ffmpeg_extension File "", line 95, in find_spec ModuleNotFoundError: No module named 'torio.lib' [2024-07-27 01:30:38,837] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:30:38,877] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:30:38,877] buzz.main:60 DEBUG -> app_dir: C:\Program Files (x86)\Buzz_internal [2024-07-27 01:30:38,877] buzz.main:61 DEBUG -> log_dir: C:\Users\jonny\AppData\Local\Buzz\Buzz\Logs [2024-07-27 01:30:38,877] buzz.main:62 DEBUG -> cache_dir: C:\Users\jonny\AppData\Local\Buzz\Buzz\Cache [2024-07-27 01:30:38,877] buzz.main:63 DEBUG -> data_dir: C:\Users\jonny\AppData\Local\Buzz\Buzz [2024-07-27 01:30:38,893] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:30:38,905] db._setup_db:38 DEBUG -> Database connection opened: C:\Users\jonny\AppData\Local\Buzz\Buzz\Buzz.sqlite [2024-07-27 01:30:38,920] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:30:38,970] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:30:39,066] file_transcriber_queue_worker.run:40 DEBUG -> Waiting for next transcription task [2024-07-27 01:30:55,685] backend._load_plugins:205 DEBUG -> Loading KWallet [2024-07-27 01:30:55,686] backend._load_plugins:205 DEBUG -> Loading SecretService [2024-07-27 01:30:55,687] backend._load_plugins:205 DEBUG -> Loading Windows [2024-07-27 01:30:55,690] init.:11 DEBUG -> Loaded cffi backend [2024-07-27 01:30:55,714] backend._load_plugins:205 DEBUG -> Loading chainer [2024-07-27 01:30:55,714] backend._load_plugins:205 DEBUG -> Loading libsecret [2024-07-27 01:30:55,714] backend._load_plugins:205 DEBUG -> Loading macOS [2024-07-27 01:30:55,726] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:30:55,728] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:31:05,548] file_transcriber_queue_worker.run:56 DEBUG -> Starting next transcription task [2024-07-27 01:31:05,568] whisper_file_transcriber.transcribe:48 DEBUG -> Starting whisper file transcription, task = FileTranscriptionTask(transcription_options=TranscriptionOptions(language='en', task=<Task.TRANSCRIBE: 'transcribe'>, model=TranscriptionModel(), word_level_timings=False, temperature=(0.0, 0.2, 0.4, 0.6, 0.8, 1.0), initial_prompt='', openai_access_token='', enable_llm_translation=False, llm_prompt='', llm_model=''), file_transcription_options=FileTranscriptionOptions(file_paths=["C:/Users/jonny/OneDrive/XXX/Transcription/XXX/XXX/test file.m4a"], url=None, output_formats={<OutputFormat.TXT: 'txt'>}), model_path='C:\Users\jonny\AppData\Local\Buzz\Buzz\Cache\models\whisper\medium.pt', id=69663840, uid=UUID('3ca8dd4a-d537-4104-a029-0300c6e3c433'), segments=[], status=None, error=None, queued_at=None, started_at=None, completed_at=None, output_directory=None, source=<Source.FILE_IMPORT: 'file_import'>, file_path="C:/Users/jonny/OneDrive/XXX/Transcription/XXX/XXX/test file.m4a", url=None, fraction_downloaded=0.0) [2024-07-27 01:33:15,324] whisper_file_transcriber.transcribe:71 DEBUG -> whisper process completed with code = 0, time taken = 0:02:09.755798, number of segments = 13 [2024-07-27 01:33:15,325] file_transcriber_queue_worker.run:40 DEBUG -> Waiting for next transcription task [2024-07-27 01:33:15,333] settings.init:14 DEBUG -> Settings filename: \HKEY_CURRENT_USER\Software\Buzz\OrganizationDefaults [2024-07-27 01:33:15,333] file_transcriber.write_output:112 DEBUG -> Writing transcription output, path = C:/Users/jonny/OneDrive/XXX/Transcription/XXX/XXX\test file (transcribed on 27-Jul-2024 01-33-15).txt, output format = OutputFormat.TXT, number of segments = 13 [2024-07-27 01:33:15,334] file_transcriber.write_output:141 DEBUG -> Written transcription output

I have edited the logs to remove any confidential folder name and file name.

Addtionally, I'm using Buzz 1.0.1 on Windows 11 Home, 23H2, 22631.3880. I only have Windows Defender installed.

raivisdejus commented 3 months ago

Some errors for ffmpeg are ok, it tries to find the appropriate ffmpeg version to use and may fail some times until it finds the right one.

A small defect with model downloading was fixed in latest development version here https://github.com/chidiwilliams/buzz/actions/runs/10170061035/attempts/1

If you can get logs from some crash, that would help us figure out what happened. For now I am glad it works at least some times and hope the crashes will not come often.