Skip to content

Commit

Permalink
fix for loading a file from HTTP POST
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatCodeholio committed Mar 18, 2024
1 parent 2391e9d commit 042bdef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "icad_tone_detection"
version = "0.4"
version = "0.5"
authors = [
{name = "TheGreatCodeholio", email = "[email protected]"},
]
Expand Down
2 changes: 1 addition & 1 deletion src/icad_tone_detection/audio_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def load_audio(audio_input):
audio = AudioSegment.from_file(audio_input)
elif hasattr(audio_input, 'read'):
audio_input.seek(0)
audio = AudioSegment.from_file(audio_input.read())
audio = AudioSegment.from_file(BytesIO(audio_input.read()))
else:
raise ValueError("Unsupported audio input type. Must be a file path, URL, Bytes object, or Pydub AudioSegment.")

Expand Down

0 comments on commit 042bdef

Please sign in to comment.