Prepare .wav or .amr files for yamnet.tflite model Android

Rufan Khokhar
Oct 19, 2021

--

Photo by Jonas Zürcher on Unsplash

After a lot of research, I realized there is no any easiest way to prepare a local .wav or .amr file for yamnet.tflite model, as we know that any AI model takes a specific type or shape as an input, but the question is, What if the input file did not meet the model input requirements?

In this article, I will explain to you how to prepare local .wav or .amr files for yamnet.tflite model.

Yamnet model input:

The model accepts a 1-D float32 Tensor or NumPy array of length 15600 containing a 0.975-second waveform represented as mono 16 kHz samples in the range [-1.0, +1.0]. read more…

Step-1

Add these dependencies to the app-level build.gradle file

Step-2

Prepare input file and run the model

Finally, the output contains the model results

Happy coding…

Photo by Eden Constantino on Unsplash

--

--

Rufan Khokhar

Experienced Android Developer with a demonstrated history of working in the information technology and services industry.