System and method for minimizing overrun and underrun errors in packetized voice transmission

When it is determined that a sample queue exceeds a first predefined level, samples being received from a IP switched network are modified such that samples are removed within the voiced region of the samples by removing whole pitch periods of samples. If the sample queue is below a second predefined number, additional samples are placed into the queue by analyzing voiced samples from the IP switched network and generating additional pitch periods of samples.

TECHNICAL FIELD

This invention relates to the transmission of digitally encoded voice, and in particular, to the transmission of digitally encoded voice between a circuit switching network and a packet switching network so as to maintain speech quality.

BACKGROUND OF THE INVENTION

In the transmission of digitally encoded voice, it is important to maintain synchronization between the two end points so that no digital information is lost due to differing rates of transmission and reception. Synchronization is the ability to maintain a stable frequency and precise timing to allow digital transmission services to read data out and read data into the transmission system at the same rate. Without synchronization, rates differ and data slippage occurs resulting in data being lost. Within the prior art, circuit switch networks and packet data switching networks when operating independently of each other have solved this problem in the following manner. In circuit switched networks, synchronization is centrally located and is synchronized throughout continental United States. For example, long distance transmission carriers, such as AT&T, have placed synchronization technologies in there central offices and relied on T1 trunk-based recovery network timing subsystems to synchronize data being received from the network. Packet switched network have allowed the receiving endpoint to signal the transmitting endpoint to slow or speed-up the transmission rate. This type of control is utilized in asynchronous transfer mode (ATM) and frame relay transmission (FR). However, the internet protocol (IP) transmission systems provide no such synchronization mechanism even though they are packet switched networks.

The prior art methods for achieving synchronization in circuit switched networks and packet switched network performed well if the two types of networks were not interconnected. An exception to this situation was in the situation where ATM or frame relay was utilized with a circuit switched network with the same data transmission company controlling both systems. Within the present business communication switching environment, there exists a need for simplified maintenance, management, and access to voice information on diverse networks. This need is forcing the convergence of a variety of circuit switched and packet switched networks. In addition, a new class of real-time multimedia networks is emerging that will also require synchronization.

The combination of a circuit switched network and a packet switched network is referred to as a hybrid network. Hybrid networks that lack synchronization exhibit the same symptoms as if packets were being lost within a packet switching system with some asymmetry. (1) If the read-out is faster than the read-in, eventually the reader exhausts the jitter-buffers and must wait for them to refill. The voice coder sees an empty stream of voice information and hence the voice quality suffers remarkably. (2) If the read-out is slower than the read-in, eventually the jitter-buffers fill full, and new packets are discarded. The voice coder sees a loss of packets and again the voice quality suffers. If the buffers are made too large, the delay in transmitting voice information from one person to another person is increased. It is well known that a large delay in voice transmission is objectionable to people. The delay is increased as the buffers are made larger, because the speech samples spend more time in the buffers.

A prior art solution for interconnecting a hybrid network is illustrated inFIG. 1. Synchronous physical (PHY) interface101is reading out PCM voice samples to voice coder106via path114. Voice coder106transmits these PCM packets via path113to IP switched network107. IP switch network107transmits packets containing PCM samples to voice coder106which transmits these to PHY101via elements102,103, and104and paths108,109, and111. PHY101utilizes insert/remove circuit102to obtain the packets that are being placed in sampled queue104by voice coder106. Insert/remove circuit102adds or deletes PCM samples as required to maintain a synchronous transfer of data to PHY101. Insert/remove circuit102performs this activity by utilizing low energy detector103. Low energy detector103evaluates the PCM sample that will next be transmitted from sample queue104to circuit102via path109. Low energy detector103indicates to circuit102if the energy contained within the PCM sample is below a predefined threshold and may be discarded. If there is not a sample present in sample queue104and a sample is required to be transmitted to PHY101, insert/remove circuit102transmits a low energy PCM sample. When insert/remove circuit102has to delete samples being received from sample queue104, circuit102deletes any present sample indicated by low energy detector103as being below predefined energy value requirement. Circuit102commences this operation at some predefined capacity of sample queue104. The problem with this prior art solution is that insert/remove circuit102has no knowledge of the number or location of PCM samples that are below the predefined energy value within sample queue104. Hence, for example, if circuit102determines that it must delete five PCM samples, circuit102will delete the next five PCM samples that low energy detector103indicates are below the minimum energy level. This can result in deletion of samples over a small period of time and cause deterioration of the voice quality being produced by PHY101.

SUMMARY OF THE INVENTION

This invention is directed to solving these and other problems and disadvantages of the prior art. When it is determined that a sample queue exceeds a first predefined level, samples being received from a IP switched network are modified such that samples are removed within the voiced region of the samples by removing whole pitch periods of samples. If the sample queue is below a second predefined number, additional samples are placed into the queue by analyzing voiced samples from the IP switched network and generating additional pitch periods of samples.

DETAILED DESCRIPTION

FIG. 2illustrates a system for implementing an embodiment of the invention. Synchronous physical (PHY) interface201is exchanging digital samples with IP switched network207via voice encoder206. Voice samples being received from IP switched network207are received by voice coder206and then, processed by elements202–204before being transferred to PHY201. Queue regulator203maintains the proper number of samples in sample queue204. Queue regulator203utilizes queue depth detector202to determine the number of samples in sample queue204. When PHY201requires another sample, it requests this sample from sample queue204. PHY201removes samples from sample queue204at a constant rate. If queue depth detector202determines that the number of samples in sample queue204is below a first predefined level, queue depth detector202transmits a first signal to queue regulator203. In response to the first signal from queue depth detector202, queue regulator203inserts additional samples into sample queue204. The additional samples are in addition to the samples being received from voice coder206. Queue regulator203generates the additional samples by performing an autocorrelation of the samples being received from voice coder206. This autocorrelation is only performed in portions of the speech that are considered to be voiced. After the pitch period is identified, queue regulator203prolongs the present speech pattern by adding extra pitch periods of samples that are identical pitch periods identified by autocorrelation in the stream of samples being communicated from voice coder206to sample queue204. A pitch period of samples is the smallest repeating pattern in the voiced part of human speech as is will known by those skilled in the art.

If queue depth detector202determines that the number of samples in sample queue204is above a second predefined level, queue depth detector202transmits a second signal to queue regulator203. Queue regulator203is responsive to the second signal to eliminate some of the samples being received from voice coder206. The eliminated samples are not stored in sample queue204by queue regulator203. Again, during a voiced period of the speech, buffer regulator203determines the pitch period for the speech pattern and eliminates whole pitch periods of samples. This is done because by eliminating an entire pitch period of samples, the pitch of the voice as determined from the samples is not modified.

Touch tone detector208is utilized to monitor the samples being received from voice coder206by queue regulator203to determine when multi-frequency dialing tones (commonly referred to as touch tone frequencies) are being received. Touch tone detector208transmit a signal to queue regulator203when multi-frequency dialing tones are detected. Queue regulator203is responsive to the signal to cease adding or detecting pitch periods of samples. This is done so that the multi-frequency dialing signals are not modified by queue regulator203.

FIG. 3illustrates another embodiment of the invention. Elements301through308perform similar functions to those performed by elements201through208ofFIG. 2. However, queue regulator303is situated between PHY301and sample queue304. If the number of samples in sample queue304is between the first and second predefined number, queue regulator303is responsive to a request from PHY301to simply communicate a sample directly from sample queue304to PHY301. However, if the number of samples in sample queue304is below the first predefined number, queue regulator303inserts additional pitch periods of samples during a voiced period of speech to those samples being retrieved from sample queue304and transferred to PHY301. If sample queue304contains a number of samples above the second predefined number, queue regulator303will eliminate pitch periods of samples during the voiced periods.

FIG. 4illustrates a block diagram of queue regulator203ofFIG. 2. DSP401in conjunction with memory402performs all of the operations illustrated in the flow chart ofFIGS. 6 and 7.

FIG. 5illustrates a block diagram of queue regulator303ofFIG. 3. DSP501in conjunction with memory502performs all of the operations illustrated in the flow chart ofFIGS. 8 and 9.

FIGS. 6 and 7illustrate the steps performed by queue regulator203ofFIG. 2. Once started, decision block601determines if a sample has been received from the voice coder. If the answer is no, decision block601is executed again. If the answer in decision block601is yes, decision block602determines if flag1or2is set. If the answer is no in decision block602, block603stores the sample into sample queue204. In response to a signal from queue depth detector202, decision block604then determines if the queue in the sample queue is greater than a first predefined capacity. If the answer is yes, block608sets flag1and returns control to decision block601. If the answer in decision block604is no, decision block606determines if the queue is at less than a second predefined capacity in response to a signal from queue depth detector202. If the answer is no, control is returned back to decision block601. If the answer in decision block606is yes, block607sets flag2before returning control back to decision block601.

Returning now to decision block602, if flag1or2is set, decision block602transfers control to decision block701ofFIG. 7. Decision block701determines if the voice samples are in a voiced region of speech. If the answer is no, control is transferred to block702which transfers the internal buffer that is utilized to store samples during the detection for a pitch period to sample queue204before returning control back to decision block601ofFIG. 6. The contents of the internal buffer is transferred to sample queue204by block702because these samples are no longer in a voiced region and must be placed in sample queue204.

If the answer in decision block701is yes, block703starts or continues the autocorrelation to determine the pitch period before transferring control to block704which stores the current sample in the internal buffer of queue regulator203. Note, one skilled in the art would readily envision that if all of the blocks inFIG. 2were being performed within one DSP or a wired logic unit, that the internal buffer could well be a shared memory facility. Once decision block706receives control from block704, the latter decision block determines if a complete pitch period has been received of samples. If the answer is no, decision block706returns control to decision block601ofFIG. 6.

If the answer is yes in decision block706, decision block707determines if flag2is set. If the answer is yes, this indicates that it is necessary to add a pitch period identical from the one that had just been completed. In response to flag2being set, decision block707transfers control to block713which transfers the just completed pitch period from the internal buffer to sample queue204. Block714then resets flag2before transferring control to block716. Block716creates a new pitch period of samples that are identical to the pitch period just completed and transfers this newly created pitch period to sample queue204before returning control back to decision block601ofFIG. 6.

Returning to decision block707, if the answer is no in decision block707, control is transferred to decision block708. Decision block708determines if flag1is set. If the answer is no, an error has occurred, and control is transferred to block712which performs error processing before returning control back to decision block601ofFIG. 1. If the answer is yes in decision block708that flag1has been set, control is transferred to block709which deletes the just completed pitch period of samples from the internal buffer before giving control to block711. Block711resets flag1and returns control back to decision block601ofFIG. 6.

One skilled in the art could readily envision that multiple pitched periods may be determined before blocks701–716would delete or create pitch periods and that more than one pitch period could be deleted or created at one time.

FIGS. 8 and 9illustrate the steps performed by queue regulator303ofFIG. 3. Once started, block800resets all flags before transferring control to decision block801. The latter decision block determines if the queue is at a level of samples that is greater than a first defined capacity. If the answer is no, decision block802determines if the queue is at a level that is less than a second predefined capacity. If the answer is no in decision block802, decision block803determines if the PHY is requesting a sample. If the answer in decision block803is yes, control is transferred to block804which transmits a sample from the queue to PHY before returning control back to block800. If the answer in decision block803is no indicating that the PHY is not requesting a sample, control is transferred back to block800.

If the answer in decision block801is yes, block806sets flag1and transfers control to block808. If the answer in decision block802is yes, block807sets flag2and transfers control to block808.

Block808gets a sample from the queue and stores this sample in an internal buffer of the queue regulator303before transferring control to block809. Block809starts the autocorrelation which is performed during voiced portions of the human speech before transferring control to decision block811. The latter decision block determines if the PHY is requesting a sample. If the answer is yes, block812transmits a sample from the internal buffer to the PHY before transferring control to decision block901ofFIG. 9. If the answer in decision block811is no, control is transferred to decision block901ofFIG. 9.

Decision block901determines if a complete pitch period is stored in the internal buffer. If the answer is no, control is transferred back to block808ofFIG. 8so that additional samples can be extracted from the queue and stored in the internal buffer. If the answer in decision block901is yes, decision block902determines if flag2is set. If the answer is no in decesion block902, decision block903determines if flag1is set. If the answer is no in decision block903, control is transferred to decision block912. Returning to decision block903, if the answer in decision block903is yes, control is transferred to block904which deletes a pitch period from the internal buffer before transferring control to block906. One skilled in the art would readily realize that more than one pitch period could be deleted at a time by a block such as904. Block906resets flag1and transfers control to block907. Block907sets flag3. When set, flag3indicates that the queue regulator is to transmit samples from the internal buffer and not from the queue. After setting flag3, block907transfers control to decision block912.

Returning to decision block902, if flag2is set, control is transferred to block908which resets flag2before transferring control to block909. The latter block creates a new pitch period identical to the pitch period already in the internal buffer and stores this newly created pitch period in the internal buffer. Block911then sets flag3before transferring control to decision block912.

Decision block912determines if flag3is set. If the answer is no, control is transferred to block913which performs error recovery before transferring control back to block800ofFIG. 8. If the answer in decision block912is yes, decision block914determines if the PHY is requesting another sample. If the answer is no in decision block914, control is transferred back to decision block912. If the answer in decision block914is yes, block916transmits a sample from the internal buffer to the PHY before transferring control to decision block917. The latter decision block determines if the internal buffer is empty. If the answer is no, control is transferred back to decision block912. If the answer is yes, block918resets flag3before returning control back to block800ofFIG. 8. Since the internal buffer is empty, it is time to resume extracting samples from the queue when the PHY requests another sample.

Of course, various changes and modifications to the illustrative embodiment described above will be apparent to those skilled in the art. Such changes and modifications can be made without departing from the spirit and scope of the invention and without diminishing its intended advantages. It is therefore intended that such changes and modifications be covered by the following claims except in so far as limited by the prior art.