mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-10 00:11:11 +00:00
[1.45.45]
Fixed bug where SSML voice change didn't remember an initially specified Klatt variant. Removed some unused variables and redundant initializations. Patch to fix a spike from Klatt function setzeroabc() git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@275 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+15
-9
@@ -883,12 +883,10 @@ static void setzeroabc(long int f, long int bw, resonator_ptr rp)
|
||||
double arg;
|
||||
|
||||
f = -f;
|
||||
|
||||
if(f>=0)
|
||||
{
|
||||
f = -1;
|
||||
}
|
||||
|
||||
|
||||
//NOTE, changes made 30.09.2011 for Reece Dunn <msclrhd@googlemail.com>
|
||||
// fix a sound spike when f=0
|
||||
|
||||
/* First compute ordinary resonator coefficients */
|
||||
/* Let r = exp(-pi bw t) */
|
||||
arg = kt_globals.minus_pi_t * bw;
|
||||
@@ -905,9 +903,17 @@ static void setzeroabc(long int f, long int bw, resonator_ptr rp)
|
||||
rp->a = 1.0 - rp->b - rp->c;
|
||||
|
||||
/* Now convert to antiresonator coefficients (a'=1/a, b'=b/a, c'=c/a) */
|
||||
rp->a = 1.0 / rp->a;
|
||||
rp->c *= -rp->a;
|
||||
rp->b *= -rp->a;
|
||||
/* If f == 0 then rp->a gets set to 0 which makes a'=1/a set a', b' and c' to
|
||||
* INF, causing an audible sound spike when triggered (e.g. apiration with the
|
||||
* nasal register set to f=0, bw=0).
|
||||
*/
|
||||
if (rp->a != 0)
|
||||
{
|
||||
/* Now convert to antiresonator coefficients (a'=1/a, b'=b/a, c'=c/a) */
|
||||
rp->a = 1.0 / rp->a;
|
||||
rp->c *= -rp->a;
|
||||
rp->b *= -rp->a;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user