Comments (1)
Same thing here! I followed the instructions in README.md to install OpenL3 on Ubuntu 22.04 (within a fresh Conda environment), then followed the first steps of the tutorial and got this error:
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openl3
2024-04-25 18:34:04.432317: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-04-25 18:34:04.432638: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-04-25 18:34:04.434472: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-04-25 18:34:04.461994: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-25 18:34:04.867150: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
>>> import soundfile as sf
>>> audio, sr = sf.read("audiofile.wav")
>>> emb, ts = openl3.get_audio_embedding(audio, sr)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/victor/.local/lib/python3.10/site-packages/openl3/core.py", line 262, in get_audio_embedding
model = load_audio_embedding_model(
File "/home/victor/.local/lib/python3.10/site-packages/openl3/models.py", line 134, in load_audio_embedding_model
return load_audio_embedding_model_from_path(model_path, input_repr, embedding_size, frontend=frontend)
File "/home/victor/.local/lib/python3.10/site-packages/openl3/models.py", line 166, in load_audio_embedding_model_from_path
m = AUDIO_MODELS[input_repr](include_frontend=frontend == 'kapre')
File "/home/victor/.local/lib/python3.10/site-packages/openl3/models.py", line 518, in _construct_mel256_audio_network
spec = __fix_kapre_spec(get_melspectrogram_layer)(
File "/home/victor/.local/lib/python3.10/site-packages/openl3/models.py", line 44, in get_spectrogram
seq = func(*a, return_decibel=False, **kw)
File "/home/victor/.local/lib/python3.10/site-packages/kapre/composed.py", line 261, in get_melspectrogram_layer
return Sequential(layers, name=name)
File "/home/victor/.local/lib/python3.10/site-packages/keras/src/models/sequential.py", line 74, in __init__
self._maybe_rebuild()
File "/home/victor/.local/lib/python3.10/site-packages/keras/src/models/sequential.py", line 139, in _maybe_rebuild
self.build(input_shape)
File "/home/victor/.local/lib/python3.10/site-packages/keras/src/layers/layer.py", line 222, in build_wrapper
original_build_method(*args, **kwargs)
File "/home/victor/.local/lib/python3.10/site-packages/keras/src/models/sequential.py", line 180, in build
x = layer(x)
File "/home/victor/.local/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/victor/.local/lib/python3.10/site-packages/optree/ops.py", line 594, in tree_map
return treespec.unflatten(map(func, *flat_args))
RuntimeError: Exception encountered when calling STFT.call().
Could not automatically infer the output shape / dtype of 'stft' (of type STFT). Either the `STFT.call()` method is incorrect, or you need to implement the `STFT.compute_output_spec() / compute_output_shape()` method. Error encountered:
Invalid dtype: complex64
Arguments received by STFT.call():
• args=('<KerasTensor shape=(None, 1, 48000), dtype=float32, sparse=None, name=keras_tensor_1>',)
• kwargs=<class 'inspect._empty'>
>>>
Using Python 3.8 solved the issue for me. Apparently, OpenL3 currently only supports Python 3.6 through 3.8, according to #94 (comment).
from openl3.
Related Issues (20)
- Expected new release HOT 1
- Add function to API for loading custom model weights HOT 1
- git clone pulls weight files as well by default HOT 1
- API docs broken HOT 1
- skimage submodules not imported correctly, regression tests fail HOT 7
- Coveralls not triggered on successful Travis build
- Make linear frontend consistent with mel
- Add Action for running US8K benchmark
- Migrate from Travis CI to GitHub Actions
- Add note to docs about embeddings changing after tensorflow 2 / kapre + librosa upgrade
- Numerical errors in hop_len due to rounding
- Dependency conflict with Tensorflow 2.5.x
- Breaks with librosa 0.9.x
- Export OpenL3 as TF/TF-Lite model
- m1 macos installation problem HOT 4
- Extract activation from lower audio layers HOT 1
- Example of fine-tuning the audio sub-network. HOT 1
- Clarification on input representation
- Error installing openl3 on Win64 with Python 3.10 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openl3.