Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix load_audio (#3207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guihao Liang authored May 21, 2020
1 parent 4c49182 commit 2e2c2e6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def load_audio(
>>> audio_path = "~/Documents/myAudioFiles/"
>>> audio_sframe = tc.audio_analysis.load_audio(audio_path, recursive=True)
"""
_scipy = _minimal_package_import_check("scipy")
# import scipy does fake include
_wavfile = _minimal_package_import_check("scipy.io.wavfile")

path = _tc.util._make_internal_url(path)

Expand All @@ -85,7 +86,7 @@ def load_audio(
)
for cur_file_path in all_wav_files:
try:
sample_rate, data = _scipy.io.wavfile.read(cur_file_path)
sample_rate, data = _wavfile.read(cur_file_path)
except Exception as e:
error_string = "Could not read {}: {}".format(cur_file_path, e)
if not ignore_failure:
Expand Down

0 comments on commit 2e2c2e6

Please sign in to comment.