Sound signal processing method and electronic device
By establishing a transmission channel between DSP and NPU in the terminal device, using the CPU to transmit signals, and coordinating the sound signal processing, the problem that terminal devices in the prior art are difficult to effectively utilize NPU resources, and more efficient voice call sound quality and processing efficiency are achieved.
Patent Information
- Application Number
- PCT/CN2024/105619
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-29
- Filing Date
- 2024-07-16
- Publication Date
- 2025-03-06
AI Technical Summary
The prior art is difficult to effectively utilize the computing power resources of the terminal device in voice call scenarios, especially the resource utilization of NPUs, resulting in limited application of deep learning processing methods on terminal devices.
By establishing a transmission channel between DSP and NPU in the terminal device and using the CPU to transmit signals, DSP and NPU can work together, DSP is responsible for pre-processing and post-processing, and NPU is responsible for deep neural network processing, thereby improving the operating performance of the device and sound signal processing capabilities.
The terminal equipment improves the effect of sound signal processing, can better utilize the computing resources of DSP and NPU, and improve the sound quality and processing efficiency of voice calls.
Smart Images

Figure CN2024105619_06032025_PF_FP_ABST
Abstract
Description
Method and electronic device for processing sound signals
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 29, 2023, with application number 202311100760.5 and application name “Method and electronic device for processing sound signals”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of sound signal processing, and more particularly, to a method and electronic device for processing sound signals. Background Art
[0003] In voice call scenarios, people have high requirements for the sound quality of voice calls. Current sound processing methods mainly include traditional signal processing methods and deep learning processing methods. Among them, the traditional signal processing method uses signal modeling, and the built model is relatively simple. In addition, some of the parameters based on which the model is built are hypothetical parameters. When the hypothetical parameters are not actually true, it may lead to poor processing effect. Compared with traditional signal processing methods, the model used by deep learning processing methods is more complex. The model is obtained through learning and training based on a large amount of signal data, and has a better sound processing effect. However, the processing process requires a lot of computing power resources. Moreover, for terminal devices, current technology makes it difficult to utilize the computing power resources of the NPU, and it is difficult to realize the application of deep learning processing methods on terminal devices.
[0004] Summary of the Invention
[0005] The present application provides a method and electronic device for processing sound signals. Through this method and electronic device, the DSP and NPU in the terminal device can establish a transmission channel through the CPU, so that the terminal device can utilize the computing power resources of the DSP and NPU, which can improve the operating performance of the device. In addition, since the deep neural network processing capability of the NPU is called upon, the device's processing capability of sound signals can be improved.
[0006] In a first aspect, a method for processing a sound signal is provided, the method comprising: a digital signal processor (DSP) pre-processing a first sound signal to output a second sound signal; the DSP transmitting the second sound signal to a neural network processor (NPU) via a central processing unit (CPU); receiving a third sound signal output by the NPU, wherein the third sound signal is a sound signal obtained by the NPU performing deep neural network processing on the second sound signal; and the DSP outputting a target sound signal by post-processing the third sound signal.
[0007] In some embodiments, the pre-processing includes one or more of echo cancellation, noise reduction, gain, and frequency response control.
[0008] In some embodiments, the deep neural network processing includes residual echo cancellation and / or noise reduction.
[0009] In some embodiments, the post-processing includes gain and frequency response control.
[0010] In an embodiment of the present application, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal device can utilize the computing power resources of the DSP and the NPU. For example, the pre-processing and post-processing processes can be performed on the DSP, and the deep neural network processing can be performed on the NPU, which can improve the operating performance of the device. Moreover, since the deep neural network processing capability of the NPU is called, the device's processing capability of the sound signal can be improved, so that the device can process the sound signal better.
[0011] In conjunction with the first aspect, in one possible implementation, the DSP transmits the second sound signal to the NPU through the CPU, including:
[0012] The DSP transmits the second sound signal to the CPU through a shared memory, so that the CPU transmits the second sound signal to the NPU by calling the NPU. The shared memory is a shared memory of the DSP and the CPU.
[0013] In an embodiment of the present application, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal device can utilize the computing power resources of the DSP and the NPU, and further enable the terminal device to use the deep neural network processing capabilities of the NPU, that is, the deep neural network processing model of the NPU can be deployed on the terminal device, which can greatly improve the sound processing capabilities of the terminal device.
[0014] In combination with the first aspect, in a possible implementation, the method also includes: when the DSP receives the first sound signal of the n+i frame, the DSP outputs the target sound signal of the i frame; when the DSP receives the first sound signal of the n+i+1 frame, the DSP outputs the target sound signal of the i+1 frame; wherein n is a positive integer less than or equal to 10, i is a natural number, i=1, 2, 3,...
[0015] In an embodiment of the present application, there is a time delay between the DSP receiving the first sound signal and the DSP outputting the target sound signal. That is to say, the deep neural network processing of the NPU and the preprocessing of the DSP can be performed synchronously. However, for the same frame of sound signal, the deep neural network processing performed by the NPU is asynchronous processing relative to the preprocessing performed by the DSP. In this way, after the DSP processes the first sound signal of this frame, it does not have to wait for the third sound signal corresponding to the current frame output by the NPU, but continues to process the first sound signal of the next frame. Within the delay frame number range, the DSP will receive the third sound signal corresponding to the current frame output by the NPU. The DSP only needs to post-process and output the corresponding third sound signal after the delay frame number is reached. In this way, the sound signal can be continuously output even when the NPU cache is insufficient, thereby meeting the continuity and real-time requirements of the sound output.
[0016] In a second aspect, a method for processing a sound signal is provided, the method comprising: a neural network processor NPU receives a second sound signal through a central processing unit CPU, the second sound signal being a sound signal obtained by a digital signal processor DSP by preprocessing a first sound signal; the NPU outputs a third sound signal by performing deep neural network processing on the second sound signal; the NPU transmits the third sound signal to the DSP through the CPU.
[0017] In some embodiments, the pre-processing includes one or more of echo cancellation, noise reduction, gain, and frequency response control.
[0018] In some embodiments, the deep neural network processing includes residual echo cancellation and / or noise reduction.
[0019] In an embodiment of the present application, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal device can utilize the computing power resources of the DSP and the NPU. For example, the pre-processing and post-processing processes can be performed on the DSP, and the deep neural network processing can be performed on the NPU, which can improve the operating performance of the device. Moreover, since the deep neural network processing capability of the NPU is called, the device's processing capability of the sound signal can be improved, so that the device can process the sound signal better.
[0020] In combination with the second aspect, in a possible implementation, the NPU transmits the third sound signal to the DSP through the CPU, including: the NPU transmits the third sound signal to the DSP through the CPU and shared memory, and the shared memory is a shared memory of the DSP and the CPU.
[0021] In an embodiment of the present application, the DSP and NPU in the terminal system device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal system device can simultaneously utilize the computing power resources of the DSP and the NPU, and further enable the terminal device to use the deep neural network processing capabilities of the NPU, that is, the deep neural network processing model of the NPU can be deployed on the terminal device, which can greatly improve the sound processing capabilities of the terminal device.
[0022] In a third aspect, a method for processing sound signals is provided, the method comprising: when the screen of a first device displays a call interface, displaying a first prompt on the screen of the first device, the first prompt being used to prompt the user to confirm whether to turn on the intelligent noise reduction mode, or when the first device is in a call state, displaying a first notification in the notification bar of the first device, the first notification being used to prompt the user to confirm whether to turn on the intelligent noise reduction mode; in response to the user confirming the operation of turning on the intelligent noise reduction mode, the first device executes the method in the above-mentioned first aspect or any possible implementation of the first aspect, or executes the method in the above-mentioned second aspect or any possible implementation of the second aspect.
[0023] In an embodiment of the present application, a method for triggering deep processing of sound signals is provided to the user. When the user is using the call function of the terminal device, the user can decide whether to turn on the intelligent noise reduction mode according to actual needs. When the user determines that the intelligent noise reduction mode needs to be turned on, the terminal device uses the computing power resources of DSP and NPU to deeply process the sound signal and output it.
[0024] In a fourth aspect, an electronic device is provided, which includes a digital signal processor DSP, a central processing unit CPU and a neural network processor NPU, wherein: the DSP is used to output a second sound signal by pre-processing a first sound signal; the DSP is also used to transmit the second sound signal to the NPU through the CPU; the NPU is used to output a third sound signal by performing deep neural network processing on the second sound signal; the NPU is also used to transmit the third sound signal to the DSP through the CPU; the DSP is also used to output a target sound signal by post-processing the third sound signal.
[0025] In some embodiments, the pre-processing includes one or more of echo cancellation, noise reduction, gain, and frequency response control.
[0026] In some embodiments, the deep neural network processing includes residual echo cancellation and / or noise reduction.
[0027] In some embodiments, the post-processing includes gain and frequency response control.
[0028] In an embodiment of the present application, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal device can utilize the computing power resources of the DSP and the NPU. For example, the pre-processing and post-processing processes can be performed on the DSP, and the deep neural network processing can be performed on the NPU, which can improve the operating performance of the device. Moreover, since the deep neural network processing capability of the NPU is called, the device's processing capability of the sound signal can be improved, so that the device can process the sound signal better.
[0029] In combination with the fourth aspect, in one possible implementation, the DSP is specifically used to: transmit the second sound signal to the CPU through a shared memory, where the shared memory is a shared memory of the DSP and the CPU; and the CPU is used to: transmit the second sound signal to the NPU by calling the NPU.
[0030] In an embodiment of the present application, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal device can utilize the computing power resources of the DSP and the NPU, and further enable the terminal device to use the deep neural network processing capabilities of the NPU, that is, the deep neural network processing model of the NPU can be deployed on the terminal device, which can greatly improve the sound processing capabilities of the terminal device.
[0031] In combination with the fourth aspect, in one possible implementation method, the DSP is specifically used to: when receiving the first sound signal of the n+i frame, output the target sound signal of the i frame; when receiving the first sound signal of the n+i+1 frame, output the target sound signal of the i+1 frame; wherein n is a positive integer less than or equal to 10, i is a natural number, i=1,2,3,...
[0032] In an embodiment of the present application, there is a time delay between the DSP receiving the first sound signal and the DSP outputting the target sound signal. That is to say, the deep neural network processing of the NPU and the preprocessing of the DSP can be performed synchronously. However, for the same frame of sound signal, the deep neural network processing performed by the NPU is asynchronous processing relative to the preprocessing performed by the DSP. In this way, after the DSP processes the first sound signal of this frame, it does not have to wait for the third sound signal corresponding to the current frame output by the NPU, but continues to process the first sound signal of the next frame. Within the delay frame number range, the DSP will receive the third sound signal corresponding to the current frame output by the NPU. The DSP only needs to post-process and output the corresponding third sound signal after the delay frame number is reached. In this way, the sound signal can be continuously output even when the NPU cache is insufficient, thereby meeting the continuity and real-time requirements of the sound output.
[0033] In a fifth aspect, an electronic device is provided, comprising: a display module for displaying a first prompt on the screen of the electronic device when a call interface is displayed on the screen of the electronic device, the first prompt being used to prompt a user to confirm whether to turn on the intelligent noise reduction mode, or for displaying a first notification in the notification bar of the first device when the electronic device is in a call state, the first notification being used to prompt a user to confirm whether to turn on the intelligent noise reduction mode; an execution module for executing the method in the above-mentioned first aspect or any possible implementation of the first aspect, or executing the method in the above-mentioned second aspect or any possible implementation of the second aspect, in response to the user confirming the operation of turning on the intelligent noise reduction mode.
[0034] In an embodiment of the present application, when a user is using the call function of a terminal device, he or she can decide whether to turn on the intelligent noise reduction mode according to actual needs. When the user determines that the intelligent noise reduction mode needs to be turned on, the terminal device uses the computing power resources of DSP and NPU to deeply process and output the sound signal.
[0035] In a sixth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect, or to implement the method in the above-mentioned second aspect or any possible implementation of the second aspect, or to implement the method in the above-mentioned third aspect.
[0036] In the seventh aspect, a chip is provided, in which instructions are stored. When the chip is run on a device, the chip executes the method in the first aspect or any possible implementation of the first aspect, or the chip executes the method in the second aspect or any possible implementation of the second aspect, or executes the method in the second aspect or any possible implementation of the second aspect, or executes the method in the third aspect.
[0037] In an eighth aspect, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method of the first aspect or any possible implementation of the first aspect is implemented, or the method of the second aspect or any possible implementation of the second aspect is implemented, or the method of the third aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0039] FIG2 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application;
[0040] FIG3 is a schematic diagram of a system architecture for processing sound signals provided by an embodiment of the present application;
[0041] FIG4 is a schematic flow chart of a method for processing a sound signal provided in an embodiment of the present application;
[0042] FIG5 is a schematic flow chart of another method for processing a sound signal provided in an embodiment of the present application;
[0043] FIG6 is a schematic flowchart of another method for processing a sound signal provided in an embodiment of the present application;
[0044] FIG7 is a schematic flowchart of another method for processing a sound signal provided in an embodiment of the present application;
[0045] FIG8 is a schematic diagram of a device for processing sound signals provided in an embodiment of the present application;
[0046] FIG9 is a schematic diagram of an interface for enabling intelligent noise reduction mode provided in an embodiment of the present application;
[0047] FIG10 is a schematic diagram of another interface for enabling the intelligent noise reduction mode provided in an embodiment of the present application;
[0048] FIG11 is a schematic diagram of an interface for enabling the intelligent noise reduction mode provided in another embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions of this application will be described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, rather than all the embodiments.
[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.
[0051] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0052] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0053] 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0054] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0055] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0056] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0057] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0058] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0059] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0060] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0061] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0062] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0063] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0064] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0065] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0066] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0067] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0068] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0069] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0070] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0071] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0072] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0073] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0074] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0075] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0076] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0077] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0078] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0079] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0080] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0081] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0082] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0083] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0084] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an App required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0085] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0086] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0087] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0088] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0089] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0090] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0091] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0092] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0093] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0094] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0095] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0096] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0097] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0098] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0099] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0100] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0101] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.
[0102] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0103] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0104] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0105] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0106] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an embedded SIM (eSIM) card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0107] It should be understood that the phone card in the embodiments of the present application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.
[0108] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0109] Figure 2 is a software structure diagram of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer, from top to bottom. The application layer can include a series of application packages.
[0110] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
[0111] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0112] As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
[0113] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0114] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0115] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0116] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).
[0117] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0118] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0119] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0120] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0121] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0122] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0123] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0124] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0125] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0126] A 2D graphics engine is a drawing engine for 2D drawings.
[0127] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0128] It should be understood that the technical solutions in the embodiments of the present application can be used in Android, IOS, Hongmeng and other systems.
[0129] The technical solutions of the embodiments of this application can be applied to electronic devices with voice call functions. For example, they can be applied to electronic devices such as mobile phones, foldable screens, and tablets. The main application scenarios can be scenarios where voice calls are made through electronic devices, such as video calls and answering calls. Specifically, they can be used for noise reduction scenarios of voice calls.
[0130] The electronic device in the embodiment of the present application may be a television, a desktop computer, a laptop computer, or a portable electronic device such as a mobile phone, a tablet computer, a camera, a video camera, a video recorder, a smart watch, a smart bracelet, or other electronic devices with voice call functions, electronic devices in a 5G network, or electronic devices in a future evolved public land mobile communication network (PLMN), etc. This application does not limit this.
[0131] In voice call scenarios, people have high requirements for the sound quality of voice calls. Current sound processing methods mainly include traditional signal processing methods and deep learning processing methods. Among them, the traditional signal processing method uses signal modeling, and the built model is relatively simple. In addition, some of the parameters based on which the model is built are hypothetical parameters. When the hypothetical parameters are not actually true, it may lead to poor processing effect. Compared with traditional signal processing methods, the model used by deep learning processing methods is more complex. The model is obtained through learning and training based on a large amount of signal data, and has a better sound processing effect. However, the processing process requires a lot of computing power resources. Moreover, for terminal devices, current technology makes it difficult to utilize the computing power resources of the NPU, and it is difficult to realize the application of deep learning processing methods on terminal devices.
[0132] In view of this, the present application provides a method and electronic device for processing sound signals. In this method, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals can be transmitted between the DSP and NPU, so that the terminal device can utilize the computing power resources of the DSP and NPU. For example, the pre-processing and post-processing processes can be performed on the DSP, and the deep neural network processing can be performed on the NPU. In this way, the system can have rich computing power resources, and because the deep neural network processing capability of the NPU is called, the terminal device can also better process the sound signal.
[0133] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of this application and the appended claims, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0134] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "one embodiment," "some embodiments," "another embodiment," and "other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically stated. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically stated.
[0135] In order to more clearly understand the solution of the present application, the relevant terms involved in the embodiments of the present application are first introduced below.
[0136] 1. Digital signal processing (DSP)
[0137] A DSP is a unique microprocessor that processes large amounts of information using digital signals. It operates by receiving analog signals, converting them into digital signals representing 0s or 1s, then modifying, deleting, and enhancing these signals. In other system chips, it interprets the digital data back into analog data or a real-world format. Not only is it programmable, but it can also execute complex programs at speeds of tens of millions of instructions per second, far exceeding general-purpose microprocessors. It is an increasingly important computer chip in the digital electronics world.
[0138] 2. Neural-network processing units (NPUs)
[0139] The neural network processor (NPU) adopts a "data-driven parallel computing" architecture and is particularly good at processing massive multimedia data such as videos and images.
[0140] 3. Central processing unit (CPU)
[0141] As the computing and control core of the computer system, the CPU is the final execution unit for information processing and program execution.
[0142] For example, FIG3 shows a schematic diagram of a system architecture for processing sound signals provided by an embodiment of the present application. As shown in FIG3 , the system architecture includes a codec (codec), a modem, a digital signal processor (DSP), a central processing unit (CPU), and a neural-network processing unit (NPU). The DSP establishes a connection with the CPU through shared memory, and the CPU can schedule the NPU to perform related processing operations and can realize signal transmission between the NPU and the DSP. Specifically:
[0143] The codec (CODEC) is used to convert the analog sound signal into a digital sound signal before the sound signal is processed, so that the sound signal can be transmitted between the DSP, CPU, and NPU, and also so that the sound signal can be processed.
[0144] A modem is used to convert the processed digital audio signal into an analog audio signal for further output.
[0145] In one example, taking the uplink as an example, the audio signal flow is mic-codec-DSP-CPU-NPU-DSP-modem, where the mic is an analog audio signal, which is converted into a digital audio signal after passing through the codec. The DSP, CPU, and NPU process the digital audio signal, and the processed digital audio signal is modulated into an analog audio signal after passing through the modem for final output. In other words, the audio signal received by the codec is an analog audio signal, which the codec converts into a digital audio signal so that it can be transmitted between the DSP, CPU, and NPU in the form of a digital signal.
[0146] The DSP and NPU use the CPU as a communication medium to collaboratively process the sound signal converted by the codec to obtain the target sound signal.
[0147] In one embodiment, the processing of the sound signal after conversion by the codec may include preprocessing, deep neural network processing (which can also be described as AI model processing) and post-processing. The preprocessing is performed by the DSP and may include one or more of echo cancellation, noise reduction, gain and frequency response control; the deep neural network processing is performed by the NPU and may include noise reduction processing and residual echo suppression processing; the post-processing is performed by the DSP and may include gain and frequency response control.
[0148] The DSP transmits the target sound signal to the modem, which converts the target sound signal from a digital sound signal to an analog sound signal, thereby obtaining the target sound signal in an analog signal format.
[0149] In the embodiment of the present application, the transmission and processing of sound signals may be the transmission and processing of sound data.
[0150] In the embodiment of the present application, the digital signal processor and the neural network processor establish a transmission channel between the digital signal processor and the neural network processor through the central processing unit, so that signals can be transmitted between the digital signal processor and the neural network processor, thereby enabling the system to utilize the computing power resources of the DSP and the NPU. For example, the pre-processing and post-processing processes can be performed on the DSP, and the deep neural network processing can be performed on the NPU. In this way, the system can have rich computing power resources, and since the deep neural network processing capabilities of the NPU are called, the processing effect of the sound signal is also better.
[0151] It should be understood that in the embodiment of the present application, the DSP and NPU are connected through the CPU, and the process of the NPU performing deep neural network processing on the sound signal depends on the voice deep learning model it establishes. The solution of the embodiment of the present application enables the voice deep learning model to be implemented on terminal products such as mobile phones and tablets, thereby improving the voice call quality of terminal devices such as mobile phones and tablets.
[0152] For example, FIG4 shows a schematic flow chart of a method 400 for processing a sound signal provided in an embodiment of the present application. As shown in FIG4 , the method 400 includes:
[0153] The codec (coedc) converts the received first sound (in analog signal format) into a first sound signal (in digital signal format) and transmits the first sound signal to the DSP.
[0154] The first sound signal may include multiple microphone signals (mic signals) and may also include multiple feedback signals (ref signals).
[0155] In one example, the first sound signal is a 3-microphone signal (3mic signal) input+2-ref signal (2ref signal).
[0156] Among them, the mic signal refers to the sound signal collected by the microphone, and the multi-mic signal refers to the sound signal collected by multiple microphones. The mic signal can be converted into a digital signal through the codec; the ref signal refers to the sound signal played by the downlink speaker at the other end, which is the digital signal before being converted by the modem.
[0157] S401: After receiving the first sound signal, the DSP pre-processes the first sound signal to obtain a second sound signal.
[0158] In some embodiments, the DSP preprocesses the first sound signal, including: the DSP performing echo cancellation on the first sound signal, specifically, the DSP performing filtering-based echo cancellation on the first sound signal; it may also include: the DSP performing noise reduction on the first sound signal; it may also include: the DSP performing gain and frequency response control on the first sound signal.
[0159] In one implementation, the DSP includes a first processing module, which is configured to process a first sound signal to obtain a second sound signal.
[0160] S402: The DSP transmits the second sound signal to the NPU via the CPU.
[0161] In one implementation, the DSP transmits the second sound signal to the CPU through a shared memory with the CPU, and the CPU further calls the NPU to perform deep neural network processing on the second sound signal.
[0162] S403: The NPU performs deep neural network processing on the second sound signal to obtain a third sound signal.
[0163] In some embodiments, the NPU performing deep neural network processing on the second sound signal includes: the NPU performing noise reduction on the first sound signal; and may also include: the NPU performing residual echo suppression on the first sound signal.
[0164] In one implementation, the NPU is established with a second processing module, and the second processing module is used to process the second sound signal to obtain a third sound signal.
[0165] In one example, the second processing module is a speech deep learning model.
[0166] S404: The NPU transmits the third sound signal to the DSP via the CPU.
[0167] In one implementation, the NPU transmits the third sound signal to the CPU, and the DSP obtains the third sound signal through a shared memory with the CPU.
[0168] S405: The DSP performs post-processing on the third sound signal to obtain a target sound signal, and transmits the target sound signal to the modem.
[0169] In some embodiments, the DSP post-processing the third sound signal includes: the DSP performing gain and frequency response control on the third sound signal.
[0170] In one implementation, the DSP includes a third processing module, which is configured to process the third sound signal to obtain a target sound signal.
[0171] The modem converts the received target audio signal (digital signal format) into the target audio (analog signal format).
[0172] It should be understood that the transmission and processing of sound signals described in the embodiments of the present application may be the transmission and processing of sound signals, the transmission and processing of sound-related data, or the transmission and processing of sound signals and sound-related data.
[0173] In the embodiment of the present application, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU, so that the terminal device can utilize the computing resources of the DSP and the NPU. For example, the pre-processing and post-processing processes can be performed on the DSP, and the deep neural network processing can be performed on the NPU. In this way, the device can have rich computing resources, and since the deep neural network processing capabilities of the NPU are called, the terminal device can also better process the sound signal.
[0174] For example, based on the embodiment shown in FIG4 , FIG5 shows a schematic flow chart of another method for processing a sound signal provided by an embodiment of the present application. As shown in FIG5 , in this method:
[0175] The DSP and NPU establish a transmission channel through the CPU, enabling mutual transmission of signals and data between the DSP and NPU. The DSP establishes a connection with the CPU through shared memory, and the CPU interacts with the NPU by calling the NPU.
[0176] The DSP is used to pre-process the received first sound signal to obtain a second sound signal.
[0177] The process of preprocessing the first sound signal is described in detail in the embodiment shown in FIG4 , and will not be described again here for the sake of brevity.
[0178] The NPU is used to perform deep neural network processing on the second sound signal to obtain a third sound signal.
[0179] Among them, the process of performing deep neural network processing on the second sound signal is described in detail in the embodiment shown in Figure 4. For the sake of brevity, it will not be repeated here.
[0180] The DSP is further configured to post-process the third sound signal to obtain a target sound signal.
[0181] The process of post-processing the third sound signal is described in detail in the embodiment shown in FIG4 , and will not be described again here for the sake of brevity.
[0182] In some embodiments, the transmission of sound signals can be performed in frames, for example: the DSP receives the first sound signal of the first frame, pre-processes the first sound signal of the first frame, and obtains the corresponding second sound signal of the first frame; the DSP receives the first sound signal of the second frame, pre-processes the first sound signal of the second frame, and obtains the corresponding second sound signal of the second frame; the NPU performs deep neural network processing on the second sound signal of the first frame and the second sound signal of the second frame to obtain the corresponding third sound signal of the first frame and the third sound signal of the second frame; the DSP post-processes the third sound signal of the first frame and the third sound signal of the second frame to obtain the target sound signal of the first frame and the target sound signal of the second frame.
[0183] In the embodiment shown in Figure 5, the DSP's processing of the first sound signal and the processing of the third sound signal have a delay of n frames. It can also be understood that: the DSP's processing of the first sound signal and the NPU's processing of the second sound signal are performed synchronously, but the sound signals corresponding to different frames are processed simultaneously, and the number of frames corresponding to the second sound signal processed by the NPU is later than the number of frames corresponding to the first sound signal processed by the DSP.
[0184] In some embodiments, the DSP's processing of the first sound signal and the third sound signal has a delay of n frames, which is ultimately reflected as: the terminal device receives the first sound signal of the first frame, the first sound signal of the second frame,... in sequence; after the terminal device receives the first sound signal of the (n+1)th frame, the terminal device outputs the first frame target sound signal corresponding to the first sound signal of the first frame; after the terminal device receives the first sound signal of the (n+2)th frame, the terminal device outputs the second frame target sound signal corresponding to the first sound signal of the second frame; and so on, that is, the input and output of the terminal device have a delay of n frames, and the output process of the target sound signal of the terminal device has a certain degree of real-time and continuity.
[0185] In some embodiments, the value of n is any integer between 1 and 10.
[0186] In some embodiments, the delay between the DSP processing the first sound signal and the DSP processing the third sound signal may be less than n frames, but there is a delay of n frames between the DSP receiving the first sound signal and the DSP outputting the target sound signal.
[0187] It should be understood that the transmission and processing of sound signals described in the embodiments of the present application may be the transmission and processing of sound signals, the transmission and processing of sound-related data, or the transmission and processing of sound signals and sound-related data.
[0188] In an embodiment of the present application, the NPU's processing of the second sound signal has a delay relative to the DSP's processing of the first sound signal (or it can be understood that there is a delay between the DSP receiving the first sound signal and the DSP outputting the target sound signal). That is, the NPU's processing is asynchronous processing relative to the DSP. In this way, after the DSP processes the first sound signal of the frame, it does not have to wait for the third sound signal corresponding to the frame output by the NPU, but continues to process the first sound signal of the next frame. After the delay frame number is reached, the third sound signal of the corresponding frame output by the NPU is obtained, processed and output. In this way, the sound signal can be output continuously even when the NPU cache is insufficient, thereby meeting the continuity and real-time requirements of the sound output.
[0189] To more clearly illustrate the latency characteristics of DSP processing and NPU processing, illustratively, taking a latency of 3 frames (i.e., n=3) as an example, FIG6 shows a schematic flow chart of another method 600 for processing sound signals provided by an embodiment of the present application. As shown in FIG6 , the method 600 includes:
[0190] S601: DSP pre-processes the first sound signal of frame 0 to obtain the second sound signal of frame 0.
[0191] The first sound signal of the 0th frame is not a continuously input sound signal, but a preset sound signal, for example, a preset sound signal according to algorithm convergence.
[0192] S602: The DSP pre-processes the received first frame of the first sound signal to obtain the first frame of the second sound signal.
[0193] The process of pre-processing the first sound signal by the DSP is described in detail in the embodiment shown in FIG4 , and will not be described again here for the sake of brevity.
[0194] S603: The DSP transmits the pre-processed second sound signal of the 0th frame and the second sound signal of the 1st frame to the NPU.
[0195] The method for transmitting the second sound signal from the DSP to the NPU is described in detail in the embodiment shown in FIG4 , and will not be described again here for the sake of brevity.
[0196] S604: The NPU performs deep neural network processing on the second sound signal of frame 0 and the second sound signal of frame 1 respectively to obtain the third sound signal of frame 0 and the third sound signal of frame 1.
[0197] Among them, the process of NPU performing deep neural network processing on the second sound signal is introduced in detail in the embodiment shown in Figure 4. For the sake of brevity, it will not be repeated here.
[0198] S605: The DSP pre-processes the received second frame of the first sound signal to obtain a second frame of the second sound signal.
[0199] S607: The DSP transmits the second sound signal of the second frame and the second sound signal of the third frame obtained through preprocessing to the NPU.
[0200] S608: The NPU performs deep neural network processing on the second sound signal of the second frame and the second sound signal of the third frame to obtain the third sound signal of the second frame and the third sound signal of the third frame.
[0201] S609: The DSP receives the third sound signal of frame 0 and the third sound signal of frame 1 transmitted by the NPU, and post-processes the third sound signal of frame 0 and the third sound signal of frame 1 to obtain the target sound signal of frame 0 and the target sound signal of frame 1, so that the DSP outputs the target sound signal of frame 0 after receiving the first sound signal of frame 3.
[0202] The process of post-processing the third sound signal by the DSP is described in detail in the embodiment shown in FIG4 , and will not be described again here for the sake of brevity.
[0203] S610: The DSP pre-processes the received first sound signal of the fourth frame to obtain the second sound signal of the fourth frame, and outputs the target sound signal of the first frame after receiving the first sound signal of the fourth frame.
[0204] S611: The DSP pre-processes the received fifth frame of the first sound signal to obtain the fifth frame of the second sound signal.
[0205] S612: The DSP transmits the pre-processed 4th frame second sound signal and the 5th frame second sound signal to the NPU.
[0206] S613: The NPU performs deep neural network processing on the second sound signal of the 4th frame and the second sound signal of the 5th frame respectively to obtain the third sound signal of the 4th frame and the third sound signal of the 5th frame.
[0207] S614: The DSP receives the third sound signal of the second frame and the third sound signal of the third frame transmitted by the NPU, and post-processes the third sound signal of the second frame and the third sound signal of the third frame to obtain the target sound signal of the second frame and the target sound signal of the third frame, so that the DSP outputs the target sound signal of the second frame after receiving the first sound signal of the fifth frame.
[0208] S615: The DSP pre-processes the received first sound signal of the sixth frame to obtain the second sound signal of the sixth frame.
[0209] S616: The DSP pre-processes the received seventh frame of the first sound signal to obtain the seventh frame of the second sound signal.
[0210] S617: The DSP transmits the pre-processed 6th frame second sound signal and the 7th frame second sound signal to the NPU.
[0211] S618: The NPU performs deep neural network processing on the second sound signal of the 6th frame and the second sound signal of the 7th frame respectively to obtain the third sound signal of the 6th frame and the third sound signal of the 7th frame.
[0212] S619: The DSP receives the third sound signal of the 4th frame and the third sound signal of the 5th frame transmitted by the NPU, and post-processes the third sound signal of the 4th frame and the third sound signal of the 5th frame to obtain the target sound signal of the 4th frame and the target sound signal of the 5th frame, so that the DSP outputs the target sound signal of the 4th frame after receiving the first sound signal of the 7th frame.
[0213] …(and so on)
[0214] It should be understood that the order of the above steps in the embodiment of the present application is not limited by the step numbers, and the above step numbers are only introduced to clearly describe the embodiment of the present application.
[0215] It should also be understood that when the DSP is processing the two consecutive frames of second sound signals received, the DSP is also synchronously processing the newly received first sound signal. For example, when the DSP is executing S604, the DSP is synchronously executing step S605 and subsequent steps. After the DSP processes the two consecutive frames of second sound signals received to obtain two consecutive frames of third sound signals, the DSP sends the third sound signal to the DSP at the same time. The DSP processes the two consecutive frames of third sound signals to obtain two consecutive frames of target sound signals, and outputs the target sound signal at the corresponding output timing. For example, when the delay is 3 frames, after the DSP receives the i+3th frame of the first sound signal, the DSP outputs the ith frame of target sound signal.
[0216] Based on the embodiment shown in FIG6 , illustratively, taking a delay of 3 frames (i.e., n=3) as an example, FIG7 shows a schematic flow chart of another method 700 for processing a sound signal provided by an embodiment of the present application. As shown in FIG7 , the method 700 includes:
[0217] (1) The DSP continuously receives a first sound signal of length Xms, wherein the first sound signal of length Xms can be understood as a frame of the first sound signal described in the above embodiment; and, after receiving each first sound signal of length Xms, the DSP preprocesses the signal to obtain a second sound signal of length Xms.
[0218] In some embodiments, the value of X is any value between 8 and 20, for example, 10.
[0219] (2) After the DSP outputs two second sound signals with a length of Xms, the two second sound signals with a length of Xms are transmitted to the NPU through the CPU.
[0220] (3) The NPU performs deep neural network processing on the two second sound signals of length Xms output by the DSP to obtain two third sound signals of length Xms (i.e., the NPU reasoning step shown in Figure 7), and transmits the two third sound signals of length Xms to the DSP through the CPU.
[0221] That is, compared with the processing of the first sound signal by the DSP, the processing of the second sound signal by the NPU has a time delay.
[0222] (4) After receiving the two third sound signals of length Xms, the DSP performs post-processing on them to obtain and output two target sound signals of length Xms.
[0223] Among them, in order to ensure the continuity and real-time output of the target sound signal, the DSP has a delay in pre-processing the first sound signal and post-processing the third sound signal. For example, in an embodiment of the present application, the DSP has a delay of 3 frames in pre-processing the first sound signal and post-processing the third sound signal. The specific embodiment in Figure 7 is as follows: the DSP will post-process and output the first third sound signal only when it pre-processes the fourth first sound signal received; the DSP will post-process and output the second third sound signal only when it pre-processes the fifth first sound signal received; the DSP will post-process and output the third third sound signal only when it pre-processes the sixth first sound signal received; the DSP will post-process and output the fourth third sound signal only when it pre-processes the seventh first sound signal received; and the DSP will post-process and output the fifth third sound signal only when it pre-processes the eighth first sound signal received.
[0224] Among them, DSP processes data once every Xms. Here, 2Xms means that the DSP collects two frames of the first sound signal and then transmits it to the NPU for inference (that is, the NPU processes the two frames of the second sound signal to obtain two frames of the third sound signal). In this way, as long as the inference is completed and returned within 2Xms, it will be fine. This increases the inference time of the NPU. When the NPU returns the third sound signal to the DSP, it also returns two frames of the third sound signal at the same time (that is, 2Xms of data).
[0225] For example, FIG8 shows a schematic diagram of a device for processing sound signals provided in an embodiment of the present application.
[0226] As shown in Figure 8, the DSP and CPU realize signal transmission through shared memory. The CPU can call the NPU to realize signal transmission between the DSP and the NPU. The DSP includes a first processing module 810 and a third processing module 830, and the NPU includes a second processing module 820. The first processing module 810 is used to process the first sound signal to obtain the second sound signal; the second processing module 820 is used to process the second sound signal to obtain the third sound signal; and the third processing module 830 is used to process the third sound signal to obtain the target sound signal.
[0227] In another implementation, the DSP only includes the first processing module 810 , and the first processing module 810 can also be used to process the third sound signal to obtain the target sound signal.
[0228] In some embodiments, the second processing module 820 may be a speech deep learning model.
[0229] The explanations of the first sound signal, the second sound signal, the third sound signal and the target sound signal have been explained in detail in the embodiment shown in FIG4 , and will not be repeated here for the sake of brevity.
[0230] For example, FIG9 shows a schematic diagram of an interface for enabling an intelligent noise reduction mode provided in an embodiment of the present application.
[0231] As shown in Figure 9, in one implementation, the incoming call interface displayed when the device 900 receives an incoming call reminder is shown in (a) of Figure 9. In this interface, a pop-up box 901 can be displayed. The pop-up box 901 is used to prompt the user whether to turn on the smart noise reduction mode. When the user clicks the control "Yes" in the pop-up box, the device 900 turns on the smart noise reduction mode. In this way, when the user answers the call, the voice output by the device 900 is obtained by processing the method of any one of the embodiments shown in Figure 4 to Figure 7 above; when the user clicks the control "No" in the pop-up box, the device 900 does not turn on the smart noise reduction mode.
[0232] In another implementation, when the device 900 receives an incoming call reminder, the pop-up box 901 is not displayed on the incoming call reminder interface, but is displayed on the call interface after the user confirms answering the call (as shown in (b) in Figure 9). In the call interface, the pop-up box 901 is used to prompt the user whether to turn on the smart noise reduction mode. When the user clicks the control "Yes" in the pop-up box, the device 900 turns on the smart noise reduction mode. In this way, the voice output by the device 900 is obtained by processing the method of any one of the embodiments shown in Figures 4 to 7 above; when the user clicks the control "No" in the pop-up box, the device 900 does not turn on the smart noise reduction mode.
[0233] In some embodiments, the pop-up window 901 is only displayed on the first few (eg, first 3, first 5, etc.) incoming call interfaces or call interfaces of the device 900.
[0234] In another implementation, the pop-up box 901 is not displayed in the interface for answering an incoming call and the call interface. At this time, during the call process, the user can view the undisplayed function controls by clicking the control "More" in the call interface. These undisplayed function controls include a control 902 for turning on and off the smart noise reduction mode. When the user clicks the control 902, the device 900 turns on the smart noise reduction mode. In this way, the voice output by the device 900 is obtained by processing the method of any one of the embodiments shown in Figures 4 to 7 above; when the user wants to turn off the smart noise reduction mode, he or she can click the control 902 again.
[0235] It should be understood that the embodiment of the present application only takes the scenario where the device receives an incoming call as an example. The solution of the embodiment of the present application can also be applied to the scenario where the device makes a call, and can also be applied to any voice call scenario such as the device's video call, online conference, etc.
[0236] For example, FIG10 shows another schematic diagram of an interface for enabling the intelligent noise reduction mode provided in an embodiment of the present application.
[0237] As shown in Figure 10, in one implementation, when the electronic device 1000 receives an incoming call reminder, the incoming call interface displayed is shown in (a) of Figure 10. After the user answers the incoming call (for example, by sliding on the interface shown in (a) of Figure 10 to answer the incoming call), the display interface of the electronic device 1000 switches to the call interface (as shown in (b) of Figure 10). In this call interface, a pop-up box 1001 can be displayed. The pop-up box 1001 is used to prompt the user whether to turn on the smart noise reduction mode. The user can turn on the smart noise reduction mode by clicking anywhere in the pop-up box. When the user turns on the smart noise reduction mode, the voice output by the device 1000 is obtained by processing the method of any one of the embodiments shown in Figures 4 to 7 above. Among them, the pop-up box 1001 may include, for example, display content or controls such as "smart noise reduction mode", "improve voice call quality after turning on", "click anywhere to turn on smart noise reduction mode" or "click here to turn on smart noise reduction mode".
[0238] When the user clicks on the pop-up box 1001, the pop-up box 1001 is canceled.
[0239] In some embodiments, the pop-up box 1001 can be displayed in the interface of the electronic device 1000 during the entire call process; the pop-up box 1001 can also start to display when the call interface is just entered, and automatically cancel the display after a certain period of time.
[0240] In some embodiments, the pop-up box 1001 is displayed during the first m calls of the electronic device 1000. If the user does not click on the pop-up box 1001 during the m calls, the pop-up box 1001 will no longer be displayed in the call interface after the mth call.
[0241] It should be understood that the embodiment of the present application only takes the scenario where the device receives an incoming call as an example. The solution of the embodiment of the present application can also be applied to the scenario where the device makes a call, and can also be applied to any voice call scenario such as the device's video call, online conference, etc.
[0242] For example, FIG11 shows another schematic diagram of an interface for enabling the intelligent noise reduction mode provided in an embodiment of the present application.
[0243] As shown in Figure 11, in one implementation, the current display interface of the electronic device 1100 is a call interface (as shown in (a) in Figure 11). At this time, when the user wants to turn on the intelligent noise reduction mode, the user can view the notification bar of the electronic device 1100 by sliding down on the screen of the electronic device 1100 (as shown in (b) in Figure 11). In the display interface of the notification bar, multiple notification items are displayed. The multiple notification items may include, for example, notification item 1101 and notification item 1102, wherein notification item 1101 is used to remind the user that the user is currently in a call. The notification item 1101 can also display information related to the current call, such as: the call object, call duration, etc. Notification item 1101 may also include multiple controls, such as a mute control, a hang-up control, a speaker control, etc.; notification item 1102 is used to prompt the user whether to turn on the smart noise reduction mode. The user can turn on the smart noise reduction mode by clicking anywhere on notification item 1102. When the user turns on the smart noise reduction mode, the voice output by device 1100 is obtained by processing the method of any of the embodiments shown in Figures 4 to 7 above. Notification item 1102 may include, for example, display content or controls such as "Smart Noise Reduction Mode", "Improve voice call quality after turning it on", "Click anywhere to turn on smart noise reduction mode", or "Click here to turn on smart noise reduction mode". When the user clicks on notification item 1102, notification item 1102 is no longer displayed.
[0244] In some embodiments, the notification item 1102 can be displayed in the notification bar of the electronic device 1100 throughout the entire call process; the notification item 1102 can also be displayed in the notification bar of the electronic device 1100 when the call interface is just entered, and automatically canceled after being displayed for a certain period of time.
[0245] In some embodiments, the notification item 1102 is displayed in the notification bar of the electronic device 1100 during the first m calls of the electronic device 1000. If the user does not click on the notification item 1102 during the m calls, the notification item 1102 will no longer be displayed in the notification bar of the electronic device 1100 during calls after the mth call.
[0246] In some embodiments, the embodiment shown in FIG. 10 and the embodiment shown in FIG. 11 are implemented in combination.
[0247] In one example, when the user selects the smart noise reduction mode in the interface shown in (b) in Figure 10, the notification item 1102 will not be displayed in the interface shown in (b) in Figure 11, but a notification item may be displayed to remind the user that the user is currently in the smart noise reduction mode, and the user may also be provided with controls to turn off the smart noise reduction mode at any time.
[0248] In another example, if the user does not select the intelligent noise reduction mode in the interface shown in (b) of Figure 10, the pop-up box 1001 will no longer be displayed in the call interface after the call lasts for a certain period of time, that is, the display interface of the electronic device is switched to the interface shown in (a) of Figure 11. If the user wants to turn on the intelligent noise reduction mode again, the user can turn on the intelligent noise reduction mode through the method provided in the embodiment shown in Figure 11.
[0249] It should be understood that the embodiment of the present application only takes the scenario where the device receives an incoming call as an example. The solution of the embodiment of the present application can also be applied to the scenario where the device makes a call, and can also be applied to any voice call scenario such as the device's video call, online conference, etc.
[0250] One or more of the modules or units described herein can be implemented in software, hardware, or a combination of the two. When any of the above modules or units is implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor, etc., a computing device that runs software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built into an SoC (system on chip) or an application specific integrated circuit (ASIC), or it may be an independent semiconductor chip. In addition to the core for executing software instructions to perform operations or processing within the processor, it may further include necessary hardware accelerators, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements dedicated logic operations.
[0251] When the modules or units described in this document are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a DSP, an MCU, an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or not rely on the software to execute the above method flow.
[0252] When the modules or units described herein are implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0253] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.
[0254] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0255] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0256] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0257] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0258] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0259] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for processing a sound signal, characterized in that: The method comprises: The digital signal processor DSP outputs a second sound signal by preprocessing the first sound signal; The DSP transmits the second sound signal to the neural network processor NPU through the central processing unit CPU; receives a third sound signal output by the NPU, wherein the third sound signal is a sound signal obtained by the NPU performing deep neural network processing on the second sound signal; The DSP outputs a target sound signal by post-processing the third sound signal.
2. The method according to claim 1, characterized in that The DSP transmits the second sound signal to the NPU through the CPU, including: The DSP transmits the second sound signal to the CPU through a shared memory, so that the CPU transmits the second sound signal to the NPU by calling the NPU, and the shared memory is a shared memory of the DSP and the CPU.
3. The method according to claim 1 or 2, characterized in that: The pre-processing includes one or more of echo cancellation, noise reduction, gain and frequency response control.
4. The method according to any one of claims 1 to 3, characterized in that The deep neural network processing includes residual echo cancellation and / or noise reduction.
5. The method according to any one of claims 1 to 4, characterized in that The post-processing includes gain and frequency response control.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the DSP receives the first sound signal of the n+ith frame, the DSP outputs the target sound signal of the ith frame; When the DSP receives the first sound signal of the n+i+1th frame, the DSP outputs the target sound signal of the i+1th frame; Wherein, n is a positive integer less than or equal to 10, i is a natural number, i=1, 2, 3,….
7. A method for processing a sound signal, characterized in that: The method comprises: The neural network processor NPU receives a second sound signal through the central processing unit CPU, where the second sound signal is a sound signal obtained by the digital signal processor DSP by preprocessing the first sound signal; The NPU outputs a third sound signal by performing deep neural network processing on the second sound signal; The NPU transmits the third sound signal to the DSP through the CPU.
8. The method according to claim 7, characterized in that The NPU transmits the third sound signal to the DSP through the CPU, including: The NPU transmits the third sound signal to the DSP through the CPU and a shared memory, where the shared memory is a shared memory of the DSP and the CPU.
9. The method according to claim 7 or 8, characterized in that: The pre-processing includes one or more of echo cancellation, noise reduction, gain and frequency response control.
10. The method according to any one of claims 7 to 9, characterized in that The deep neural network processing includes residual echo cancellation and / or noise reduction.
11. A method for processing a sound signal, characterized in that: The method comprises: When the screen of the first device displays a call interface, a first prompt is displayed on the screen of the first device, and the first prompt is used to prompt the user to confirm whether to turn on the intelligent noise reduction mode; or when the first device is in a call state, a first notification is displayed in the notification bar of the first device, and the first notification is used to prompt the user to confirm whether to turn on the intelligent noise reduction mode; In response to the user confirming the operation of turning on the intelligent noise reduction mode, the first device executes the method as described in any one of claims 1 to 6, or executes the method as described in any one of claims 7 to 10.
12. An electronic device, characterized in that: The electronic device comprises a digital signal processor DSP, a central processing unit CPU and a neural network processor NPU, wherein: The DSP is used to output a second sound signal by preprocessing the first sound signal; The DSP is further configured to transmit the second sound signal to the NPU via the CPU; The NPU is used to output a third sound signal by performing deep neural network processing on the second sound signal; The NPU is further configured to transmit the third sound signal to the DSP via the CPU; The DSP is further configured to output a target sound signal by post-processing the third sound signal.
13. The electronic device according to claim 12, characterized in that: The DSP is specifically used for: transmitting the second sound signal to the CPU via a shared memory, wherein the shared memory is a shared memory of the DSP and the CPU; The CPU is used to: The second sound signal is transmitted to the NPU by calling the NPU.
14. The electronic device according to claim 12 or 13, characterized in that: The pre-processing includes one or more of echo cancellation, noise reduction, gain and frequency response control.
15. The method according to any one of claims 12 to 14, characterized in that The deep neural network processing includes residual echo cancellation and / or noise reduction.
16. The method according to any one of claims 12 to 15, characterized in that The post-processing includes gain and frequency response control.
17. The method according to any one of claims 12 to 16, characterized in that The DSP is specifically used for: When receiving the first sound signal of the n+ith frame, outputting the target sound signal of the ith frame; When receiving the n+i+1th frame of the first sound signal, outputting the i+1th frame of the target sound signal; Wherein, n is a positive integer less than or equal to 10, i is a natural number, i=1, 2, 3,….
18. An electronic device, characterized in that: The electronic device comprises: A display module, configured to display a first prompt on the screen of the electronic device when a call interface is displayed on the screen of the electronic device, wherein the first prompt is used to prompt a user to confirm whether to turn on the intelligent noise reduction mode, or to display a first notification in a notification bar of the electronic device when the electronic device is in a call state, wherein the first notification is used to prompt a user to confirm whether to turn on the intelligent noise reduction mode; An execution module, configured to execute the method according to any one of claims 1 to 6, or execute the method according to any one of claims 7 to 10, in response to a user confirming an operation of turning on the intelligent noise reduction mode.
19. An electronic device, characterized in that: include: one or more processors; one or more memories; And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, enable the electronic device to perform the method as described in any one of claims 1 to 6, or the method as described in any one of claims 7 to 10, or the method as described in claim 11.
20. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction. When the program or the instruction is executed, the method according to any one of claims 1 to 6 is implemented, or the method according to any one of claims 7 to 10 is implemented, or the method according to claim 11 is implemented.
21. A chip, characterized in that: The chip stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is implemented, or the method according to any one of claims 7 to 10 is implemented, or the method according to claim 11 is implemented.
Citation Information
Patent Citations
Method of processing a sound signal and electronic device
CN119541517B
Voice recognition method and device, storage medium, and electronic equipment
CN107481718A
Voice processing system, voice processing method, electronic equipment and readable storage medium
CN112259071A
Memory allocation method and device and electronic equipment
CN112669852A
Audio processing method and device, electronic equipment and storage medium
CN113284500A