marl / marl/openl3

Numerical errors in hop_len due to rounding

Open
#81 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
604
Forks
66
PR merge metrics
No merged PRs in 30d

Description

It appears there might be a bug in the audio framing.

If you round hop_len, then for a long audio file, over time the rounding error will accumulate. It seems that you should leave it as a float, and round every time you use it.

For example, if you want embeddings every 25ms and have 44100Hz audio, then the sample hop length is 1102.5. In this
example, you will drift 25ms every 37 minutes of audio. This is just an example because the sample rate is 48000 here.

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

Locate the audio framing code that calculates hop_len and inspect every place where that value is used. Reproduce the rounding behavior with a non-integer hop length such as 1102.5 and verify that long files do not accumulate timing drift; add or update a regression test if the existing test layout identifies one.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
audio-video-rtc
Issue type
Bug
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.