Implement ops for converted audio models: Mfcc, DecodeWav, AudioSpectrogram
See original GitHub issueTensorFlow.js version
0.3.0
Describe the problem or feature request
I generated a model using the “Simple Audio Recognition” tutorial, which I’d like to run in a browser. I tried to convert it for use with TensorFlow.js, but I had some issues loading the model when I ran the tensorflowjs-converter
, as described in this issue: https://github.com/tensorflow/tfjs/issues/246.
I tried resolving this by adding the line:
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
to converters/converter.py
in the tensorflowjs
pip package. This fixed the exception when loading the model and now the converter lists the missing ops:
Unsupported Ops in the model
Mfcc, DecodeWav, AudioSpectrogram
Could these ops be implemented for TensorFlow.js?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Custom, converted tflite model causing an AudioClassifier ...
I had a .pb model which I converted to a .tflite model. ... implementation 'org.tensorflow:tensorflow-lite-task-audio:0.3.0' implementation ...
Read more >tf.audio.decode_wav | TensorFlow v2.11.0
Decode a 16-bit PCM WAV file to a float tensor. View aliases. Compat aliases for migration. See Migration guide for more details. tf....
Read more >Audio Spectrogram Transformer - Hugging Face
The Audio Spectrogram Transformer applies a Vision Transformer to audio, by turning audio into an image (spectrogram). The model obtains state-of-the-art ...
Read more >Audio spectrogram — NVIDIA DALI 1.20.0 documentation
A spectrogram is a representation of a signal (e.g. an audio signal) that shows ... We can use DALI's MFCC operator to transform...
Read more >How to run GPU accelerated Signal Processing in TensorFlow
We walked through each step from decoding a WAV file to computing MFCCs features of the ... audio/signal processing pipeline for you TensorFlow/Keras...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the request! We are working to expand the coverage of TensorFlow Ops in TF.js. I can’t say when these will be done, but user feedback does help up prioritize.
I vaguely recall that spectrograms are a special case-- @nsthorat, was this one of those situations where the browser implementation differs subtly from the TF implementation and so breaks imported models?
Hi, Instead of doing that, I created a package by extending tf.keras.layers.Layer by creating an audio preprocessor which generates spectrograms and it turned out that the ops are in TFlite.
On DecodeWav, I preprocess the data before basing through the spectrogram layer hence the not included when converting the model to TFlite.
On Tue, 22 Oct 2019, 19:34 Naveen Singh, notifications@github.com wrote: