Skip to content

Bug Report: Time Domain Shifted When Plotting the Formants #108

@Dzaau

Description

@Dzaau

I am reporting an issue when using Fasttrackpy to generate spectrograms and formants. 

formantTracking.html
untitled1.wav

In the generated graphs, the blank area before the formant data points begin is noticeably shorter than the blank area after they end. The reason for this can be found in the time_domain attribute of the candidates. As I calculated in the attached HTML document, the time corresponding to the formant data points somehow happens to have been shifted forward by half the window length. This will affect the accuracy of the formants, especially for transitions. However, the blank areas before and after the formants appear to be equal on example graphs shown at https://fasttrackiverse.github.io/fasttrackpy/usage/pythonic_use.html

I was wondering what could be causing the issue and how to generate the right time domain. 

To help illustrate the problem, an HTML file of the code and the output in Jupyter Lab and the audio file are attached. I am using Python 3.13 on Windows 11 and I installed fasttrackpy via pip. The sampling rate of the audio file is 22050Hz.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions