- 
                Notifications
    You must be signed in to change notification settings 
- Fork 736
Closed
Description
🚀 Feature
The load API does not support loading audio bytes from the memory. It would a great addition to be able to load file like object, e.g. BytesIO. This is would be similar to SoundFile's read function (https://github.com/bastibe/SoundFile/blob/master/soundfile.py#L170)
Motivation
This addition will support a use case for reading audio as blobs directly from DB instead writing the files locally first.
Pitch
Without this feature, torchaudio.load is not useful for users who load files from DB and would love to use torchaudio for all audio operations.
Alternatives
SoundFile supports loading from bytes but currently does not support MP3 files. CommonVoice's audio files are saved in MP3, which requires to convert to FLAC or WAV before training.
waveform, samplerate = sf.read(file=io.BytesIO(audio_bytes), dtype='float32')
faroit, mogwai, rbracco, MohamedKari, IamSVP94 and 6 moreDimIsaev and aconneau-openaifaroit, Abhi011999, rbracco, kamo-naoyuki, JINHXu and 1 more
Metadata
Metadata
Assignees
Labels
No labels