Reply by Chetan Vinchhi●December 22, 20062006-12-22
brettcclark@gmail.com wrote:
> No, this is not DTMF. It is Baudot code (TTY) which consist of
> independant 1400 and 1800 Hz tones played end to end (i.e., no
> overlapping tones like in DTMF).
I am not aware which standards (if any) drive TTY compliance. There
must be an acceptable operating range for the tones and your tone
detectors (yes, for a few independent tones Goertzel is a good choice)
need to be designed for that range. Have you implemented this in a
fixed-point machine? If so, the choice of size and Q formats for
representing the coeffficients and intermediate values will determine
the dynamic range that can be addressed. Also, what is the environment
like? Is there an echo canceller or a non-linear processor (i.e.
residual echo suppressor) anywhere in the system?
C
Reply by robert bristow-johnson●December 21, 20062006-12-21
brettcclark@gmail.com wrote:
> No, this is not DTMF. It is Baudot code (TTY) which consist of
> independant 1400 and 1800 Hz tones played end to end (i.e., no
> overlapping tones like in DTMF).
>
> What is the "broadbanded measure of power"?
> ... What's the idea behind it?
if x(t) is your signal, the power around time t0 is
px(t0) = (1/tau)*integral{ |x(t)|^2 * w((t-t0)/tau) dt}
where w((t-t0)/tau) >= 0 is a window centered around time t0 of width
tau and scaled or normalized so that:
integral{ w(t/tau) dt} = tau
or
integral{ w(u) du} = 1
this is "broadbanded" because it's the raw input, x(t), going into it
without running x(t) through some filter and eliminating other
frequency components.
now, suppose you define some y(t) which is the output of some filter
(with impulse response h(t)) that had x(t) going in. and let's also
define the filter so that the gain in the middle of the passband of the
filter is normalized to be 1 (or 0 dB):
.------.
x(t) ---->| h(t) |-----> y(t) = integral{ x(u)*h(t-u) du}
'------'
now suppose that output y(t) has its power measured in the same way
that x(t) is:
py(t0) = (1/tau)*integral{ |y(t)|^2 * w((t-t0)/tau) dt}
even though it's was normalized, it's probably a good idea to have the
same window, w(), and same width, tau.
now, the ratio py(t0)/px(t0) is a measure of how much of the energy of
x(t) there is that lives in the passband of the filter that outputs
y(t). if that ratio is very close to one, then you can say that all of
x(t) consists of frequency components tuned to whatever frequency the
filter is tuned to.
if that filter is tuned to 1400 Hz, that is a measure of how confident
you are that x(t) is purely 1400 Hz. if the confidence of the 1800 Hz
signal is higher than the confidence of the 1400 Hz signal, you might
have a "1". if it's the other way around, you might have a "0".
if you normalized things right (and if your filter bandwidths are small
enough so that 1400 Hz stays the hell outa the 1800 Hz filter and
vice-versa), there is no way that the confidence of *both* filter
outputs can be close to one at the same time, t0. if the confidence
for both filter outputs are low, you know you don't have a decent FSK
signal to work with and you should inform the client program of such.
so you might have 3 possible outputs: "0", "1", and too crappy to tell.
> How can I implement this in my app?
convert x(t) into x[n] (samples), w(t) to w[n], y(t) to y[n], and
replace the integrals with summations and implement your filters with
some decent passband filters or perhaps a scaled version of the audio
peakingEQ. the center frequencies should be tuned to 1400 Hz and 1800
Hz and the gain at those center frequencies should be 1 (or 0 dB). the
audio EQ cookbook might help you quickly design the filters. other
than that, you're on your own or you gotta pay someone else to sweat
the details.
r b-j
Reply by ●December 21, 20062006-12-21
No, this is not DTMF. It is Baudot code (TTY) which consist of
independant 1400 and 1800 Hz tones played end to end (i.e., no
overlapping tones like in DTMF).
What is the "broadbanded measure of power"? How can I implement this
in my app? Whats the idea behind it?
Thanks,
Brett
robert bristow-johnson wrote:
> is the application a DTMF decoder?
>
> i wouldn't AGC the thing, but i would compare the filter output (or the
> sum of the two filter outputs, if this is a 2-tone DTMF) to the
> broadbanded measure of power to make sure that they are close to each
> other. also, for DTMF, the two tones should be close to equal in
> magnitude. when both of those relative measures exceed some threshold
> that you determine, you might say that the decoder has a legitimate
> "hit".
>
> r b-j
Reply by Chetan Vinchhi●December 21, 20062006-12-21
robert bristow-johnson wrote:
>
> i wouldn't AGC the thing, but i would compare the filter output (or the
> sum of the two filter outputs, if this is a 2-tone DTMF) to the
> broadbanded measure of power to make sure that they are close to each
> other. also, for DTMF, the two tones should be close to equal in
> magnitude. when both of those relative measures exceed some threshold
> that you determine, you might say that the decoder has a legitimate
> "hit".
The "SNR" as well as the relative powers in the two frequency bins are
prescribed by standards (ITU-T Q.24 IIRC) for DTMF tones. There is some
variation across national boundaries, but the "you determine" aspect of
it is limited.
C
Reply by robert bristow-johnson●December 20, 20062006-12-20
brettccl...@gmail.com wrote:
> Hello All,
> I'm currently using the Goertzal algorithm to find a couple frequencies
> in some audio samples. However, how am I supposed to deal with volume
> differences? On occasion, the tones are quieter and thus don't seem to
> be picked up by the decoder. Same thing with loud tones: they don't
> necessarily get picked up. Should I boost/lower volume on the fly
> (sounds real hard!) or tweak the algorithm depending upon the average
> magnitude of the incoming samples? Any ideas will be welcome!
is the application a DTMF decoder?
i wouldn't AGC the thing, but i would compare the filter output (or the
sum of the two filter outputs, if this is a 2-tone DTMF) to the
broadbanded measure of power to make sure that they are close to each
other. also, for DTMF, the two tones should be close to equal in
magnitude. when both of those relative measures exceed some threshold
that you determine, you might say that the decoder has a legitimate
"hit".
r b-j
Reply by ●December 20, 20062006-12-20
Hello All,
I'm currently using the Goertzal algorithm to find a couple frequencies
in some audio samples. However, how am I supposed to deal with volume
differences? On occasion, the tones are quieter and thus don't seem to
be picked up by the decoder. Same thing with loud tones: they don't
necessarily get picked up. Should I boost/lower volume on the fly
(sounds real hard!) or tweak the algorithm depending upon the average
magnitude of the incoming samples? Any ideas will be welcome!
Thanks,
Brett