7.8. Formant strengthening and steering
191
n=[wid(lp), n(1:2)];
ni=[lp, ni(1:2)];
else
n(2:3)=[wid(lp), n(2)];
ni(2:3)=[lp, ni(2)];
end
else
n(3)=wid(lp);
ni(3)=lp;
end
end
end
%narrow the 3 narrow pairs even further
nlsp=lsp;
for k=1:3
nlsp(ni(k))
= lsp(ni(k))
+ n(k)*sc;
nlsp(ni(k)+1) = lsp(ni(k)+1) - n(k)*sc;
end
A scaling factor of sc
= 0.2 or less is usually sufficient to noticeably accentuate spec-
tral peaks, but the code can also be used in reverse, by scaling with sc
= 1.2 to widen the
spectral peaks. Thus, the Matlab code shown was used to produce the LSPs and spec-
trum shown in Figure 7.9. Shifting, rather than narrowing, formant-related lines would
involve simply replacing the subtraction in the final loop with an addition (although that
would neither detect nor correct resonances caused by lines approaching either angular
frequency extreme).
Definitely, it should be noted that adjusting lines in this way alters the frequency
relationship between any underlying formants, and therefore will tend to degrade the
quality of encoded speech. In fact the code shown, when applied to continuous speech
recordings, will sometimes result in very unusual sounds once the degree of scaling
becomes extreme (for narrowing with sc
≥ 0.5 or widening with sc ≥ 1.5), thus it is far
better to make only small changes to a speech spectrum wherever possible.
7.8.1
Perceptual formant steering
In order to minimise perceived quality degradation, a perceptual basis can be used for
line shifting. For example, frequencies can be altered by constant Bark, rather than by a
fixed ratio. In this scheme, if B
k
is the Bark corresponding to the frequency of a particular
line, then that line shifted by degree
δ is:
ω
k
= 600 sinh{(B
k
+ δ)/6}.
(7.15)
To demonstrate this in Matlab, we would very simply use the bark2f() and
f2bark()
functions developed in Section 4.3.2 to convert to and from Bark domain,
192
Do'stlaringiz bilan baham: |