Note: Descriptions are shown in the official language in which they were submitted.
~IZ~9~9
- 1 - ,
B.N. Hansen-~
.
DIGITAL ~ANDS~REE TELEP~ONE
This invention relates to a telephone
-- subscriber's instrument with a handsfree facility.
A hancsfree telephone receives speech viâ a
lsudspeaker built into Ihe set and sends speech via a
microphone on 1he set and near the speaker. The two
transducers can also be incorporated into a separate unit
near the telephone, or 'he microphone may be separate
from the speaker unit, connected thereto by â cord or by
a cordless ~ransmission system. This closeness of the
speaker and microphone may cause instability due to
analoyue coupling from louospeâker to microphone, with
; electrical coupling within the transmission circuit
including ~ar-end acoustic coupling. In â digital syslem
coupling between the digi~al transmission paths is not
,- relevant, which leaves coupling due to analogue signals
I at both ends of the connection, i.e. sidetone and
acoustic coupling. The system is unstable when these
factors crea~e â closed loop gain greater than unity.
To get adequate speech levels from the speaker
and adequate microphone sensi~ivity, the signal gain in
the speech paths has to bè controlled so thal total loop
gain is always less than unity. $o do this, the incoming
speech path is attenuated while outgoing speech is
presen4, and vice versa under control of a speech
amplitude detection system. The invention has as its
object the provision of an arrangement for achieving this
r~
,
~7~
in a satisfactory and economical manner.
According to the invention, there is provided an elec-
trical circuit for use in a handsfree telephone, wherein there
are separate channels for outgoing speech and for incoming speech,
comprising: Codec means for sampling each said channel at preset
intervals and for coupling the results of the samplings, which
represent the amplitudes of the speech in those channels, to
processor means having an algorithm for comparison of said sam-
plings with a stored threshold amplitude, wherein information
representative of the level of the background noise in the
channels is monitored and the threshold amplitude for each said
channel is adjusted so as to be at least equal to the noise level
as monitored, and wherein each said channel includes an attenua-
tor means having a look-up table whose value is adjusted accor-
ding to the results of the comparisons, such that each said
speech channel is enabled or disabled according to the comparison
results, and so that a channel on which the current threshold
amplitude has been exceeded is enabled while a channel in which
the current threshold amplitude has not been exceeded is dis-
abled, and wherein the processor includes a memory having a num-
ber of control words each of which when read out is used to
control the adjustment of a said look-up table to one of a number
of preset values, and wherein when the noise level as monitored
is found to have changed a corresponding adjustment is made to
the values of said control words.
Thus the above arrangement involves for each speech
channel the detection of the speech signal and its comparison
~,~
:~2~ 9
-2a-
with a preset threshold. When such a threshold is achieved
there is an initial delay be~ore the speech channel is enabled,
which delay should be as short as possible to avoid clipping the
beginning of the speech. At the end of the speech, when its
amplitude falls below the threshold a delay should be introduced
to avoid clipping and to avoid unnecessary inter-word switching.
The noise level detection is needed because the speech signals
often have to be detected in the presence of noise. In the arrange-
ment to be described herein, which is a digital system, the three
main parameters of a voice switching system, i.e., initial delay,
threshold level and hold-on time are determined using a processor-
con-trolled system which operates on digitally encoded speech
samples.
` - 3 ~ 9~9 l
An embodiment of the lnvention will now be
desc~ibed with reference to the accompanying drawings, in
which
~ig. 1 is a highly simplified block diagram of a
digital hands-free telephone.
~ig. 2 shows how the PCM encoded speech samples are
handled under control o a microprocessor.
Fig. 3 is a time diasram representative of PCM code
processing during programme execu~ion.0 Pigs. 4-10 are flow sheets explanatory of the operation
of the telephone described herein.
We refer to the block diagram of Fig. 1. The
system described herein uses A-law PCY. encoded speech
signals although the method is applicable when o'her
forms of digitally encoded speech are used.
The analogue signal from the microphone 1 is
amplified and then band-~idth limited by the codec filter
2. The codec 3 then samples the analogue signal and
carries out PCM encoding of ~he sampled signal
amplitudes, which are transmitted to the interface
circuit 4 where they are converted to a format suitable
for reception by the data processor 5. ~hey are then
latched in temporary registers until required by ~he
processor. At the same time PC~ codes from the ~-line
are received and latched. ~fter processing ~y the
computer the codes are re-transmitted to their respective
destinations via a pair of registers. The principle is
shown in Fig. 2.
The interface also includes the timing circuitry
needed to generate the required clock and synchronisation
signals for the codec. A sighal derived from this
circuit is used to interr~pt the data processor at the
same rate as the sampling, PCM c~des being read in,
processed, and re-transmitted at each such interrupt time.
The program flow is illustrated in ~i~. 3.
During execution of the interrupt routine, signal
amplitude information from the two directi~ns is
.
~ _ 4 _ 1 Z ~ ~ 9
converted to an approximation of the respective speech
envelope, and the resulting parameter for each direc'ion
is passed to the main program. A noise monitor algorithm
is also placed within this routine. During execution of ,!
the main program each speech envelope parameter is
compared with a set threshold and the appropriate speech
channel is enabled or partially disabled by adjustments
made to two attenuation tables, one in the send speech
channel and one in the receive channel. The software
1~ used to control the processor is now described.
The flow diagram for the interrup routine shown
in Fig. 4 contains three algorithms, which determine
speech envelope parameters in receive and tr2nsmit
' directions and a noise monitor.
The speech envelope is continuously monitored in
; both speech directions and is derived from a peak-seeking
algorithm at the beginning of the interrupt routine. The
output from this algorithm is a parameter representing
- the sampled speech envelope. A flow diagram of the
algorithm is shown in Pig. 5.
The parameter DAC~ which represents the
amplitude of speech envelope, is reset to 0 when tbe
program is originally initialised. It is then
incremented in steps of 3 d3 every 125 us, or at tbe
sampling rate, until a peak is found. A 32 ms delay i
t-~ then initiated at the peak level, after which DACA is
decremented in steps of 3 dB every 4ms. Both the 32 ms
and 4 ms delays may be reset, and the parameter DACA may
be updated if it is found that (AIN) ~ DACA. ~ (AI~) ~ is
the value (unsigned) of the decoded Tx PC~ code. A
corresponding peak-seeking algorithm is applied to the
receive path from whlch pàrameter DACB is derived. Both
of these speech envelope parameters DACA and DACB are
passed on to the main program.
Reverting to the interrupt routine, both decoded
PCM woràs must now be re-transmitted to their respective
destinations i.e. A-Tx to B-Rx and B-Tx to A-Rx, see the
diagram of the interrupt routine, Pig. 4.
.' :
1 Z~79Z9
- 5 -
The returned oodes are found from two
attenuation look-up tables. Each decoded and unsigned
PCM-word corresponds to an address in ~he look-up table,
i.e. (AIN)=1010111 is the address 57~. At this address
we find the corresponding attenuated code, i.e. with 6 dB
attenuation (AIN)-6 dB-1000111=47B. The orginal sign of
this word is then replaced, i.e. if negative
llO00111=C7~, and i' is then encoded into PC~, A-law
format by inverting alternate digits and sent ou~ to its
appropriate destination. This method can also be used
for ~-law PCM, but the look-up tables from which the
attenuators are controlled are different.
( The interrupt routine includes a ~noise monitor
!~ algori'hm~ which is time controlled from the main
program, its flow d~agram being shown in Fig. 6. The
noise level is monitored ~rom ~he microphone input of the
handsfree telephone, the Rnoise~ level being defined as
the minimum value of the transmit speech envelope over a
given period of time. The noise monitor algorithm resels
a noise parameter DACB~ to maximum code amplitude i.e.
7F~ at the beginning of every ~ sec. period. This
parameter DACB~ is then compared with DACR every 125 us,
and reduced to DACB resulting in a figure at the end OL
the 4 sec. period of DACBM=DACB min. over the period.
This is then set to the noise parameter DACBL which is
used ~o control transmit threshold level and channel
~` attenuations. DACBL remains constant over every 4 sec.
period and is DACBL=DACB min~ monitored over the previous-
period.
In the main program the two speech envelope
levels are compared with the ~espective thresholds as
shown on the flow diagram, Figs. 7 and 8 of these, Pig. 7
is an outline of the main program while Fig. 8 relates to
a comparison of speech envelope levels DACA and DACB each
against thresholds, of which RxUT~R is the receive
threshold and TxUT~R is the transml~ threshold.
.
'' '
~12~7~9
J
- 6 -
Initially the two attenua'ion tables, i.e. the
attenuators in the two speech channels, are given equal
attenuation so that the telephone is in a standby state
with both transmit and receive channels partially
blocked. While executing the standby loop the program
first compares DACA with the receive threshold, and if it
exceeds this threshold, program execution continues by !
enabling the A-Tx channel so that the A-party is talking
and the B-party (handsfree) is listening. If DACA is
found to be less than this threshold, ~hen DACB is
compared with the transmit threshold. ~hese threshold
levels are variable and depend on the noise level and
,- loudspeaker gain as explained below. As before, if DACB
exceeds this threshold then B-Tx channel is enable~ so
that the B-party is talking and the A-par y is listening.
I~ neither threshold is exceeded the prosram remain~ in
the standby loop.
When the channel B-~x threshold is exceeded the
attenuation tables are adjusted so that the B-Tx
attenuation is reduced by x dB and A-Tx a'tenuator is
increased by x dB, where x is related to the system
configuration, i.e. microphone sensitivity, pre-amp gzin
~nd standby attenuation level and can be typically 6 dB
or 12 dB. This also allows for some automatic adjustment
of path gain to compPnsate for background noise. This
;~ adjustment is carried out by adjusting all 128 codes in
each table in sequence from highest amplitude to lowesl.
The 128 codes are the 128 amplitude levels of the
de-coded unsigned PCM-Gode, which codes are each a 7-bit
30 word: 27 = 128 levels. These are the codes which are
used by the processor to control the settings of the
` attenuator in the speech channels. Thus during a
transition period between speech in one direction and
speech in the other direction, some distortion may occur
in the speech pattern due to some PCYI code sample bein~
re-transmitted at dif~erent attenuation levels. ~owever,
the transition is so fast that it is in almost 211 cases
'' '.
` ~Z~79~9
-- 7 --
not noticeable subjectively. Tbe flow diagram for the
ad jUS1 ment of the look up tables is shown in Fig. 9. An
alternative approach is to have permanent look-up tables,
which for eight levels of attenuation needs 1 k by_e
S additional memory, but allows attenuation steps of 3 dB
'o be implemented with greater accuracy than that
achieved by a simple algorithm. The transition phase is
also eliminated by this method.
Al this stage the program enters a loop which
continuously monitors the Bx-Tx or Ax-Tx levels,
depending on which channel is open, and compares the
results of the monitoring against set thresholds. In the
same loop a differential comparison is made of the two
speech envelope parameters 3ACA and DAC~ If the 3-Tx
channel is open, the other channel can at this point gain
access in the conversa~ion provideà DAC~ is at a
specified level above DA~B, i.e. if DACAsDACB+A dB. ~he
differential threshold, A, assumes three different values
àepending on the loudspeaker gain control setting, the
gain control is divided into three ranges, with ~-6 dB in
the lower range, A=12 d~ in the mid range, and A=18 dB
~ithin the high range. This automatic adjustment of the
differential threshold is introduced to avoid the set
switching itself off at relatively high speaker output
~ 25 levels. In such a case, acoustic feedback from the
f speaker received by the microphone could on detection by
the processor exceed its threshold. This would switch
the microphone channel on and speaker channel off,
whereafter the channels switch back to their original
positions as there is no input to the microphone. By
setting the differential threshold to an appropirate
level as just indicated, this clipping of the speaker
output is avoided. This adjustment is illustrated by the
flow diagram of ~ig. 10.
The flow diagram including differential
thresholds and hold-on delay time is shown in Fig. 8.
There are ~asically two loops in the routine.` The B-~x
.
.
- 8 -
loop holds the outgoing transmit- channel open until
either incomin~ DACA is ~ DACB~A or outgoing DACBK~X~T~R.
In the lat~er case, the loop continues until the hold-on
time of 450 ms is completed after which the program ¦',
returns to standby. A similar procedure is carried out ii
in the A-Tx loop when incoming signal channel is on.
'i
'
. . .
~ . .
.,, .. I
- .
:"" i