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

Remove sd2 sound extensions from supported audio extensions #1409

Merged
merged 5 commits into from
Aug 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion flash/core/data/utilities/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ def load_spectrogram(file_path: str, sampling_rate: int = 16000, n_fft: int = 40
"""
loaders = copy.copy(_spectrogram_loaders)
loaders[AUDIO_EXTENSIONS] = partial(loaders[AUDIO_EXTENSIONS], sampling_rate=sampling_rate, n_fft=n_fft)
return load(file_path, loaders)
loader = _get_loader(file_path, loaders)
# FIXME: Following error is raised while trying to read fsspec object from SoundFile:
# RuntimeError: Error opening <fsspec.implementations.local.LocalFileOpener object at 0x100f4ac50>: Format not recognised.
return loader(file_path)


def load_audio(file_path: str, sampling_rate: int = 16000):
Expand Down