tflite-support icon indicating copy to clipboard operation
tflite-support copied to clipboard

Adding offset param to TensorAudio.create_from_wav_file

Open khanhlvg opened this issue 3 years ago • 1 comments

The function currently only allows reading from the beginning of the file. We'd like to allow user to skip a certain number samples at the beginning to make the function more flexible.

We should update the C++ implementation to add the offset parameters, and surface that to the Python layer. Besides, we should update all files that use the C++ LoadAudioBufferFromFile function so that we don't break any tests.

@kinaryml Can you handle this?

khanhlvg avatar Jul 07 '22 02:07 khanhlvg

@khanhlvg I've raised a PR here. PTAL and let me know if there's anything more that needs to be looked into.

kinarr avatar Jul 08 '22 08:07 kinarr