Audio reading fails with TensorFlow IO on Colab

Versions:

  • TensorFlow: 2.8.2
  • TensorFlow IO: 0.26.0 (installed with pip install tensorflow-io)

When executing:

import tensorflow_io as tfio
sample_audio = tfio.audio.AudioIOTensor("gs://cloud-samples-tests/speech/brooklyn.flac")

It fails with:

NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZNK10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE']

Even though the issue is solved with pip install tensorflow-io==0.23.1 but I lose access to .numpy().

Please advise.

1 Like

I am having the same issue.