Adaptive signal detection process for the evaluation of multifrequency coded signals

Abstract: A process for determining the presence of either speech or one of a plurality of expected single-frequency signals on a line includes the steps of measuring the total signal energy on the line; measuring the signal energy present in each one of a plurality of selected separate frequency bands and identifying the two frequency bands having the highest signal energies; determining whether the highest signal energy exceeds a first selected threshold value; determining whether the highest signal energy exceeds the second highest signal energy by greater than a second selected threshold value; determining the amount of out-of-band signal energy; and determining whether the highest signal energy exceeds the out-of-band signal energy by greater than a third selected threshold value. A process for determining the presence of two of a plurality of expected a single-frequency signals on a line includes the steps of measuring the total signal energy on the line; measuring the signal energy present in each one of a plurality of selected separate frequency bands and identifying the three frequency bands having the highest signal energies; determining whether the two highest signal energies exceed a first selected threshold value; determining whether the second-highest energy exceeds the third-highest energy by a second selected threshold value; determining the amount of out-of-band signal energy and determining whether the sum of the two highest signal energies exceeds the out-of-band energy by a third selected threshold value; and determining whether the ratio of the two highest signal energy values exceeds a fourth selected threshold value. A method for identifying expected call progression signals on a telephone line, comprises the steps of (1) sensing the presence of energy on the line and determining if the energy comprises speech; (2) identifying the frequency content and duration of the energy; 3) comparing the frequency content of the energy with stored information comprising the frequency content of expected signals and identifying the energy as one of the expected call progression signals if a match is found; (4) sensing the presence of silence on the line if no match is found; (5) identifying the duration of the silence; (6) repeating steps (1) through (5) for a predetermined number of times; and then (7) comparing the frequency content of the energy, the duration of the energy, and the duration of the silence with stored information comprising the frequency content of energy, the duration of energy, and the duration of silence for a plurality of expected call progression signals and identifying the energy as one of the expected call progression signals if a match is found.

Description: BACKGROUND OF THE INVENTION 1. Field Of The Invention The present invention relates to circuits and other apparatus and to methods for tone decoding. More particularly, the present invention relates to apparatus and methods for decoding single tones and dual tones, such as those used in telephone applications to decode DTMF tones, dial tones, busy signals and other tones used in telephone systems, for recognizing call progress signals in PBX and other telephone systems, for adapting tone recognition systems to new environments, and for recognizing voice energy. 2. The Prior Art Modern telephone systems automate and implement many useful functions by detecting the presence of control tones and response tones generated by the telephone company central office or local PBX in response to the condition of individual telephone sets in the system. Depending on location, telephone systems throughout the world utilize different combinations of periodic or continuous single tones and dual tones, such as dial tones, DTMF tones, ringback and no-ringback signals, busy signals, and connect signals. Circuits are known in the prior art for detection of single and dual tones used in telephone systems, and for classifying these tones by their function. A combination of frequency decoding and cadence detection is commonly employed to identify telephone system tones. Frequency decoding, as its name suggests, identifies tones by their characteristic frequency or frequencies. Cadence detection looks for a repeating pattern in the audio signal, such as the pattern produced by a ringback or a busy signal. These patterns are called audio cadences. Once a cadence has been established, it can be classified as a single ring, a double ring, or a busy signal by comparing the periods of silence and sound to established parameters stored in or otherwise known by the circuitry. Cadence detection differentiates between the no- ringback, no-answer, busy, and connect states of a telephone system. An example of a prior art cadence detection system is found in United States Patent No. 4,477,698. GB-A-2 113 880 discloses an apparatus and method for detecting multi-frequency signals for use in telephony. The receiver comprises a plurality of frequency selective circuits whose outputs are connected to a signal combination detector. A guard circuit determines the total received power for comparison with the power of the two strongest multi-frequency signals received in order to decide whether the detected signal is valid. The capability of a signal processing system to identify these different call progression tones and to differentiate between these tones, noise, and voice energy on a signal line would be useful capability. It is therefore an object of the invention to provide apparatus and a method which is capable of identify different call progression tones and differentiating between these tones, noise, and voice energy on a signal line. BRIEF DESCRIPTION OF THE INVENTION A method for determining the presence of one of a plurality of expected single-frequency signals on a signal line at a selected time includes the steps of measuring the total signal energy on the signal line at the selected time; measuring the signal energy present in each one of a plurality of selected separate frequency bands at the selected time and identifying the two frequency bands having the highest signal energies; determining whether the highest signal energy exceeds a first selected threshold value; determining whether the highest signal energy exceeds the second highest signal energy by greater than a second selected threshold value; determining the amount of out-of-band signal energy present in all frequency bands other than the frequency band containing the highest signal energy; and determining whether the highest signal energy exceeds the out-of-band signal energy by greater than a third selected threshold value. A method for determining the presence of two of a plurality of expected a single-frequency signals on a signal line at a selected time includes the steps of measuring the total signal energy on the signal line at the selected time; measuring the signal energy present in each one of a plurality of selected separate frequency bands at the selected time and identifying the three frequency bands having the highest signal energies; determining whether the two highest signal energies exceed a first selected threshold value; determining whether the second-highest energy exceeds the third-highest energy by a second selected threshold value; determining the amount of out-of-band signal energy present in all frequency bands other than the frequency bands containing the two highest signal energies and determining whether the sum of the two highest signal energies exceeds the out-of-band energy by a third selected threshold value; and determining whether the ration of the two highest signal energy values exceeds a fourth selected threshold value. A method for recognizing call-progression signals on a signal line according to the present invention includes the steps of detecting the presence of energy on the line, determining if the energy comprises human speech sounds, measuring period during which the energy is present, detecting when the energy ceases, measuring the period of silence, and comparing the frequency components of the energy, the on period and the off period with the parameters of known call-progression tones. According to the present invention, human speech is recognized in real time by an apparatus and a method including the steps of digitizing an analog signal present on a signal line, correlating N neighboring portions of the digitized signal, performing frequency analysis using fast fourier transform (FFT) analysis on the digitized signal, identifying the three largest frequency-domain maxima, determining whether the two largest maxima are above a threshold frequency, and determining whether the ratio of the largest to the third largest maxima exceeds a predetermined value. According to the present invention, the steps of the method may be performed in real time using fixed-point hardware by approximating the correlation and FFT functions. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow diagram for a process according to the present invention for determining the presence of one of a plurality of expected single-frequency signals on a signal line at a selected time. FIG. 2 is a flow diagram for a process according to the present invention for determining the presence of two of a plurality of expected single-frequency signals on a signal line at a selected time. FIG. 3 is a conceptual block diagram of a combination hardware/software system for performing the processes of the present invention. FIG. 4a is a flow diagram for a state machine which implements a process according to the present invention for recognizing call progression tones in a telephone system. FIG. 4b is a representation of the functionality of a state machine which implements the process illustrated in FIG. 4a. FIGS. 5a-5c are flow diagrams describing the operation of the three states of the state machine depicted in FIG. 4a. FIG. 6 is a diagram of presently preferred apparatus according to the present invention for performing speech recognition. FIG. 7 is a flow diagram showing the steps of a method for real-time human speech recognition according to a presently preferred embodiment of the invention. FIG. 8 is a block diagram illustrating a presently preferred method for sharpening the FFT maxima in the process of FIG. 7. DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT Those of ordinary skill in the art will realize that the following description of the present invention is illustrative only and not in any way limiting. Other embodiments of the invention will readily suggest themselves to such skilled persons. The adaptive single/dual tone decoder and method of the present invention is useful in telephony environments and finds uses in such apparatus as PBX units and other intelligent telephone equipment. Because both the apparatus and method according to the present invention are adaptive, apparatus fabricated in accordance with the teachings of the present invention may be readily employed in different environments. Such different environments include the different telephone systems encountered in different countries where tone frequencies, cadences, and other call progress signal attributes differ from one another. A process according to a presently-preferred embodiment of the invention for determining the presence of one of a plurality of expected single-frequency signals on a signal line at a selected time is illustrated in flow diagram form at FIG. 1. The process illustrated in FIG. 1 may be performed to monitor a signal line and detect the presence of a signal characterized by one of a plurality of frequencies which are expected to be present on that line at various times. In real-world telephone signal processing applications, non-exhaustive examples of such signals include dial tones and busy signals. A first step in the process illustrated at box 10 of FIG. 1, the signal line is monitored and several measurements are made. The total amount of energy present within the bandwidth of the signal line is measured. In addition, the amount of energy present in a plurality sub bands within the bandwidth of the signal line is measured. The number of sub bands corresponds to the number of different single-frequency signals expected to be encountered on the signal line. The sub bands are substantially non-overlapping and each of the sub bands is chosen to encompass only one frequency from the plurality of frequencies which characterize the expected signals. Ideally, one of the expected frequencies would be at or close to the center frequency of each sub band. Next, at box 12, the energies measured for each sub band are examined and the two sub bands containing the two highest in-band energy readings E 1 and E 2 are identified. The remaining steps in the process will utilize these measured energy values. Those of ordinary skill in the art will recognize that the steps of measuring the total energy in the entire signal bandwidth and measuring the energy in the individual sub bands can be performed simultaneously or in either order without departing from the teachings of the invention. Next, at box 14, it is determined whether the energy of the sub band containing the highest amount of in-band energy is greater than a preselected first threshold energy value E Threshold . If it is not, a decision is made that no one of the expected single-frequency signals is present and the process terminates at box 16. The purpose of this first decision step is to eliminate erroneous single-frequency-signal-present decisions based upon measuring random in-band noise. The preselected first threshold energy value may be selected to assure an adequate noise margin and will vary from system to system, depending on signal strength, signal-to-noise ratio, etc. According to a presently preferred embodiment of the invention, this threshold value may typically be set to be about -30 to -36 dBM. If the value of measured energy in the sub band containing the highest energy reading is above the first threshold energy value, the process proceeds to the step in box 18, in which the value of the energy measured in the highest sub band is compared with the energy measured in the sub band having the second highest reading. If the highest energy value does not exceed the second highest value by a second threshold amount, a decision is made that no one of the expected single-frequency signals is present and the process terminates at box 16. The purpose of this second decision step 18 is to eliminate erroneous single-frequency-present decisions based upon measuring multi-frequency energy such as voice or music on the signal line. The second threshold amount may be selected to assure an adequate noise margin and will vary from system to system, depending on signal strength, signal-to-noise ratio, etc. According to a presently preferred embodiment of the invention, the comparison E 1 > K 1 xE 2 is made where E 1 is the highest measured energy, E 2 is the second highest measured energy, and K 1 is a constant, which may be derived from the specifications of the signals to be measured. For example, if DTMF tones are to be detected, K 1 =4 dB if E 1 is the high frequency and K 1 =8 dB if E 1 is the lower frequency. This parameter is called "twist". Next, at box 20, a process step is performed to compare the in-band energy in the sub band having the highest energy with the out-of-band energy, i.e., the total combined energy in all other bands. If the in-band energy of the sub band having the highest energy is not greater than the out-of-band energy by a third threshold amount, a decision is made that no one of the expected single-frequency signals is present and the process terminates at box 16. The purpose of this third decision step 20 is to eliminate erroneous single-frequency-present decisions based upon measuring multi-frequency energy such as voice or music on the signal line. The second threshold amount may be selected to assure an adequate noise margin and will vary from system to system, depending on signal strength, signal-to-noise ratio, etc. According to a presently preferred embodiment of the invention, the comparison E 1 > K 2 (E Total -E 1 ) is made where E 1 is the highest measured energy, E Total is the total energy measured on the signal line, the quantity (E Total -E 1 ) is the out-of-band energy, and K 2 is a constant, which may typically be set at 6-10 for signal-to-noise ratios (SNR) greater than about 30 dB to yield high false detection immunity. This constant may be as low as 0.5 if the SNR is bad, i.e., if there is recorded voice or music program material on the line simultaneously with the tones to be detected, or if the line is noisy for other reasons. If the in-band energy of the sub band having the highest energy is greater than the out-of-band energy by the third threshold amount, a decision is made that the one of the expected single-frequency signals which is within the sub-band from which the highest energy reading was obtained is present and the process terminates at box 22 with an identification of that frequency. A process for determining the simultaneous presence of two of a plurality of expected single-frequency signals on a signal line at a selected time according to the present invention is illustrated with reference to FIG. 2, a flow diagram of a presently preferred embodiment of the process. A first step in the process illustrated at box 30 of FIG. 2, the signal line is monitored and several measurements are made. The total amount of energy present within the bandwidth of the signal line is measured. In addition, the amount of energy present in a plurality sub bands within the bandwidth of the signal line is measured. As in the process described with reference to FIG. 1, the number of sub bands corresponds to the number of different single-frequency signals expected to be encountered on the signal line. The sub bands are substantially non-overlapping and each of the sub bands is chosen to encompass only one frequency from the plurality of frequencies which characterize the expected signals. Ideally, one of the expected frequencies would be at or close to the center frequency of each sub band. Next, at box 32, a step is performed to select the three sub bands containing the three highest in-band energy readings E 1 , E 2 , and E 3 . The remaining steps in the process will utilize these measured energy values. Those of ordinary skill in the art will recognize that the steps of measuring the total energy in the entire signal bandwidth and measuring the energy in the individual sub bands can be performed simultaneously or in either order without departing from the teachings of the invention. Next, at box 34, it is determined whether the measured energies of the sub bands containing the two highest measured energies E 1 and E 2 are greater than a preselected first threshold energy value E Threshold . If it is not, a decision is made that no one of the expected single-frequency signals is present and the process terminates at box 36. Those of ordinary skill in the art will recognize that, except for the selection of three sub bands and the comparison of two energy values with a threshold energy value, the steps in the process according to this embodiment of the present invention are identical to the steps performed according to the first embodiment. The purpose of this first decision step is the same as for the first embodiment of the invention. According to a presently preferred embodiment of the invention, this threshold value may typically be set to be about -42 to -48 dB. Next, at box 38, the energy values measured for the second and third highest sub bands are compared. If the energy value of the third highest sub band is too close to the value of the second highest sub band, more than two frequencies are present and a decision is made that a dual frequency signal , i.e., a DTMF tone, is not present and the process terminates at box 36. According to a presently preferred embodiment of the invention, E 2 > E 3 .K 1 , where E 2 and E 3 are the second and third highest measured energy values and K 1 is a constant. As presently preferred K 1 should be about 6 to 12 dB. Next, at box 40, a step is performed to compare the in-band energy E in defined as (E 1 +E 2 ), the sum of the two highest measured energies, with the out-of-band energy E out , which is defined as (E Total -E in ). As presently preferred, E in > K 2 .E out must be true, where K 2 is a constant and which may typically be equal to about 2 to 8 dB. If the statement is not true, a decision is made that a dual frequency signal is not present and the process terminates at box 36. If the statement is true, then a step is performed at box 42 to compare the energy values E 1 and E 2 . In a presently preferred embodiment, twist is measured by testing the statement E 1 /E 2 < K 3 , where K 3 is a constant like K 2 . This test is performed to insure that the two energies are fairly close in magnitude to one another before a dual-frequency tone is recognized. If the statement is not true, a decision is made that a dual frequency signal is not present and the process terminates at box 36. If the statement is true, a decision is made that a dual-frequency tone is present on the signal line and is identified as comprising the expected frequencies which lie within the sub bands from which E 1 and E 2 were measured. The processes disclosed with reference to FIGS. 1 and 2 may be performed using an electronic system according to the present invention such as will now be disclosed with reference to FIG. 3, a block diagram of an electronic system capable of adaptive tone recognition in accordance with the principles of the present invention. Those of ordinary skill in the art will recognize that the processes of the present invention may be carried out in a general purpose processing system, such as a personal computer equipped with digital signal processing (DSP) capability. Such DSP capability may be provided, for example, by DSP products available from Rhetorex, Inc., of Campbell, California. Such products are available as plug-in bus circuit cards for IBM compatible personal computers. Referring now to FIG. 3, a signal line 50 is monitored by electronic system 52, including a plurality of bandpass filters 54 0 -54 i , where the total number of filters (i+1) is equal to the total number of single and discrete expected frequencies which the system is supposed to recognize. The filters should be designed such that the bandwidth of each filter comprises a substantially non-overlapping sub band of the total energy spectrum expected to be encountered. It is preferred that each filter have as its center frequency one of the expected frequencies although it is not critical as long as the expected frequency is not positioned too far down the roll-off curve of the filter's frequency response characteristic. According to a presently preferred embodiment of the invention, bandpass filters 54 0 -54 i may be digital filters configured according to the Goertzel algorithm, as described in A. Oppenheim and R Schafer, Digital Signal Processing , pp. 287-289, Prentice- Hall 1975, expressly incorporated herein by reference. Design and implementation of such digital filters is well known to those of ordinary skill in the art, and the details of such filters will thus not be repeated herein. According to one aspect of the present invention, it has been discovered that where digital filters configured according to the Goertzel algorithm are used, the term K/N may be a non-integer fraction, thus making the filters more flexible. In the presently preferred embodiment, bandpass filters 54 0 -54 i may be associated with processor 56, with an associated program store 58, used to store program commands and tables, and random access memory unit 60 used to temporarily store intermediate data results. Processor 56, program store 50, and random access memory unit 60 may comprise a conventional computer such as an IBM compatible personal computer. The structure and use of such elements is well known to those of ordinary skill in the art. An input/output interface 62 is used to communicate between processor 56 and a PBX unit or other readily available intelligent telephone equipment. which will utilize the information developed by system 58. The particular nature of input/output interface 62 will depend on the particular PBX unit or other readily available intelligent telephone equipment utilized, and details thereof are not part of the present invention. Those of ordinary skill in the art are knowledgeable concerning the interfacing of system 52 to particular examples of such equipment. The apparatus described above may be employed for numerous purposes. According to a presently preferred embodiment of the present invention, the apparatus may be employed to recognize a plurality of call-progression signals used in telephone systems, such as telephone company central office switching facilities and PBX equipment. The process of call-progression tone recognition described herein is illustrative only, and those of ordinary skill in the art will recognize that other tones or other types of signals may be recognized using the method of the present invention. The method of the present invention may be implemented as a state machine. Referring now to FIG. 4a, a flow diagram of the transitions of a presently preferred implementation of a state machine 70 according to the present invention, this aspect of the present invention may be easily understood. FIG. 4a, along with FIG. 4b, a representation of the functionality of a state machine which implements the process illustrated in FIG. 4a and illustrates the correspondence between the signal condition (ON or OFF) and the states of the state machine, shows the operation of the state machine. Transitions occur in the state machine 70 between a first state shown at block 72, a second state shown at block 74, and a third state shown in block 76, as the call-progression signal transitions from ON (sound) to OFF (silence). When the state machine 70 is not in operation, it is in an idle state 78. The state machine works in co-operation with a tone table. The tone table contains information necessary for the identification of all of the tones which are expected to be encountered by the recognition system. In a presently preferred embodiment of the invention, the tone table contains multiple entries, or fields, for each tone to be identified. In a typical system for identifying single and dual-frequency tones, the following fields may be used for each tone: an F 1 field identifies the first frequency of the tone; an F 2 field identifies the second frequency of the tone (only used for dual-frequency tones); a T ONmin field identifies the minimum on time of the tone; a T ONmax field identifies the maximum on time of the tone; a T OFFrnin field identifies the minimum off time of the tone; a T OFFmax field identifies the maximum off time of the tone; a Quick-Count field assigns a minimum on time to a tone if that tone can be identified by frequency alone; and an ID field assigns an identifier to the tone. The operation of the state machine may be easily understood with reference to FIGS. 5a-5c, flow diagrams of presently preferred implementations of States 1-3, respectively according to the present invention. When initialized, for example by a signal Indicating a number has been dialed by a telephone set in a telephone system containing the present invention, the state machine enters State 1. The purpose of State 1 is to wait for the first signal to be detected and reported by the filter array as previously described. State 1 is illustrated in FIG. 5a. The state machine periodically evaluates the reports from the filter array. According to a presently preferred embodiment of the invention, the state machine may examine the filter array output once during every 16.66 millisecond sampling interval, although those of ordinary skill in the art will recognize that other sampling intervals may be used, depending on the particular application to which the present invention is put. Initially, and as shown in FIG.. 4b, the condition of the signal line to be interrogated is silence. This condition is usually followed by the presence of energy on the line as reported by the filter array. First, at decision diamond 80, a determination is made regarding whether speech is present on the line. If so, speech is identified at block 82, and the routine terminates. If not, and as shown in decision diamond 84, State 1 evaluates the condition of the signal line. If no signal is detected, a try count is incremented at step 86 and the try count is interrogated at decision diamond 88 to see if the maximum try count has been reached. If the maximum try count has been reached, the state machine reports no tone at block 90 and goes to idle state (box 78 FIG. 4a). If the maximum try count has not been reached, the state machine waits one sampling interval at box 92 and returns to decision diamond 84. If the presence of energy on the line has been detected for a period exceeding a predetermined time t spike at decision diamond 84, the state machine proceeds to decision diamond where a decision is made whether the energy can be identified by a Quick Count entry in the tone table on the basis of frequency alone. The purpose of the t spike threshold is to reject random noise spikes on the signal line. There will probably be certain tones, such as special intercept tones, which can be readily identified by frequency component only. Accordingly, in an illustrative two-frequency tone example, assume that energy having frequency components F x and F y is reported by the filter array for a predetermined number of consecutive sampling intervals. If F x and F y equal the F 1 and F 2 values for an entry in the tone table for which a Quick Count decision is permitted, and if F x and F y have been reported for a preselected minimum number of sampling intervals specified by the Quick Count entry in the tone table, a tone recognition can be made as shown in decision diamond 92. If a Quick Count identification can be made, the identity of the tone is reported at block 96 and the state machine goes to idle. If a Quick Count identification cannot be made, the state machine goes to State 2 at box 98. There are thus three exit conditions from State 1. Pursuant to a first condition, at box 90, there is an exit from State 1 when no tone is detected. Pursuant to a second exit condition, the state machine may terminate its operation if it can readily identify a call progress tone by its frequency components only according to a Quick Count at box 96. Pursuant to a third exit condition, if energy is detected on the signal line by the filter array for the predetermined time threshold, the state machine makes a transition from State 1 to State 2 at box 98. State 2 of the state machine is illustrated in FIG. 5b. State 2 is coincident with the tone ON state and performs several tasks. First, at decision diamond 100, the state machine determines if speech is present on the line. If so, speech is reported at block 102. If not, at decision diamond 104, it is determined whether the tone is still on. If it is not, control passes to decision diamond 106 where a decision is made regarding whether the tone is off for a period of time longer than t glitch . The purpose of this test is to reject signal dropouts which may occur on the line. Random and/or isolated intervals during which no tone is reported can be reported as dropout intervals if the same tone reappears after the one or more consecutive silence intervals within State 2. If the signal is off for a period exceeding t glitch , the state machine transitions to State 3 at box 108 and stores information comprising the length of the on time of the tone. This information will be used later to determine the tone cadence. If the signal has not been off for a period exceeding t glitch , , the signal is considered to still be present and control returns to decision diamond 104. If decision diamond 104 reports the tone still present, control passes to decision diamond 110, where it is determined if a Quick Count identification can be made. If Quick Count identification can be made, the tone is identified and the state machine returned to the idle state at box 112. If a Quick Count identification cannot be made, control passes to decision diamond 114 where it is determined if the tone is a valid tone. This is done by comparing the reported frequency or frequencies with valid frequency combination entries in the tone table. If the tone is not valid, control is passed to decision diamond 116, where it is determined how many passes have been made with a tone-invalid result. If that number exceeds a predetermined threshold, speech is identified at box 118 and the state machine transitions to the idle state. The purpose of decision diamond 116 is to avoid false results based on momentary distortion on the line. If a valid tone has been identified, control passes to decision diamond 120, where the ON time of the tone is compared with its T onmax value in the tone table. If the ON time exceeds the t onmax time, the tone is identified as continuous and the state machine returns to idle at box 122. If the t onmax time has not been exceeded, control passes to box 124, where the state machine waits for the next sampling interval, before returning control to decision diamond 104. As shown in FIG. 5c, in State 3, the period of silence until another tone is reported present is measured and reported. First, at decision diamond 130, the state machine determines if speech is present on the line. If so, speech is reported at block 132. If not, at decision diamond 134, the absence of energy on the line is monitored. If energy is reported, control passes to decision diamond 136, where it is determined if the energy represents more than a noise spike. If the energy does not comprise a noise spike, a decision is made that valid energy is present and control passes to decision diamond 138. The function of decision diamond 138 is to control the number of times that the state machine switches between State 3 and State 2. If the desired number of State-3/State-2 transitions have not taken place, control passes to box 140 and the state machine transitions to State 2 after storing information comprising the length of the tone- off time for cadence analysis. If the desired number of State-3/State-2 transitions have taken place, control passes to box 142 and the tone is identified. The state machine then goes idle at box 144. If the result at decision diamond 1334 was that no energy was present, or if the result at decision diamond 136 was that the tone on was merely a noise spike, control passes to box 146, which waits until the next sampling interval before returning control to decision diamond 130. After the first full cycle of the State-2/State-3 transitions has occurred, the ON time and the OFF time of the tone have been measured once at blocks 108 and 136 of FIGS. 5b and 5c, respectively. Each full cycle of the State-2/State-3 transition allows that measurement to be performed again. The ON time reported by the state machine for State 2 and the and the OFF time reported by the state machine for State 3 provide cadence information for tone identification. The tone identification at block 138 comprises comparisons of the tone frequency and cadence with the tone table information to identify a match. Once a match has been found, further processing may take place, or an idle state may be entered. For example, if the tone has been identified as a RING type tone, States 2 and 3 are repeated until a change in tone indicates that the call has been answered, or until a preselected time-out interval has passed beyond which it is determined that the call will not be answered. For all remaining State 2 State 3 transition cycles, the tone table of call progression tones is searched for a matching tone and the signal is compared to previous cycles to validate the continuity of the signal. The database of call progression tones is searched for a tone that matches the cadence or cadence and frequency of the signal being analyzed. If a match is identified, and this cycle exceeds a maximum cycle analysis threshold, call analysis terminates. If the current signal does not compare with the previous signal, and the previous signal was identified as a RING type tone, the call is terminated and marked answered. If a the signal does not match a database tone, but compares with previous signals, a RING type tone is assumed. Analysis continues until the maximum cycle analysis threshold is exceeded, or the signal fails to compare with previous signals. If the threshold is exceeded, the call is marked not answered. If the comparison fails, the call is marked answered. According to the present invention, the signal analysis includes a determination of whether the energy on the signal line comprises human speech. This determination may be made according to a presently preferred embodiment of the invention. Speech may be divided into two components. A first voiced component comprises the English language vowel sounds, and consonants such as "m" "n" etc. A second unvoiced component comprises sounds such as "sh" "th" "p" and "t". While the unvoiced sounds are characterized by little or no correlation, the voiced sounds in speech are highly correlated in the intervals of their pitch. Such a feature recommends the use of correlation techniques as a component of a speech identification method. Certain applications, notably telecommunications, require reliable detection and identification of both speech sounds and tones, such as call progression tones. Because call progression tones, usually unmodulated sinusoidal tones, are ideally perfectly correlated and practically highly correlated, correlation techniques alone cannot be used to discriminate between speech sounds and tones such as call-progression signals on communications lines. According to the present invention, a combination of digital real-time signal processing techniques implemented in fixed-point hardware may be employed to readily differentiate between speech sounds and call progression tones. The method of the present invention provides a reliable and economically viable solution to the speech recognition problem. From the description presented herein, those of ordinary skill in the art will recognize that the method of the present invention could be performed by an appropriately programmed personal computer, such as an IBM compatible computer equipped with a 386 processor. Particular software coded instruction routines for carrying out an actual embodiment of the present invention may be easily provided by those of ordinary skill in the art as a routine exercise. Referring first to FIG. 6, a symbolic representation of apparatus according to the present invention is presented. A signal line 150 to be monitored carries a digitized signal which is to be identified. As those of ordinary skill in the art will readily appreciate, this digitized signal may be in PCM format, sampled at a rate of 8,000 samples/sec. Codec apparatus for creating such signals from analog signals is well known and widely used in the art and consequently need not be disclosed herein. The digitized signal is first processed through low-pass digital filter 152. According to a presently preferred embodiment of the invention, low-pass digital filter 152 may have a linear rolloff characteristic curve in which attenuation begins at 700 Hz and is complete at 800 Hz. Digital filter technology for provision of such a filter is conventional and well understood. The filtered digital signal is then decimated in circuit block 154 using conventional decimation techniques, preferably by taking every fifth sample, resulting in a data sample rate out of block 14 of 1,600 samples/sec. Those of ordinary skill in the art will recognize that the data samples may be placed in a register 156 for holding while they are processed according to the present method. According to a presently preferred embodiment of the invention, the digital signal is then subjected to both correlation (block 158) and FFT analysis (block 160). Both of these forms of digital signal processing are well known to those of ordinary skill in the art and are described in texts such as L. R. Rabiner and R. W. Schafer, Digital Processing of Speech Signals, Prentice Hall, 1978, and R. E. Blahut, Fast Algorithms for Digital Signal Processing, Addison Wesley, 1987. Both of these works are expressly incorporated by reference herein. The results of both the correlation and FFT signal processing steps are evaluated to determine if the energy represented by the digital signal on line 12 comprises speech, tone energy, or noise. A flow diagram representing a method according to a presently preferred embodiment of the invention is depicted in FIG. 7. First, at step 170, correlation is performed on a first block of the data samples. Correlation R xx (k) of two signal samples may be expressed as: According to the present invention, the correlation lag k is chosen to be within the range of human pitch, i.e., between about 2.5 to 20 msec. In addition, the correlation length is chosen to be at least as long as the maximum human pitch, i.e., about 20 msec. At a sample rate of 1,600 samples/sec., the correlation length should be preferably at least 32 samples. These correlation parameters may be easily specified in a conventional software routine for performing correlation. Those of ordinary skill in the art will recognize that, in order to be able to perform this digital signal processing economically in real time in a fixed-point hardware environment such as an IBM compatible personal computer, some approximations will need to be employed to simplify the amount of data processing required by the signal processing hardware. According to a presently preferred embodiment of the invention, the maximum R is first determined by employing only the numerator of eq. [1]. At the k value of that maximum R, the function R(k) may be estimated by taking the arithmetic mean rather than the geometric mean specified by the denominator of eq. [1], thus significantly simplifying the amount of processing necessary. Next, at step 172, the correlation result is compared with a predetermined threshold α to determine if there is a possibility that the energy on the line comprises speech. As presently preferred, the threshold may be between about 0.6 and 0.8. To further simplify the signal processing operations, it is preferable to avoid division operations by multiplying α by the arithmetic mean and comparing it with the numerator of eq. [1]. If the correlation result is below the threshold value of α, noise is reported at step 174. There exists the possibility that, even in uncorrelated signals, one random region of a signal will correlate well with a second random region. To avoid false positive results obtained by encountering such glitches, it would be preferable to perform the correlation operation on several consecutive data blocks offset by a time T 0 , which may be about 10 to 20 msec If the correlation is below threshold for one or more of the correlation passes, the signal is determined to comprise noise. If the correlation is above threshold for all three passes, there is either speech or tone energy on the line. Steps 176 and 178 illustrate the repetition of the correlation step for N blocks. As previously stated, the presently preferred value for N is 3. As previously noted, the results of the correlation operation indicate the possibility of speech energy, but can also indicate the presence of call-progression tone energy. Therefore, according to the present energy, the digital signal is also subjected to FFT analysis at step 180 to make the final determination regarding whether speech or tone energy is present on the line. It is preferable to perform the FFT analysis with sufficient resolution to identify individual tones. At a sample rate of 1,600 samples/ sec., an FFT length of 128 will produce a resolution of 12.5 Hz, which is satisfactory for the application disclosed herein. FFT analysis of digital signals is well known. Next, at step 182, the FFT analysis results may be "sharpened" according to a presently preferred embodiment of the invention under some conditions. Because of the overlapping band coverage of the FFT process, the frequency response at frequencies between the center bandwidth points defined by the FFT are attenuated and may introduce some ambiguity into the determination. According to this aspect of the invention, the maxima are "sharpened" before the maxima are evaluated. The three highest frequency maxima M 1 , M 2 , and M 3 are identified at step 184. If the largest or second largest maxima are found to fall below 300 Hz at step 186, speech is identified at step 188 because call progression tones having a frequency of less than 300 Hz are not likely to be employed. If none of the two highest maxima M 1 and M 2 , fall below 300 Hz, the largest maxima M 1 is compared with the third highest maxima M 3 at step 190. If the ratio exceeds the threshold, the third maxima is significantly lower energy than the first maxima and the energy is identified as a dual tone at step 192. If the ratio of the first and third maxima is below a preselected threshold (i.e., about 8-10 db) the energy may be identified as speech. Finally, it has been discovered that if a tone is sampled in the time region where it is turned off, there exists the possibility that speech energy can be mistakenly identified. In order to minimize this possibility, the decision to identify speech in an embodiment having a block length of 16 msec can be deferred until three correlations have been reported above threshold and that the FFT analysis has not reported tone energy from the last few, i.e., four, blocks analyzed. This is illustrated at block 194. Referring now to FIG. 8, a block diagram illustrates a presently preferred method for sharpening the FFT maxima. The amplitude of the FFT results in adjacent frequency bands are evaluated in groups of three selected in step 200. The magnitude of each band is compared with its right and left hand neighbors in step 202. If, at step 204, it is determined that the center bandwidth has the largest magnitude and the ratio of the center bandwidth to one of its right or left hand immediate neighbors is greater than 9 db and the ratio to the other immediate neighbor is less than 6 db, then the amplitude of the second highest value is added to the amplitude of the highest value and ther. that second highest band is zeroed out in step 206. At step 208, it is determined whether all groups of three adjacent maxima have been evaluated. If there are no more groups to evaluate, the process terminates. If additional groups exist, at step 210 the next group is identified and the process returns to step 202. While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims. While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except by the appended claims.

Claims: A method for identifying expected signals on a telephone line, comprising the steps of: (1) sensing (80) the presence of energy on said line, identifying (82) the energy as speech if the energy comprises speech, and proceeding to step (2) if the energy does not comprise speech; (2) identifying the frequency content (F x , F y ) and duration of said energy; (3) comparing said frequency content (F x , F y ) of said energy with stored information comprising the frequency content (F 1 , F 2 ) of expected signals and identifying said energy as one of said expected signals if a match is found; (4) sensing the presence of silence (OFF) on said line if no match is found; (5) identifying the duration of said silence (OFF) ; (6) repeating steps (1) through (5) for a predetermined number of times; and then (7) comparing said frequency content (F x , F y ) of said energy, said duration of said energy (T ON ), and said duration of said silence (OFF) with stored information comprising the frequency content of energy (F 1 , F 2 ), the duration of energy (T ONmin, T ONmax ), and the duration of silence for a plurality of expected call progression signals and identifying said energy as one of said expected call progression signals if a match is found. The method of claim 1 wherein the steps of identifying and comparing said frequency content of said energy include, for determining the presence of one of a plurality of expected single-frequency signals on a signal line at a selected time, the steps of: (1) measuring (10) the total signal energy (E Total ) on said signal line at said selected time; (2) measuring (12) the signal energy present in each one of a plurality of selected separate frequency bands at said selected time, each of said frequency bands encompassing one of the frequencies of said expected single-frequency signals; (3) identifying (12) the two frequency bands (E 1 , E 2 ) having the highest signal energies and determining the value of the highest signal energy (E 1 ) and the second highest signal energy (E 2 ) ; (4a) determining (14) whether the highest signal energy (E 1 ) exceeds a first selected threshold value (E Threshold ); (4b) determining (16) whether the highest energy (E 1 ) exceeds the second highest energy (E 2 ) by greater than a second selected threshold value if the highest signal energy (E 1 ) exceeds said first selected threshold value (E Threshold ); (4c) determining (18) the amount of out-of-band energy (E Total - E 1 ) present in all frequency bands other than the frequency band containing the highest signal energy (E 1 ) if the highest signal energy is greater than the second highest energy (E 2 ) by greater than a second selected threshold value; (4d) determining (20) whether the highest signal energy (E 1 ) exceeds the out-of-band energy (E Total - E 1 ) by greater than a third selected threshold value; and (5) identifying (22) the presence of the one of said expected single frequency signals associated with the one of said selected separate frequency bands having the highest signal energy (E 1 ) if the highest signal energy (E 1 ) is greater than the out-of-band energy (E Total - E 1 ) by greater than said third selected threshold value. The method of claim 1 wherein the steps of identifying and comparing said frequency content of said energy include, for determining the presence of two of a plurality of expected single-frequency signals on a signal line at a selected time, the steps of: (1) measuring (30) the total signal energy (E Total ) on said signal line at said selected time; (2) measuring (32) the signal energy (E 1 , E 2 , E 3 ) present in each one of a plurality of selected separate frequency bands at said selected time, each of said frequency bands encompassing one of the frequencies of said expected single-frequency signals; (3) identifying (32) the three frequency bands having the highest signal energies and determining the value of the highest signal energy (E 1 ), the second highest signal energy (E 2 ), and the third highest signal energy (E 3 ) ; (4a) determining (34) whether the highest signal energy (E 1 ) and the second highest signal (E 2 ) energy both exceed a first selected threshold value (E Threshold ) ; (4b) determining (36) whether the second highest energy (E 2 ) exceeds the third highest (E 3 ) energy by greater than a second selected threshold value if both the highest signal energy (E 1 ) and second highest signal energy (E 2 ) exceed said first selected threshold value (E Threshold ) ; (4c) determining (38) the amount of out-of-band energy (E Total - E 1 - E 2 ) present in all frequency bands other than the frequency band containing the highest signal energy (E 1 ) if the second highest signal energy (E 2 ) exceeds the third highest signal energy (E 3 ) by greater than said second selected-threshold value (K 1 ) ; (4d) determining (40) whether the sum of the highest signal energy (E 1 ) and second highest signal energy (E 2 ) exceeds the out-of-band energy (E Total - E 1 - E 2 ) by greater than a third selected threshold value (K 2 ) ; (4e) determining (42) whether the ratio of the first highest signal energy (E 1 ) to the second highest signal (E 2 ) energy exceeds a fourth selected threshold value (K 3 ) ; and (5) identifying the presence of the two of said expected single frequency signals associated with the two of said selected separate frequency bands having the first and second highest signal energies (E 1 , E 2 ) if the ratio of the first highest signal energy (E 1 ) to the second highest signal energy (E 2 ) exceeds said fourth selected threshold value (K 3 ). The method of claim 1 wherein the steps of identifying and comparing said frequency content of said energy include, for determining the presence of one of a plurality of expected single-frequency signals on a signal line at a selected time, the steps of: (1) measuring the total signal energy (E Total ) on said signal line at said selected time; (2) measuring the signal energy present in each one of a plurality of selected separate frequency bands at said selected time, each of said frequency bands encompassing one of the frequencies of said expected single-frequency signals; (3) identifying the two frequency bands having the highest signal energies and determining the value of the highest signal energy (E 1 ) and the second highest signal energy (E 2 ); (4a) determining whether a first statement E 1 > E Threshold is true, where E Threshold is a preselected value; (4b) determining whether a second statement E 1 > E 2 .K l is true where K 1 is a first preselected constant; (4c) determining whether a third statement E in > (E Total -E in ).K 2 is true, where K 2 is a second preselected constant and E in = (E 1 + E 2 ); and (5) identifying the presence of a single-frequency tone as comprising the expected frequency which is in band for the sub bands from which the highest signal energy(E 1 ) was measured if the first through the third statements (4a ... 4c) are true. The method of claim 1 wherein the steps of identifying and comparing said frequency content of said energy include, for determining the presence of two of a plurality of expected a single-frequency signals on a signal line at a selected time, the steps of: (1) measuring the total signal energy (E Total ) on said signal line at said selected time; (2) measuring the signal energy (E 1 , E 2 , E 3 ) present in each one of a plurality of selected separate frequency bands at said selected time, each of said frequency bands encompassing one of the frequencies of said expected single-frequency signals (E 1 , E 2 , E 3 ); and (3) identifying the three frequency bands having the highest signal energies (E 1 , E 2 , E 3 ) and determining the value of the highest signal energy (E 1 ), the second highest signal energy (E 2 ), and the third highest signal energy (E 3 ) ; (4a) determining whether a first statement E 1 > E Threshold is true, where E Threshold is a preselected value; (4b) determining whether a second statement E 2 > E Threshold is true; (4c) determining whether the a third statement E 2 > E 3 .K 1 is true, where K 1 is a first preselected constant; (4d) determining whether a fourth statement E In > E Out .K 2 is true, where K 2 is a second preselected constant; (4e) determining whether a fifth statement E 1 /E 2 > K 3 is true, where K 3 is a third preselected constant; and (5) identifying the presence of a dual-frequency tone as comprising the two expected frequencies which are in band for the sub bands from which the first highest and the second highest signal energies (E 1 , E 2 ) were measured if the first through the fifth statements (4a ...4e) are true. The method according to any of claims 2 to 5, wherein the sub bands are substantially non-overlapping and each of the sub bands is chosen to encompass only one frequency from the plurality of frequencies which characterize the expected signals, and wherein preferably one of the expected frequencies would be at or close to the center frequency of each sub band. An adaptive single-frequency and dual-frequency signal detector, comprising: a plurality of bandpass filters (54 0 ... 54 i ) having filter inputs and filter outputs, said inputs adapted to be connected to a signal line (50) which from time to time carries electrical signals comprising energy at one or more expected frequencies, each of said bandpass filters (54 0 ... 54 i ) configured to pass only energy included within a band of frequencies, said band of frequencies for each of said bandpass filters being different from others and including substantially only a different one of said expected frequencies; energy measuring means (56), communicating with said filter outputs and with said signal line (50), for measuring the total electrical energy (E Total ) present on said signal line (50) and for measuring the filter output energy at each of said filter outputs, said energy measuring (56) means producing a plurality of energy output signals representing said total energy (E Total ) and said filter output energy from individual ones of said bandpass filters (54 0 ... 54 i ) ; evaluation means (56) for comparing, in accordance with the method of one of claims 1 to 6, said energy output signals with one another and for selectively mathematically combining said energy output signals with one another and with a plurality of predetermined threshold values. The method according to claim 1, wherein (1) the condition of said line is interrogated and (2) if no signal is detected a try count is incremented (86), (3) said try count is interrogated (88) to see whether a maximum try count has been reached and (4) if the maximum try count has been reached, "no tone" is reported (90) and an idle state is taken (78), and (5) if the maximum try count has not been reached, one sampling interval is waited (92) and steps (1) through (4) are repeated. The method according to claims 1 or 8, wherein (1) the condition of said line is interrogated and (2) if the presence of energy is detected for a period exceeding a predetermined period of time (t spike ) a decision is made whether the energy can be identified on the basis of frequency alone (94), and (3) if it is decided that the energy can be identified on the basis of frequency alone (94), (4) the identification is made, the identity of the tone is reported (96) and an idle state is taken (98). The method according to claims 1, 8, or 9, wherein (1) the condition of said line is interrogated and (2) if "speech present" is detected, "speech present" is reported (102), and (3) if not, it is determined whether the tone is still on (104), and (4) if not, it is determined, whether the tone is off for a period of time longer than a predetermind period of time (t glitch ) (106), and (5) if the tone is off for a period of time exceeding the predetermined period of time (t glitch ), the length of the time of the tone is stored, and (6) if the tone has not been off for a period of time exceeding the predetermined period of time (t glitch ), the steps (3) through (5) are repeated. The method according to any of claims 1, or 8 to 10, wherein upon the decision that the energy can not be identified on the basis of frequency alone, (1) the validity of the tone is determined (104), and (2) if the tone is not valid, it is determined, how many times a tone-invalid result has been achieved, and (3) if the number of tone-invalid results exceeds a predetermined threshold, "speech" is reported (118) and an idle state is taken. The method of one of claims 1 to 6, or 8 to 11, wherein: real-time recognition of speech and call-progression tones from electrical energy on a signal line (10) is performed including the steps of: providing a digitized signal representing said energy; correlating (170) N neighboring portions of said digitized signal and reporting "no speech present" (174) if correlation (R) does not exceed a predetermined threshold (α) (172); performing FFT analysis (180) on the digitized signal and identifying (184) first (M1), second (M2) and third (M3) largest frequency-domain maxima; determining (186) whether said first (M1) and second (M2) largest maxima are above a threshold frequency and reporting "speech present" (188) if either said first (M1) and second (M2) largest maxima are below said threshold frequency; and determining (190) whether the ratio of said first (M1) largest to said third (M3) largest maxima exceeds a predetermined value (Th), reporting "tone present" (192) if said ratio is larger than said predetermined value (Th). A method according to claim 12, wherein the digitized signal is in PCM format having a sample rate of 8000 samples/sec. A method according to claim 13, wherein the digitized signal is processed through a low-pass filter (152) having a linear rolloff characteristic curve in which attenuation begins at 700 Hz and is complete at 800 Hz. A method according to claim 13 or 14, wherein the digitized signal is decimated (154) by taking every fifth sample to achieve a sample rate of 1600 samples/sec. A method according to claim 12 to 15, wherein the step (170) of correlating N neighboring portions of said digitized signal includes the performance of the following calculation: wherein the correlation lag k is chosen between 2.5 to 20 msec and the correlation length N is chosen to be at least 32 samples. A method according to any of claims 12 to 16, wherein the reporting "no speech present" is performed if correlation does not exceed a predetermined threshold (α) of 0.6 to 0.8. A method according to any of claims 12 to 17, wherein the FFT analysis is performed at a sample rate of 1600 samples/sec at an FFT length of 128. A method according to any of claims 12 to 18, wherein the result of the FFT analysis are sharpened (182) by the following steps: the amplitude of the FFT results in adjacent frequency bands are evaluated (200) in groups of three; for all groups of three adjacent maxima, the following comparison steps are carried out: the magnitude of each frequency band (C) is compared (202) with its right (R) and left (L) neighbors; if it is determined (204) that the center frequency band (C) has the largest magnitude and the ratio of the center frequency band (C) to one of its adjacent left or right (L,R) neighbors is greater than 9 dB and the ratio of the center frequency band (C) to its other adjacent left or right (L,R) neighbor is less than 6 dB, then the amplitude of the second highest value is added (206) to the amplitude of the highest value and the second highest frequency band is zeroed out (206). A method according to any of claims 12 to 19, wherein said threshold frequency is 300 Hz and said predetermined ratio value is about 8 to 10 dB.

Inventors: BAUMANN CLIFFORD N, EATAMAR DRORY, MACHUTA ROBERT J, PERRY RON A, BAUMANN, CLIFFORD N., EATAMAR. DRORY, MACHUTA, ROBERT J., PERRY, RON A.
Applicants: VMX INC, VMX INC.
Application year: 1993
Main classification: H04Q1
IPC codes: H04M11, H04Q1, H04L27