Method for processing sound signal 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 of terminal devices being difficult to effectively utilize NPU resources is solved, and efficient sound quality improvement and processing performance improvement is achieved.
Patent Information
- Application Number
- CN202311100760.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-29
AI Technical Summary
The prior art is difficult to effectively utilize the computing power resources of NPUs on terminal devices, which limits the application of deep learning processing methods on terminal devices, especially processing with high sound quality requirements in voice call scenarios.
By establishing a transmission channel between DSP and NPU in the terminal device and using the CPU to transmit signals, the 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.
It realizes efficient processing of sound signals by terminal devices, improves sound quality and processing performance, meets the high sound quality requirements of voice call scenarios, and avoids the difficulty of NPU resource utilization.
Smart Images

Figure CN119541517A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of processing sound signals, and more specifically, to a method and electronic device for processing sound signals. Background Art
[0002] In the voice call scenario, people have high requirements for the sound quality of voice calls. The 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 constructed model is relatively simple. In addition, some of the parameters used to establish the model are hypothetical parameters. When the hypothetical parameters are not actually true, it may lead to poor processing results. Compared with the traditional signal processing method, the model used by the deep learning processing method 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, the 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. Summary of the invention
[0003] 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, the device's processing capability for sound signals can be improved.
[0004] In a first aspect, a method for processing a sound signal is provided, the method comprising: a digital signal processor DSP outputs a second sound signal by preprocessing a first sound signal; the DSP transmits the second sound signal to a neural network processor NPU through a central processing unit CPU; a third sound signal output by the NPU is received, 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 outputs a target sound signal by post-processing the third sound signal.
[0005] In some embodiments, the pre-processing includes one or more of echo cancellation, noise reduction, gain and frequency response control.
[0006] In some embodiments, the deep neural network processing includes residual echo cancellation and / or noise reduction.
[0007] In some embodiments, the post-processing includes gain and frequency response control.
[0008] 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, which can improve the operating performance of the device. In addition, since the deep neural network processing capability of the NPU is called, the device's processing capability of sound signals can be improved, so that the device can process sound signals better.
[0009] In combination with the first aspect, in a possible implementation manner, the DSP transmits the second sound signal to the NPU through the CPU, including:
[0010] The DSP transmits the second sound signal to the CPU through the 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.
[0011] 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 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.
[0012] 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,….
[0013] In the 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, the deep neural network processing of the NPU and the preprocessing of the DSP can be performed synchronously, but for the same frame of sound signal, the deep neural network processing performed by the NPU on it is asynchronous processing relative to the preprocessing performed by the DSP on it. In this way, after the DSP processes the first sound signal of this frame, it does not need 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.
[0014] 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.
[0015] In some embodiments, the pre-processing includes one or more of echo cancellation, noise reduction, gain and frequency response control.
[0016] In some embodiments, the deep neural network processing includes residual echo cancellation and / or noise reduction.
[0017] 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, which can improve the operating performance of the device. In addition, since the deep neural network processing capability of the NPU is called, the device's processing capability of sound signals can be improved, so that the device can process sound signals better.
[0018] 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 a shared memory, and the shared memory is a shared memory of the DSP and the CPU.
[0019] In the 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.
[0020] 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 a user to confirm whether to turn on an 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 a user to confirm whether to turn on an 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 above-mentioned second aspect or any possible implementation of the second aspect.
[0021] 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 and output the sound signal.
[0022] 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.
[0023] In some embodiments, the pre-processing includes one or more of echo cancellation, noise reduction, gain and frequency response control.
[0024] In some embodiments, the deep neural network processing includes residual echo cancellation and / or noise reduction.
[0025] In some embodiments, the post-processing includes gain and frequency response control.
[0026] 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, which can improve the operating performance of the device. In addition, since the deep neural network processing capability of the NPU is called, the device's processing capability of sound signals can be improved, so that the device can process sound signals better.
[0027] In combination with the fourth aspect, in a possible implementation, the DSP is specifically used to: transmit the second sound signal to the CPU via 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.
[0028] 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 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.
[0029] In combination with the fourth aspect, in a 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,….
[0030] In the 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, the deep neural network processing of the NPU and the preprocessing of the DSP can be performed synchronously, but for the same frame of sound signal, the deep neural network processing performed by the NPU on it is asynchronous processing relative to the preprocessing performed by the DSP on it. In this way, after the DSP processes the first sound signal of this frame, it does not need 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.
[0031] 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 an intelligent noise reduction mode, or for displaying a first notification in a 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 an 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 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.
[0032] 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 the DSP and NPU to deeply process and output the sound signal.
[0033] 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 first aspect or any possible implementation of the first aspect, or implement the method in the second aspect or any possible implementation of the second aspect, or implement the method in the third aspect.
[0034] In the seventh aspect, a chip is provided, in which instructions are stored, which, when executed on a device, enable the chip to execute the method in the first aspect or any possible implementation of the first aspect, or enable the chip to execute the method in the second aspect or any possible implementation of the second aspect, or execute the method in the second aspect or any possible implementation of the second aspect, or execute the method in the third aspect.
[0035] 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 in the first aspect or any possible implementation of the first aspect is implemented, or the method in the second aspect or any possible implementation of the second aspect is implemented, or the method in the third aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0037] Figure 2 is a software structure block diagram of the electronic device provided in the embodiment of the present application;
[0038] Figure 3 is a schematic diagram of a system architecture for processing sound signals provided in an embodiment of the present application;
[0039] Figure 4 is a schematic flow chart of a method for processing a sound signal provided in an embodiment of the present application;
[0040] Figure 5 is a schematic flow chart of another method for processing a sound signal provided in an embodiment of the present application;
[0041] Figure 6 is a schematic flow chart of another method for processing a sound signal provided in an embodiment of the present application;
[0042] Figure 7 is a schematic flow chart of another method for processing a sound signal provided in an embodiment of the present application;
[0043] Figure 8 is a schematic diagram of a device for processing sound signals provided in an embodiment of the present application;
[0044] Fig. 9 This is a schematic diagram of an interface for turning on an intelligent noise reduction mode provided in an embodiment of the present application;
[0045] Fig.10 This is another interface schematic diagram for turning on the intelligent noise reduction mode provided in an embodiment of the present application;
[0046] Fig.11 This is another interface diagram for turning on the intelligent noise reduction mode provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solution in the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0048] The technical solutions in the embodiments of the present application will be described below in conjunction with the 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.
[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, 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.
[0050] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0051] For example, Figure 1 1 shows a schematic diagram of the structure of the 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 screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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.
[0052] It is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0053] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0054] 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.
[0055] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0056] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0057] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0058] 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 achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0059] 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 to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0060] The UART interface is a universal serial data bus for asynchronous communication. The 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 generally 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 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0061] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0062] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the 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.
[0063] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0064] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0065] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0066] 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 supplies power to the processor 110, the internal memory 121, the external memory, the display screen 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 number, battery health status (leakage, impedance), etc. 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.
[0067] 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.
[0068] 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0069] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.
[0070] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a 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.
[0071] 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 integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0072] 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 the network and other devices through wireless communication technology. The wireless communication technology 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).
[0073] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0074] The display screen 194 is used to display images, videos, etc. The 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0075] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0076] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0077] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.
[0078] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0079] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0080] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0081] 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 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0082] 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 may store an operating system, at least one App required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may 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.
[0083] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0084] 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 arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0085] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0086] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0087] Microphone 170C, also called "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 microphone 170C to input the sound signal into 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 sound source, realize directional recording function, etc.
[0088] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0089] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0090] The gyro 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 gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro 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 gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0091] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0092] 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 leather 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 according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0093] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0094] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0095] 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 holds 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.
[0096] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0097] 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.
[0098] 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 a 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 avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0099] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and 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 acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0100] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0101] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0102] 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.
[0103] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0104] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out 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, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0105] 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.
[0106] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0107] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.
[0108] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0109] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0110] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0111] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0112] 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.
[0113] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0114] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0115] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0116] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0117] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0118] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0119] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0120] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0121] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0122] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0123] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0124] A 2D graphics engine is a drawing engine for 2D drawings.
[0125] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0126] 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.
[0127] The technical solution of the embodiment of the present application can be applied to electronic devices with voice call functions. For example, it can be applied to electronic devices such as mobile phones, folding screens, and tablets. The main application scenario can be a scenario of making voice calls through electronic devices, such as video calls, answering calls, etc., and can be specifically used for noise reduction scenarios of voice calls.
[0128] The electronic device in the embodiments 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 public land mobile communication network (PLMN) to be evolved in the future, etc., and the present application does not limit this.
[0129] In the voice call scenario, people have high requirements for the sound quality of voice calls. The 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 constructed model is relatively simple. In addition, some of the parameters used to establish the model are hypothetical parameters. When the hypothetical parameters are not actually true, it may lead to poor processing results. Compared with the traditional signal processing method, the model used by the deep learning processing method 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, the 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.
[0130] In view of this, the present application provides a method and electronic device for processing sound signals. In the method, the DSP and NPU in the terminal device establish a transmission channel through the CPU, so that the DSP and NPU can realize mutual transmission of signals, 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 carried out on the DSP, and the deep neural network processing can be carried out on the NPU. In this way, the system can have abundant 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.
[0131] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "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 may exist; for example, A and / or B can represent: 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 objects associated before and after are in an "or" relationship.
[0132] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "one embodiment", "some embodiments", "another embodiment", "some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0133] 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.
[0134] 1. Digital signal processing (DSP)
[0135] DSP is a unique microprocessor that processes large amounts of information using digital signals. Its working principle is to receive analog signals, convert them into digital signals of 0 or 1, modify, delete, and enhance the digital signals, and interpret the digital data back to analog data or actual environment formats in other system chips. It is not only programmable, but also has a real-time running speed of tens of millions of complex instruction programs per second, far exceeding general-purpose microprocessors. It is an increasingly important computer chip in the digital electronic world.
[0136] 2. Neural-network processing units (NPU)
[0137] 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.
[0138] 3. Central processing unit (CPU)
[0139] As the computing and control core of the computer system, the CPU is the final execution unit for information processing and program running.
[0140] For example, Figure 3 FIG. 1 is a schematic diagram of a system architecture for processing sound signals provided by an embodiment of the present application. Figure 3As shown in FIG. 1 , the system architecture includes a codec (coedc), 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 a shared memory, and the CPU can schedule the NPU to perform related processing operations and can realize signal transmission between the DSP and the NPU. Specifically:
[0141] The codec (coedc) is used to convert the sound analog signal into a sound digital signal before the sound signal is processed, so that the sound signal can be transmitted between the DSP, CPU, and NPU, and also enables the sound signal to be processed.
[0142] A modem is used to convert the processed digital sound signal into an analog sound signal after the digital sound signal has been processed, and then output it further.
[0143] In one example, taking the uplink as an example, the signal flow of the sound is mic-codec-DSP-CPU-NPU-DSP-modem, where mic is a sound analog signal, which is converted into a sound digital signal after passing through the codec, and the sound digital signal is processed by the DSP, CPU, and NPU. The processed sound digital signal is modulated into a sound analog signal after passing through the modem and finally output. In other words, the sound signal received by the codec is a sound analog signal, which is converted into a sound digital signal by the codec so that the sound signal can be transmitted between the DSP, CPU, and NPU in the form of a digital signal.
[0144] DSP and NPU use CPU as the communication medium to jointly process the sound signal converted by the codec to obtain the target sound signal.
[0145] In one embodiment, the sound signal converted by the codec is processed, which may include preprocessing, deep neural network processing (which may 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.
[0146] 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.
[0147] Among them, in the embodiment of the present application, the transmission and processing of sound signals may be the transmission and processing of sound data.
[0148] 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, so that the system 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 system can have abundant computing resources, and since the deep neural network processing capability of the NPU is called, the processing effect of the sound signal is also better.
[0149] It should be understood that in the embodiment of the present application, the DSP and the NPU are connected through the CPU, and the process of the NPU performing deep neural network processing on the sound signal depends on the speech deep learning model it establishes. The solution of the embodiment of the present application enables the speech 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.
[0150] For example, Figure 4 FIG. 4 is a schematic flow chart of a method 400 for processing a sound signal provided in an embodiment of the present application. Figure 4 As shown, the method 400 includes:
[0151] The codec (coedc) converts the received first sound (in analog signal format) into a first sound signal (in digital signal format) and transmits it to the DSP.
[0152] The first sound signal may include multiple microphone signals (mic signals) and may also include multiple ref signals (ref signals).
[0153] In an example, the first sound signal is a 3-microphone signal (3mic signal) input+2-ref signal (2ref signal).
[0154] 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 a codec; the ref signal refers to the sound signal of the other end played by the downlink speaker, which is a digital signal before being converted by a modem.
[0155] S401: After receiving the first sound signal, the DSP pre-processes the first sound signal to obtain a second sound signal.
[0156] In some embodiments, the DSP preprocesses the first sound signal, including: the DSP performs echo elimination on the first sound signal, specifically, the DSP performs filtering-based echo elimination on the first sound signal; it may also include: the DSP performs noise reduction on the first sound signal; it may also include: the DSP performs gain and frequency response control on the first sound signal.
[0157] In one implementation, the DSP includes a first processing module, and the first processing module is used to process a first sound signal to obtain a second sound signal.
[0158] S402: The DSP transmits the second sound signal to the NPU via the CPU.
[0159] In one implementation, the DSP transmits the second sound signal to the CPU via a shared memory with the CPU, and the CPU further calls the NPU to perform deep neural network processing on the second sound signal.
[0160] S403: The NPU performs deep neural network processing on the second sound signal to obtain a third sound signal.
[0161] 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.
[0162] 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.
[0163] In one example, the second processing module is a speech deep learning model.
[0164] S404: The NPU transmits the third sound signal to the DSP via the CPU.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] In one implementation, the DSP includes a third processing module, and the third processing module is used to process the third sound signal to obtain a target sound signal.
[0169] The modem converts the received target sound signal (digital signal format) into the target sound (analog signal format).
[0170] 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.
[0171] 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 abundant computing resources, and since the deep neural network processing capability of the NPU is called, the terminal device can also better process the sound signal.
[0172] For example, in Figure 4 Based on the embodiment shown, Figure 5 FIG. 2 is a schematic flow chart of another method for processing a sound signal provided by an embodiment of the present application. Figure 5 As shown, in this method:
[0173] The DSP and NPU establish a transmission channel through the CPU, so that signals and data can be transmitted between the DSP and the NPU. The DSP establishes a connection with the CPU through shared memory, and the CPU interacts with the NPU by calling the NPU.
[0174] The DSP is used to pre-process the received first sound signal to obtain a second sound signal.
[0175] Among them, regarding the process of preprocessing the first sound signal, Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0176] The NPU is used to perform deep neural network processing on the second sound signal to obtain a third sound signal.
[0177] Among them, regarding the process of performing deep neural network processing on the second sound signal, in Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0178] The DSP is also used to post-process the third sound signal to obtain a target sound signal.
[0179] Among them, regarding the process of post-processing the third sound signal, Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0180] 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.
[0181] Should Figure 5 In the illustrated embodiment, the DSP's processing of the first sound signal and the processing of the third sound signal have a delay of n frames, which can also be understood as: 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.
[0182] In some embodiments, the DSP's processing of the first sound signal and the processing of the third sound signal have a delay of n frames, which is ultimately reflected as follows: 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.
[0183] In some embodiments, the value of n is any integer between 1 and 10.
[0184] 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.
[0185] 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.
[0186] In the embodiment of the present application, the processing of the second sound signal by the NPU has a delay relative to the processing of the first sound signal by the DSP (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 to say, the processing of the NPU is asynchronous processing relative to 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 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, and it is processed and output. 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.
[0187] In order to more clearly describe the delay characteristics of DSP processing and NPU processing, for example, a delay of 3 frames (ie, n=3) is taken as an example. Figure 6 FIG. 6 is a schematic flow chart of another method 600 for processing a sound signal provided in an embodiment of the present application. Figure 6 As shown, the method 600 includes:
[0188] S601: DSP pre-processes the first sound signal of frame 0 to obtain the second sound signal of frame 0.
[0189] 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.
[0190] S602: The DSP pre-processes the received first frame of the first sound signal to obtain the first frame of the second sound signal.
[0191] The process of DSP preprocessing the first sound signal is as follows: Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0192] S603: The DSP transmits the second sound signal of the 0th frame and the second sound signal of the 1st frame obtained by preprocessing to the NPU.
[0193] The method of transmitting the second sound signal from DSP to NPU is as follows: Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0194] S604: The NPU performs deep neural network processing on the second sound signal of the 0th frame and the second sound signal of the 1st frame respectively to obtain the third sound signal of the 0th frame and the third sound signal of the 1st frame.
[0195] The process of NPU performing deep neural network processing on the second sound signal is described in Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0196] S605: The DSP pre-processes the received second frame of the first sound signal to obtain the second frame of the second sound signal.
[0197] S607: The DSP transmits the second sound signal of the second frame and the second sound signal of the third frame obtained by preprocessing to the NPU.
[0198] 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.
[0199] S609: DSP receives the third sound signal of frame 0 and the third sound signal of frame 1 transmitted by 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 DSP outputs the target sound signal of frame 0 after receiving the first sound signal of frame 3.
[0200] The process of post-processing the third sound signal by DSP is described in Figure 4 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0201] 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 the DSP outputs the target sound signal of the first frame after receiving the first sound signal of the fourth frame.
[0202] S611: The DSP pre-processes the received fifth frame of the first sound signal to obtain the fifth frame of the second sound signal.
[0203] S612: The DSP transmits the pre-processed 4th frame second sound signal and the 5th frame second sound signal to the NPU.
[0204] 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.
[0205] S614: DSP receives the third sound signal of the second frame and the third sound signal of the third frame transmitted by 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 DSP outputs the target sound signal of the second frame after receiving the first sound signal of the fifth frame.
[0206] S615: The DSP pre-processes the received first sound signal of the sixth frame to obtain a second sound signal of the sixth frame.
[0207] S616: The DSP pre-processes the received 7th frame of the first sound signal to obtain the 7th frame of the second sound signal.
[0208] S617: The DSP transmits the pre-processed 6th frame second sound signal and the 7th frame second sound signal to the NPU.
[0209] 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.
[0210] S619: 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.
[0211] …(and so on)
[0212] It should be understood that the order of the above steps in the embodiments of the present application is not limited by the step numbers, and the above step numbers are only introduced to clearly describe the embodiments of the present application.
[0213] It should also be understood that: when the DSP is processing the received two consecutive frames of the second sound signal, 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 the steps thereafter; after the DSP processes the received two consecutive frames of the second sound signal to obtain two consecutive frames of the third sound signal, the DSP simultaneously sends the third sound signal to the DSP, and the DSP processes the two consecutive frames of the third sound signal to obtain two consecutive frames of the target sound signal, 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 i-th frame of the target sound signal.
[0214] exist Figure 6 Based on the embodiment shown, illustratively, taking a delay of 3 frames (ie, n=3) as an example, Figure 7 FIG. 7 is a schematic flow chart of another method 700 for processing a sound signal provided in an embodiment of the present application. Figure 7 As shown, the method 700 includes:
[0215] (1) The DSP continuously receives a first sound signal with a length of X ms, wherein the first sound signal with a length of X ms can be understood as a frame of the first sound signal described in the above embodiment; and, after receiving each first sound signal with a length of X ms, the DSP preprocesses the first sound signal to obtain a second sound signal with a length of X ms.
[0216] In some embodiments, the value of X is any value between 8 and 20, for example, 10.
[0217] (2) After the DSP outputs two second sound signals with a length of X ms, the two second sound signals with a length of X ms are transmitted to the NPU via the CPU.
[0218] (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. Figure 7 The NPU reasoning steps shown in FIG. 10A ) and transmits the two third sound signals of length Xms to the DSP through the CPU.
[0219] 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.
[0220] (4) After receiving 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.
[0221] In order to ensure the continuity and real-time output of the target sound signal, the DSP has a delay in preprocessing the first sound signal and post-processing the third sound signal. For example, in the embodiment of the present application, the DSP has a delay of 3 frames in preprocessing the first sound signal and post-processing the third sound signal. Figure 7The specific embodiment is, for example: when the DSP pre-processes the fourth first sound signal received, it will post-process and output the first third sound signal; when the DSP pre-processes the fifth first sound signal received, it will post-process and output the second third sound signal; when the DSP pre-processes the sixth first sound signal received, it will post-process and output the third third sound signal; when the DSP pre-processes the seventh first sound signal received, it will post-process and output the fourth third sound signal; when the DSP pre-processes the eighth first sound signal received, it will post-process and output the fifth third sound signal.
[0222] Among them, DSP processes data once every Xms, where 2Xms means that DSP collects two frames of the first sound signal and then transmits it to NPU for inference (that is, NPU processes 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 within 2Xms, it will be fine. This increases the inference time of NPU. When NPU returns the third sound signal to DSP, it also returns two frames of the third sound signal at the same time (that is, 2Xms of data).
[0223] For example, Figure 8 A schematic diagram of a device for processing sound signals provided in an embodiment of the present application is shown.
[0224] like Figure 8 As shown, the DSP and the CPU realize signal transmission through shared memory, and 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, wherein 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.
[0225] 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.
[0226] In some embodiments, the second processing module 820 may be a speech deep learning model.
[0227] The explanation of the first sound signal, the second sound signal, the third sound signal and the target sound signal is as follows: Figure 4 The illustrated embodiment has been described in detail and will not be described again for the sake of brevity.
[0228] For example, Fig. 9 A schematic diagram of an interface for turning on an intelligent noise reduction mode provided in an embodiment of the present application is shown.
[0229] like Fig. 9 As shown, in one implementation, when the device 900 receives an incoming call reminder, the incoming call interface displayed is as follows Fig. 9 As shown in (a) of FIG. 1 , in this interface, a pop-up box 901 may be displayed, and the pop-up box 901 is used to prompt the user whether to turn on the intelligent noise reduction mode. When the user clicks the control "Yes" in the pop-up box, the device 900 turns on the intelligent noise reduction mode. In this way, when the user answers the call, the voice output by the device 900 is the voice after the above Figure 4 The embodiments shown to Figure 7 The method of any one of the embodiments shown is used to obtain the result; when the user clicks the control "No" in the pop-up box, the device 900 does not turn on the intelligent noise reduction mode.
[0230] 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 to answer the call (such as Fig. 9 As shown in (b) in the call interface, the pop-up box 901 is used to prompt the user whether to turn on the intelligent noise reduction mode. When the user clicks the control "Yes" in the pop-up box, the device 900 turns on the intelligent noise reduction mode. In this way, the voice output by the device 900 is the above Figure 4 The embodiments shown to Figure 7 The method of any one of the embodiments shown is used to obtain the result; when the user clicks the control "No" in the pop-up box, the device 900 does not turn on the intelligent noise reduction mode.
[0231] In some embodiments, the pop-up window 901 is only displayed in the first few (eg, first 3, first 5, etc.) incoming call interfaces or call interfaces of the device 900.
[0232] In another implementation, the pop-up box 901 is not displayed in the call answering interface 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 the voice after the above Figure 4 The embodiments shown to Figure 7 The method of any one of the embodiments shown is used to obtain the result; when the user wants to turn off the intelligent noise reduction mode, the user can click the control 902 again.
[0233] 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 device calling call scenario, and can also be applied to any voice call scenario such as the device's video call, online conference, etc.
[0234] For example, Fig.10 A schematic diagram of an interface for turning on the intelligent noise reduction mode provided in an embodiment of the present application is shown.
[0235] like Fig.10 As shown, in one implementation, when the electronic device 1000 receives an incoming call reminder, the incoming call interface displayed is as shown in FIG. Fig.10 As shown in (a) in Fig.10 The operation of sliding on the interface shown in (a) in the figure to connect the incoming call is implemented), and the display interface of the electronic device 1000 is switched to the interface of the call in progress (such as Fig.10 In the call interface, a pop-up box 1001 may be displayed to prompt the user whether to turn on the intelligent noise reduction mode. The user may turn on the intelligent noise reduction mode by clicking anywhere in the pop-up box. When the user turns on the intelligent noise reduction mode, the voice output by the device 1000 is the voice after the above Figure 4 The embodiments shown to Figure 7 The method of any of the embodiments shown is used to obtain the result, wherein the pop-up box 1001 may include, for example, display content or controls such as "intelligent noise reduction mode", "improve voice call quality after turning on", "click anywhere to turn on intelligent noise reduction mode" or "click here to turn on intelligent noise reduction mode".
[0236] When the user clicks on the pop-up box 1001, the pop-up box 1001 is no longer displayed.
[0237] 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.
[0238] 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.
[0239] 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 device calling call scenario, and can also be applied to any voice call scenario such as the device's video call, online conference, etc.
[0240] For example, Fig.11A schematic diagram of an interface for turning on the intelligent noise reduction mode provided in an embodiment of the present application is shown.
[0241] like Fig.11 As shown, in one implementation, the current display interface of the electronic device 1100 is a call interface (eg Fig.11 As shown in (a) in FIG. 1 ), 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 (as shown in FIG. 1 ) by sliding down on the screen of the electronic device 1100. Fig.11 As shown in (b) in the figure, in the display interface of the notification bar, multiple notification items are displayed, and 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, and the notification item 1101 may also display information related to the current call, such as: the call object, the call duration, etc., and the notification item 1101 may also include multiple controls, such as: a mute control, a hang-up control, a speaker control, etc.; the notification item 1102 is used to remind the user whether to turn on the intelligent noise reduction mode, and the user can turn on the intelligent noise reduction mode by clicking anywhere on the notification item 1102. When the user turns on the intelligent noise reduction mode, the voice output by the device 1100 is the voice after the above Figure 4 The embodiments shown to Figure 7 The method of any of the embodiments shown in the embodiments is processed, wherein the notification item 1102 may include, for example, display content or controls such as "intelligent noise reduction mode", "improve voice call quality after turning it on", "click anywhere to turn on the intelligent noise reduction mode", or "click here to turn on the intelligent noise reduction mode". When the user clicks on the notification item 1102, the notification item 1102 is canceled.
[0242] In some embodiments, the notification item 1102 may be displayed in the notification bar of the electronic device 1100 throughout the entire call process; the notification item 1102 may 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.
[0243] In some embodiments, the notification item 1102 is displayed in the notification bar of the electronic device 1100 during the first m calls on 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.
[0244] In some embodiments, the above Fig.10 The embodiments shown and Fig.11 The illustrated embodiments are implemented in combination.
[0245] In one example, when a user Fig.10 When the intelligent noise reduction mode is selected in the interface shown in (b) in Fig.11 The notification item 1102 will not be displayed in the interface shown in (b), but a notification item can be displayed to remind the user that the user is currently in the intelligent noise reduction mode, and a control can also be provided to the user to turn off the intelligent noise reduction mode at any time.
[0246] In another example, if the user Fig.10 In the interface shown in (b) in FIG. 1 , the intelligent noise reduction mode is not selected. After a call lasts for a certain period of time, the pop-up box 1001 is no longer displayed in the call interface, that is, the display interface of the electronic device is switched to the following example. Fig.11 In the interface shown in (a) of Figure 1, if the user wants to turn on the intelligent noise reduction mode, the user can Fig.11 The method provided in the illustrated embodiment turns on the intelligent noise reduction mode.
[0247] 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 device calling call scenario, and can also be applied to any voice call scenario such as the device's video call, online conference, etc.
[0248] One or more of the modules or units described herein can be implemented by software, hardware or a combination of the two. When any of the above modules or units are 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 and other types of computing devices that run 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 used to execute software instructions for operations or processing in the processor, necessary hardware accelerators may be further included, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements a dedicated logic operation.
[0249] 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 be independent of the software to execute the above method flow.
[0250] 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may 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 may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may 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)), etc.
[0251] Those of ordinary skill 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 to be beyond the scope of this application.
[0252] Those skilled in the art can 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.
[0253] In the several embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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.
[0254] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0255] 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.
[0256] 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0257] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope 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
Voice processing method and related device
CN112397083A
Audio data processing method, chip, earphone and Bluetooth earphone assembly
CN115426563A
Fan controller based on AI voice chip
CN210265228U
Voice recognition method
JP1994214595A
Cited By
Sound signal processing method and electronic device
EP4723110A1