Voice Sampling Rate Conversion Method

By using integer or fractional times clocks in different source clock systems to upsample and downsample voice signals, setting a warning pointer in FIFO and using random number delay, the problem of speech signal quality degradation caused by clock frequency deviation is solved, high-quality sampling rate conversion is achieved, and system complexity and cost are reduced.

CN114155867BActive Publication Date: 2025-06-03HANGZHOU NATCHIP SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111498648.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-09
Publication Date
2025-06-03
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

In systems with different source clocks, due to the frequency deviation of clock frequency, too much or too little voice data is transmitted, resulting in a degradation of voice signal quality. It is difficult for the prior art to realize accurate sampling rate conversion, which increases system complexity and cost.

Method used

By using an integer or fractional clock to perform upsampling and downsampling before sampling rate conversion, and setting a warning pointer in the FIFO, the random number delay controls the movement of the read pointer, avoiding periodic point jumps and repeated point operations, and achieving high-quality sampling rate conversion.

Benefits of technology

The reception quality of voice signals is improved, data discarded and duplicated due to clock frequency deviation is avoided, and system complexity and cost are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0005247298700000011
    Figure FDA0005247298700000011
  • Figure FDA0005247298700000012
    Figure FDA0005247298700000012
Patent Text Reader

Abstract

The present invention discloses a method for voice sampling rate conversion. The method of the present invention includes a writing process and a reading process. The writing process is to upsample the voice signal before conversion and write it into the FIFO. The frequency F of the upsampled voice signal 2 has an error less than or equal to 0.01 with the frequency F 3 of the target voice signal. The FIFO has a write pointer, an upper warning pointer, a read pointer, and a lower warning pointer set in sequence. The reading process is that the signal receiving end reads voice data from the FIFO at the frequency F 3 . If F 3 >F 2 , when the read pointer is equal to the address value of the upper warning pointer, a random number S 1 is randomly generated. At the (S 1 +1)-th read operation, the address value of the read pointer of the FIFO remains unchanged. If F 3 <F 2 , when the read pointer is equal to the address value of the upper warning pointer, a random number S 2 is randomly generated. At the (S 2 +1)-th read operation, the address value of the read pointer of the FIFO is incremented by 2. The method of the present invention does not generate periodic jump points and repeated point operations during sampling rate conversion, improves the quality of the received voice signal, and saves the cost of the electronic system at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of speech processing and relates to a method for converting speech sampling rates. Background Art

[0002] The effective frequency of human speech is below 20KHz. Retaining an 8KHz speech signal can ensure speech intelligibility. To save transmission bandwidth or storage capacity, the actual speech sampling rates used are 16KHz, 44.1KH, 48KHz, etc. When using different sampling rates, it is necessary to convert the sampling rate when transmitting speech between systems. The commonly used conversion methods for sampling rate conversion are integer multiple upsampling and integer multiple downsampling. For example, after upsampling 44.1KHz by 160 times and then downsampling by 147 times, the sampling rate conversion to 48KHz can be achieved.

[0003] In a homologous clock system, since there is no frequency deviation between the input clock and the output clock of the sampling rate conversion, the above method can be used for high-precision signal sampling. However, in a system with different source clocks, such as when the signal sender and the signal receiver use different individual clock oscillators with the same frequency, or when the signal sender and the signal receiver use different individual clock oscillators with different frequencies, due to the individual differences of the oscillators, the differences in the operating temperature and operating voltage of the oscillators, the clock frequencies of the signal sender and the signal receiver have a frequency deviation within 1%. If the clock frequency of the signal sender is higher than that of the signal receiver, it will inevitably lead to too much speech data, and the signal receiver will regularly discard speech data, resulting in a decline in the quality of the speech signal. If the clock frequency of the signal sender is lower than that of the signal receiver, it will inevitably lead to too little speech data, and the signal receiver will regularly repeat speech data, which will also lead to a decline in the quality of the speech signal.

[0004] The frequencies of commonly used 24MHz or 27MHz crystal oscillators in electronic systems are not integer multiples or simple fractions of 44.1KHz or 48KHz (for example, 612.5 times the frequency of 44.1KHz is 27.01125MHz, not equal to 27MHz), and accurate sampling rate conversion cannot be achieved. Due to the particularity of the audio sampling rate, in order to improve the speech quality, it is usually necessary to increase the use of crystal oscillators with special frequencies or to use high-cost fractional-N PLLs to achieve high-precision clock conversion. This increases the complexity and cost of the electronic system. Summary of the Invention

[0005] The object of the present invention is to provide a high-quality audio sampling rate conversion method for the characteristics of existing electronic systems using common 24MHz or 27MHz crystal oscillators.

[0006] The method of the present invention includes a writing process and a reading process.

[0007] The writing process is as follows: Before sampling rate conversion, the voice signal uses the voice signal frequency F at the signal sending end 1 An integer multiple or fractional multiple of the signal sending end clock, and upsampling is performed through multiple cascaded integer multiple upsampling filters and integer multiple downsampling filters. The frequency F of the voice signal before sampling rate conversion 1 Is an integer multiple or fractional multiple of 44.1 Hz or 48 Hz. An integer multiple means multiplying by a positive integer value, and a fractional multiple means dividing by a positive integer value; the frequency F of the upsampled voice signal 2 And the target voice signal frequency F 3 Error Write the upsampled voice signal into the first-in-first-out data buffer FIFO at frequency F 2 FIFO has a read pointer and a write pointer. On this basis, the present invention method adds an upper warning pointer and a lower warning pointer. For each voice data written, the address values of the write pointer, the upper warning pointer, and the lower warning pointer are all incremented by 1. When the system is reset, the upper warning pointer lags behind the write pointer by N addresses, the read pointer lags behind the upper warning pointer by M addresses, and the lower warning pointer lags behind the read pointer by K addresses, where N, M, K ∈ [1, 5].

[0008] The reading process is as follows: The signal receiving end uses the signal receiving end clock to read voice data from the FIFO at the target voice signal frequency F 3

[0009] If F 3 > F 2 , when the address value of the read pointer is equal to the address value of the upper warning pointer, the random number generator generates a random natural number In the subsequent S 1 +1 read operations, in the first S 1 read operations, for each voice data read, the address value of the read pointer of the FIFO is incremented by 1. In the (S 1 +1)-th read operation, the address value of the read pointer of the FIFO remains unchanged.

[0010] If F 3 < F 2 , when the address value of the read pointer is equal to the address value of the lower warning pointer, the random number generator generates a random natural number S 2 ∈ [1, 500]. In the subsequent S 2 +1 read operations, in the first S 2 read operations, for each voice data read, the address value of the read pointer of the FIFO is incremented by 1. In the (S 2 +1)-th read operation, the address value of the read pointer of the FIFO is incremented by 2.

[0011] ​When the read pointer address value is less than the upper warning pointer address value and greater than the lower warning pointer address value, for each voice data read, the read pointer address value of the FIFO is incremented by 1.

[0012] The sampling rate conversion point of the system occurs on a high-speed clock of 24 MHz or 27 MHz. The signal error caused by the jump point caused by incrementing the read pointer address value of the FIFO by 2 or the repeated point caused by the unchanged read pointer address value of the FIFO is much smaller than the signal error caused by the jump point or repeated point of the voice signal at a low sampling rate of 44.1 KHz or 48 KHz. By using the method of the present invention, since the delay of the random number is increased, no periodic jump points and repeated point operations will occur during the sampling rate conversion, and thus no harmonics caused by the periodic jump points and repeated point operations will be generated, improving the quality of the received voice signal. Since the voice receiving system does not require an accurate clock that is an integer multiple or a simple fraction multiple of the input sampling rate, that is, it does not need to add a crystal oscillator with a special frequency or use a high-cost fractional-N PLL to achieve high-precision clock conversion, the cost of the electronic system is saved. Detailed implementation manners

[0013] The present invention will be further described below in conjunction with embodiments. The following embodiments are only specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantive modification made to the present invention using this concept shall fall within the protection scope of the present invention.

[0014] The following takes the case where the input is a voice signal of 44.1 KHz, the crystal oscillator of the receiving system is 27 MHz and the target voice frequency is 27 MHz, and the case where the input is a voice signal of 44.1 KHz, the crystal oscillator of the receiving system is 24 MHz and the target voice frequency is 24 MHz to illustrate the voice sampling rate conversion method.

[0015] Case where the input is a voice signal of 44.1 KHz, the crystal oscillator of the receiving system is 27 MHz and the target voice frequency is 27 MHz:

[0016] Using one 2x upsampling filter, two 5x upsampling filters, two 7x upsampling filters, and two 2x downsampling filters in series, the input voice signal of 44.1 KHz can be upsampled to 27.01125 MHz. Therefore, the FIFO writes the upsampled voice data at a speed of 27.01125 MHz. The receiving system reads the voice data at the clock of the target voice frequency of 27 MHz. Since the write speed of the FIFO is higher than the read speed, the lower warning pointer will slowly catch up with the read pointer. When the read pointer is equal to the lower warning pointer, the read pointer movement control module samples a random number S, and after delaying S clocks, it increments the read pointer by 1, thus skipping one voice data. Subsequently, the read pointer is greater than the lower warning pointer, and normal read and write operations are performed until the next time the lower warning pointer catches up with the read pointer. In this way, the sampling rate conversion from 27.01125 MHz to 27 MHz is achieved.

[0017] For the case where the input is a voice signal of 44.1 KHz, the receiving system crystal oscillator is 24 MHz, and the target voice frequency is 24 MHz:

[0018] Using two 2x upsampling filters, three 3x upsampling filters, and one 5x upsampling filter in series, the input voice signal of 44.1 KHz can be upsampled to 23.814 MHz. Therefore, the FIFO writes the upsampled voice data at a speed of 23.814 MHz. The receiving system reads the voice data at the clock of the target voice frequency of 24 MHz. Since the write speed of the FIFO is lower than the read speed, the read pointer will slowly catch up with the warning pointer. When the read pointer is equal to the upper warning pointer, the read pointer movement control module samples a random number S, and after delaying S clocks, it stops incrementing the read pointer by 1 once, causing the read voice data to be repeated once. Subsequently, the read pointer is less than the lower warning pointer, and normal read and write operations are performed until the next time the read pointer is equal to the upper warning pointer. In this way, the sampling rate conversion from 23.814 MHz to 24 MHz is achieved.

Claims

1. A voice sampling rate conversion method, including a write process and a read process, Characterized in that, The specific write process is as follows: Before sampling rate conversion, the voice signal uses the voice signal frequency F of the signal sending end 1 An integer multiple or a fractional multiple of the signal sending end clock, and is upsampled through multiple cascaded integer multiple upsampling filters, or through cascaded multiple integer multiple upsampling filters and multiple integer multiple downsampling filters; the voice signal frequency F after upsampling 2 And the target voice signal frequency F 3 Error Write the upsampled speech signal at frequency F 2 to the first-in-first-out data buffer FIFO; the first-in-first-out data buffer FIFO has a read pointer, a write pointer, an upper warning pointer, and a lower warning pointer. For each written speech data, the address values of the write pointer, the upper warning pointer, and the lower warning pointer are all incremented by 1. When the system is reset, the upper warning pointer lags behind the write pointer by N addresses, the read pointer lags behind the upper warning pointer by M addresses, and the lower warning pointer lags behind the read pointer by K addresses; The specific read process is as follows: The signal receiving end uses the signal receiving end clock to read voice data from the FIFO at the target voice signal frequency F 3 ; Such as F 3 > F 2 When the read pointer address value is equal to the upper warning pointer address value, the random number generator generates a random natural number In the subsequent S 1 +1 read operations, for the first S 1 read operations, for each voice data read, the read pointer address value of the FIFO is incremented by 1. For the (S 1 +1)-th read operation, the read pointer address value of the FIFO remains unchanged; Such as F 3 <F 2 When the read pointer address value is equal to the lower warning pointer address value, the random number generator generates a random natural number S 2 ∈[1, 500], in the subsequent S 2 +1 read operations, for the first S 2 read operations, each time a voice data is read, the read pointer address value of the FIFO is incremented by 1. At the S 2 +1 read operation, the read pointer address value of the FIFO is incremented by 2; When the read pointer address value is less than the upper warning pointer address value and greater than the lower warning pointer address value, for each voice data read out, the read pointer address value of the FIFO is incremented by 1.

2. The voice sampling rate conversion method according to claim 1, Characterized in that: The frequency F of the speech signal before sampling rate conversion 1 is an integer multiple or a fractional multiple of 44.1 Hz or 48 Hz.

3. The voice sampling rate conversion method according to claim 1, Characterized in that: The pointer address spacings N, M, K in the first-in first-out data buffer FIFO belong to [1, 5].

Citation Information

Patent Citations

  • Large-scale speed-variable true random source realizing system for power grid and related method

    CN102750128A

  • Arbitrary waveform synthesis method based on sampling rate conversion technology

    CN112953461A