Repository navigation
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
aguirreSL
added a commit
to aguirreSL/PyTTa
that referenced
this pull request
Nov 1, 2026
…PyTTaMaster#111 by hand Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds to
pytta.functionsfrequency warping with the first-order allpass D(z) = (z⁻¹ - λ) / (1 - λz⁻¹), whichita_audio_warp,ita_zpk_warpandbarkwarpprovide in the ITA-Toolbox:warp(signal, lam, numSamples=None): the signal, taken as an FIR filter, with every delay replaced by D(z). Its spectrum at ω is the original one at θ(ω) = ω + 2 arctan(λ sin ω / (1 - λ cos ω)), so a positive λ gives more resolution to the low frequencies. It is computed by passing the impulse through the chain of allpasses, and-lamundoes it.warp_zpk(z, p, k, lam): the zeros, poles and gain of the same substitution in a filter, each root r moving to (r + λ) / (1 + λr), with roots at λ for the difference between the numbers of zeros and poles.bark_warping(samplingRate): the coefficient that approximates the Bark scale, 0.8517 √arctan(0.06583 fs / 1000) - 0.1916 (Smith and Abel, "Bark and ERB bilinear transforms", IEEE Trans. Speech Audio Process. 7(6), 1999).ita_audio_warpandita_zpk_warpbelong to an application of the ITA-Toolbox whose license is "all rights reserved", so nothing was taken from their code; the functions are written from the allpass substitution.The tests in
tests/test_warping.pyprint the measured differences against the analytic mapping θ(ω):SignalObj).Checked with Python 3.12, numpy 1.26 and scipy 1.17. The 7 failures of
development(3 intest_h5io.py, 4 intest_pyttasave.py) are the same with and without this change.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com