Skip to content

Commit

Permalink
Remove soundfile module's dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviliz committed Jan 9, 2025
1 parent afa0a07 commit 5b9499d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/src/unittests/tonal/test_audio2midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,7 @@ def runARealCase(
midi_note_tolerance: int,
):
filename = join(testdata.audio_dir, audio_path)
if sys.platform == "darwin":
import soundfile as sf

audio, _ = sf.read(filename, dtype="float32")
if audio.ndim > 1:
audio = audio[:, 0]
else:
audio = MonoLoader(filename=filename, sampleRate=sample_rate)()
audio = MonoLoader(filename=filename, sampleRate=sample_rate)()
frames = FrameGenerator(audio, frameSize=frame_size, hopSize=hop_size)
step_time = hop_size / sample_rate

Expand Down

0 comments on commit 5b9499d

Please sign in to comment.