Skip to content

Chunk creation logic fails on Windows #400

@Lunat1q

Description

@Lunat1q

Hi!
The line mentioned above fails for Windows machines.

time=22:13:39 level=ERROR msg="Job processing failed" worker_id=0 job_id=68d16f0f-e040-47c2-8f2c-1e95df65ccb0 error="single-track processing failed: transcription failed: Parakeet buffered execution failed: exit status 1\nLogs:\n0.0\r\n final_eos_score: 1.0\r\n score_per_phrase: 0.0\r\n source_lang: en\r\n use_triton: true\r\n uniform_weights: false\r\n use_bpe_dropout: false\r\n num_of_transcriptions: 5\r\n bpe_alpha: 0.3\r\n boosting_tree_alpha: 0.0\r\n hat_subtract_ilm: false\r\n hat_ilm_weight: 0.0\r\n max_symbols_per_step: 10\r\n blank_lm_score_mode: LM_WEIGHTED_FULL\r\n pruning_mode: LATE\r\n allow_cuda_graphs: true\r\n tsd_max_sym_exp: 50\r\n temperature: 1.0\r\n durations:\r\n - 0\r\n - 1\r\n - 2\r\n - 3\r\n - 4\r\n big_blank_durations: []\r\n \r\n✓ CUDA graphs disabled successfully\r\nSplitting audio into 300.0s chunks...\r\nCreated 12 chunks\r\nTranscribing chunk 1/12 (duration: 300.0s)...\r\nTraceback (most recent call last):\r\n File "D:\AudioTranscribe\Scriberr_Windows_x86_64\data\whisperx-env\parakeet\transcribe_buffered.py", line 171, in \r\n main()\r\n File "D:\AudioTranscribe\Scriberr_Windows_x86_64\data\whisperx-env\parakeet\transcribe_buffered.py", line 163, in main\r\n transcribe_buffered(\r\n File "D:\AudioTranscribe\Scriberr_Windows_x86_64\data\whisperx-env\parakeet\transcribe_buffered.py", line 84, in transcribe_buffered\r\n sf.write(chunk_path, chunk_info['audio'], sr)\r\n File "D:\AudioTranscribe\Scriberr_Windows_x86_64\data\whisperx-env\parakeet\.venv\Lib\site-packages\soundfile.py", line 363, in write\r\n with SoundFile(file, 'w', samplerate, channels,\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File "D:\AudioTranscribe\Scriberr_Windows_x86_64\data\whisperx-env\parakeet\.venv\Lib\site-packages\soundfile.py", line 690, in init\r\n self._file = self._open(file, mode_int, closefd)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File "D:\AudioTranscribe\Scriberr_Windows_x86_64\data\whisperx-env\parakeet\.venv\Lib\site-packages\soundfile.py", line 1265, in _open\r\n raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))\r\nsoundfile.LibsndfileError: Error opening '/tmp/chunk_0.wav': System error.\r\n"

I've modified it to be:

    temp_dir = "tmp"
    os.makedirs(temp_dir, exist_ok=True)
    chunk_path = os.path.join(temp_dir, f"chunk_{i}.wav")

so it creates the tmp folder right next to "exe" file. please validate that such approach will work with other OS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions