Voice data processing method and device, audio processor and storage medium

CN116418440BActive Publication Date: 2026-10-27GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111662445.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2026-10-27
Estimated Expiration
2041-12-30

AI Technical Summary

Benefits of technology

[0033]本申请实施例中,音频处理器接收调制解调器发送的语音帧,所述语音帧携带语音数据和所述调制解调器的时钟信息;所述音频处理器根据所述调制解调器的时钟信息和所述音频处理器的时钟信息计算所述音频处理器的时钟频率调整量,按照所述时钟调频率整量对所述音频处理器的时钟频率进行调整;所述音频处理器对所述语音数据进行处理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418440B_ABST
    Figure CN116418440B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a voice data processing method and device, an audio processor and a storage medium. The voice data processing method comprises: an audio processor receiving a voice frame sent by a modem, the voice frame carrying voice data and clock information of the modem; the audio processor calculating a clock frequency adjustment amount of the audio processor according to the clock information of the modem and clock information of the audio processor, and adjusting the clock frequency of the audio processor according to the clock frequency adjustment amount; and the audio processor processing the voice data. Embodiments of the present application can avoid voice data overload or underload.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio technology, specifically to a voice data processing method, apparatus, audio processor, and storage medium. Background Technology

[0002] In network communication, it is required that the host clock and slave clock remain synchronized. The modem clock of electronic devices such as mobile phones keeps pace with the base station clock, while the clock of the processor responsible for voice processing in the electronic device is stable. During voice calls, electronic devices may experience voice data overrun or underrun. Summary of the Invention

[0003] This application provides a voice data processing method, apparatus, audio processor, and storage medium to avoid voice data overload or underload.

[0004] The first aspect of this application provides a voice data processing method, including:

[0005] The audio processor receives voice frames sent by the modem, the voice frames carrying voice data and the clock information of the modem;

[0006] The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount;

[0007] The audio processor processes the voice data.

[0008] A second aspect of this application provides a voice data processing method, including:

[0009] The audio processor receives voice frames sent by the modem, the voice frames carrying voice data;

[0010] If the voice frame is the first frame received by the audio processor from the modem, the audio processor processes the voice data after a preset duration following the receipt of the voice frame.

[0011] A third aspect of this application provides a voice data processing method, including:

[0012] The audio processor receives voice frames sent by the modem, the voice frames carrying voice data;

[0013] The audio processor processes the voice data;

[0014] The audio processor receives clock information from the modem via the modem's clock pin, and the modem's clock pin is connected to the modem's clock pin.

[0015] The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount.

[0016] A fourth aspect of this application provides a voice data processing apparatus, including:

[0017] A receiving unit is used to receive voice frames sent by a modem, wherein the voice frames carry voice data and clock information of the modem;

[0018] A calculation unit is used to calculate the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor;

[0019] An adjustment unit is used to adjust the clock frequency of the audio processor according to the clock adjustment frequency adjustment amount;

[0020] The processing unit is used to process the voice data.

[0021] A fifth aspect of this application provides a voice data processing apparatus, comprising:

[0022] A receiving unit is used to receive voice frames sent by a modem, wherein the voice frames carry voice data;

[0023] The processing unit is configured to process the voice data after a preset duration following the receipt of the voice frame by the receiving unit, when the voice frame is the first frame received by the audio processor from the modem.

[0024] A sixth aspect of this application provides a voice data processing apparatus, comprising:

[0025] A voice receiving unit is used to receive voice frames sent by a modem, wherein the voice frames carry voice data;

[0026] A processing unit is used to process the voice data;

[0027] A clock receiving unit is used to receive clock information of the modem transmitted by the clock pin of the modem through the clock pin of the audio processor, wherein the clock pin of the audio processor is connected to the clock pin of the modem.

[0028] A calculation unit is configured to calculate the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor;

[0029] The adjustment unit is used to adjust the clock frequency of the audio processor according to the clock adjustment amount.

[0030] A seventh aspect of this application provides an audio processor, including a processor and a memory, the memory being used to store a computer program, the computer program including program instructions, and the processor being configured to invoke the program instructions to execute the step instructions as described in the first, second, or third aspect of this application.

[0031] An eighth aspect of this application provides a computer-readable storage medium storing a computer program for electronic data interchange, the computer program including program instructions that, when executed by a processor, cause the processor to perform some or all of the steps described in the first, second, or third aspects of this application.

[0032] A ninth aspect of this application provides a computer program product, wherein the computer program product includes a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform some or all of the steps described in the first, second, or third aspects of this application. The computer program product may be a software installation package.

[0033] In this embodiment, the audio processor receives a voice frame sent by a modem, the voice frame carrying voice data and the modem's clock information; the audio processor calculates a clock frequency adjustment amount based on the modem's clock information and the audio processor's clock information, and adjusts the audio processor's clock frequency according to the clock frequency adjustment amount; the audio processor processes the voice data.

[0034] The voice data processing method of this application embodiment can calculate the clock frequency adjustment amount of the audio processor by using the clock information of the modem and the clock information of the audio processor carried in the voice frame, and adjust the clock frequency of the audio processor according to the clock frequency adjustment amount, so that the clock of the audio processor and the clock of the modem can be kept synchronized, which can avoid voice data overload or underload. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1a This is a schematic diagram of the structure of an electronic device for processing voice data provided in an embodiment of this application;

[0037] Figure 1b This is a schematic diagram of another electronic device for processing voice data provided in an embodiment of this application;

[0038] Figure 2 This is a flowchart illustrating a voice data processing method provided in an embodiment of this application;

[0039] Figure 3a This is a schematic diagram illustrating the normal loading of voice data according to an embodiment of this application;

[0040] Figure 3b This is a schematic diagram illustrating a voice data underload situation provided in an embodiment of this application;

[0041] Figure 3c This is a schematic diagram illustrating a voice data overload situation provided in an embodiment of this application;

[0042] Figure 4 This is a schematic diagram illustrating an embodiment of increasing buffer time provided in this application;

[0043] Figure 5 This is a flowchart illustrating another voice data processing method provided in an embodiment of this application;

[0044] Figure 6 This is a flowchart illustrating another voice data processing method provided in an embodiment of this application;

[0045] Figure 7 This is a schematic diagram of the structure of a voice data processing device provided in an embodiment of this application;

[0046] Figure 8 This is a schematic diagram of another voice data processing device provided in the embodiments of this application.

[0047] Figure 9 This is a schematic diagram of the structure of a voice data processing device provided in an embodiment of this application;

[0048] Figure 10 This is a schematic diagram of the structure of an audio processor provided in an embodiment of this application. Detailed Implementation

[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0050] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0051] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0052] The electronic devices involved in the embodiments of this application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with communication functions, as well as various forms of user equipment (UE), mobile station (MS), terminal device, etc. For ease of description, the devices mentioned above are collectively referred to as electronic devices.

[0053] Please see Figure 1a , Figure 1a This is a schematic diagram of the structure of an electronic device for processing voice data, provided in an embodiment of this application. Figure 1a As shown, the electronic device 100 may include a modem 11, an audio processor 12, a communication bus 13, and an audio player 14.

[0054] The modem 11 can receive modulated voice data from the base station, demodulate the modulated voice data, load the demodulated voice data and the clock information of the modem 11 into a voice frame, and send the voice frame to the audio processor 12 through the communication bus 13. The audio processor 12 extracts the voice data and the clock information of the modem 11 from the voice frame, adjusts the clock frequency of the audio processor 12 according to the clock information of the modem 11, processes the voice data, and transmits the processed voice data to the audio player 14 for playback through the communication bus 13.

[0055] The above-described voice data processing procedure can be applied to the process of processing downlink voice data (voice data from the base station to the electronic device) for electronic devices to make voice calls (e.g., make a phone call).

[0056] The audio processor 12 can be an audio digital signal processor (ADSP) in the electronic device 100. The audio player 14 can be a speaker or loudspeaker (built-in or external) in the electronic device 100. The communication bus 13 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 13 can include an address bus, a data bus, a control bus, etc. The modem 11 can be an external modem.

[0057] The audio processor 12 can calculate the clock frequency adjustment amount of the audio processor 12 by using the clock information of the modem 11 carried in the voice frame and the clock information of the audio processor. The clock frequency of the audio processor 12 is adjusted according to the clock frequency adjustment amount, so that the clock of the audio processor 12 can be synchronized with the clock of the modem 11. This prevents the audio processor 12 from experiencing voice data overload or underload during the processing of downlink voice data (voice data from the base station to the electronic device).

[0058] Please see Figure 1b , Figure 1b This is a schematic diagram of another electronic device for processing voice data provided in an embodiment of this application. Figure 1b As shown, the electronic device 100 may include a modem 11, an audio processor 12, a communication bus 13, and an audio player 14. The clock pin of the audio processor 12 is connected to the clock pin of the modem 11.

[0059] The modem 11 can receive modulated voice data from the base station, demodulate the modulated voice data, load the demodulated voice data into a voice frame, and send the voice frame to the audio processor 12 through the communication bus 13. The audio processor 12 also receives the clock information of the modem 11 transmitted by the clock pin of the modem 11 through the clock pin of the audio processor 12. The audio processor 12 adjusts the clock frequency of the audio processor 12 according to the clock information of the modem 11. The audio processor 12 extracts voice data from the voice frame, processes the voice data, and transmits the processed voice data to the audio player 14 for playback through the communication bus 13.

[0060] Modem 11 can be an external modem. For descriptions of audio processor 12, communication bus 13, and audio player 14, please refer to... Figure 1a The device embodiments shown are not described in detail here.

[0061] The audio processor 12 can receive clock information from the modem 11 through its clock pin, and calculate the clock frequency adjustment amount of the audio processor 12 based on the clock information of the modem 11 and the clock information of the audio processor 12. The audio processor 12's clock frequency is adjusted according to the clock frequency adjustment amount, so that the clock of the audio processor 12 can be synchronized with the clock of the modem 11, thus avoiding voice data overload or underload during the processing of downlink voice data (voice data from the base station to the electronic device).

[0062] In network communication, it is required that the master and slave clocks remain synchronized. Clock synchronization can be achieved using the IEEE Std1588-2019 Precision Time Protocol (PTP). The principle of clock synchronization using PTP is as follows: The slave device receives the timestamp sent by the master device, calculates the clock offset and network delay, and adjusts its local time to maintain the same frequency and phase as the master device. Clock offset: The clock difference between the master and slave clocks. Network delay: The delay caused by message transmission in the network.

[0063] How to calculate clock offset:

[0064] (1) The master clock sends a synchronization message to the slave clock. The synchronization message contains the synchronization message and records the time t1. The slave clock receives the synchronization message and records the reception time t2.

[0065] (2) The master clock sends a follow-up message carrying time t1 to notify the slave clock, and the slave clock records time t1.

[0066] (3) Send a delay request (Delay_Req) ​​message from the clock and record the sending time t3.

[0067] (4) The master clock receives the Delay_Req message and records the receiving time t4.

[0068] (5) The master clock sends a delay response (Delay_Resp) message carrying time t4 to the slave clock.

[0069] After the above 5 steps, the timestamps t1, t2, t3, and t4 were obtained from the clock.

[0070] Offset=(t2-t1)-[(t2-t1)+(t4-t3)] / 2;

[0071] Among them, the above steps (1) to (5) are executed in chronological order.

[0072] According to the IEEE 1588 standard, Sync frames, Follow up frames, Delay_Req frames, and Delay_Resp frames need to be sent periodically for clock synchronization. This requires multi-frame interaction, which increases scheduling overhead and introduces errors.

[0073] This application provides a voice data processing method, apparatus, audio processor, and storage medium that can avoid voice data overload or underload. It eliminates the need for multi-frame interaction, avoids increased scheduling overhead, and prevents the introduction of errors. A detailed description follows.

[0074] Please see Figure 2 , Figure 2 This is a flowchart illustrating a voice data processing method provided in an embodiment of this application. Figure 2 The voice data processing method can be achieved through Figure 1a This is achieved using the electronic device shown. For example... Figure 2 As shown, the voice data processing method may include the following steps.

[0075] 201. The audio processor receives a voice frame sent by the modem, which carries voice data and the modem's clock information.

[0076] In this embodiment of the application, during a voice call, when processing downlink voice data, the modem can receive modulated voice data from the base station. After demodulating the modulated voice data, the modem loads the demodulated voice data and the modem's clock information into a voice frame, and sends the voice frame to the audio processor through the communication bus.

[0077] To ensure that the modem can receive control and data signals from the base station in real time, the modem and base station need to maintain clock synchronization; that is, the modem's clock needs to follow the base station's clock. The base station's clock may change dynamically due to factors such as temperature drift, requiring the modem's clock to be fine-tuned accordingly. When an electronic device establishes a connection with a new base station, it will also follow the new base station's clock, potentially causing the modem's clock to be in a dynamic state.

[0078] During a voice call, if the audio processor's clock does not adjust to match the modem's clock, it may cause voice data overrun or underrun. Please refer to [link / reference]. Figure 3a , Figure 3b and Figure 3c , Figure 3a This is a schematic diagram illustrating the normal loading of voice data according to an embodiment of this application. Figure 3b This is a schematic diagram illustrating a voice data underload situation provided in an embodiment of this application. Figure 3c This is a schematic diagram illustrating a voice data overload situation provided in an embodiment of this application. For example... Figure 3a , Figure 3b and Figure 3c As shown, the audio processor can use a ping-pong buffer, i.e., two buffers, A and B. The modem can send voice frames sequentially (for example, the modem's voice frame transmission period is 20ms) to the audio processor's ping-pong buffer. The data of voice frame 1 is loaded into buffer A, and the data of voice frame 2 is loaded into buffer B. After the data in buffer A is processed by the audio processor, it can be sent to the audio player for playback. The audio processor clears the data in buffer A and then loads the data of voice frame 3 into buffer A. After the data in buffer B is processed by the audio processor, it can be sent to the audio player for playback. The audio processor clears the data in buffer B and then loads the data of voice frame 4 into buffer B, and so on.

[0079] When the modem and audio processor clocks are synchronized, such as Figure 3a As shown, the voice frames sent by the modem are pre-programmed at the ping-pong switching moment of the audio processor. Figure 3aBefore the moment when cache A and cache B switch, there will be no situation where the audio processor's ping-pong cache is waiting for the modem's voice frames, that is, there will be no underload; before the moment when the audio processor switches, there will only be one voice frame waiting to be loaded, and there will be no two or more voice frames waiting to be loaded, that is, there will be no overload.

[0080] When the modem's clock and the audio processor's clock are out of sync, such as Figure 3b As shown, when the modem clock frequency decreases or the audio processor frequency increases, voice frame 5 arrives at time t2, while the ping-pong switching time between voice frame 4 and voice frame 5 is t1. Voice frame 5 arrives after the ping-pong switching time t1, and buffer B cannot receive voice frame 5, resulting in a frame underload. There is no data in buffer B to process, which causes stuttering in the user experience.

[0081] When the modem's clock and the audio processor's clock are out of sync, such as Figure 3c As shown, when the modem clock frequency increases or the audio processor frequency decreases, voice frame 6 arrives at time t2, while the ping-pong switching time between voice frames 4 and 5 is t1. t2 arrives before time t1. Before the ping-pong switching time t1, voice frames 5 and 6 are waiting to be loaded. There are two voice frames waiting to be loaded, but only one voice frame can be loaded at a time, resulting in one frame overload. This results in voice delay in the user experience.

[0082] The embodiments of this application can be applied to the following scenario: User A makes a phone call to User B via an electronic device. The voice emitted by User B can be transmitted to the modem of the electronic device via a base station. The modem sends the demodulated voice data to the audio processor in the form of voice frames. The modem can periodically send voice frames to the audio processor.

[0083] The modem's clock information can be phase-locked loop (PLL) information sent by the modem, or PLL information can be obtained from the modem's crystal oscillator. The PLL information can include the modem's clock frequency offset or the modem's current clock frequency.

[0084] Optionally, in step 201, the audio processor receiving voice frames sent by the modem may include the following steps:

[0085] The audio processor receives voice frames sent by the modem via a communication bus.

[0086] In this embodiment, the modem can demodulate the voice received from the base station in chronological order and send it to the audio processor via the communication bus, ensuring the temporal continuity of voice data during downlink voice data processing.

[0087] 202. The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount.

[0088] In this embodiment of the application, after the audio processor receives the voice frame sent by the modem, it can extract the voice data and the modem's clock information from the voice frame.

[0089] The modem's clock information can be either its current clock frequency or its current clock frequency offset. If the modem does not follow the base station clock and its frequency does not experience temperature drift, the modem's clock frequency is the standard clock frequency. For example, if the modem's standard clock frequency is 52 MHz, the current clock offset is 100 kHz. If the modem's clock information carried in the voice frame is its current clock frequency, then the modem's clock information is 52.01 MHz; if the modem's clock information carried in the voice frame is its current clock frequency offset, then the modem's clock information is 100 kHz.

[0090] If the modem clock information carried in the voice frame is the modem's current clock frequency, the audio processor can calculate the audio processor's clock frequency adjustment amount according to the following formula:

[0091] O=△f / (f1*f2), △f=f3-f1;

[0092] Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, f2 represents the standard clock frequency of the audio processor, and f3 represents the current clock frequency of the modem. The audio processor can know the standard clock frequency f1 of the modem in advance.

[0093] Optionally, the clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the standard clock frequency of the audio processor; the audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including:

[0094] The audio processor calculates the clock frequency adjustment amount according to the following formula:

[0095] O = △f / f1*f2;

[0096] Where 0 represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The audio processor can know the standard clock frequency f1 of the modem in advance. Δf can be a positive or negative value.

[0097] For example, if Δf = 1MHz, f1 = 52MHz, and f2 = 38.4MHz, then O = 1MHz / (52MHz * 38.4MHz) = 738.46kHz. If Δf = -1MHz, f1 = 52MHz, and f2 = 38.4MHz, then O = -1MHz / (52MHz * 38.4MHz) = -738.46kHz.

[0098] The embodiments of this application can accurately calculate the clock frequency adjustment of the audio processor based on the clock frequency offset of the modem, the standard clock frequency of the modem, and the standard clock frequency of the audio processor.

[0099] When △f equals 0, there is no need to execute the following steps; continue with step 201.

[0100] Optionally, the audio processor adjusts its clock frequency according to the clock adjustment amount, including:

[0101] The clock frequency of the audio processor is adjusted according to the following formula:

[0102] f2' = f2 + O;

[0103] Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

[0104] In this embodiment, each audio frame can carry voice data and modem clock information. Each frame can adjust the clock frequency of the audio processor, thereby adjusting the clock frequency of the audio processor in a timely manner so that the clock frequency of the audio processor follows the modem as quickly as possible, ensuring that the clock of the audio processor and the modem are synchronized.

[0105] 203. The audio processor processes the voice data.

[0106] In this embodiment of the application, the audio processor can process the voice data so that the processed voice data can be played by the audio player.

[0107] The execution order of steps 202 and 203 is not limited. Steps 202 and 203 can be executed in parallel, or step 202 can be executed before step 203, or step 202 can be executed after step 203.

[0108] Optionally, in step 203, the audio processor processes the voice data, which may include the following steps:

[0109] (11) If the voice frame is the first frame sent by the modem to the audio processor, the audio processor processes the voice data after a preset duration of receiving the voice frame;

[0110] (12) If the voice frame is not the first frame sent by the modem to the audio processor, the audio processor starts processing the voice data at the moment it receives the voice frame.

[0111] In this embodiment, the preset duration can be pre-set and stored in the audio processor's memory (non-volatile memory). After receiving the preset duration of the first frame sent by the modem, the audio processor processes the voice data in that frame, allowing sufficient time to prevent underruns. This staggers the arrival and processing intervals of downlink voice frames, increasing the jitter resistance of the communication network.

[0112] In the embodiments of this application, please refer to Figure 4 , Figure 4 This is a schematic diagram illustrating an embodiment of increasing buffer time provided in this application. For example... Figure 4 As shown in the figure, the dashed arrows represent the transmission times of each frame by the modem, and the solid arrows represent the times when the audio processor begins processing the received frames. When the audio processor receives the first frame from the modem, it can start a 3ms timer. The audio processor only begins voice processing 3ms later. This delays the processing time by 3ms. The embodiments of this application can significantly increase the jitter resistance of the communication network. For example, if the modem's clock frequency is 0.1ms slower per second, an underrun will occur after 30 seconds without synchronization.

[0113] Optionally, after performing step 203, the following steps may also be performed:

[0114] The audio processor transmits the processed audio data to the audio player for playback.

[0115] In this embodiment, the clock frequency adjustment amount of the audio processor can be calculated using the clock information of the modem and the clock information of the audio processor carried in the voice frame. The clock frequency of the audio processor is adjusted according to the clock frequency adjustment amount, so that the clock of the audio processor and the clock of the modem can be kept synchronized, thus avoiding voice data overload or underload.

[0116] Please see Figure 5 , Figure 5 This is a flowchart illustrating another voice data processing method provided in an embodiment of this application. Figure 5 The voice data processing method can be achieved through Figure 1a This is achieved using the electronic device shown. For example... Figure 5 As shown, the voice data processing method may include the following steps.

[0117] 501, The audio processor receives voice frames sent by the modem, and the voice frames carry voice data.

[0118] 502. If the voice frame is the first frame sent by the modem to the audio processor, the audio processor processes the voice data after a preset duration of receiving the voice frame.

[0119] If the voice frame is not the first frame received by the audio processor from the modem, the audio processor begins processing the voice data the moment it receives the voice frame.

[0120] In this embodiment of the application, the specific implementation of step 501 can be found in [reference needed]. Figure 2 For the relevant description of step 201, the specific implementation of step 502 can be found in the relevant descriptions of steps (11) and (12) above, and will not be repeated here.

[0121] In this embodiment, the audio processor processes the voice data in the first frame after receiving it from the modem for a preset duration. This allows sufficient time to prevent underrun, thus staggering the arrival and processing intervals of the downlink voice frames and increasing the jitter resistance of the communication network.

[0122] Optionally, the voice frame may also carry the clock information of the modem. Figure 5 The method shown may also include the following steps:

[0123] The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount.

[0124] Optionally, the clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the standard clock frequency of the audio processor; the audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including:

[0125] The audio processor calculates the clock frequency adjustment amount according to the following formula:

[0126] O = △f / f1*f2;

[0127] Where 0 represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The audio processor can know the standard clock frequency f1 of the modem in advance. Δf can be a positive or negative value.

[0128] Optionally, the audio processor adjusts its clock frequency according to the clock adjustment amount, including:

[0129] The clock frequency of the audio processor is adjusted according to the following formula:

[0130] f2' = f2 + O;

[0131] Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

[0132] For details on the implementation of the above steps, please refer to [link / reference]. Figure 2 The relevant description of step 202 in the previous section will not be repeated here.

[0133] Please see Figure 6 , Figure 6 This is a flowchart illustrating another voice data processing method provided in an embodiment of this application. Figure 6 The voice data processing method can be achieved through Figure 1b This is achieved using the electronic device shown. For example... Figure 6 As shown, the voice data processing method may include the following steps.

[0134] 601, The audio processor receives voice frames sent by the modem, and the voice frames carry voice data.

[0135] 602, the audio processor processes voice data.

[0136] For details on the implementation of step 601, please refer to [link to relevant documentation]. Figure 2For a description of step 201 and a detailed implementation of step 602, please refer to [link to relevant documentation]. Figure 2 The relevant description of step 203 in the previous section will not be repeated here.

[0137] 603. The audio processor receives the modem clock information transmitted by the modem clock pin through the modem's clock pin, and the modem's clock pin is connected to the modem's clock pin.

[0138] In this embodiment, the clock pin of the audio processor can be connected to the clock pin of the modem, and the audio processor can directly obtain the modem's clock information from the modem. This embodiment obtains the modem's clock information through the connection of the clock pins in the hardware connection relationship, without having to carry the modem's clock information in the voice frame, which can reduce the complexity of software design.

[0139] 604. The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount.

[0140] Steps 603 and 604 can be executed periodically. The execution order of steps 601 and 603 is not limited. Steps 601 and 603 can be executed in parallel, or step 601 can be executed before step 603, or step 601 can be executed after step 603.

[0141] For details on the implementation of step 604, please refer to [link to relevant documentation]. Figure 2 The relevant description of step 202 in the previous section will not be repeated here.

[0142] Optionally, the clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the standard clock frequency of the audio processor; the audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including:

[0143] The audio processor calculates the clock frequency adjustment amount according to the following formula:

[0144] O = △f / f1*f2;

[0145] Where 0 represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The audio processor can know the standard clock frequency f1 of the modem in advance. Δf can be a positive or negative value.

[0146] Optionally, the audio processor adjusts its clock frequency according to the clock adjustment amount, including:

[0147] The clock frequency of the audio processor is adjusted according to the following formula:

[0148] f2' = f2 + O;

[0149] Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

[0150] For details on the implementation of the above steps, please refer to [link / reference]. Figure 2 The relevant description of step 202 in the previous section will not be repeated here.

[0151] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0152] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0153] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a voice data processing device provided in an embodiment of this application. The voice data processing device 700 is applied to... Figure 1a The audio processor in the electronic device, the voice data processing device 700 may include a receiving unit 701, a calculation unit 702, an adjustment unit 703, and a processing unit 704, wherein:

[0154] The receiving unit 701 is used to receive voice frames sent by the modem, the voice frames carrying voice data and clock information of the modem;

[0155] The calculation unit 702 is used to calculate the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor;

[0156] The adjustment unit 703 adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount;

[0157] The processing unit 704 is used to process the voice data.

[0158] Optionally, the processing unit 704 processes the voice data, including:

[0159] When the voice frame is the first frame received by the audio processor from the modem, the voice data is processed after a preset duration following the receipt of the voice frame.

[0160] Optionally, the processing unit 704 processes the voice data, including:

[0161] If the voice frame is not the first frame received by the audio processor from the modem, the voice data processing begins at the moment the voice frame is received.

[0162] Optionally, the clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the standard clock frequency of the audio processor; the calculation unit 702 calculates the clock frequency adjustment of the audio processor based on the clock information of the modem and the clock information of the audio processor, including:

[0163] The clock frequency adjustment of the audio processor is calculated using the following formula:

[0164] O = △f / f1*f2;

[0165] Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor.

[0166] The adjustment unit 703 adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount, including:

[0167] The clock frequency of the audio processor is adjusted according to the following formula:

[0168] f2' = f2 + O;

[0169] Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

[0170] The receiving unit 701, the calculation unit 702, the adjustment unit 703, and the processing unit 704 can be processors in an audio processor.

[0171] In this embodiment, the clock frequency adjustment amount of the audio processor can be calculated using the clock information of the modem and the clock information of the audio processor carried in the voice frame. The clock frequency of the audio processor is adjusted according to the clock frequency adjustment amount, so that the clock of the audio processor and the clock of the modem can be kept synchronized, thus avoiding voice data overload or underload.

[0172] Please see Figure 8 , Figure 8 This is a schematic diagram of another voice data processing device provided in an embodiment of this application. The voice data processing device 800 is applied to... Figure 1a An audio processor in an electronic device, the voice data processing device 800 may include a receiving unit 801 and a processing unit 804, wherein:

[0173] The receiving unit 801 is used to receive voice frames sent by the modem, wherein the voice frames carry voice data;

[0174] The processing unit 804 is configured to process the voice data after a preset duration following the receipt of the voice frame, when the voice frame is the first frame sent by the modem and received by the receiving unit 801.

[0175] Optionally, the processing unit 804 is further configured to start processing the voice data at the moment the voice frame is received, if the voice frame is not the first frame sent by the modem to be received by the audio processor.

[0176] Optionally, the voice data processing device 800 may include a computing unit 802 and an adjustment unit 803.

[0177] The calculation unit 802 is used to calculate the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor.

[0178] The adjustment unit 803 is used to adjust the clock frequency of the audio processor according to the clock adjustment amount.

[0179] Optionally, the clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the standard clock frequency of the audio processor; the calculation unit 802 calculates the clock frequency adjustment of the audio processor based on the clock information of the modem and the clock information of the audio processor, including:

[0180] The clock frequency adjustment of the audio processor is calculated using the following formula:

[0181] O = △f / f1*f2;

[0182] Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor.

[0183] The adjustment unit 803 adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount, including:

[0184] The clock frequency of the audio processor is adjusted according to the following formula:

[0185] f2' = f2 + O;

[0186] Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

[0187] The receiving unit 801, the calculation unit 802, the adjustment unit 803, and the processing unit 804 can be processors in an audio processor.

[0188] In this embodiment, the audio processor processes the voice data in the first frame after receiving it from the modem for a preset duration. This allows sufficient time to prevent underrun, thus staggering the arrival and processing intervals of the downlink voice frames and increasing the jitter resistance of the communication network.

[0189] Please see Figure 9 , Figure 9This is a schematic diagram of the structure of a voice data processing device provided in an embodiment of this application. The voice data processing device 900 is applied to... Figure 1b The audio processor in the electronic device, the voice data processing device 900, may include a voice receiving unit 901, a calculation unit 902, an adjustment unit 903, a processing unit 904, and a clock receiving unit 905, wherein:

[0190] The voice receiving unit 901 is used to receive voice frames sent by the modem, the voice frames carrying voice data;

[0191] Processing unit 904 is used to process the voice data;

[0192] The clock receiving unit 905 is used to receive clock information of the modem transmitted by the clock pin of the modem through the clock pin of the audio processor, wherein the clock pin of the audio processor is connected to the clock pin of the modem.

[0193] The calculation unit 902 is used to calculate the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor;

[0194] The adjustment unit 903 is used to adjust the clock frequency of the audio processor according to the clock adjustment frequency adjustment amount.

[0195] Optionally, the processing unit 904 processes the voice data, including:

[0196] When the voice frame is the first frame received by the audio processor from the modem, the voice data is processed after a preset duration following the receipt of the voice frame.

[0197] Optionally, the processing unit 904 processes the voice data, including:

[0198] If the voice frame is not the first frame received by the audio processor from the modem, the voice data processing begins at the moment the voice frame is received.

[0199] Optionally, the clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the standard clock frequency of the audio processor; the calculation unit 902 calculates the clock frequency adjustment of the audio processor based on the clock information of the modem and the clock information of the audio processor, including:

[0200] The clock frequency adjustment of the audio processor is calculated using the following formula:

[0201] O = △f / f1*f2;

[0202] Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor.

[0203] The adjustment unit 903 adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount, including:

[0204] The clock frequency of the audio processor is adjusted according to the following formula:

[0205] f2' = f2 + O;

[0206] Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

[0207] The voice receiving unit 901, the calculation unit 902, the adjustment unit 903, the processing unit 904, and the clock receiving unit 905 can be processors in an audio processor.

[0208] In this embodiment, the clock pin of the audio processor can be connected to the clock pin of the modem, and the audio processor can directly obtain the clock information of the modem from the modem. Through the design of the hardware connection relationship, the clock information of the modem is obtained through the connection of the clock pin, without carrying the clock information of the modem in the voice frame, which can reduce the complexity of software design.

[0209] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of an audio processor provided in an embodiment of this application, such as... Figure 10 As shown, the audio processor 1000 includes a processor 1001 and a memory 1002, which are interconnected via a communication bus 1003. The communication bus 1003 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1003 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 10The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. Memory 1002 stores computer programs, which include program instructions. Processor 1001 is configured to invoke these program instructions, which include instructions for execution. Figures 2-6 Some or all of the steps in the method shown.

[0210] The processor 1001 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the above-mentioned program.

[0211] The memory 1002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.

[0212] In this embodiment, the clock frequency adjustment amount of the audio processor can be calculated using the clock information of the modem and the clock information of the audio processor carried in the voice frame. The clock frequency of the audio processor is adjusted according to the clock frequency adjustment amount, so that the clock of the audio processor and the clock of the modem can be kept synchronized, thus avoiding voice data overload or underload.

[0213] This application also provides a computer-readable storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the voice data processing methods described in the above method embodiments.

[0214] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0215] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0216] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0217] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0218] Furthermore, the functional units in the various embodiments of the application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.

[0219] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0220] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.

[0221] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A voice data processing method, characterized in that, include: The audio processor receives voice frames sent by the modem, the voice frames carrying voice data and the clock information of the modem; The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount; The audio processor processes the voice data; The clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the clock standard frequency of the audio processor; The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including: The clock frequency adjustment of the audio processor is calculated using the following formula: O=△f / f1 f2; Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The step of adjusting the clock frequency of the audio processor according to the clock frequency adjustment amount includes: The clock frequency of the audio processor is adjusted according to the following formula: f2'=f2+O; Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

2. The method according to claim 1, characterized in that, The audio processor processes the voice data, including: If the voice frame is the first frame received by the audio processor from the modem, the audio processor processes the voice data after a preset duration following the receipt of the voice frame.

3. A voice data processing method, characterized in that, include: The audio processor receives voice frames sent by the modem, the voice frames carrying voice data and the clock information of the modem; If the voice frame is the first frame received by the audio processor from the modem, the audio processor processes the voice data after a preset duration following the receipt of the voice frame; The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount; The clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the clock standard frequency of the audio processor; The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including: The clock frequency adjustment of the audio processor is calculated using the following formula: O=△f / f1 f2; Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The step of adjusting the clock frequency of the audio processor according to the clock frequency adjustment amount includes: The clock frequency of the audio processor is adjusted according to the following formula: f2'=f2+O; Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

4. A voice data processing method, characterized in that, include: The audio processor receives voice frames sent by the modem, the voice frames carrying voice data; The audio processor processes the voice data; The audio processor receives clock information from the modem via the modem's clock pin, and the modem's clock pin is connected to the modem's clock pin. The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, and adjusts the clock frequency of the audio processor according to the clock frequency adjustment amount; The clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the clock standard frequency of the audio processor; The audio processor calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including: The clock frequency adjustment of the audio processor is calculated using the following formula: O=△f / f1 f2; Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The step of adjusting the clock frequency of the audio processor according to the clock frequency adjustment amount includes: The clock frequency of the audio processor is adjusted according to the following formula: f2'=f2+O; Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

5. A voice data processing device, characterized in that, include: A receiving unit is used to receive voice frames sent by a modem, wherein the voice frames carry voice data and clock information of the modem; A calculation unit is used to calculate the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor; An adjustment unit is used to adjust the clock frequency of the audio processor according to the clock adjustment frequency adjustment amount; A processing unit is used to process the voice data; The clock information of the modem includes the clock frequency offset of the modem, and the clock information of the audio processor includes the clock standard frequency of the audio processor; The computing unit calculates the clock frequency adjustment amount of the audio processor based on the clock information of the modem and the clock information of the audio processor, including: The clock frequency adjustment of the audio processor is calculated using the following formula: O=△f / f1 f2; Where O represents the clock frequency adjustment amount of the audio processor, Δf represents the clock frequency offset of the modem, f1 represents the standard clock frequency of the modem, and f2 represents the standard clock frequency of the audio processor. The adjustment unit adjusts the clock frequency of the audio processor according to the clock adjustment amount, including: The clock frequency of the audio processor is adjusted according to the following formula: f2'=f2+O; Where f2' is the adjusted clock frequency of the audio processor, f2 represents the standard clock frequency of the audio processor, and 0 represents the clock frequency adjustment amount of the audio processor.

6. An audio processor, characterized in that, The method includes a processor and a memory, the memory being used to store a computer program, the computer program including program instructions, and the processor being configured to invoke the program instructions to perform the method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Voice processing method, device, electronic equipment and readable storage medium

    CN113031901A

  • System and method for clock self-adjustment in audio communications systems

    US20120053709A1