I've written a program that produces wav files using the WinRT AudioGraph API.
VLC plays the files fine, and displays the correct length.
But when trying to load the files in python
torchaudio
, librosa
, scipy.io
all say the file has no sampleswave
says "not a WAVE file"I understand that AudioGraph probably uses a newer wav metadata format designed for streams. Is there same easy work around? like using ffmpeg.
I think maybe the best thing to do is to load raw bytes into pytorch tensor and slice of the metadata.
The AudioGraph
API has an AudioFileOutputNode.FinalizeAsync
method which solved this problem.
Previously I was just calling AudioGraph.Close
a synchronous method and apparently this wasn't good enough.