Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use tensorflow_io.audio.resample on Mac M1 #1963

Open
e-koc opened this issue Mar 16, 2024 · 0 comments
Open

Unable to use tensorflow_io.audio.resample on Mac M1 #1963

e-koc opened this issue Mar 16, 2024 · 0 comments

Comments

@e-koc
Copy link

e-koc commented Mar 16, 2024

OS: MacOS Sonoma 14.2.1
TF Version: 2.15.0
TFIO Version: 0.36.0
Python Version: 3.9

I'm getting error while using tfio.audio.resample(wav, rate_in=44100, rate_out=16000) method. I tried downgrading tfio to 0.34.0 and tf to 2.13.0 but same error occured. It looks like there is a problem with core_ops.io_audio_resample which is trying to load libtensorflow_io.so

Code to reproduce

import tensorflow_io as tfio

wav = tfio.audio.resample([], rate_in=44100, rate_out=16000)

Stacktrace

File "/Users/ekoc/Documents/git/ml/bird3/main.py", line 26, in qq
wav = tfio.audio.resample(wav, rate_in=sample_rate, rate_out=16000)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow_io/python/ops/audio_ops.py", line 469, in resample
value = tf.vectorized_map(f, input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow/python/ops/parallel_for/control_flow_ops.py", line 578, in vectorized_map
return pfor(
^^^^^
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow/python/ops/parallel_for/control_flow_ops.py", line 228, in pfor
outputs = f()
^^^
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/var/folders/yz/kj795ffd4bs5hy18s97fsn6nvy_4x4/T/autograph_generated_file_mux5szo.py", line 17, in tf__f
retval
= ag
_.converted_call(ag__.ld(pfor_impl), (ag_.ld(loop_fn), ag__.ld(iters)), dict(fallback_to_while_loop=ag__.ld(fallback_to_while_loop), parallel_iterations=ag__.ld(parallel_iterations), warn=ag__.ld(warn)), fscope)
^^^^^
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow_io/python/ops/audio_ops.py", line 465, in f
return core_ops.io_audio_resample(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow_io/python/ops/init.py", line 88, in getattr
return getattr(self._load(), attrb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: in user code:

File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow_io/python/ops/audio_ops.py", line 465, in f
    return core_ops.io_audio_resample(
File "/opt/miniconda3/envs/tensorflow-macos/lib/python3.11/site-packages/tensorflow_io/python/ops/__init__.py", line 88, in __getattr__
    return getattr(self._load(), attrb)

AttributeError: module '77ab628d7ad4acaa62f6bde524b9d631895821c9' has no attribute 'io_audio_resample'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant