When the snack formant command is run, it appears to produce non-deterministic results, despite having the same input sound file and parameter values. This is especially apparent if we call the formant command through Python's Tkinter library and calculate formants for multiple sound files in the same Tcl shell. Changing the order in which the sound files are processed, changes the results slightly. This suggests that the formant command uses a random seed (unfortunately, we can't confirm if it's actually a random seed issue, since the snack formant documentation doesn't mention anything about a random seed.) If we run the formant command for a single sound file via a Tcl script, then we get consistent results, presumably because the same random seed is used each time.
For now, it's best to avoid calling Snack through the Python Tkinter library since the Tkinter-based implementation evaluates Snack commands line by line through the Tcl interpreter, which can lead to non-deterministic results depending on the order in which sound files are processed.
When the snack
formant
command is run, it appears to produce non-deterministic results, despite having the same input sound file and parameter values. This is especially apparent if we call theformant
command through Python's Tkinter library and calculate formants for multiple sound files in the same Tcl shell. Changing the order in which the sound files are processed, changes the results slightly. This suggests that theformant
command uses a random seed (unfortunately, we can't confirm if it's actually a random seed issue, since the snack formant documentation doesn't mention anything about a random seed.) If we run theformant
command for a single sound file via a Tcl script, then we get consistent results, presumably because the same random seed is used each time.For now, it's best to avoid calling Snack through the Python Tkinter library since the Tkinter-based implementation evaluates Snack commands line by line through the Tcl interpreter, which can lead to non-deterministic results depending on the order in which sound files are processed.