tensorflow / tensorflow/tflite-support

Adding offset param to TensorAudio.create_from_wav_file

Open
#849 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
441
Forks
146
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with TensorAudio.create_from_wav_file and the C++ LoadAudioBufferFromFile implementation. Trace every file that calls LoadAudioBufferFromFile and update the Python layer and affected tests for the new sample offset parameter. Done means callers can skip the requested number of samples without breaking existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.