Signal processing method and device, chip and module equipment

By obtaining the complex spectra of far-end and near-end speech signals and combining them with VAD information, the model parameters are optimized to solve the problem of residual echo in AI echo cancellation technology and improve voice quality and power consumption efficiency.

CN118692480APending Publication Date: 2024-09-24UNISOC CHONGQING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410756779.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing AI echo cancellation technology cannot completely eliminate the echo, especially in the case of remote single speech, the residual echo is obvious and affects the voice quality.

Method used

By obtaining the complex spectrum of the far-end speech signal and the near-end speech signal, the trained model is used to perform echo cancellation processing, and combined with the voice activity detection (VAD) information, the model parameters are adjusted to optimize the echo cancellation performance, especially in the far-end single Strengthen the suppression of residual echo under certain circumstances.

Benefits of technology

It effectively improves the performance of echo cancellation, improves voice quality, reduces power consumption, and reduces the processing of voice signals in dual-talk mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692480A
    Figure CN118692480A
Patent Text Reader

Abstract

The invention discloses a signal processing method and device, a chip and module equipment. The method comprises the following steps: acquiring a first complex spectrum of a far-end voice signal and a second complex spectrum of a first voice signal; the first voice signal is obtained by processing a far-end voice signal and a near-end voice signal through an adaptive filter; performing echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end VAD information; under the condition that the near-end VAD information indicates that the voice of the user of the near-end equipment does not exist, reducing the first complex spectrum mask to obtain a second complex spectrum mask; determining a second speech signal based on the second complex spectrum mask and the second complex spectrum; a third speech signal is determined based on the first complex spectrum mask and the second complex spectrum if the near-end VAD information indicates the presence of speech of the user of the near-end device. According to the invention, the performance of echo cancellation can be improved, and the voice quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a signal processing method, device, chip and module equipment. Background Art

[0002] With the popularity of online communication methods such as video conferencing and voice calls, echo problems have become a common problem. Echo is caused by the audio signal being reflected during transmission and re-input into the microphone. This echo can cause sound duplication and distortion, affecting communication quality and user experience. Artificial intelligence (AI) echo cancellation technology is a technology that uses artificial intelligence algorithms to eliminate echoes. It can improve communication quality and user experience by analyzing the characteristics of audio signals, identifying echo signals and removing them from the original signals.

[0003] However, the current AI echo cancellation technology cannot completely eliminate the echo. Especially in the case of a single speaker at the far end, the residual echo will be more obvious, resulting in a decrease in voice quality. Summary of the invention

[0004] The present application provides a signal processing method, device, chip and module device. Based on the method described in the present application, the performance of echo cancellation can be improved and the voice quality can be improved.

[0005] In a first aspect, the present application provides a signal processing method, the method comprising: obtaining a first complex spectrum of a far-end speech signal and a second complex spectrum of the first speech signal; the first speech signal is obtained after the far-end speech signal and the near-end speech signal are processed by an adaptive filter, the far-end speech signal is a speech signal sent by a far-end device, and the near-end speech signal is a speech signal collected by a microphone of a near-end device when the far-end speech signal is played through a speaker of the near-end device; performing echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end voice activity detection VAD information; when the near-end VAD information indicates that the voice of the user of the near-end device does not exist in the near-end speech signal, reducing the first complex spectrum mask to obtain a second complex spectrum mask; and determining a second speech signal based on the second complex spectrum mask and the second complex spectrum.

[0006] Based on the method described in the first aspect, after the near-end device obtains the far-end voice signal and the near-end voice signal, it determines the first complex spectrum of the far-end voice signal and the second complex spectrum of the first voice signal, wherein the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by an adaptive filter; then the first complex spectrum and the second complex spectrum are echo-cancelled using the trained first model to obtain a first complex spectrum mask and near-end VAD information; combined with the near-end VAD information output by the first model, it is determined whether the enhanced signal output by the frame contains the voice of the user of the near-end device; if it is determined that the voice of the user of the near-end device does not exist, the suppression of the residual partial echo is further strengthened to improve the performance of the echo cancellation and the voice quality; if it is determined that the voice of the user of the near-end device exists, no further processing is performed to reduce power consumption, and finally a clean voice signal is output.

[0007] In a possible implementation, determining the second speech signal based on the second complex spectrum mask and the second complex spectrum includes: determining a third complex spectrum based on the second complex spectrum mask and the second complex spectrum; and performing speech synthesis processing on the third complex spectrum to obtain the second speech signal. Based on this method, a speech signal after echo cancellation can be effectively generated, thereby improving the quality of voice communication.

[0008] In a possible implementation, the method further includes: when the near-end VAD information indicates that the near-end voice signal contains the voice of the user of the near-end device, determining a third voice signal based on the first complex spectrum mask and the second complex spectrum. Based on this approach, while ensuring voice quality, it is beneficial to reduce power consumption.

[0009] In a possible implementation, determining the third speech signal based on the first complex spectrum mask and the second complex spectrum includes: determining a fourth complex spectrum based on the first complex spectrum mask and the second complex spectrum; and performing speech synthesis processing on the fourth complex spectrum to obtain the third speech signal. Based on this method, a speech signal after echo cancellation can be effectively generated, thereby improving the quality of speech communication.

[0010] In a second aspect, the present application provides a model training method, which includes: obtaining a first sample complex spectrum of a sample far-end speech signal, a second sample complex spectrum of the first sample speech signal, and a third sample complex spectrum of a target speech signal; the first sample speech signal is obtained after the sample far-end speech signal and the sample near-end speech signal are processed by an adaptive filter, the sample far-end speech signal is a sample speech signal sent by a far-end device, and the sample near-end speech signal is a speech signal collected by a microphone of a near-end device when the sample far-end speech signal is played through a speaker of the near-end device; echo cancellation processing is performed on the first sample complex spectrum and the second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information; the near-end VAD prediction information is used to indicate whether there is the voice of a user of the near-end device in the sample near-end speech signal; based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum, and the third sample complex spectrum, the model parameters of the initial model are adjusted to obtain a first model.

[0011] Based on the method described in the second aspect, during the model training process, on the basis of the codec model of AI echo cancellation, a near-end VAD module constructed using a neural network is further introduced to determine the speech segment and non-speech segment of the input signal, thereby obtaining near-end VAD prediction information (used to indicate whether the voice of the user of the near-end device is present in the sample near-end voice signal); the near-end VAD prediction information can be used to assist the loss function of echo cancellation, better optimize the model, and realize collaborative training between tasks, which is conducive to taking into account both the elimination of echoes and the retention of voice, and is more conducive to eliminating some echo signals remaining in the near-end non-speech segment, thereby achieving the elimination of some residual echoes in the case of far-end single speaking, improving the performance of echo cancellation, and improving voice quality.

[0012] In a possible implementation, based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum and the third sample complex spectrum, the model parameters of the initial model are adjusted to obtain the first model, including: performing voice activity detection on the third sample complex spectrum to obtain a near-end VAD label; determining a first loss value based on the near-end VAD prediction information and the near-end VAD label; determining a second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum; adjusting the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model. Based on this method, the loss function of the output of the near-end VAD module is used to assist in echo cancellation to achieve inter-task collaborative training, which is conducive to taking into account both echo elimination and speech retention, and is more conducive to eliminating partial echo signals remaining in the near-end speechless segment, so that the residual partial echo can be eliminated in the case of far-end single talk, improving the performance of echo cancellation and improving speech quality.

[0013] In a possible implementation, the model parameters of the initial model are adjusted based on the first loss value and the second loss value to obtain the first model, including: when the near-end VAD prediction information indicates that there is no voice of the user of the near-end device in the sample near-end voice signal, determining a first weight value corresponding to the first loss value and a second weight value corresponding to the second loss value; the second weight value is greater than the first weight value; the first loss value and the second loss value are weighted and summed using the first weight value and the second weight value to obtain a third loss value; the model parameters of the initial model are adjusted based on the third loss value to obtain the first model. Based on this method, since in the model training process, more attention is still paid to voice loss, and VAD loss is only an auxiliary role, the second weight value corresponding to the second loss value needs to be greater than the first weight value corresponding to the first loss value, which is more conducive to echo cancellation.

[0014] In one possible implementation, the model parameters of the initial model are adjusted based on the third loss value, and before obtaining the first model, the method also includes: when the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal, determining a third weight value corresponding to the first loss value and a fourth weight value corresponding to the second loss value; the fourth weight value is greater than the third weight value, the fourth weight value is greater than the second weight value, and the third weight value is less than the first weight value; and using the third weight value and the fourth weight value to perform weighted summation of the first loss value and the second loss value to obtain a third loss value. Based on this method, when the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal, it means that the sample near-end voice signal of the current frame is a voice segment, that is, a double-talk state. Since the model needs to be used to perform echo elimination more accurately in the double-talk state so that no further processing is required later to reduce power consumption, compared to the case where the near-end VAD prediction information indicates that the voice of the user of the near-end device does not exist in the sample near-end voice signal (that is, the far-end single-talk state), more attention needs to be paid to the part of the voice loss to improve the performance of the echo cancellation.

[0015] In a possible implementation, determining the second loss value based on the third sample complex spectrum, the first sample complex spectrum mask, and the second sample complex spectrum includes: determining a fourth sample complex spectrum based on the first sample complex spectrum mask and the second sample complex spectrum; and determining the second loss value based on the fourth sample complex spectrum and the third sample complex spectrum. Based on this method, the loss value can be effectively determined.

[0016] In a possible implementation, the first sample complex spectrum and the second sample complex spectrum are subjected to echo cancellation processing through an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information, including: splicing the first sample complex spectrum and the second sample complex spectrum to obtain a fifth sample complex spectrum; encoding the fifth sample complex spectrum using an encoder to obtain a first feature vector; performing deep feature extraction on the first feature vector using a feature extractor to obtain a second feature vector; decoding the second feature vector through a decoder to obtain a first sample complex spectrum mask; parsing the second feature vector through a near-end VAD module to obtain near-end VAD prediction information. Because in the process of model processing, the embodiment of the present application further introduces a near-end VAD module constructed using a neural network after the feature extractor on the basis of the codec model of AI echo cancellation to determine the speech segment and non-speech segment of the input signal, so as to facilitate the subsequent auxiliary echo cancellation loss function and achieve reasonable and effective echo cancellation.

[0017] In a third aspect, the present application provides a signal processing device, which includes: an acquisition unit, used to acquire a first complex spectrum of a far-end speech signal and a second complex spectrum of the first speech signal; the first speech signal is obtained after the far-end speech signal and the near-end speech signal are processed by an adaptive filter, the far-end speech signal is a speech signal sent by a far-end device, and the near-end speech signal is a speech signal collected by a microphone of a near-end device when the far-end speech signal is played through a speaker of the near-end device; a processing unit, used to perform echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end VAD information; the processing unit is also used to reduce the first complex spectrum mask to obtain a second complex spectrum mask when the near-end VAD information indicates that the voice of the user of the near-end device does not exist in the near-end speech signal; a determination unit, used to determine the second speech signal based on the second complex spectrum mask and the second complex spectrum.

[0018] In a fourth aspect, the present application provides a model training device, which includes: an acquisition unit, used to acquire a first sample complex spectrum of a sample far-end speech signal, a second sample complex spectrum of the first sample speech signal, and a third sample complex spectrum of a target speech signal; the first sample speech signal is obtained after the sample far-end speech signal and the sample near-end speech signal are processed by an adaptive filter, the sample far-end speech signal is a sample speech signal sent by a far-end device, and the sample near-end speech signal is a speech signal collected by a microphone of a near-end device when the sample far-end speech signal is played through a speaker of the near-end device; a processing unit, used to perform echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information; the near-end VAD prediction information is used to indicate whether there is the voice of the user of the near-end device in the sample near-end speech signal; an adjustment unit, used to adjust the model parameters of the initial model based on the first sample complex spectrum mask and the near-end VAD prediction information to obtain a first model.

[0019] In a fifth aspect, the present application provides a chip comprising a processor and a communication interface, wherein the processor is configured to cause the chip to execute the method in the above-mentioned first aspect or any possible implementation thereof, or the processor is configured to cause the chip to execute the method in the above-mentioned second aspect or any possible implementation thereof.

[0020] In a sixth aspect, the present application provides a module device, which includes a communication module, a power module, a storage module and a chip, wherein: the power module is used to provide power to the module device; the storage module is used to store data and instructions; the communication module is used for internal communication within the module device, or for the module device to communicate with external devices; the chip is used to execute the method in the above-mentioned first aspect or any possible implementation thereof, or the chip is used to execute the method in the above-mentioned second aspect or any possible implementation thereof.

[0021] In a seventh aspect, the present application provides a signal processing device, which includes a memory and a processor, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method in the above-mentioned first aspect or any possible implementation thereof.

[0022] In an eighth aspect, the present application provides a model training device, which includes a memory and a processor, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method in the above-mentioned second aspect or any possible implementation thereof.

[0023] In the ninth aspect, the present application provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed on a signal processing device, the signal processing device executes the method in the first aspect or any possible implementation thereof; or, when the computer-readable instructions are executed on a model training device, the model training device executes the method in the second aspect or any possible implementation thereof.

[0024] In the tenth aspect, the present application provides a computer program or a computer program product, comprising codes or instructions, which, when executed on a computer, enable the computer to execute the method in the first aspect or any possible implementation thereof, or enable the computer to execute the method in the second aspect or any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a schematic diagram of a communication system provided in an embodiment of the present application;

[0026] Figure 2 is a schematic diagram of an acoustic echo in voice communication provided by an embodiment of the present application;

[0027] Figure 3 It is a flowchart of a model training method provided in an embodiment of the present application;

[0028] Figure 4A It is a flow chart of an embodiment of the present application, which provides a method for performing echo cancellation processing on a first sample complex spectrum and a second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information;

[0029] Figure 4B It is a flow chart of adjusting the model parameters of the initial model based on the first sample complex spectrum mask, the proximal VAD prediction information and the third sample complex spectrum to obtain the first model provided by an embodiment of the present application;

[0030] Figure 5A It is a flow chart of adjusting the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model provided by an embodiment of the present application;

[0031] Figure 5B It is another flow chart of adjusting the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model provided by an embodiment of the present application;

[0032] Figure 5C It is another flow chart of adjusting the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model provided by an embodiment of the present application;

[0033] Figure 6 It is a flowchart of another model training method provided in an embodiment of the present application;

[0034] Figure 7 is a flowchart of a signal processing method provided in an embodiment of the present application;

[0035] Figure 8 is a flowchart of another signal processing method provided in an embodiment of the present application;

[0036] Fig. 9 is a structural schematic diagram of a signal processing device provided in an embodiment of the present application;

[0037] Fig.10 It is a structural schematic diagram of a model training device provided in an embodiment of the present application;

[0038] Fig.11 is a structural schematic diagram of another signal processing device provided in an embodiment of the present application;

[0039] Fig.12 is a structural schematic diagram of another model training device provided in an embodiment of the present application;

[0040] Fig.13 It is a structural schematic diagram of a module device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0043] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present application and in the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0044] In order to better understand the embodiments of the present application, the system architecture involved in the embodiments of the present application is first introduced below:

[0045] The technical solution of the embodiment of the present application can be applied to various communication systems, such as satellite communication systems and traditional mobile communication systems. Among them, the satellite communication system can be integrated with the traditional mobile communication system (i.e., the ground communication system). Mobile communication systems include, for example, wireless local area network (WLAN) communication system, wireless fidelity (Wi-Fi) system, multiple-in multiple-out (MIMO) communication system, long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD), fifth generation (5G) system or new radio (NR), and other future communication systems, such as the sixth generation (6G) system, etc., and also support communication systems that integrate multiple wireless technologies, for example, it can also be applied to non-terrestrial networks (NTN) such as drones, satellite communication systems, and high altitude platform stations (HAPS) communications. The system integrates ground mobile communication networks. In addition, it can also be applied to low-frequency (sub 6GHz) and high-frequency (above 6GHz) communication scenarios. It is understandable that the system architecture described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application.

[0046] Figure 1Schematic diagram of a communication system applicable to an embodiment of the present application. The communication system includes at least one network device and at least one terminal device. The terminal device here may include a near-end device and a far-end device. In the embodiment of the present application, the so-called near-end device refers to the terminal device used locally by the current user in the voice communication, and the so-called far-end device refers to the terminal device used by other participants in the voice communication relative to the near-end device. Figure 1 For example, a communication system includes a near-end device, a remote device, and a network device. Both the near-end device and the remote device can communicate with the network device. In addition, the near-end device and the remote device can also communicate with each other, such as device-to-device (D2D) transmission. Figure 1 The number of proximal devices, remote devices, and network devices in the example is just an example, and can be less or more. Figure 1 The proximal devices, remote devices and network devices involved in the communication system are described in detail.

[0047] 1. Near-end device and far-end device

[0048] The near-end device and the far-end device mentioned in the embodiments of the present application are both terminal devices, and the terminal device includes a device that provides voice and / or data connectivity to the user. For example, the terminal device is a device with wireless transceiver function, which can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; it can also be deployed on the water surface (such as ships, etc.); it can also be deployed in the air (such as airplanes, balloons and satellites, etc.). The terminal device in the embodiments of the present application can be a device equipped with a microphone and a speaker, such as a mobile phone, a headset, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a vehicle-mounted terminal device, a wireless terminal in self-driving, a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in a smart city (smart city), a wireless terminal in a smart home (smart home), a wearable terminal device, etc. The embodiments of the present application do not limit the application scenario. In addition, the terminal device may sometimes also be referred to as a terminal, user equipment (UE), access terminal equipment, vehicle-mounted terminal, industrial control terminal, UE unit, UE station, mobile station, mobile station, remote station, remote terminal equipment, mobile device, UE terminal equipment, terminal equipment, wireless communication equipment, UE agent or UE device, etc. The terminal may also be fixed or mobile. In the embodiment of the present application, the device for realizing the function of the near-end device or the far-end device may be a terminal device, or may be a device that can support the terminal device to realize the function, such as a chip system or a combination device or component that can realize the function of the terminal device, and the device may be installed in the terminal device.

[0049] 2. Network equipment

[0050] The network device mentioned in the embodiments of the present application has a wireless transceiver function and is used to communicate with the terminal. Specifically, it may refer to a base station, an evolved NodeB (eNodeB), a transmission reception point (TRP), a next generation base station (nextgeneration NodeB, gNB) in a 5G mobile communication system, a next generation base station in a sixth generation (6th generation, 6G) mobile communication system, an access network device or a module of an access network device in an open access network (open RAN, ORAN) system, a base station in a future mobile communication system, or an access node in a WiFi system, etc. The network device may also be a module or unit that can implement some functions of a base station. For example, the network device may be a centralized unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU), etc., described below. Among them, in the ORAN system, CU can also be called O-CU, DU can also be called open (open, O)-DU, CU-CP can also be called O-CU-CP, CU-UP can also be called O-CUP-UP, and RU can also be called O-RU. Exemplarily, the base station in the embodiment of the present application may include various forms of base stations, such as: macro base stations, micro base stations (also called small stations), relay stations, access points, next generation base stations (gNodeB, gNB), transmission and receiving points (transmitting and receiving point, TRP), transmission points (transmitting point, TP), mobile switching centers, and can also be devices to devices (Device-to-Device, D2D), vehicle-to-everything (vehicle-to-everything, V2X), machine-to-machine (machine-to-machine, M2M) communications, Internet of Things (Internet of Things) communications, etc., which undertake wireless access functions. In addition, in this application, unless otherwise specified, "network device" may refer to the network device itself or a component in the network device, such as a chip system, a system-on-a-chip (SOC), which may be installed in the network device.

[0051] In order to facilitate understanding of the solution provided by the embodiment of the present application, the following introduces the relevant concepts involved in the embodiment of the present application:

[0052] 1. Voice activity detection (VAD)

[0053] VAD is also known as voice endpoint detection. It is used to detect the presence of speech in speech processing. Its function is to identify speech segments and non-speech segments from a speech (pure or noisy) signal. VAD can be used for echo cancellation, noise suppression, speech recognition, etc.

[0054] VAD algorithms can be roughly divided into three categories: threshold-based VAD, classifier-based VAD, and model-based VAD. Threshold-based VAD extracts time domain (short-time energy, short-time zero-crossing rate, etc.) or frequency domain (MFCC, spectral entropy, etc.) features and sets a reasonable threshold to distinguish between speech and non-speech; classification-based VAD uses speech activity detection as a binary classification (speech and non-speech), and can train classifiers through machine learning methods to achieve the purpose of speech activity detection; model-based VAD builds a complete speech recognition model to distinguish between speech segments and non-speech segments.

[0055] 2. Far-end single talk state, near-end single talk state and dual talk state

[0056] The so-called far-end single-talk state refers to a state in which only the user of the far-end device is speaking on both sides of the voice communication; the so-called near-end single-talk state refers to a state in which only the user of the near-end device is speaking on both sides of the voice communication; the so-called dual-talk state refers to a state in which both the user of the far-end device and the user of the near-end device are speaking on both sides of the voice communication.

[0057] 3. Acoustic echo

[0058] With the popularity of online communication methods such as video conferencing and voice calls, echo has become a common problem. In a voice communication system, the far-end voice signal is transmitted to the near-end device through the network device, played by the speaker of the near-end device, picked up by the microphone again, and transmitted to the far-end device, thus forming an acoustic echo.

[0059] like Figure 2 As shown, in the state of remote single talk, the remote device collects the voice signal of the first user (i.e., the remote voice signal) through microphone 1, and transmits the remote voice signal to the near-end device through the network device. After the near-end device receives the remote voice signal, it can play the remote voice signal through speaker 2. At this time, the remote voice signal will be picked up again by the microphone 2 of the near-end device directly or indirectly after reflection, forming an acoustic echo signal. When the near-end device transmits the acoustic echo signal to the remote device through the network device, the first user will always be able to hear his own voice when speaking, which seriously affects the call experience.

[0060] In addition, if the speaker 2 of the near-end device is playing the far-end voice signal while the second user is also speaking (i.e., double-talk mode), the microphone 2 of the near-end device will also pick up the voice signal of the second user, and the near-end device will transmit the voice signal of the second user and the acoustic echo signal to the far-end device through the network device, causing the first user to not only be able to hear his own voice when speaking, but also be unable to hear the voice of the second user clearly, which seriously reduces the effectiveness of the voice call and the quality of voice communication.

[0061] 4. Acoustic echo cancellation technology

[0062] In acoustic echo cancellation technology, an adaptive filter is usually used for linear filtering to filter out the components of the echo that are linearly related to the far-end voice signal. However, after adaptive filtering, there will still be residual echoes, which will affect the communication quality and user experience. With the advancement of technology, artificial intelligence (AI) echo cancellation technology can be further used to process residual echoes. The so-called AI echo cancellation technology is a technology that uses artificial intelligence algorithms (AI deep learning) to eliminate echoes. It can identify echo signals and remove them from the original signals by analyzing the characteristics of audio signals.

[0063] The essence of deep learning is to build a deep model to fit the mapping relationship between input and output, and to make the error between the model output and the target smaller and smaller through the continuous self-adjustment of the built model until convergence and stability. The model used can be a convolutional neural network (CNN), a recurrent neural network (RNN), a Conformer model (a sequence model based on the self-attention mechanism), etc., without limitation here.

[0064] However, the current mainstream deep learning-based echo cancellation algorithm does not distinguish between near-end speech segments and non-speech segments, that is, the same weight is used for near-end speech segments and non-speech segments, and it is impossible to take into account both echo removal and speech retention. Especially in the model prediction stage, since there is no information about whether the near-end speech signal contains the voice of the user of the near-end device, some echo signals still remain in the part of the near-end speech signal without speech segments. At the same time, some AI algorithms based on voice activity detection are applied to noise reduction tasks. The role of VAD is to reduce the noise of non-speech segments, but since the harmonic structure and frequency components of the echo signal and the near-end speech are similar, the VAD in the noise reduction task has poor ability to distinguish the far-end single-speech scenario.

[0065] It can be seen that in actual applications, the current AI echo cancellation technology cannot completely eliminate echoes. Especially in the case of a single speaker at the far end, the residual echo will be more obvious, resulting in poor listening experience during calls and affecting voice quality.

[0066] Therefore, in order to improve the performance of echo cancellation and improve voice quality, the present application provides a signal processing method, a model training method, a device, a chip and a module device. The signal processing method, the model training method, the device, the chip and the module device provided in the embodiments of the present application are further described in detail below.

[0067] 1. Model training method (training phase)

[0068] Before using the AI ​​model for echo cancellation, an electronic device can be used to train the model, and the trained model (i.e., the first model) can be sent to the proximal device for use. The electronic device here can be a server, a laptop, a tablet computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a desktop computer, a personal digital assistant (PDA), and other devices, but is not limited to this. The so-called server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution servers (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0069] Figure 3 is a flow chart of a model training method provided in an embodiment of the present application. Figure 3 As shown, the model training method includes the following steps S301 to S303. Figure 3 The method shown may be performed by an electronic device. Figure 3 The method shown may be performed by a chip in an electronic device, which is not limited here. Figure 3 The method is described by taking an electronic device as an example of an execution subject.

[0070] S301. The electronic device obtains a first sample complex spectrum of a sample far-end speech signal, a second sample complex spectrum of the first sample speech signal, and a third sample complex spectrum of a target speech signal.

[0071] In an embodiment of the present application, the electronic device may collect training samples from a database, wherein the training samples include a sample far-end voice signal, a sample near-end voice signal, and a target voice signal. The sample far-end voice signal is a sample voice signal sent by a far-end device, the sample near-end voice signal is a voice signal collected by a microphone of a near-end device when the sample far-end voice signal is played through a speaker of the near-end device, and the target voice signal is a clean near-end voice signal after removing echo and noise.

[0072] It should be noted that in the process of model training by electronic equipment, frame-by-frame processing is adopted. Therefore, the sample far-end speech signal mentioned here specifically refers to a frame of sample far-end speech signal, the sample near-end speech signal refers to a corresponding frame of sample near-end speech signal, and the target speech signal is also a corresponding frame of target speech signal.

[0073] First, the electronic device may perform signal processing (ie, Fourier transform to decompose the signal into its spectral components) on the sample far-end speech signal to obtain a first sample complex spectrum S1 (k, λ) of the sample far-end speech signal.

[0074] Then, the sample far-end speech signal and the sample near-end speech signal are filtered by an adaptive filter to obtain a first sample speech signal (that is, the first sample speech signal is obtained after the sample far-end speech signal and the sample near-end speech signal are processed by an adaptive filter). The adaptive filter here is mainly used to preliminarily remove the linear echo in the sample near-end speech signal. The adaptive filter can be updated according to algorithms such as normalized least mean square (NLMS) and partitioned block frequency-domain adaptive filter (PBFDAF), which are not limited here.

[0075] Further, the first sample speech signal is processed to obtain a second sample complex spectrum S2(k,λ) of the first sample speech signal; finally, the target speech signal is processed to obtain a third sample complex spectrum S t (k, λ). Wherein, k represents a frequency index, and λ represents a frame index. Of course, the step of performing signal processing on the target speech signal may also be performed after the subsequent step S302, or simultaneously with the subsequent step S302, which is not limited here.

[0076] S302: The electronic device performs echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information.

[0077] In the embodiment of the present application, the initial model mentioned here can be a neural network model or other types of models, which is not limited here. The embodiment of the present application has no specific requirements for the selected network type and construction order. The electronic device uses the first sample complex spectrum and the second sample complex spectrum as the input of the initial model, and the output is the first sample complex spectrum mask and the near-end VAD prediction information. The first sample complex spectrum mask here is the complex spectrum mask predicted by the model; the near-end VAD prediction information is the near-end VAD information predicted by the model, and the near-end VAD prediction information is used to indicate whether the voice of the user of the near-end device exists in the sample near-end voice signal.

[0078] The specific processing process of the model is described in detail below. In a possible implementation, when the electronic device performs echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through the initial model to obtain the first sample complex spectrum mask and the near-end VAD prediction information, the specific implementation may include the following steps s11 to s15, such as Figure 4A Based on this method, the echo cancellation process can be performed reasonably and effectively.

[0079] s11. The electronic device concatenates the first sample complex spectrum and the second sample complex spectrum to obtain a fifth sample complex spectrum.

[0080] In a specific implementation, the splicing here may refer to connecting the first sample complex spectrum and the second sample complex spectrum to obtain a connected fifth sample complex spectrum S p (k,λ).

[0081] s12. The electronic device uses an encoder to encode the fifth sample complex spectrum to obtain a first eigenvector.

[0082] In a specific implementation, the encoder can use a CNN, Conformer, RNN or other networks, which are not limited here. The encoder is used to reduce the dimensionality of the signal complex spectrum features to a low dimension for feature construction.

[0083] s13. The electronic device uses a feature extractor to perform deep feature extraction on the first feature vector to obtain a second feature vector.

[0084] In a specific implementation, the feature extractor may use a gated recurrent unit (GRU), a temporal convolutional network (TCN), an RNN, etc., which are not limited here. The function of the feature extractor is to extract deep features from compressed features.

[0085] s14. The electronic device decodes the second eigenvector through a decoder to obtain a first sample complex spectral mask.

[0086] In a specific implementation, the decoder can use a CNN, Conformer, RNN or other network, which is not limited here. The structure of the decoder is similar to that of the encoder, and the function of the decoder is to restore the deep features into a complex spectral mask.

[0087] s15. The electronic device analyzes and processes the second eigenvector through a near-end VAD module to obtain near-end VAD prediction information.

[0088] In a specific implementation, the near-end VAD module may be a model-based VAD module, and the structure of the near-end VAD module may adopt a long short-term memory network (LSTM), GRU or other networks, which are not limited here. The function of the near-end VAD module is to extract the near-end voice activity probability from the deep features, indicating whether there is the voice of the user of the near-end device in the sample near-end voice signal of the current frame.

[0089] It should be noted that the execution order of step s14 and step s15 is not limited.

[0090] S303: The electronic device adjusts the model parameters of the initial model based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain a first model.

[0091] In an embodiment of the present application, the electronic device adjusts the model parameters of the initial model according to the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum of the first sample speech signal, and the third sample complex spectrum of the target speech signal output by the initial model, and continuously optimizes the model parameters so that the gap between the output result and the true label is within a smaller range, thereby realizing the training of the model, and the first model obtained by training can be used to perform echo cancellation processing on the speech signal later. Because in the process of model processing, the embodiment of the present application further introduces a near-end VAD module constructed by a neural network after the feature extractor on the basis of the codec model of AI echo cancellation to determine the speech segment and non-speech segment of the input signal. The output of the near-end VAD module can assist the loss function of echo cancellation, realize collaborative training between tasks, and is conducive to taking into account the elimination of echoes and the retention of speech, and is more conducive to eliminating the residual part of the echo signal in the near-end speechless segment, so that the residual part of the echo can be eliminated in the case of far-end single talk, improving the performance of echo cancellation and improving speech quality.

[0092] The specific processing of model optimization is described in detail below. In a possible implementation, the electronic device adjusts the model parameters of the initial model based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain the first model. The specific implementation may include the following steps s21 to s24, such as Figure 4B shown.

[0093] s21. The electronic device performs voice activity detection on the third sample complex spectrum to obtain a near-end VAD label.

[0094] In a specific implementation, the electronic device can use the VAD decision module to perform voice activity detection on the third sample complex spectrum to obtain a near-end VAD label. The VAD decision module is used to determine whether the target voice signal of the current frame is a voice segment or a non-voice segment. Specifically, the decision can be made using a traditional solution based on short-time energy or zero-crossing detection, or a deep learning method can be used for the decision, which is not limited here. For example, when the near-end VAD label is 1, it indicates that the target voice signal of the current frame is a voice segment (that is, the voice of the user of the near-end device exists in the target voice signal); when the near-end VAD label is 0, it indicates that the target voice signal of the current frame is a non-voice segment (that is, the voice of the user of the near-end device does not exist in the target voice signal).

[0095] s22. The electronic device determines a first loss value based on the proximal VAD prediction information and the proximal VAD label.

[0096] In a specific implementation, the proximal VAD prediction information here is the proximal VAD information predicted by the model, and the proximal VAD label is the VAD information of the target speech signal (ie, the real label). The electronic device can calculate the proximal VAD prediction information and the proximal VAD label through a first loss function to obtain a first loss value (ie, VAD loss). The first loss function here can be a mean square error (MSE) loss function, a cross entropy (CE) loss function, etc., which is not limited here, as long as it can reflect the gap between the output result and the real label.

[0097] s23. The electronic device determines a second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum.

[0098] Optionally, when the electronic device determines the second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum, the specific implementation method may be: the electronic device determines the fourth sample complex spectrum based on the first sample complex spectrum mask and the second sample complex spectrum; and then determines the second loss value based on the fourth sample complex spectrum and the third sample complex spectrum.

[0099] It can be understood that the electronic device will first multiply the first sample complex spectrum mask and the second sample complex spectrum to obtain a fourth sample complex spectrum. The fourth sample complex spectrum here is the complex spectrum predicted by the model, and the third sample complex spectrum is the complex spectrum of the target speech signal (ie, the true label).

[0100] Then, the electronic device can calculate the fourth sample complex spectrum and the third sample complex spectrum through the second loss function to obtain a second loss value (i.e., speech loss). The second loss function here can be a dynamic compression loss function, a negative signal-to-noise ratio loss function, etc., which is not limited here, as long as it can reflect the gap between the output result and the true label.

[0101] s24. The electronic device adjusts the model parameters of the initial model based on the first loss value and the second loss value to obtain a first model.

[0102] In a specific implementation, the electronic device can adjust the model parameters of the initial model in the direction of reducing the first loss value and the second loss value, continuously optimize the model, and finally obtain the first model. The first model can then be used to perform echo cancellation processing on the speech signal. Among them, the method of adjusting the model parameters of the initial model can adopt a stochastic gradient descent method, an adaptive gradient algorithm, etc., which is not limited here.

[0103] Optionally, when the electronic device adjusts the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model, specific implementation methods may include the following two methods.

[0104] Method 1: distinguishing between a case where the voice of the user of the near-end device does not exist in the sample near-end voice signal and a case where the voice of the user of the near-end device exists in the sample near-end voice signal.

[0105] Case 1: The near-end VAD prediction information indicates that there is no voice of the user of the near-end device in the sample near-end voice signal, which specifically includes steps A to C, such as Figure 5A shown.

[0106] Step A: When the near-end VAD prediction information indicates that the voice of the user of the near-end device does not exist in the sample near-end voice signal, the electronic device determines a first weight value corresponding to the first loss value and a second weight value corresponding to the second loss value.

[0107] Among them, the second weight value is greater than the first weight value. It should be noted that, since in the model training process, more attention is still paid to speech loss, and VAD loss is only an auxiliary role, the second weight value corresponding to the second loss value needs to be greater than the first weight value corresponding to the first loss value.

[0108] Step B: The electronic device uses the first weight value and the second weight value to perform weighted summation on the first loss value and the second loss value to obtain a third loss value.

[0109] Step C: The electronic device adjusts the model parameters of the initial model based on the third loss value to obtain the first model.

[0110] Exemplarily, assume that the first loss value is 0.3 and the second loss value is 0.4. When the near-end VAD prediction information indicates that the voice of the user of the near-end device does not exist in the sample near-end voice signal, the electronic device determines that the first weight value corresponding to the first loss value is 0.4, and the second weight value corresponding to the second loss value is 0.6. Then, the first loss value and the second loss value are weighted and summed using the first weight value and the second weight value, and the third loss value obtained is 0.36. The electronic device can adjust the model parameters of the initial model in the direction of reducing the third loss value, continuously optimize the model, and finally obtain the first model.

[0111] Case 2: The near-end VAD prediction information indicates that the sample near-end speech signal contains the speech of the user of the near-end device, which specifically includes steps a to c, such as Figure 5B shown.

[0112] Step a: When the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal, the electronic device determines a third weight value corresponding to the first loss value and a fourth weight value corresponding to the second loss value.

[0113] Among them, the fourth weight value is greater than the third weight value, the fourth weight value is greater than the second weight value, and the third weight value is less than the first weight value. It should be noted that, since in the model training process, more attention is still paid to speech loss, and VAD loss is only an auxiliary role, the fourth weight value corresponding to the second loss value needs to be greater than the third weight value corresponding to the first loss value. In addition, when the near-end VAD prediction information indicates that there is a voice of the user of the near-end device in the sample near-end speech signal, it means that the sample near-end speech signal of the current frame is a speech segment, that is, a double-talk state. Since the model needs to be used to more accurately perform echo cancellation in the case of a double-talk state, so that no more processing is performed later to reduce power consumption, compared with the near-end VAD prediction information indicating that there is no voice of the user of the near-end device in the sample near-end speech signal (that is, a far-end single-talk state), it is necessary to pay more attention to the part of speech loss to improve the performance of echo cancellation, so that the fourth weight value needs to be greater than the second weight value mentioned in the above case 1, and the third weight value needs to be less than the first weight value mentioned in the above case 1.

[0114] Step b: The electronic device uses the third weight value and the fourth weight value to perform weighted summation on the first loss value and the second loss value to obtain a third loss value.

[0115] Step c: The electronic device adjusts the model parameters of the initial model based on the third loss value to obtain a first model.

[0116] Exemplarily, assume that the first loss value is 0.3 and the second loss value is 0.4. When the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal, the electronic device determines that the first weight value corresponding to the first loss value is 0.3, and the second weight value corresponding to the second loss value is 0.7. Then, the first loss value and the second loss value are weighted and summed using the first weight value and the second weight value, and the third loss value obtained is 0.37. The electronic device can adjust the model parameters of the initial model in the direction of reducing the third loss value, continuously optimize the model, and finally obtain the first model.

[0117] Through method 1, the output of the near-end VAD module is used to assist speech loss. Different speech losses are applied to speech segments and non-speech segments. At the same time, the near-end VAD loss and speech loss are weighted and summed, and feedback is used to adjust network parameters, thereby improving algorithm performance.

[0118] Mode 2: Do not distinguish between a case where the voice of the user of the near-end device does not exist in the sample near-end voice signal and a case where the voice of the user of the near-end device exists in the sample near-end voice signal.

[0119] Specifically including steps 1 to 3, such as Figure 5C As shown:

[0120] Step 1: The electronic device determines a fifth weight value corresponding to the first loss value and a sixth weight value corresponding to the second loss value.

[0121] Among them, the sixth weight value is greater than the fifth weight value. It should be noted that, since in the model training process, more attention is still paid to speech loss, and VAD loss is only an auxiliary role, the sixth weight value corresponding to the second loss value needs to be greater than the fifth weight value corresponding to the first loss value.

[0122] Step 2: The electronic device uses the first weight value and the fifth weight value to perform weighted summation on the first loss value and the sixth loss value to obtain a third loss value.

[0123] Step 3: The electronic device adjusts the model parameters of the initial model based on the third loss value to obtain the first model.

[0124] Exemplarily, assume that the first loss value is 0.3 and the second loss value is 0.4. Regardless of whether the near-end VAD prediction information indicates that the voice of the user of the near-end device does not exist in the sample near-end voice signal, or whether the voice of the user of the near-end device does not exist in the sample near-end voice signal, the electronic device determines that the first weight value corresponding to the first loss value is 0.4, and the second weight value corresponding to the second loss value is 0.6. Then, the first loss value and the second loss value are weighted and summed using the first weight value and the second weight value, and the obtained third loss value is 0.36. The electronic device can adjust the model parameters of the initial model in the direction of reducing the third loss value, continuously optimize the model, and finally obtain the first model.

[0125] The following is a general overview of the model training method. For example, Figure 6 As shown, first, the signal processing module 105 is used to perform signal processing on the sample far-end speech signal 101 (i.e., Fourier transform, decomposing the signal into its spectral components) to obtain a first sample complex spectrum 118 of the sample far-end speech signal; then, the adaptive filter 103 is used to filter the sample far-end speech signal 101 and the sample near-end speech signal 102 to obtain a first sample speech signal, and the signal processing module 105 is used to perform signal processing on the first sample speech signal to obtain a second sample complex spectrum 104 of the first sample speech signal.

[0126] Further, the first sample complex spectrum 118 and the second sample complex spectrum 104 are input into the initial model 106, and the initial model 106 includes an encoder 110, a feature extractor 111, a decoder 112 and a near-end VAD module 113. Specifically, the first sample complex spectrum 118 and the second sample complex spectrum 104 are first concatenated to obtain a fifth sample complex spectrum; then, the fifth sample complex spectrum is encoded by the encoder 110 to obtain a first feature vector; the feature extractor 111 is used to perform deep feature extraction on the first feature vector to obtain a second feature vector; further, the second feature vector is decoded by the decoder 112 to obtain a first sample complex spectrum mask 120; the second feature vector is parsed by the near-end VAD module 113 to obtain near-end VAD prediction information 121.

[0127] Further, the signal processing module 105 is used to perform signal processing on the target speech signal 114 to obtain a third sample complex spectrum 119 of the target speech signal; then, the VAD decision module 115 is used to perform voice activity detection on the third sample complex spectrum 119 to obtain a near-end VAD label 122.

[0128] Further, the model parameters of the initial model are optimized using the loss function 107. The loss function 107 includes a VAD loss 116 and a speech loss 117. Specifically, the VAD loss 116 is used to calculate the near-end VAD prediction information 121 and the near-end VAD label 122 to obtain a first loss value; and the first sample complex spectrum mask 120 and the second sample complex spectrum 104 are multiplied to obtain a fourth sample complex spectrum 123, and then the speech loss 117 is used to calculate the fourth sample complex spectrum 123 and the third sample complex spectrum 119 to obtain a second loss value.

[0129] Further, according to the indication of the near-end VAD prediction information 121 (the presence / absence of the voice of the user of the near-end device in the sample near-end voice signal), the weight value corresponding to the first loss value and the weight value corresponding to the second loss value are determined; then, the first loss value and the second loss value are weighted and summed according to the corresponding weight values ​​to obtain a third loss value. Finally, the model parameters of the initial model are adjusted in the direction of reducing the third loss value, and the model is continuously optimized to finally obtain the first model. In the subsequent process of using the first model for echo cancellation, the speech synthesis module 108 including the overlap-add algorithm (OLA) and the inverse Fourier transform is used to obtain the estimated speech signal 109 after time-domain echo cancellation.

[0130] It can be seen that based on Figure 3 The described method, during the model training process, further introduces a near-end VAD module constructed using a neural network on the basis of the AI ​​echo cancellation codec model to determine the speech segment and the non-speech segment of the input signal, thereby obtaining near-end VAD prediction information (used to indicate whether the voice of the user of the near-end device exists in the sample near-end voice signal); the near-end VAD prediction information can assist the loss function of the echo cancellation, better optimize the model, and realize collaborative training between tasks, which is conducive to taking into account both the elimination of echoes and the retention of voices, and is more conducive to eliminating the partial echo signals remaining in the near-end non-speech segment, thereby achieving the elimination of the residual partial echo in the case of far-end single speaking, improving the performance of echo cancellation, and improving voice quality.

[0131] 2. Signal processing method (application stage)

[0132] After the AI ​​model training is completed, the trained model (ie, the first model) is used to perform echo cancellation processing. Figure 7 is a flow chart of a signal processing method provided by an embodiment of the present application. Figure 7 As shown, the signal processing method includes the following steps S701 to S704. Optionally, the signal processing method also includes step S705. Figure 7 The method shown in the figure can be performed by a proximal device (such as the above Figure 1the near-end device mentioned). Or, Figure 7 The method shown may be performed by a chip in a proximal device, which is not limited here. Figure 7 The following description is given by taking the proximal device as the execution subject of the method as an example.

[0133] S701. A near-end device obtains a first complex spectrum of a far-end speech signal and a second complex spectrum of a first speech signal.

[0134] In an embodiment of the present application, when the remote device and the near-end device perform voice communication, the remote device sends the collected remote voice signal to the near-end device through the network device (that is, the remote voice signal is the voice signal sent by the remote device). After the near-end device receives the remote voice signal, it will play the remote voice signal through the speaker of the near-end device. At this time, the remote voice signal will be picked up again by the microphone of the near-end device directly or indirectly after reflection to form an echo signal; if the user of the near-end device is also speaking at this time, the microphone of the near-end device will also collect the voice signal of the user of the near-end device (that is, the near-end voice signal is the voice signal collected by the microphone of the near-end device when the far-end voice signal is played through the speaker of the near-end device). Therefore, in an embodiment of the present application, all signals collected by the microphone of the near-end device are collectively referred to as near-end voice signals, and the near-end voice signal includes the echo signal corresponding to the far-end voice signal. Optionally, the near-end voice signal also includes the voice signal of the user of the near-end device.

[0135] It should be noted that, in the process of signal processing by electronic devices, frame-by-frame processing is adopted. Therefore, the far-end voice signal mentioned here can specifically refer to a frame of far-end voice signal, and the near-end voice signal refers to a corresponding frame of near-end voice signal.

[0136] First, the electronic device may perform signal processing (ie, Fourier transform to decompose the signal into its spectral components) on the far-end voice signal to obtain a first complex spectrum of the far-end voice signal.

[0137] Then, the far-end voice signal and the near-end voice signal are filtered by an adaptive filter to obtain a first voice signal (i.e., the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by the adaptive filter). The adaptive filter here is mainly used to preliminarily remove the linear echo in the near-end voice signal. The adaptive filter can be updated according to algorithms such as NLMS and PBFDAF, which are not limited here. Finally, the first voice signal is processed to obtain a second complex spectrum of the first voice signal.

[0138] S702: The near-end device performs echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end VAD information.

[0139] In an embodiment of the present application, the near-end device can obtain the first model trained by the above-mentioned electronic device. The first model here can be a neural network model or a model of other types, which is not limited here. The first model can be used to perform echo cancellation processing on the voice signal. The near-end device uses the first complex spectrum and the second complex spectrum as inputs of the first model. After the first model performs echo cancellation processing, it outputs the first complex spectrum mask and near-end VAD information. Among them, the near-end VAD information is used to indicate whether there is the voice of the user of the near-end device in the near-end voice signal.

[0140] Specifically, the first model includes an encoder, a feature extractor, a decoder and a near-end VAD module. First, the first complex spectrum and the second complex spectrum are spliced ​​to obtain a spliced ​​complex spectrum; then, the spliced ​​complex spectrum is encoded by the encoder to obtain a third feature vector; the feature extractor is used to perform deep feature extraction on the third feature vector to obtain a fourth feature vector; finally, the fourth feature vector is decoded by the decoder to obtain a first complex spectrum mask; the fourth feature vector is analyzed by the near-end VAD module to obtain near-end VAD information.

[0141] If the near-end VAD information indicates that the near-end voice signal contains the voice of the user of the near-end device, execute steps S703 and S704; if the near-end VAD information indicates that the near-end voice signal contains no voice of the user of the near-end device, execute step S705.

[0142] S703: When the near-end VAD information indicates that the near-end voice signal does not contain the voice of the user of the near-end device, the near-end device reduces the first complex spectral mask to obtain a second complex spectral mask.

[0143] S704: The near-end device determines a second speech signal based on the second complex spectrum mask and the second complex spectrum.

[0144] In one possible implementation, when the near-end device determines the second speech signal based on the second complex spectrum mask and the second complex spectrum, the specific implementation method may be: the near-end device determines the third complex spectrum based on the second complex spectrum mask and the second complex spectrum; then, performs speech synthesis processing on the third complex spectrum to obtain the second speech signal.

[0145] In an embodiment of the present application, if the near-end VAD information indicates that the near-end voice signal does not contain the voice of the user of the near-end device, it means that the current frame is in the far-end single-talk state, and the residual echo signal will be more obvious at this time, so it is necessary to strengthen the residual echo suppression of the frame signal. The way to strengthen the residual echo suppression can be to reduce the first complex spectrum mask, that is, multiply the first complex spectrum mask by a gain less than 1, so that the suppression strength is stronger, which is more conducive to improving the effect of echo cancellation.

[0146] Further, the near-end device reduces the first complex spectrum mask to obtain a second complex spectrum mask; then, the second complex spectrum mask and the second complex spectrum are multiplied to obtain a third complex spectrum; finally, the third complex spectrum can be processed for speech synthesis to obtain a second speech signal. The second speech signal here is the speech signal after time domain echo cancellation, and the near-end device can send the second speech signal to the far-end device through the network device to achieve voice communication.

[0147] Of course, other methods of enhancing residual echo suppression may also be used, which are not limited here. For example, when the near-end VAD information indicates that the voice of the user of the near-end device does not exist in the near-end voice signal, the coefficients of the adaptive filter may be updated and adjusted to enhance the filtering performance of the adaptive filter, and the far-end voice signal and the near-end voice signal may be re-filtered using the adjusted adaptive filter to obtain a fifth voice signal; then, the fifth voice signal is subjected to signal processing to obtain a fifth complex spectrum of the fifth voice signal; the first complex spectrum and the fifth complex spectrum are subjected to echo cancellation processing by the first model to obtain a third complex spectrum mask and near-end VAD information, and then the third complex spectrum mask and the second complex spectrum are multiplied to obtain a sixth complex spectrum; finally, the sixth complex spectrum may be subjected to speech synthesis processing to obtain a sixth voice signal. The sixth voice signal here is the voice signal after time domain echo cancellation, and the near-end device may send the sixth voice signal to the far-end device through a network device to achieve voice communication.

[0148] S705: When the near-end VAD information indicates that the near-end voice signal contains the voice of the user of the near-end device, the electronic device determines a third voice signal based on the first complex spectrum mask and the second complex spectrum.

[0149] In one possible implementation, when the near-end device determines the third speech signal based on the first complex spectrum mask and the second complex spectrum, the specific implementation method may be: the near-end device determines the fourth complex spectrum based on the first complex spectrum mask and the second complex spectrum; then, performs speech synthesis processing on the fourth complex spectrum to obtain the third speech signal.

[0150] In an embodiment of the present application, if the near-end VAD information indicates that the near-end voice signal contains the voice of the user of the near-end device, it means that the current frame is in a double-talk state. At this time, the residual echo signal is not obvious, and there is no need to strengthen the residual echo suppression of the frame signal to reduce power consumption. At this time, the near-end device can directly multiply the first complex spectrum mask and the second complex spectrum to obtain a third complex spectrum; finally, the third complex spectrum can be processed for speech synthesis to obtain a third voice signal. The third voice signal here is the voice signal after time domain echo elimination. The near-end device can send the third voice signal to the remote device through a network device to achieve voice communication.

[0151] Based on the above, it can be understood that the voice signal is echo-cancelled using the trained first model, and combined with the near-end VAD information output by the first model, it is determined whether the enhanced signal output by the frame contains the voice of the user of the near-end device. If it is determined that there is no voice of the user of the near-end device, the suppression of the residual partial echo is further strengthened; if it is determined that there is the voice of the user of the near-end device, no further processing is performed to reduce power consumption, and finally a clean voice signal is output.

[0152] The following is a general overview of the signal processing method. Figure 8 As shown, in the above model training phase, the model is continuously optimized using the loss function 107 to obtain the finally trained first model 106. In the application phase, after the near-end device obtains the far-end voice signal and the near-end voice signal, the first model 106 can be used for echo cancellation processing.

[0153] Specifically, the signal processing module 105 is first used to perform signal processing on the far-end speech signal 201 (i.e., Fourier transform, decomposing the signal into its spectral components) to obtain a first complex spectrum 203 of the far-end speech signal; then, the adaptive filter 103 is used to filter the far-end speech signal 201 and the near-end speech signal 202 to obtain a first speech signal, and the signal processing module 105 is used to perform signal processing on the first speech signal to obtain a second complex spectrum 204 of the first speech signal.

[0154] Further, the first complex spectrum 203 and the second complex spectrum 204 are input into the first model 106, and the first model 106 includes an encoder 110, a feature extractor 111, a decoder 112 and a near-end VAD module 113. Specifically, the first complex spectrum 203 and the second complex spectrum 204 are firstly spliced ​​to obtain a spliced ​​complex spectrum; then, the spliced ​​complex spectrum is encoded by the encoder 110 to obtain a third feature vector; the feature extractor 111 is used to perform deep feature extraction on the third feature vector to obtain a fourth feature vector; further, the fourth feature vector is decoded by the decoder 112 to obtain a first complex spectrum mask 205; the fourth feature vector is analyzed by the near-end VAD module 113 to obtain near-end VAD information 206.

[0155] If the near-end VAD information indicates that there is no voice of the user of the near-end device in the near-end voice signal, it means that the current frame is in the far-end single-talk state. At this time, the residual echo signal will be more obvious, so it is necessary to strengthen the residual echo suppression of the frame signal. The near-end device reduces the first complex spectrum mask 205 to obtain a second complex spectrum mask; then, the second complex spectrum mask and the second complex spectrum 204 are multiplied to obtain a third complex spectrum 207; finally, the third complex spectrum 207 is processed by speech synthesis using a speech synthesis module 108 including OLA and inverse Fourier transform to obtain a second speech signal 208. The second speech signal here is the speech signal after time domain echo cancellation. The near-end device can send the second speech signal to the far-end device through a network device to achieve voice communication.

[0156] If the near-end VAD information indicates that the near-end voice signal contains the voice of the user of the near-end device, it means that the current frame is in a double-talk state. At this time, the residual echo signal is not obvious, and there is no need to strengthen the residual echo suppression of the frame signal to reduce power consumption. The near-end device directly multiplies the first complex spectrum mask 205 and the second complex spectrum 204 to obtain a fourth complex spectrum 207; finally, the speech synthesis module 108 including OLA and inverse Fourier transform is used to perform speech synthesis processing on the fourth complex spectrum 207 to obtain a third speech signal 208. The third speech signal here is the speech signal after time domain echo elimination. The near-end device can send the third speech signal to the remote device through the network device to achieve voice communication.

[0157] It can be seen that based on Figure 7The described method is that after the near-end device obtains the far-end voice signal and the near-end voice signal, it determines the first complex spectrum of the far-end voice signal and the second complex spectrum of the first voice signal, wherein the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by an adaptive filter; then the first complex spectrum and the second complex spectrum are echo-cancelled using the trained first model to obtain a first complex spectrum mask and near-end VAD information; combined with the near-end VAD information output by the first model, it is determined whether the enhanced signal output by the frame contains the voice of the user of the near-end device; if it is determined that the voice of the user of the near-end device does not exist, the suppression of the residual partial echo is further strengthened to improve the performance of the echo cancellation and the voice quality; if it is determined that the voice of the user of the near-end device exists, no further processing is performed to reduce power consumption, and finally a clean voice signal is output.

[0158] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a signal processing device provided by an embodiment of the present invention. The signal processing device may be a proximal device or a device (such as a chip) having the function of a proximal device. Fig. 9 As shown, the signal processing device 900 may include an acquisition unit 901, a processing unit 902 and a determination unit 903. Among them:

[0159] The acquisition unit 901 is used to acquire a first complex spectrum of a far-end voice signal and a second complex spectrum of the first voice signal; the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by an adaptive filter, the far-end voice signal is a voice signal sent by a far-end device, and the near-end voice signal is a voice signal collected by a microphone of a near-end device when the far-end voice signal is played through a speaker of the near-end device;

[0160] A processing unit 902 is used to perform echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end VAD information;

[0161] The processing unit 902 is further configured to reduce the first complex spectral mask to obtain a second complex spectral mask when the near-end VAD information indicates that the near-end voice signal does not contain the voice of the user of the near-end device;

[0162] The determination unit 903 is configured to determine a second speech signal based on the second complex spectrum mask and the second complex spectrum.

[0163] In one possible implementation, the determination unit 903, when determining the second speech signal based on the second complex spectrum mask and the second complex spectrum, is specifically used to: determine a third complex spectrum based on the second complex spectrum mask and the second complex spectrum; and perform speech synthesis processing on the third complex spectrum to obtain a second speech signal.

[0164] In a possible implementation, the determination unit 903 is further used to: determine a third voice signal based on the first complex spectrum mask and the second complex spectrum when the near-end VAD information indicates that the near-end voice signal contains the voice of a user of the near-end device.

[0165] In one possible implementation, the determination unit 903, when determining the third speech signal based on the first complex spectrum mask and the second complex spectrum, is specifically used to: determine a fourth complex spectrum based on the first complex spectrum mask and the second complex spectrum; and perform speech synthesis processing on the fourth complex spectrum to obtain a third speech signal.

[0166] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a model training device provided by an embodiment of the present invention. The model training device may be an electronic device or a device having the function of an electronic device (such as a chip). Fig.10 As shown, the model training device 1000 may include an acquisition unit 1001, a processing unit 1002 and an adjustment unit 1003. Among them:

[0167] The acquisition unit 1001 is used to acquire a first sample complex spectrum of a sample far-end speech signal, a second sample complex spectrum of the first sample speech signal, and a third sample complex spectrum of a target speech signal; the first sample speech signal is obtained after the sample far-end speech signal and the sample near-end speech signal are processed by an adaptive filter, the sample far-end speech signal is a sample speech signal sent by a far-end device, and the sample near-end speech signal is a speech signal collected by using a microphone of a near-end device when the sample far-end speech signal is played through a speaker of the near-end device;

[0168] The processing unit 1002 is used to perform echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information; the near-end VAD prediction information is used to indicate whether there is a voice of a user of a near-end device in the sample near-end voice signal;

[0169] The adjustment unit 1003 is used to adjust the model parameters of the initial model based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain a first model.

[0170] In one possible implementation, the adjustment unit 1003, when adjusting the model parameters of the initial model based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain the first model, is specifically used to: perform voice activity detection on the third sample complex spectrum to obtain a near-end VAD label; determine a first loss value based on the near-end VAD prediction information and the near-end VAD label; determine a second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum; and adjust the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model.

[0171] In one possible implementation, the adjustment unit 1003, when adjusting the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model, is specifically used to: determine a first weight value corresponding to the first loss value and a second weight value corresponding to the second loss value when the near-end VAD prediction information indicates that there is no voice of the user of the near-end device in the sample near-end voice signal; the second weight value is greater than the first weight value; use the first weight value and the second weight value to perform a weighted sum of the first loss value and the second loss value to obtain a third loss value; and adjust the model parameters of the initial model based on the third loss value to obtain the first model.

[0172] In one possible implementation, the adjustment unit 1003 adjusts the model parameters of the initial model based on the third loss value to obtain the first model, and the processing unit 1002 is also used to: determine the third weight value corresponding to the first loss value and the fourth weight value corresponding to the second loss value when the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal; the fourth weight value is greater than the third weight value, the fourth weight value is greater than the second weight value, and the third weight value is less than the first weight value; and use the third weight value and the fourth weight value to perform weighted summation on the first loss value and the second loss value to obtain the third loss value.

[0173] In a possible implementation, the adjustment unit 1003, when determining the second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum, is specifically used to: determine the fourth sample complex spectrum based on the first sample complex spectrum mask and the second sample complex spectrum; determine the second loss value based on the fourth sample complex spectrum and the third sample complex spectrum.

[0174] In one possible implementation, the processing unit 1002, when performing echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through the initial model to obtain the first sample complex spectrum mask and the near-end VAD prediction information, is specifically used to: splice the first sample complex spectrum and the second sample complex spectrum to obtain a fifth sample complex spectrum; encode the fifth sample complex spectrum using an encoder to obtain a first feature vector; perform deep feature extraction on the first feature vector using a feature extractor to obtain a second feature vector; decode the second feature vector through a decoder to obtain the first sample complex spectrum mask; and parse the second feature vector through a near-end VAD module to obtain near-end VAD prediction information.

[0175] The embodiment of the present application also provides a chip, which can execute the relevant steps of the electronic device in the aforementioned method embodiment. The chip includes a processor and a communication interface, and the processor is configured to enable the chip to perform the following operations: obtain a first complex spectrum of a far-end voice signal and a second complex spectrum of the first voice signal; the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by an adaptive filter, the far-end voice signal is a voice signal sent by a far-end device, and the near-end voice signal is a voice signal collected by a microphone of a near-end device when the far-end voice signal is played through a speaker of the near-end device; the first complex spectrum and the second complex spectrum are echo-cancelled by a first model to obtain a first complex spectrum mask and near-end VAD information; when the near-end VAD information indicates that the voice of the user of the near-end device does not exist in the near-end voice signal, the first complex spectrum mask is reduced to obtain a second complex spectrum mask; and the second voice signal is determined based on the second complex spectrum mask and the second complex spectrum.

[0176] In one possible implementation, when the second speech signal is determined based on the second complex spectrum mask and the second complex spectrum, the processor is configured to cause the chip to perform the following operations: determine a third complex spectrum based on the second complex spectrum mask and the second complex spectrum; perform speech synthesis processing on the third complex spectrum to obtain a second speech signal.

[0177] In one possible implementation, the processor is configured to cause the chip to further perform the following operation: when the near-end VAD information indicates that the voice of the user of the near-end device exists in the near-end voice signal, determine a third voice signal based on the first complex spectrum mask and the second complex spectrum.

[0178] In one possible implementation, when determining the third speech signal based on the first complex spectrum mask and the second complex spectrum, the processor is configured to cause the chip to perform the following operations: determining the fourth complex spectrum based on the first complex spectrum mask and the second complex spectrum; performing speech synthesis processing on the fourth complex spectrum to obtain the third speech signal.

[0179] For each device or product applied to or integrated in the chip, each module contained therein can be implemented in the form of hardware such as circuits, or at least some of the modules can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules can be implemented in the form of hardware such as circuits.

[0180] The embodiment of the present application also provides a chip, which can execute the relevant steps of the electronic device in the above method embodiment. The chip includes a processor and a communication interface, and the processor is configured to enable the chip to perform the following operations: obtain a first sample complex spectrum of a sample far-end voice signal, a second sample complex spectrum of the first sample voice signal, and a third sample complex spectrum of a target voice signal; the first sample voice signal is obtained after the sample far-end voice signal and the sample near-end voice signal are processed by an adaptive filter, the sample far-end voice signal is a sample voice signal sent by a far-end device, and the sample near-end voice signal is a voice signal collected by a microphone of a near-end device when the sample far-end voice signal is played through a speaker of the near-end device; the first sample complex spectrum and the second sample complex spectrum are echo-cancelled by an initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information; the near-end VAD prediction information is used to indicate whether there is a voice of a user of a near-end device in the sample near-end voice signal; based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum, and the third sample complex spectrum, the model parameters of the initial model are adjusted to obtain a first model.

[0181] In one possible implementation, when the model parameters of the initial model are adjusted based on the first sample complex spectrum mask, the near-end VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain the first model, the processor is configured to cause the chip to perform the following operations: perform voice activity detection on the third sample complex spectrum to obtain a near-end VAD label; determine a first loss value based on the near-end VAD prediction information and the near-end VAD label; determine a second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum; and adjust the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model.

[0182] In one possible implementation, when the model parameters of the initial model are adjusted based on the first loss value and the second loss value to obtain the first model, the processor is configured to cause the chip to perform the following operations: when the near-end VAD prediction information indicates that there is no voice of the user of the near-end device in the sample near-end voice signal, determine a first weight value corresponding to the first loss value and a second weight value corresponding to the second loss value; the second weight value is greater than the first weight value; the first loss value and the second loss value are weightedly summed using the first weight value and the second weight value to obtain a third loss value; and the model parameters of the initial model are adjusted based on the third loss value to obtain the first model.

[0183] In one possible implementation, before adjusting the model parameters of the initial model based on the third loss value to obtain the first model, the processor is configured to cause the chip to also perform the following operations: when the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal, determine the third weight value corresponding to the first loss value and the fourth weight value corresponding to the second loss value; the fourth weight value is greater than the third weight value, the fourth weight value is greater than the second weight value, and the third weight value is less than the first weight value; and use the third weight value and the fourth weight value to perform weighted summation of the first loss value and the second loss value to obtain a third loss value.

[0184] In one possible implementation, when determining the second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum, the processor is configured to cause the chip to perform the following operations: determine the fourth sample complex spectrum based on the first sample complex spectrum mask and the second sample complex spectrum; determine the second loss value based on the fourth sample complex spectrum and the third sample complex spectrum.

[0185] In one possible implementation, when the first sample complex spectrum and the second sample complex spectrum are echo-cancelled by the initial model to obtain the first sample complex spectrum mask and the near-end VAD prediction information, the processor is configured to cause the chip to perform the following operations: splicing the first sample complex spectrum and the second sample complex spectrum to obtain a fifth sample complex spectrum; encoding the fifth sample complex spectrum by an encoder to obtain a first feature vector; performing deep feature extraction on the first feature vector by a feature extractor to obtain a second feature vector; decoding the second feature vector by a decoder to obtain the first sample complex spectrum mask; and parsing the second feature vector by a near-end VAD module to obtain near-end VAD prediction information.

[0186] For each device or product applied to or integrated in the chip, each module contained therein can be implemented in the form of hardware such as circuits, or at least some of the modules can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules can be implemented in the form of hardware such as circuits.

[0187] See also Fig.11 , Fig.11 1 is a schematic diagram of the structure of a signal processing device provided by an embodiment of the present invention. The signal processing device 1100 may include a memory 1101 and a processor 1102. Optionally, it also includes a communication interface 1103. The memory 1101, the processor 1102 and the communication interface 1103 are connected via one or more communication buses. The communication interface 1103 is controlled by the processor 1102 to send and receive information.

[0188] The memory 1101 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1102. A portion of the memory 1101 may also include a nonvolatile random access memory.

[0189] The communication interface 1103 is used to receive or send data.

[0190] The processor 1102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or alternatively, the processor 1102 may be any conventional processor, etc. Among them:

[0191] The memory 1101 is used to store program instructions.

[0192] The processor 1102 is used to call the program instructions stored in the memory 1101.

[0193] The processor 1102 calls the program instructions stored in the memory 1101 to enable the signal processing device 1100 to execute the method executed by the near-end device in the above method embodiment.

[0194] See also Fig.12 , Fig.121 is a schematic diagram of the structure of a model training device provided by an embodiment of the present invention. The model training device 1200 may include a memory 1201 and a processor 1202. Optionally, it also includes a communication interface 1203. The memory 1201, the processor 1202 and the communication interface 1203 are connected via one or more communication buses. The communication interface 1203 is controlled by the processor 1202 to send and receive information.

[0195] The memory 1201 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1202. A portion of the memory 1201 may also include a nonvolatile random access memory.

[0196] The communication interface 1203 is used to receive or send data.

[0197] The processor 1202 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or alternatively, the processor 1202 may be any conventional processor, etc. Among them:

[0198] The memory 1201 is used to store program instructions.

[0199] The processor 1202 is used to call the program instructions stored in the memory 1201.

[0200] The processor 1202 calls the program instructions stored in the memory 1201 to enable the model training device 1200 to execute the method executed by the electronic device in the above method embodiment.

[0201] like Fig.13 As shown, Fig.13 1300 is a schematic diagram of a module device provided in an embodiment of the present application. The module device 1300 can execute the relevant steps of the electronic device or the proximal device in the aforementioned method embodiment, and the module device 1300 includes: a communication module 1301, a power module 1302, a storage module 1303 and a chip 1304.

[0202] Among them, the power module 1302 is used to provide power to the module device; the storage module 1303 is used to store data and instructions; the communication module 1301 is used for internal communication of the module device, or for the module device to communicate with external devices; the chip 1304 is used to execute the method executed by the electronic device or the proximal device in the above method embodiment.

[0203] It should be noted that Figures 9 to 13 The contents not mentioned in the corresponding embodiments and the specific implementation methods of each step can be found in Figure 3 and Figure 7 The illustrated embodiments and the aforementioned contents will not be described in detail here.

[0204] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is executed on a processor, the method flow of the above method embodiment is implemented.

[0205] The embodiment of the present application also provides a computer program product. When the computer program product runs on a processor, the method flow of the above method embodiment is implemented.

[0206] Regarding the various modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, or hardware modules / units, or they can be partially software modules / units and partially hardware modules / units. For example, for various devices and products applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuits, or at least some of the modules / units can be implemented in the form of software programs, which run on the integrated processor inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same part of the chip module (such as a chip, circuit module, etc.) or in different components, or at least some of the modules / units can be implemented in the form of software programs. The software programs run on the integrated processor inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits. It can be implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal, the modules / units contained therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.

[0207] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain operations can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0208] The descriptions of the various embodiments provided in this application can refer to each other, and the descriptions of the various embodiments have different focuses. For parts that are not described in detail in a certain embodiment, refer to the relevant descriptions of other embodiments. For the convenience and simplicity of description, for example, the functions of the various devices and equipment provided in the embodiments of this application and the operations performed can refer to the relevant descriptions of the method embodiments of this application, and the various method embodiments and the various device embodiments can also refer to, combine or quote each other.

[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A signal processing method, characterized in that: The method comprises: Acquire a first complex spectrum of a far-end voice signal and a second complex spectrum of a first voice signal; the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by an adaptive filter, the far-end voice signal is a voice signal sent by a far-end device, and the near-end voice signal is a voice signal collected by a microphone of the near-end device when the far-end voice signal is played through a speaker of the near-end device; Performing echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end voice activity detection VAD information; When the near-end VAD information indicates that the near-end voice signal does not contain the voice of the user of the near-end device, reducing the first complex spectral mask to obtain a second complex spectral mask; A second speech signal is determined based on the second complex spectral mask and the second complex spectrum.

2. The method according to claim 1, characterized in that The determining the second speech signal based on the second complex spectrum mask and the second complex spectrum comprises: determining a third complex spectrum based on the second complex spectrum mask and the second complex spectrum; Perform speech synthesis processing on the third complex spectrum to obtain a second speech signal.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: In a case where the near-end VAD information indicates that the voice of the user of the near-end device is present in the near-end voice signal, a third voice signal is determined based on the first complex spectrum mask and the second complex spectrum.

4. The method according to claim 3, characterized in that The determining of the third speech signal based on the first complex spectrum mask and the second complex spectrum comprises: determining a fourth complex spectrum based on the first complex spectrum mask and the second complex spectrum; Perform speech synthesis processing on the fourth complex spectrum to obtain a third speech signal.

5. A model training method, characterized in that: The method comprises: Acquire a first sample complex spectrum of a sample far-end speech signal, a second sample complex spectrum of the first sample speech signal, and a third sample complex spectrum of a target speech signal; the first sample speech signal is obtained after the sample far-end speech signal and the sample near-end speech signal are processed by an adaptive filter, the sample far-end speech signal is a sample speech signal sent by a far-end device, and the sample near-end speech signal is a speech signal collected by a microphone of the near-end device when the sample far-end speech signal is played through a speaker of the near-end device; Performing echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end voice activity detection VAD prediction information; the near-end VAD prediction information is used to indicate whether there is a voice of the user of the near-end device in the sample near-end voice signal; Based on the first sample complex spectrum mask, the proximal VAD prediction information, the second sample complex spectrum and the third sample complex spectrum, the model parameters of the initial model are adjusted to obtain a first model.

6. The method according to claim 5, characterized in that The adjusting the model parameters of the initial model based on the first sample complex spectrum mask, the proximal VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain the first model includes: Performing voice activity detection on the third sample complex spectrum to obtain a near-end VAD label; Determining a first loss value based on the proximal VAD prediction information and the proximal VAD label; determining a second loss value based on the third sample complex spectrum, the first sample complex spectrum mask, and the second sample complex spectrum; The model parameters of the initial model are adjusted based on the first loss value and the second loss value to obtain a first model.

7. The method according to claim 6, characterized in that The adjusting the model parameters of the initial model based on the first loss value and the second loss value to obtain the first model includes: In a case where the near-end VAD prediction information indicates that the voice of the user of the near-end device does not exist in the sample near-end voice signal, determining a first weight value corresponding to the first loss value and a second weight value corresponding to the second loss value; the second weight value is greater than the first weight value; Using the first weight value and the second weight value to perform weighted summation on the first loss value and the second loss value to obtain a third loss value; The model parameters of the initial model are adjusted based on the third loss value to obtain a first model.

8. The method according to claim 7, characterized in that Before adjusting the model parameters of the initial model based on the third loss value to obtain the first model, the method further includes: In a case where the near-end VAD prediction information indicates that the voice of the user of the near-end device exists in the sample near-end voice signal, determining a third weight value corresponding to the first loss value and a fourth weight value corresponding to the second loss value; the fourth weight value is greater than the third weight value, the fourth weight value is greater than the second weight value, and the third weight value is less than the first weight value; The first loss value and the second loss value are weightedly summed using the third weight value and the fourth weight value to obtain a third loss value.

9. The method according to any one of claims 6 to 8, characterized in that: The determining a second loss value based on the third sample complex spectrum, the first sample complex spectrum mask and the second sample complex spectrum comprises: determining a fourth sample complex spectrum based on the first sample complex spectrum mask and the second sample complex spectrum; A second loss value is determined based on the fourth sample complex spectrum and the third sample complex spectrum.

10. The method according to any one of claims 6 to 8, characterized in that: The performing echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through the initial model to obtain a first sample complex spectrum mask and near-end VAD prediction information includes: splicing the first sample complex spectrum and the second sample complex spectrum to obtain a fifth sample complex spectrum; Using an encoder to encode the fifth sample complex spectrum to obtain a first eigenvector; Using a feature extractor to perform deep feature extraction on the first feature vector to obtain a second feature vector; Decoding the second feature vector by a decoder to obtain a first sample complex spectral mask; The second feature vector is analyzed and processed by a near-end VAD module to obtain near-end VAD prediction information.

11. A signal processing device, characterized in that: The device comprises: An acquisition unit, used to acquire a first complex spectrum of a far-end voice signal and a second complex spectrum of a first voice signal; the first voice signal is obtained after the far-end voice signal and the near-end voice signal are processed by an adaptive filter, the far-end voice signal is a voice signal sent by a far-end device, and the near-end voice signal is a voice signal collected by a microphone of the near-end device when the far-end voice signal is played through a speaker of the near-end device; a processing unit, configured to perform echo cancellation processing on the first complex spectrum and the second complex spectrum through a first model to obtain a first complex spectrum mask and near-end voice activity detection (VAD) information; The processing unit is further configured to reduce the first complex spectral mask to obtain a second complex spectral mask when the near-end VAD information indicates that the voice of the user of the near-end device does not exist in the near-end voice signal; A determination unit is used to determine a second speech signal based on the second complex spectrum mask and the second complex spectrum.

12. A model training device, characterized in that: The device comprises: An acquisition unit is used to acquire a first sample complex spectrum of a sample far-end speech signal, a second sample complex spectrum of the first sample speech signal, and a third sample complex spectrum of a target speech signal; the first sample speech signal is obtained after the sample far-end speech signal and the sample near-end speech signal are processed by an adaptive filter, the sample far-end speech signal is a sample speech signal sent by a far-end device, and the sample near-end speech signal is a speech signal collected by a microphone of the near-end device when the sample far-end speech signal is played through a speaker of the near-end device; A processing unit, configured to perform echo cancellation processing on the first sample complex spectrum and the second sample complex spectrum through an initial model to obtain a first sample complex spectrum mask and near-end voice activity detection VAD prediction information; the near-end VAD prediction information is used to indicate whether there is a voice of a user of the near-end device in the sample near-end voice signal; An adjustment unit is used to adjust the model parameters of the initial model based on the first sample complex spectrum mask, the proximal VAD prediction information, the second sample complex spectrum and the third sample complex spectrum to obtain a first model.

13. A chip, characterized in that: The method comprises a processor and a communication interface, wherein the processor is configured to cause the chip to execute the method as claimed in any one of claims 1 to 4; or, the processor is configured to cause the chip to execute the method as claimed in any one of claims 5 to 10.

14. A module device, characterized in that: The module device includes a communication module, a power module, a storage module and a chip, wherein: The power module is used to provide electrical energy to the module device; The storage module is used to store data and instructions; The communication module is used for internal communication of the module device, or for communication between the module device and an external device; The chip is used to execute the method as claimed in any one of claims 1 to 4; or, the chip is used to execute the method as claimed in any one of claims 5 to 10.

15. A signal processing device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions so that the signal processing device executes the method according to any one of claims 1 to 4.

16. A model training device, characterized in that: It comprises a memory and a processor, the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions so that the model training device executes the method as described in any one of claims 5-10.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed on a signal processing device, the signal processing device executes the method as described in any one of claims 1 to 4; or, when the computer-readable instructions are executed on a model training device, the model training device executes the method as described in any one of claims 5 to 10.