tensorflow / io

Dataset, streaming, and file system extensions maintained by TensorFlow SIG-IO
Apache License 2.0
700 stars 281 forks source link

Mp4 (AAC) is not supported in AudioIOTensor #1456

Open naveensingh opened 3 years ago

naveensingh commented 3 years ago

I'm getting the following error when trying to load an M4A (from VoxCeleb dataset) file:

tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: mp4(aac) is not supported in AudioIOTensor or AudioIODataset: data/dev/aac/id04652/NwRl9TEnukc/00125.m4a [Op:IO>AudioReadableInit]

My precise code is:

import tensorflow_io as tfio
audio = tfio.audio.AudioIOTensor('data/dev/aac/id04652/NwRl9TEnukc/00125.m4a')

AAC is listed as a supported format in the documentation or am I mistaken? Since TensorFlow seems to be using FFmpeg underneath I have verified the files can be opened and converted to other formats using FFmpeg and using the pydub library (AudioSegment) which also happens to be using FFmpeg underneath. Why is TensorFlow IO having trouble with this? I have attached an m4a file (zipped) from the above example for reproducibility:

00125.zip

EDIT: I'd like to point out that even aac audio files that are encoded using the TensorFlow IO tfio.audio.encode_aac can't be decoded using the TensorFlow IO tfio.audio.decode_aac

@yongtang

kvignesh1420 commented 3 years ago

kind ping to @yongtang to take a look.

TheSeamau5 commented 2 years ago

Running into the same issue. I get the error

InvalidArgumentError: mp4(aac) is not supported in AudioIOTensor or AudioIODataset