Method for detecting voice presence on a communication line
FIELD OF THE INVENTION 
     The present invention relates to telecommunications in general, and more particularly to a method for detecting voice presence on a communication line. 
     BACKGROUND - PRIOR ART 
     The ability to detect when a called-party answers the telephone is a requirement for many applications and services that are now available throughout telephone networks, such as automatic voice information, voice messaging, telemarketing, etc . . . If the beginning and the end of called-party&#39;s introductory message after hang-up are accurately detected, efficiency in the delivered message will be optimized. Such a detection however is technically difficult to achieve, and it is currently estimated that inaccurate answer detection still costs telephone carriers and users a huge amount of money every year. 
     U.S. Pat. No. 4,672,669 filed on May 31, 1984, describes a Voice Activity Detector featuring a determination algorithm comprising two steps: checking the received signal energy versus an adaptive threshold, and testing the rate of change of spectral parameters (autocorrelation coefficients) for a number of consecutive 20ms sequences of the received signal versus a second fixed threshold. 
     The Detector was designed to take advantage of the half duplex effect of telephone conversation, and interpolate additional talkers up to twice the overall channel capacity (multiple telephone channels application). It was then able to detect even low-level &#34;speech&#34; segments in high-level uncorrelated or correlated background noise, but not in the presence of tones, including call progress tones (Detector designed for already established communications). 
     To detect voice on a communication line, even in the case of tones presence, it can still be considered to use spectral parameters thru a number of consecutive 20ms sequences, but it might happen that variations of these autocorrelation coefficients for some tone signals (including ring-back, SIT tones, . . .), due to the difference between the tone period and the 20ms computation window length, are such that the second threshold is difficult to establish, if not impossible. Moreover, in case of voiced speech (speech `sounding` like a tone) the method implemented in the Voice Activity Detector appears to not be sensitive enough. 
     OBJECTS OF THE INVENTION 
     It is therefore an object of the present invention to provide a method for accurately detecting beginning and end of voice presence on a digitized communication line, even in the presence of tone signals. 
     BRIEF SUMMARY OF INVENTION 
     The invention includes a method also based on the computing of spectral parameters, but with more sensitive capabilities, comprising more decision steps that make it suitable for detection of voice presence throughout the whole communication time, with all known types of signalling tones, in all cases of received signals, including when the ring-back tone is not received at the calling party (case of fast hang-up). The method also allows detection of the end of the called-party&#39;s answer. Computation power and memory requirements are very low. Voice presence is detected in less than 200ms. The invention has been tested versus numerous typical communication and telephone signals as call progress tones (dial, busy, reorder, ring-back, vacant, waiting, intercept), more than 100 voice files combined with silence, with and without noise conditions, . . . 
     The method includes analyzing digitized communication input signal by blocks of 20ms, and defining the stationary or non-stationary state of any current block. Then an analysis on the states of M last 20ms blocks allows to give the final decision on voice presence or not. 
     The invention specifically includes a method for detecting voice presence on a communication line, in a system where communication data are incoming in the form of a series of successive binary samples, of which N are stored so as to successively make up an input block of samples, said method comprising, after each block input, the steps of: 
     determining the stationary or non stationary state of the current block, and 
     deciding voice presence in the incoming communication data, if more than M3 non stationary states have been determined within the last M input blocks including the current block, and 
     deciding end of voice presence if no non stationary states have been determined within the last M input blocks including the current block. 
     The invention will be better understood from the following detailed description read in conjunction with the following schematics: 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     FIG. 1 shows an example of an application of the method according to the invention. 
     FIG. 2 shows the sequence of steps in the method according to the present invention. 
     FIG. 3 shows the detailed sequence of steps included in step 21 in the method according to the present invention. 
     FIG. 4 shows an example of parameter evolution with the method according to the present invention. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENT OF INVENTION 
     FIG. 1 shows an example of implementation for the method according to the invention. A terminal 1 allows an operator to take control over a computer system 2. The computer system includes interfacing functions with link 3, which is a digital link carrying several digitized communications. Such communications are organized on the link under a format well-known by the man skilled in the art as T1, CEPT or ISDN (Basic or Primary Rate). The link is provided by a telephone company that operates network 4. A private phone 5 is for example connected to the same network. 
     The computer system is capable of running an application such as automatic voice messaging, which requires handling of the call progress up to the called-party 5, delivery of a recorded message, and handling of proper end for the call. The present invention teaches, before delivery of the recorded message, the accurate detection of hang-up and end of introductory message by the called-party (`Mr. Smith speaking . . . `), so that, for example, the recorded message is not partially left unheard. 
     FIG. 2 shows the sequence of steps in the method according to the present invention. Step 19 is the initialization step for all parameters used in the method, and will be detailed further. 
     The digitized communication, for example over link 3, is in the form of a series of binary samples (typically 8-bit samples) x(j), incoming at a rate (typically 8kHz) depending on the communication network bandwidth. A number N of successive of these samples x(j) are stored within appropriate computer system memory, so as to form a 20ms block i at step 20. Three parameters are associated with each block: 
     S i  being determined equal to 1 only if a non stationary state of the input signal is being detected for current block i, 
     C i  being the sum of the M last states S i  for the M last input blocks including the current block i, and 
     VP i  being a flag set to 1 according to the method of the invention only when voice presence is being decided in the digitized communication input signal, the voice presence decision being re-evaluated after each new incoming block i (the flag will be set to 0 when end of voice presence is being decided). 
     The state S i  is determined for current block i at step 21, in a way that is for example detailed with FIG. 3 (other ways possible), and stored in a computer system buffer BUF(i). 
     Then, at step 22, the count C i  is computed for current block i. 
     At step 23, a branch is made depending on whether or not the voice presence flag was activated after the last input block (VP i-1 ), because the test on the value of C i  differs according to the situation: if the voice presence flag was not activated, it is desirable that the voice presence decision (flag set to 1) be as soon as possible after the actual start of the called-party&#39;s answer, and at the same time, secure enough so as to not be made wrongly. Whereas if the voice presence flag was activated, there is `no rush` to decide the end of the introductory message by the called-party. 
     Therefore, if VP i-1  is equal to 0, VP i  is set to 0 (no voice presence decision after current block i, step 26) if the sum C i  is less than a value M3 (step 24), that is, less than M3 non stationary states are counted within the M last input blocks. Otherwise, VP i  is set to 1 (voice presence decision after current block i, step 25). 
     If on the contrary, VP i-1  is equal to 1, VP i  is set to 0 (no voice presence decision after current block i, step 29) if the sum C i  is equal to, 0 (step 27), that is, all M previous states are stationary ones. Otherwise, VP i  is set to 1 (voice presence decision after current block i, step 28). 
     In both cases, the newly set VP i  becomes the next VP i-1  for the next analyzed input block, after a branch is made to step 20. 
     The re-evaluated VP flag can then be constantly polled by an application that requires accurate knowledge of beginning and end of voice on a communication line. 
     FIG. 3 shows the detailed sequence of steps included in step 21 in the method according to the present invention. 
     In step 30, the energy level Ei for a current input block is computed. Whether or not a dedicated mathematical processor is included in the computer system, the way to compute such an energy level is well-known to the man skilled in the art. 
     Then (step 31), the obtained value is compared with a M1 threshold, representing the specified level under which any signal on the link 3 is ignored. It is assumed that, under this level, there cannot be any voice presence in the current block, and a branch is made to step 39. 
     Otherwise, processing of the input signal is somewhat more elaborate: the first two autocorrelation coefficients for the current block, R i  (0) and R i  (1) are computed in step 32, as well as the ratio of the two in step 33, which gives a value k i  (PARCOR for the current block i). 
     The test performed in step 34 is intended to differentiate voice from high level noise, and additionally from R1 tones (cadence as low as 50ms and frequency as high as 1600Hz). Both cases indeed might lead to erroneous voice presence decisions, if the fact is not exploited that, generally, the first PARCOR absolute value is much higher (&gt;0.15) in the presence of voice than it is in the presence of noise signals. This test proves to be a good compromise between wrongly identifying high noise (or R1 tone) as voice, and accurately deciding voice presence in all cases. It can be removed if the system is to be attached to a network 4 featuring no R1tones, or if the noise level remains within controllable limits, and a branch directly made from step 33 to step 35. 
     Next (step 35), the variation of k i  versus its value for the preceding input block is computed, and compared with a fraction p1 of the current value: if the variation is higher, a non stationary state is decided for the current block (step 38). If not, a second test is performed (step 36). 
     The variation of energy level Ei versus its value for the preceding input block is computed, and compared with a fraction p2 of the current value: if the variation is higher, a non stationary state is decided for the current block (step 38). If not, a third test is performed (step 37). 
     When step 37 is reached, ambiguity should lie only in the presence of a tone, or a `stationary` voiced speech. Ambiguity is removed by comparing the value of C i-1  (number of non stationary states summed at the last input block), with a value M2 : if more than M2 non stationary states were counted, voiced speech is assumed and current block is decided non stationary (branch to step 38). Otherwise, a stationary block is assumed (branch to step 39). 
     Values for parameters that have proven to be effective are the following: 
     M=10 
     M1=-43 (dbm) 
     M2=5 
     M3=7 
     N=160 
     p1=2% 
     p2=25% 
     Those values are set at initialization step 19 along with setting of starting values for all other parameters. 
     It will be obvious to the man skilled in the art, that other values could be considered depending on the computer system and communication environment. 
     It will be equally obvious to the man skilled in the art that blocks of duration other than 20ms could have been chosen, shorter or longer (not exceeding 30 or 40ms though due to the type of signal analysis performed), the value of parameter N having to be adjusted accordingly. 
     FIG. 4 shows an example of parameter evolution with the method according to the present invention. A simulated S i  state is shown on the first line, determined for each new incoming block. Second line shows the computed C i  after each input block, and the third line the flag VP i  indicating a decision of voice presence (flag is equal to 1) or end of voice presence (flag is equal to 0). 
     Although the invention has been described in a particular embodiment, it will be obvious to the man skilled in the art, that the description is sufficient to allow easy embodiment of the invention in other computer system and communication environment.