Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate argument for seek is integer. #444

Open
Ruben-Kruepper opened this issue Sep 19, 2024 · 1 comment
Open

Validate argument for seek is integer. #444

Ruben-Kruepper opened this issue Sep 19, 2024 · 1 comment

Comments

@Ruben-Kruepper
Copy link

Ruben-Kruepper commented Sep 19, 2024

I've been using this excellent on my Mac for months. Now, suddenly, files that previously ran through my scripts just fine throw.

  File "/Users/ini/parsonos/palaba-server/palaba/transcription.py", line 238, in transcribe_audio
    audio_chunks = _chunk_audio(audio_file_path, tmp_path)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ini/parsonos/palaba-server/palaba/transcription.py", line 127, in _chunk_audio
    sound_file.seek(offset)
  File "/Users/ini/parsonos/palaba-server/env/lib/python3.11/site-packages/soundfile.py", line 802, in seek
    _error_check(self._errorcode)
  File "/Users/ini/parsonos/palaba-server/env/lib/python3.11/site-packages/soundfile.py", line 1407, in _error_check
    raise LibsndfileError(err, prefix=prefix)
soundfile.LibsndfileError: Internal psf_fseek() failed.

Update: I identified the issue as an invalid float argument to seek. I suggest a check to validate that arguments are in fact int. 🤓

@Ruben-Kruepper Ruben-Kruepper changed the title Soundfile broken on MacOS 15 Validate argument for seek is integer. Sep 19, 2024
@bastibe
Copy link
Owner

bastibe commented Sep 22, 2024

Thank you for the analysis. I'd be grateful if you could prepare a pull request that issues an appropriate error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants