clamsproject / app-tonedetection

CLAMS wrapper for monotonic audio detection
Other
0 stars 0 forks source link

Issues generating mmifs #1

Closed MrSqually closed 1 year ago

MrSqually commented 1 year ago

Currently, the detector doesn't actually generate the proper annotations. I don't know if this is an issue with _annotate, or if it's an issue in the _detect_tones function.

keighrim commented 1 year ago

After a meeting today, it seems like this and #2 are both related to the audio I/O package (aubio) being only partially functional inside the debian container. We discussed possibility of swapping out aubio with something like librosa https://librosa.org/doc/main/index.html .

MrSqually commented 1 year ago

so after implementing the tone detector in librosa (will fork a branch with the codebase later today), there are two big problems: 1.) it's worse than aubio for detecting the actual spans, and 2.) it's giving me the same problems? i.e., blank annotations. I'm wondering if this means that the aubio implementation is actually working on .wav files (and could thus be handled via a temporary ffmpeg conversion to .wav), and that the problem is somewhere else in my code - possibly in how I'm adding annotations to the view or constructing the new mmif object.

keighrim commented 1 year ago

I'm seeing these two lines when I POST, then get empty-view output.

[mp3float @ 0x7f24dc015100] Could not update timestamps for skipped samples.
[mp3float @ 0x7f24dc015100] Could not update timestamps for discarded samples.

Although, I'm not sure they are relevant messages...

MrSqually commented 1 year ago

figured it out. It actually was an incredibly simple issue in my code... the default output unit for the app.py in the container was milliseconds and there was some faulty logic in the loop that basically prevented any spans from being included. Changed the default to seconds (more human readable anyway) and fixed the issue. Oops!