Voice signal processing method and related device
By resetting the AI model in the voice communication device and using the second AI model to process voice signal frames, the problem of user voice signal distortion caused by the enhanced acoustic echo suppression capability of the AI model is solved, improving voice communication quality and user experience.
Patent Information
- Application Number
- CN202410853988.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-10
AI Technical Summary
In voice communications, the AI model has an enhanced ability to suppress acoustic echoes when the remote end is speaking for a long time, causing some users' voice signals to be suppressed and distorted, affecting communication quality.
By resetting the AI model in the first device, the second AI model is obtained, and is used to perform echo suppression processing on the currently processed near-end voice signal frame to ensure the quality of the voice signal and user experience.
It effectively avoids the distortion of user voice signals, improves voice communication quality and user experience, and ensures the reliability and accuracy of acoustic echo suppression.
Smart Images

Figure CN118629416A
Abstract
Description
Technical Field
[0001] The present application relates to the field of voice communication technology, and in particular to a voice signal processing method and related devices. Background Art
[0002] During the voice communication between the first device and the second device, there may be acoustic echo. Acoustic echo refers to the echo formed by the user voice signal of the second device being transmitted to the first device, played by the speaker of the first device, and then collected by the microphone of the first device. In order to improve the call quality between the first device and the second device, the acoustic echo can be filtered out.
[0003] Artificial Intelligence (AI) echo suppression technology is a technology that uses artificial intelligence algorithms to suppress acoustic echoes. It can identify acoustic echo signals and remove them from the voice signals collected by the microphone by analyzing the characteristics of the voice signals. Since the voice signal is a sequence input, there is a strong correlation between adjacent voice frames. The AI model can remember previous information and capture the time dependency between voice frames. The AI model can filter out acoustic echoes.
[0004] Far-end speech refers to the user of the second device speaking, while near-end speech refers to the user of the first device speaking. Because the AI model has time dependence when processing voice frames, the AI model's ability to suppress acoustic echoes gradually increases in the long-term far-end speech state, which may cause the call state between the first device and the second device to change from the far-end speech state to the near-end speech state, which in turn causes the voice signals of some users of the first device to be suppressed and distorted, resulting in poor voice communication quality. Summary of the invention
[0005] The present application provides a voice signal processing method and related devices. Based on the method described in the present application, the quality of voice communication can be improved.
[0006] In the first aspect, the present application provides a method for processing a speech signal, which can be executed by a first device, or by a device matching the first device, such as a processor, a chip, or a chip system. When the method is executed by the first device, the first device includes a speaker and a microphone; the method includes: receiving a first speech signal frame from a second device, playing the first speech signal frame through the speaker, and obtaining a second speech signal frame collected by the microphone; in response to the absence of a first user speech signal in the first speech signal frame, and the number of frames in the first speech signal frame set is greater than a first threshold, resetting the first AI model to obtain a second AI model; wherein the first speech signal frame set is a set of continuous speech signal frames processed by the first AI model, and the mask of each speech signal frame in the first speech signal frame set output by the first AI model meets the reset condition; inputting the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model; determining a third speech signal frame based on the first mask and the second speech signal frame; and sending the third speech signal frame to the second device.
[0007] In the above embodiment, the first device can, when using the first AI model for acoustic echo suppression, reset the first AI model to obtain the second AI model based on the absence of acoustic echo in the near-end voice signal frame currently processed by the first device and the first AI model being in a strong suppression state for a long time. The second AI model is then used to perform echo suppression processing on the near-end voice signal frame currently processed to obtain a higher-quality communication voice signal frame, which is beneficial to avoiding the suppression and distortion of the user voice signal of the first device, ensuring the reliability and accuracy of the acoustic echo suppression performed by the first device, and realizing voice communication between the first device and the second device through the higher-quality communication voice signal frame, thereby improving the quality of voice communication and, at the same time, improving the user experience.
[0008] In combination with the first aspect, in one possible manner, the second AI model includes an encoder, a feature extraction module, and a decoder; the above-mentioned inputting the first voice signal frame and the second voice signal frame into the second AI model to obtain the first mask output by the second AI model includes: obtaining the first complex spectrum of the first voice signal frame; and obtaining the second complex spectrum of the second voice signal frame; splicing the first complex spectrum and the second complex spectrum to obtain a third complex spectrum; encoding the third complex spectrum by the encoder to obtain a first feature vector; performing deep feature extraction on the first feature vector by the feature extraction module to obtain a second feature vector; decoding the second feature vector by the decoder to obtain the first mask. It can be seen that by adopting an AI model including an encoder, a feature extraction module, and a decoder structure, performing echo cancellation processing on the first voice signal frame to obtain the first mask of the first voice signal frame, it is conducive to more reliably determining the first mask.
[0009] In combination with the first aspect, in one possible manner, the second AI model includes a signal processing module, an encoder, a feature extraction module, and a decoder; the above-mentioned inputting the first voice signal frame and the second voice signal frame into the second AI model to obtain the first mask output by the second AI model includes: obtaining the first complex spectrum of the first voice signal frame through the signal processing module; and obtaining the second complex spectrum of the second voice signal frame through the signal processing module; splicing the first complex spectrum and the second complex spectrum through the signal processing module to obtain a third complex spectrum; encoding the third complex spectrum through the encoder to obtain a first feature vector; performing deep feature extraction on the first feature vector through the feature extraction module to obtain a second feature vector; decoding the second feature vector through the decoder to obtain the first mask. It can be seen that by adopting an AI model including a signal processing module, an encoder, a feature extraction module, and a decoder structure, the first voice signal frame is echo-cancelled to obtain the first mask of the first voice signal frame, which is conducive to more conveniently and accurately determining the first mask.
[0010] In combination with the first aspect, in one possible manner, the above-mentioned determination of the third voice signal frame based on the first mask and the second voice signal frame includes: determining a fourth complex spectrum based on the first mask and the second complex spectrum; performing speech synthesis processing on the fourth complex spectrum to obtain a third voice signal frame. It can be seen that determining the third voice signal frame through the first mask output by the second AI model and the second complex spectrum of the second voice signal frame is conducive to more accurately and reasonably avoiding the suppression and distortion of the user voice signal of the first device.
[0011] In combination with the first aspect, in one possible manner, resetting the first AI model to obtain the second AI model includes: setting the hidden state parameters and / or memory cell parameters in the first AI model to zero to obtain the second AI model. It can be seen that by setting the hidden state parameters and / or memory cell parameters in the first AI model to zero to obtain the second AI model, it is beneficial to obtain the second AI model more flexibly.
[0012] In combination with the first aspect, in one possible manner, the mask of each voice signal frame in the above-mentioned first voice signal frame set satisfies the reset condition, including: the maximum value of multiple mask values corresponding to each voice signal frame in the first voice signal frame set is less than the second threshold. It can be seen that by comparing the maximum value of multiple mask values corresponding to each voice signal frame in the first voice signal frame set with the second threshold, the reset condition of the mask of each voice signal frame in the first voice signal frame set output by the first AI model can be judged more accurately and meticulously.
[0013] In combination with the first aspect, in one possible manner, the method also includes: in response to the presence of a first user voice signal in the first voice signal frame and the number of frames in the second voice signal frame set is greater than a third threshold, resetting the first AI model to obtain a third AI model; wherein the second voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the voice signal frames in the second voice signal frame set do not include the user voice of the second device; inputting the first voice signal frame and the second voice signal frame into the third AI model to obtain a second mask output by the third AI model; determining a fourth voice signal frame based on the second mask and the second voice signal frame; and sending the fourth voice signal frame to the second device. It can be seen that the first device can, when using the first AI model for acoustic echo suppression, reset the first AI model to obtain the second AI model based on the presence of acoustic echo in the near-end voice signal frame currently processed by the first device, and the first AI model processes the near-end voice signal frame that does not include the user voice of the second device for a long time, and then use the second AI model to perform echo suppression on the currently processed near-end voice signal frame to obtain a higher-quality communication voice signal frame, which is conducive to avoiding the residual acoustic echo of the first device and improving the comprehensiveness and accuracy of the acoustic echo suppression performed by the first device. Voice communication between the first device and the second device is realized through the higher-quality communication voice signal frame, which is conducive to further improving the quality of voice communication and, at the same time, further improving the user experience.
[0014] In a second aspect, the present application provides a speech signal processing device, which is applied to a first device, the first device including a speaker and a microphone; the device includes:
[0015] An acquisition unit, configured to receive a first voice signal frame from a second device, play the first voice signal frame through a speaker, and acquire a second voice signal frame collected by a microphone;
[0016] A model resetting unit, configured to reset the first AI model in response to the absence of the first user voice signal in the first voice signal frame and the number of frames in the first voice signal frame set being greater than a first threshold, to obtain a second AI model; wherein the first voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the mask of each voice signal frame in the first voice signal frame set output by the first AI model meets the reset condition;
[0017] A mask acquisition unit, configured to input the first speech signal frame and the second speech signal frame into a second AI model to obtain a first mask output by the second AI model;
[0018] A determining unit, configured to determine a third speech signal frame based on the first mask and the second speech signal frame;
[0019] A sending unit is used to send a third voice signal frame to the second device.
[0020] In a third aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the processor is configured to enable the chip to execute the method in the above-mentioned first aspect or any possible implementation manner thereof.
[0021] In a fourth 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.
[0022] In a fifth aspect, the present application provides an electronic device comprising a memory and a processor, the memory being used to store a computer program, the computer program comprising program instructions; the processor being configured to call the program instructions to execute the method in the above-mentioned first aspect or any possible implementation thereof.
[0023] In a sixth 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 above-mentioned first aspect or any possible implementation thereof.
[0024] In a seventh 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1A is a schematic diagram of a communication system provided in an embodiment of the present application;
[0026] Figure 1B It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0027] Figure 1C is a schematic diagram of an acoustic echo in voice communication provided by an embodiment of the present application;
[0028] Figure 2A It is a flowchart of a method for processing a speech signal provided in an embodiment of the present application;
[0029] Figure 2B It is a structural diagram of an AI model provided in an embodiment of the present application;
[0030] Figure 2CIt is a structural diagram of another AI model provided in an embodiment of the present application;
[0031] Figure 3 It is a flowchart of another speech signal processing method provided in an embodiment of the present application;
[0032] Figure 4 is a structural schematic diagram of a speech signal processing device provided in an embodiment of the present application;
[0033] Figure 5 It is a structural schematic diagram of a module device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] 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.
[0035] 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.
[0036] 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.
[0037] In order to facilitate understanding of the embodiments of the present application, the system architecture involved in the embodiments of the present application is first introduced below:
[0038] 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, wherein the satellite communication system can be integrated with the traditional mobile communication system (ie, the ground communication system). Mobile communication systems include, for example, ZigBee, Near Field Communication (NFC), Radio Frequency Identification (RFID), General Packet Radio Service (GPRS), Narrow Band-Internet of Things (NB-loT), 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) system, 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 drones, satellite communication systems, high altitude platforms (high altitude platforms) The present invention relates to a system that integrates a non-terrestrial network (NTN) with a terrestrial mobile communication network such as a HAPS (High Availability Station) communication. 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.
[0039] Figure 1AA schematic diagram of a communication system using an embodiment of the present application. The communication system includes at least two electronic devices, and the at least two electronic devices include a near-end device and a far-end device. In the embodiment of the present application, the near-end device, also known as the first device, refers to a terminal device used locally by the current user in voice communication; the far-end device, also known as the second device, refers to a terminal device used by other participants in voice communication relative to the near-end device. The near-end device and the far-end device can communicate directly with each other, such as device-to-device (D2D) transmission. Optionally, the communication between the near-end device and the far-end device can also be carried out through a network device ( Figure 1A (not shown), for example, the near-end device sends a signal to the far-end device through the network device.
[0040] Among them, the electronic device includes a device that provides voice and / or data connectivity to the user, for example, the electronic 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 electronic device in the embodiment of the present application can be a device equipped with a speaker and a microphone, such as a walkie-talkie, a mobile phone, a headset, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control (industrial control), a vehicle-mounted electronic device, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid (smartgrid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in a smart city (smartcity), a wireless terminal in a smart home (smart home), a wearable electronic device, etc. The embodiment of the present application does not limit the application scenario. In addition, electronic devices may sometimes also be referred to as terminals, user equipment (UE), access electronic devices, vehicle-mounted terminals, industrial control terminals, UE units, UE stations, mobile stations, mobile stations, remote stations, remote electronic devices, mobile devices, UE electronic devices, terminal devices, wireless communication devices, UE agents or UE devices, etc. Electronic devices may also be fixed or mobile. In the embodiments of the present application, the device for realizing the function of the near-end device or the far-end device may be an electronic device, or may be a device that can support the electronic device to realize the function, such as a chip system or a combination device or component that can realize the function of the electronic device, and the device may be installed in the electronic device.
[0041] like Figure 1BAs shown, the electronic device 100 is exemplarily shown as a structural diagram of the electronic device. The electronic device 100 may include: a processor 101, a speech unit 102, a speaker 1021, a microphone 1022, an interface unit 103, and a memory 104. Those skilled in the art can understand that Figure 1B The structural diagram shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, and the present application does not impose any limitation on this.
[0042] Combine the following Figure 1B A detailed introduction to the various components of electronic equipment:
[0043] The processor 101 can be the control center of the electronic device, using various interfaces and lines to connect the various parts of the entire electronic device, and execute various functions of the electronic device and process data by running or executing software programs and / or modules stored in the memory 104, and calling the data stored in the memory 104, so as to monitor the electronic device as a whole. Optionally, the processor 101 can be a central processing unit (CPU), which serves as the final execution unit for electronic device information processing and program operation. The processor 101 may include multiple microcontroller units (MCU). Among them, MCU can also be called a single chip microcomputer (Single Chip Microcomputer) or a single chip microcomputer, and the MCU can perform different combination controls for different application scenarios. In an embodiment of the present application, the MCU can receive and process voice signals.
[0044] The speech unit 102 is used to convert digital speech signals into analog speech signals, and is also used to convert analog speech signals into digital speech signals. The speech unit 102 can also be used to encode and decode speech signals. In some embodiments, the speech unit 102 can be arranged in the processor 101, or some functional modules of the speech unit 102 can be arranged in the processor 101.
[0045] The speaker 1021, also called a "speaker", is used to convert the voice electrical signal into a voice signal. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 1021.
[0046] Microphone 1022, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting his mouth close to microphone 1022 to input the voice signal into microphone 1022. The electronic device 100 can be provided with at least one microphone 1022. In other embodiments, the electronic device 100 can be provided with two microphones 1022, which can not only collect voice signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 1022 to realize the collection of voice signals, noise reduction, and identification of voice sources, and realize directional recording function, etc.
[0047] The interface unit 103 may be used to connect the electronic device to at least one external device. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a memory card port, a voice input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 103 may be used to receive input (e.g., a voice signal, etc.) from an external device and transmit the received input to one or more elements in the electronic device, or may be used to transmit data between the electronic device and the external device.
[0048] The memory 104 can be used to store software programs and various data. The memory 104 may mainly include a program storage area and a data storage area. Optionally, the program storage area may store an operating system, an application required for at least one function (such as a voice communication function), etc.; the data storage area may store data created during the use of the electronic device (such as voice data), etc. In addition, the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Optionally, the electronic device may also include a power supply (such as a battery) to power each component. The power supply may be logically connected to the processor 101 through a power management system, so that the power management system can realize functions such as managing charging, discharging, and power consumption management.
[0049] 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:
[0050] 1. Voice activity detection (VAD)
[0051] VAD, also known as voice endpoint detection, is used to detect the presence of user voice in speech processing. Its function is to identify user voice segments and non-user voice segments from a speech (clean or noisy) signal.
[0052] 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 (Mel Frequency Cepstral Coefficient (MFCC), spectral entropy, etc.) features and sets a reasonable threshold to achieve the purpose of distinguishing user voice from non-user voice; classification-based VAD uses voice activity detection as a binary classification (user voice and non-user voice), and can train classifiers through machine learning methods to achieve the purpose of voice activity detection; model-based VAD builds a complete set of speech recognition models to distinguish user voice segments from non-user voice segments. There is no specific limitation on the voice activity detection algorithm used in this application.
[0053] 2. Far-end speaking status and far-end microphone muting status
[0054] The far-end voice state refers to the state in which the user of the far-end device is speaking on both sides of the voice communication. The far-end voice state includes the far-end voice-only state and the dual-talk state. The far-end voice-only state refers to the state in which only the user of the far-end device is speaking on both sides of the voice communication. The dual-talk state refers to the state in which both users of the far-end device are speaking on both sides of the voice communication.
[0055] The far-end mute state refers to the state in which the user of the far-end device on both sides of the voice communication is not speaking. The far-end mute state includes the near-end only state and the dual-end mute state. The near-end only state refers to the state in which only the user of the near-end device on both sides of the voice communication is speaking. The dual-end mute state refers to the state in which neither user on both sides of the voice communication is speaking.
[0056] 3. Far-end voice signal, near-end voice signal and far-end user voice signal
[0057] The far-end voice signal refers to the voice signal sent by the far-end device to the near-end device; the near-end voice signal refers to the voice signal collected by the microphone of the near-end device; the far-end user voice signal refers to the voice signal collected by the microphone of the far-end device when the user of the far-end device speaks.
[0058] 4. Acoustic echo
[0059] In a voice communication system, the voice signal of a far-end user is transmitted to a near-end device, played by a speaker of the near-end device, and then collected by a microphone of the near-end device, thereby forming an acoustic echo.
[0060] Figure 1C is a schematic diagram of an acoustic echo in voice communication provided by an embodiment of the present application. In the embodiment of the present application, the first user is a user of a remote device, and the second user is a user of a near-end device. Figure 1CAs shown, in the process of voice communication between the near-end device and the far-end device, the two parties of voice communication include a first user and a second user. The first user can send a voice signal to the near-end device through the far-end device to realize a conversation with the second user. Similarly, the second user can send a voice signal to the far-end device through the near-end device to realize a conversation with the first user. Among them, the near-end device includes a microphone A2 and a speaker B2, and the far-end device includes a microphone A1 and a speaker B1. When the first user speaks, the far-end device collects the far-end voice signal through the microphone A1, and then sends the far-end voice signal to the near-end device. At this time, the far-end voice signal includes the user voice of the far-end device. Correspondingly, the near-end device receives the far-end voice signal from the far-end device, and then plays the far-end voice signal through the speaker B2. After the user voice of the far-end device in the far-end voice signal is played through the speaker B2, it will be directly or indirectly collected by the microphone A2 after reflection to generate an acoustic echo signal. After the near-end device transmits the acoustic echo signal to the far-end device, the far-end device plays the acoustic echo signal through the speaker B1, so that the first user can always hear his own voice when speaking, which seriously affects the call experience.
[0061] 5. Artificial Intelligence
[0062] Artificial intelligence can be understood as the intelligence displayed by machines made by humans. Generally, artificial intelligence refers to the technology that presents human intelligence through computer programs. The goals of artificial intelligence include understanding intelligence by building computer programs with symbolic reasoning or inference. For example, artificial intelligence can be used to recognize user voice, acoustic echo, environmental noise, etc. in voice signals.
[0063] 6. Machine learning.
[0064] Machine learning is a way to implement artificial intelligence. Machine learning is a method that can give machines the ability to learn, so that machines can complete functions that cannot be completed by direct programming. In a practical sense, machine learning is a method of using data to train a model and then using the model to predict. There are many methods of machine learning, such as neural networks (NN), decision trees, support vector machines, etc. The theory of machine learning is mainly to design and analyze some algorithms that allow computers to learn automatically. Machine learning algorithms are a type of algorithm that automatically analyzes data to obtain rules and uses the rules to predict unknown data. For example, using sample speech data, an acoustic echo suppression model is trained, and the trained acoustic echo suppression model is used to perform acoustic echo filtering on the subsequently acquired speech data.
[0065] 7. AI model.
[0066] AI model, also known as AI algorithm (or AI operator), is a general term for mathematical algorithms built on the principles of artificial intelligence, and is also the basis for using AI to solve specific problems. Depending on the specific methods and / or technologies for implementing artificial intelligence, AI models may include machine learning (ML) models, deep learning models, and reinforcement learning models. For example, an AI model may be, but is not limited to, any one of a recurrent neural network (RNN), a long short-term memory network (LSTM), and a gated recurrent unit (GRU).
[0067] In an embodiment of the present application, the AI model includes an input layer, a hidden layer, and an output layer. The hidden layer includes hidden state parameters and memory cell parameters. Specifically, the hidden state parameters represent the short-term memory of the AI model; the memory cell parameters represent the long-term memory of the AI model. The memory cell parameters are a special type of hidden state parameters. The hidden state parameters specifically refer to the data generated during the echo filtering process of the AI model on the voice signal frame. For adjacent voice signal frames, the AI model uses the hidden layer state parameters based on the output of the previous voice signal frame as the hidden layer input when the AI model processes the next voice signal frame, thereby realizing the transmission of timing information.
[0068] 8. Artificial Intelligence (AI) echo suppression technology
[0069] AI echo suppression technology is a technology that uses artificial intelligence algorithms to suppress acoustic echoes. It can identify acoustic echo signals and remove them from the voice signals collected by the microphone by analyzing the characteristics of the voice signals.
[0070] The AI model can memorize previous information and capture the time dependency between voice frames. Therefore, the current mainstream deep learning-based echo cancellation algorithms all include AI models. Among them, deep learning is a further extension of machine learning. Its essence is to build a model to fit the mapping relationship between input and output, and through the continuous self-adjustment of the constructed model, the error between the model output and the target is made smaller and smaller until convergence and stability. It can be seen that the AI model is used to suppress acoustic echoes. Because the AI model has time dependency when processing voice frames, the AI model's ability to suppress acoustic echoes gradually increases in the long-term far-end voice state, which may cause the call state between the first device and the second device to change from the far-end voice state to the near-end voice state, which in turn causes the voice signals of some users of the first device to be suppressed and distorted, resulting in poor voice communication quality.
[0071] In addition, when the far-end microphone is muted for a long time, the AI model's ability to suppress acoustic echoes gradually weakens, which may cause the call state between the first device and the second device to change from the far-end microphone muted state to the far-end sounding state, thereby causing some acoustic echo signals of the first device to remain, resulting in poor voice communication quality.
[0072] Therefore, in order to improve the quality of voice communication, the present application provides a voice signal processing method, device, chip and module equipment. The voice signal processing method, device, chip and module equipment provided in the embodiments of the present application are further described in detail below.
[0073] The following is an introduction to the speech signal processing method provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 2A , Figure 2A 1 is a flow chart of a method for processing a speech signal provided in an embodiment of the present application, the method including but not limited to the following steps S201-S206:
[0074] S201: A second device sends a first voice signal frame to a first device. Correspondingly, the first device receives the first voice signal frame from the second device.
[0075] In an embodiment of the present application, the remote microphone is also the microphone of the second device. The second device can collect the initial voice signal frame within the coverage range of the remote microphone signal through the remote microphone. At this time, the initial voice signal frame may include at least one of the user voice, environmental noise and acoustic echo of the second device. After acquiring the initial voice signal frame, the second device can send the initial voice signal frame to the first device. At this time, the first voice signal frame is the initial voice signal frame. Optionally, after acquiring the initial voice signal frame, the second device can also perform signal processing operations (noise elimination, echo filtering, etc.) on the initial voice signal frame to obtain the first voice signal, and then send the first voice signal to the first device. At this time, the first voice signal frame is the voice signal after the initial voice signal frame is signal processed. It can be understood that if the initial voice signal frame is a voice signal frame collected by the second device in a far-end utterance state, the first user voice signal exists in the first voice signal frame, and accordingly, an acoustic echo exists in the second voice signal frame; conversely, if the initial voice signal frame is a voice signal frame collected by the second device in a far-end closed microphone state, the first user voice signal does not exist in the first voice signal frame, and accordingly, an acoustic echo does not exist in the second voice signal frame. The first user voice signal is the user voice of the second device in the first voice signal frame.
[0076] S202: The first device plays a first voice signal frame through a near-end speaker, and obtains a second voice signal frame collected by a near-end microphone.
[0077] Among them, the near-end speaker is also the speaker of the first device. The near-end speaker can be a built-in speaker or an external speaker. The built-in speaker refers to a speaker set on the first device. The external speaker refers to a speaker set independently of the first device. If the near-end speaker is an external speaker, the first device can establish a connection with the near-end speaker to achieve signal interaction. Specifically, the near-end speaker can be a wired speaker. At this time, the second user can find the connection interface corresponding to the first device and the near-end speaker, and insert the near-end speaker into the connection interface, thereby completing the connection between the first device and the near-end speaker. Optionally, the near-end speaker can be a wireless speaker. At this time, the way the first device establishes a connection with the near-end speaker can be WiFi, Bluetooth, infrared technology, ultra-wideband technology or wireless high-fidelity technology, etc., which is not limited in this application. After the first device receives the first voice signal frame from the second device, it can be played through the near-end speaker.
[0078] Among them, the near-end microphone is also the microphone of the first device. Similarly, the near-end microphone can be a built-in microphone or an external microphone. The built-in microphone refers to a microphone set on the first device. The external microphone refers to a microphone set independently of the first device. If the near-end microphone is an external microphone, the first device can establish a connection with the near-end microphone to achieve signal interaction. Specifically, the near-end microphone can be a wired microphone. At this time, the second user can find the connection interface corresponding to the first device and the near-end microphone, and insert the near-end microphone into the connection interface, thereby completing the connection between the first device and the near-end microphone. Optionally, the near-end microphone can be a wireless microphone. At this time, the way in which the first device establishes a connection with the near-end microphone can be WiFi, Bluetooth, infrared technology, ultra-wideband technology or wireless high-fidelity technology, etc., which is not limited in this application. The first device can continuously collect the near-end voice signal within the coverage range of the near-end microphone signal through the near-end microphone, and determine the second voice signal frame from the near-end voice signal.
[0079] In an embodiment of the present application, there is a correlation between the first voice signal frame and the second voice signal frame. The second voice signal frame is a voice signal frame collected by the near-end microphone when the first voice signal frame is played by the near-end speaker and propagated through the air to the near-end microphone. Since the sound source of the near-end voice signal may include but is not limited to the second user and the near-end speaker, etc., it is obvious that the second user voice signal and / or acoustic echo may exist in the second voice signal frame, and the second user voice signal is the user voice of the first device in the second voice signal frame.
[0080] S203: In response to the absence of the first user voice signal in the first voice signal frame and the number of frames in the first voice signal frame set being greater than a first threshold, the first device resets the first AI model to obtain a second AI model.
[0081] In an embodiment of the present application, the first AI model refers to a trained AI model, which is used to perform acoustic echo filtering on the near-end voice signal frame corresponding to the far-end voice signal frame with the far-end voice signal frame as a reference object, and output a mask. The mask includes a plurality of continuous mask values, and each of the plurality of mask values is between 0 and 1. The first threshold is used to distinguish whether the first AI model is in a strong suppression state for a long time. Specifically, if the number of frames of the first voice signal frame set is greater than the first threshold, the first AI model is in a strong suppression state for a long time, and if the number of frames of the first voice signal frame set is less than or equal to the first threshold, the first AI model is in a strong suppression state for a short time. The first threshold can be determined according to experimental data or empirical data, or it can be determined for the specific circumstances of different AI models. The model state of the first AI model includes a strong suppression state and a weak suppression state. The strong suppression state refers to the state in which the first AI model is in a state with a strong suppression ability for acoustic echoes, and accordingly, the weak suppression state refers to the state in which the first AI model is in a state with a weak suppression ability for acoustic echoes. The first speech signal frame set is a set of continuous speech signal frames that have been processed by the first AI model, and the mask of each speech signal frame in the first speech signal frame set output by the first AI model meets the reset condition.
[0082] It should be noted that, in the embodiment of the present application, the triggering conditions for resetting the first AI model and obtaining the second AI model include: ① the first user voice signal does not exist in the first voice signal frame, ② the number of frames in the first voice signal frame set is greater than the first threshold, and the above two conditions need to be met at the same time. It can be seen that whether to reset the first AI model and obtain the second AI model requires the following two determinations: whether the first user voice signal exists in the first voice signal frame, and whether the number of frames in the first voice signal frame set is greater than the first threshold.
[0083] In some embodiments, the first device determines whether there is a first user voice signal in the first voice signal frame in the following manner, but is not limited to: after receiving the first voice signal frame, the first device may perform voice activity detection on the first voice signal frame to identify user voice segments and non-user voice segments in the first voice signal frame; if there is a user voice segment in the first voice signal frame, the first device determines that there is a first user voice signal in the first voice signal frame. Conversely, if there is no user voice segment in the first voice signal frame, the first device determines that there is no first user voice signal in the first voice signal frame. It can be understood that there is no first user voice signal in the first voice signal frame, and obviously, the first voice signal frame indicates that the call status between the first device and the second device is a remote microphone-closed state.
[0084] It can be seen that in the embodiment of the present application, the first device can determine whether the first user voice signal exists in the first voice signal frame, improve the intelligence and convenience of resetting the first AI model, and obtain the trigger condition ① judgment of the second AI model.
[0085] In some embodiments, the first device may determine the model state of the first AI model based on the second threshold. In an embodiment of the present application, the second threshold refers to the minimum value of the maximum mask value of the mask output when the first AI model is in a weak suppression state. The second threshold can be determined based on experimental data or empirical data, or it can be determined for the specific circumstances of different AI models. In a specific implementation, after the first device outputs mask 1 of voice signal frame 1 through the first AI model, it can first determine the maximum value a among multiple mask values of mask 1; then compare the maximum value a with the second threshold; if the maximum value a is less than the second threshold, it is determined that mask 1 meets the reset condition, and it is determined that when processing voice signal frame 1, the first AI model is in a strong suppression state; if the maximum value a is greater than or equal to the second threshold, it is determined that mask 1 does not meet the reset condition, and it is determined that when processing voice signal frame 1, the first AI model is in a weak suppression state. Obviously, the mask meets the reset condition here, that is, the maximum value among the multiple mask values of the mask is less than the second threshold. Based on this mechanism, the mask of each voice signal frame in the first voice signal frame set output by the first AI model satisfies the reset condition when the maximum value of multiple mask values corresponding to each voice signal frame in the first voice signal frame set is less than the second threshold. It can be seen that in the embodiment of the present application, the first device can more accurately and meticulously judge the reset condition of the mask of each voice signal frame in the first voice signal frame set output by the first AI model by comparing the maximum value of multiple mask values corresponding to each voice signal frame in the first voice signal frame set with the second threshold.
[0086] In some embodiments, the first device may determine the model state of the first AI model based on a fourth threshold. In an embodiment of the present application, the fourth threshold refers to the minimum value of the average mask value of the mask output when the first AI model is in a weak suppression state, and the average mask value is the average value of multiple mask values of the mask. The fourth threshold can be determined based on experimental data or empirical data, or it can be determined for the specific circumstances of different AI models. In a specific implementation, after the first device outputs mask 2 of the voice signal frame 2 through the first AI model, it can first determine the average value b of multiple mask values of the mask 2; then compare the average value b with the fourth threshold; if the average value b is less than the fourth threshold, it is determined that mask 2 meets the reset condition, and it is determined that when processing voice signal frame 2, the first AI model is in a strong suppression state; if the average value b is greater than or equal to the fourth threshold, it is determined that mask 2 does not meet the reset condition, and it is determined that when processing voice signal frame 2, the first AI model is in a weak suppression state. Obviously, the mask meets the reset condition here, that is, the average value of the multiple mask values of the mask is less than the fourth threshold. Based on this mechanism, the mask of each voice signal frame in the first voice signal frame set output by the first AI model may also satisfy the reset condition if the average value of multiple mask values corresponding to each voice signal frame in the first voice signal frame set is less than the fourth threshold. It can be seen that in the embodiment of the present application, the first device can more reliably judge the reset condition of the mask of each voice signal frame in the first voice signal frame set output by the first AI model by comparing the average value of multiple mask values corresponding to each voice signal frame in the first voice signal frame set with the fourth threshold.
[0087] In an embodiment of the present application, the mask of each voice signal frame in the first voice signal frame set output by the first AI model may satisfy the reset condition in other situations. For example, the weighted average of multiple mask values corresponding to each voice signal frame in the first voice signal frame set may be less than the fifth threshold. Obviously, the mask satisfies the reset condition here when the weighted average of multiple mask values of the mask is less than the fifth threshold. This application does not make specific limitations on this.
[0088] In some embodiments, the first device resets the first AI model to obtain the second AI model by setting the hidden state parameters and / or memory cell parameters in the first AI model to zero to obtain the second AI model.
[0089] The hidden state parameter here is used to indicate the hidden state of the last speech signal frame in the first speech signal frame set output by the first AI model. Similarly, the memory cell parameter here is used to indicate the memory cell state of the last speech signal frame in the first speech signal frame set output by the first AI model.
[0090] Exemplarily, when the first AI model is RNN, the first AI model includes hidden state parameters, and the first device may set the hidden state parameters in the first AI model to zero to obtain a second AI model. When the first AI model is GRU / LSTM, the first AI model includes hidden state parameters and memory cell parameters. The first device may only set the hidden state parameters in the first AI model to zero to obtain the second AI model. Optionally, the first device may only set the memory cell parameters in the first AI model to zero to obtain the second AI model. Optionally, the first device may set both the hidden state parameters and the memory cell parameters in the first AI model to zero to obtain the second AI model.
[0091] It can be understood that after the hidden state parameters in the first AI model are set to zero and the second AI model is obtained, the hidden state parameters output by the second AI model based on the first voice signal frame are no longer affected by the hidden state parameters output by the first AI model. Similarly, after the memory cell parameters in the first AI model are set to zero and the second AI model is obtained, the memory cell parameters output by the second AI model when processing the first voice signal frame will no longer be affected by the memory cell parameters output by the first AI model.
[0092] It can be seen that in the embodiment of the present application, the second AI model is obtained by setting the hidden state parameters and / or memory cell parameters in the first AI model to zero, which is conducive to obtaining the second AI model more flexibly.
[0093] S204: The first device inputs the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model.
[0094] In an embodiment of the present application, after acquiring the above-mentioned second AI model, the first device can use the first voice signal frame and the second voice signal frame as input of the second AI model. The second AI model performs echo cancellation processing based on the first voice signal frame and the second voice signal frame, and outputs a first mask.
[0095] In some embodiments, the structure of the second AI model used by the first device can be as follows: Figure 2BIn the structure shown in FIG. 1 , the second AI model includes an encoder, a feature extraction module, and a decoder. The first device can obtain a first complex spectrum of a first speech signal frame; and obtain a second complex spectrum of a second speech signal frame; then concatenate the first complex spectrum and the second complex spectrum to obtain a third complex spectrum; then encode the third complex spectrum through the encoder to obtain a first feature vector; then perform deep feature extraction on the first feature vector through the feature extraction module to obtain a second feature vector; finally, decode the second feature vector through the decoder to obtain a first mask. In an embodiment of the present application, concatenating the first complex spectrum and the second complex spectrum may be, but is not limited to, connecting the first complex spectrum and the second complex spectrum.
[0096] The first complex spectrum is a complex spectrum obtained by the first device performing Fourier transform on the first speech signal frame, and the second complex spectrum is a complex spectrum obtained by the first device performing Fourier transform on the second speech signal frame.
[0097] It can be seen that in the embodiment of the present application, the first device performs echo cancellation processing on the first voice signal frame by adopting an AI model including an encoder, a feature extraction module and a decoder structure to obtain a first mask of the first voice signal frame, which is conducive to more reliably determining the first mask.
[0098] In some embodiments, the structure of the second AI model used by the first device can be as follows: Figure 2C In the structure 2 shown, the second AI model may include a signal processing module, an encoder, a feature extraction module and a decoder; the first device may obtain a first complex spectrum of a first speech signal frame through the signal processing module; and obtain a second complex spectrum of a second speech signal frame through the signal processing module; then the first complex spectrum and the second complex spectrum are concatenated through the signal processing module to obtain a third complex spectrum; then the third complex spectrum is encoded through the encoder to obtain a first feature vector; then the first feature vector is deep-featured extracted through the feature extraction module to obtain a second feature vector; finally, the second feature vector is decoded through the decoder to obtain a first mask.
[0099] It can be seen that in the embodiment of the present application, the first device performs echo cancellation processing on the first voice signal frame by adopting an AI model including a signal processing module, an encoder, a feature extraction module and a decoder structure to obtain a first mask of the first voice signal frame, which is conducive to more convenient and accurate determination of the first mask.
[0100] In some embodiments, the structure of the second AI model used by the first device may also be other structures, such as including Figure 2C The present application is not limited to more or fewer components shown, or combinations of certain components, or different arrangements of components.
[0101] S205: The first device determines a third speech signal frame based on the first mask and the second speech signal frame.
[0102] In some embodiments, the first device determines the third voice signal frame based on the first mask and the second voice signal frame in the following implementation method: after acquiring the first mask and the second complex spectrum, the first device may first determine the fourth complex spectrum based on the first mask and the second complex spectrum; and then perform speech synthesis processing on the fourth complex spectrum to obtain the third voice signal frame. Specifically, the first device may multiply the first mask and the second complex spectrum to obtain the fourth complex spectrum, and then perform an inverse Fourier transform on the fourth complex spectrum to obtain the third voice signal frame. It can be seen that in the embodiment of the present application, the first device determines the third voice signal frame through the first mask and the second complex spectrum of the second voice signal frame output by the second AI model, which is conducive to more accurately and reasonably avoiding the suppression and distortion of the user voice signal of the first device.
[0103] S206: The first device sends a third voice signal frame to the second device. Correspondingly, the second device receives the third voice signal frame from the first device.
[0104] In some embodiments, after the second device receives the third voice signal frame from the first device, the third voice signal frame can be played through a remote speaker, thereby achieving voice communication between the first device and the second device.
[0105] It can be seen that in the embodiment of the present application, the first device can, when using the first AI model for acoustic echo suppression, reset the first AI model to obtain the second AI model based on the absence of acoustic echo in the near-end voice signal frame currently processed by the first device and the first AI model being in a strong suppression state for a long time. The near-end voice signal frame currently processed is then echo suppressed by the second AI model to obtain a higher-quality communication voice signal frame, which is beneficial to avoiding the suppression and distortion of the user voice signal of the first device, ensuring the reliability and accuracy of the acoustic echo suppression performed by the first device, and realizing voice communication between the first device and the second device through the higher-quality communication voice signal frame, thereby helping to improve the quality of voice communication and, at the same time, helping to improve the user experience.
[0106] In some embodiments, the first device may perform echo suppression processing on each near-end voice signal frame in order from front to back in acquisition time. During the processing, the first device determines that the near-end voice signal frame and the far-end voice signal frame with a correlation relationship meet the second condition, and adds the near-end voice signal frame to the first voice signal frame set; or, the first device determines that the far-end voice signal frame and the far-end voice signal frame with an association relationship meet the third condition, and clears the voice signal frame in the first voice signal frame set. Optionally, the first device may increase the first parameter value by 1 when adding the near-end voice signal frame to the first voice signal frame set, so as to achieve synchronous update of the first parameter value. Optionally, the first device may set the first parameter value to 0 when clearing the voice signal frame in the first voice signal frame set, so as to achieve recounting of the number of frames in the first voice signal frame set. The first parameter value is used to indicate the number of frames in the first voice signal frame set. The correlation between the near-end voice signal frame and the far-end voice signal frame means that the near-end voice signal frame is a voice signal frame collected by the near-end microphone when the far-end voice signal frame is played by the near-end speaker and propagated through the air to the near-end microphone.
[0107] In some embodiments, the second condition satisfied by the correlated near-end voice signal frame and far-end voice signal frame includes: ① the presence of a first user voice signal in the far-end voice signal frame; ② the mask output by the AI model and the near-end voice signal frame meets the reset condition; the above two conditions need to be met at the same time. Correspondingly, the third condition satisfied by the correlated near-end voice signal frame and far-end voice signal frame means: ① the first user voice signal does not exist in the far-end voice signal frame; ② the first user voice signal exists in the far-end voice signal frame, and the mask output by the first AI model and the near-end voice signal frame does not meet the reset condition; any one of the above two conditions can be met.
[0108] In some embodiments, the first device can obtain the number of frames of the first voice signal frame set after the i-th update (that is, the first parameter value after the i-th update) after updating the first voice signal frame set for the i-th time (including adding the near-end voice signal frame to the first voice signal frame set and clearing the voice signal frame in the first voice signal frame set), and store the first parameter value after the i-th update in the storage space of the first device system. When the i-th updated first parameter value is needed, it can be directly obtained from the storage space. In some embodiments, the first device can obtain the first voice signal frame set after the i-th update after updating the first voice signal frame set for the i-th time, and store the first voice signal frame set after the i-th update in the storage space of the first device system. When the number of frames of the first voice signal frame set after the i-th update is needed, the first voice signal frame set after the i-th update is first obtained from the storage space, and then the number of frames of the first voice signal frame set after the i-th update is determined, where i is a positive integer.
[0109] In some embodiments, after step S202, the speech signal processing method may further include the following steps S11-S14 ( Figure 2A Not shown):
[0110] S11. In response to the presence of a first user voice signal in a first voice signal frame and the number of frames in a second voice signal frame set being greater than a third threshold, the first device resets the first AI model to obtain a third AI model.
[0111] Among them, the second voice signal frame set is a set of continuous voice signal frames that have been processed by the first AI model, and the voice signal frames in the second voice signal frame set do not include the user voice of the second device.
[0112] The third threshold is used to distinguish whether the call status between the first device and the second device is in the remote microphone-mute state for a long time. Specifically, if the number of frames in the first voice signal frame set is greater than the third threshold, the call status between the first device and the second device is in the remote microphone-mute state for a long time; if the number of frames in the first voice signal frame set is less than or equal to the third threshold, the call status between the first device and the second device is in the remote microphone-mute state for a short time. The third threshold can be determined based on experimental data or empirical data, or it can be determined based on the specific circumstances of different AI models.
[0113] It should be noted that, in the embodiment of the present application, the triggering conditions for resetting the first AI model to obtain the third AI model include: ① the presence of the first user voice signal in the first voice signal frame; ② the number of frames in the second voice signal frame set is greater than the third threshold; the above two conditions need to be met at the same time. It can be seen that whether to reset the first AI model to obtain the third AI model requires the following two aspects to be determined: whether the first user voice signal exists in the first voice signal frame, and whether the number of frames in the second voice signal frame set is greater than the third threshold.
[0114] In some embodiments, the first device may obtain a maximum value c among multiple amplitudes of a far-end reference signal frame; in response to the maximum value c being less than an eighth threshold, determine that the far-end reference signal frame does not include the user voice of the second device; or, in response to the maximum value being greater than or equal to the eighth threshold, determine that the far-end reference signal frame includes the user voice of the second device.
[0115] In some embodiments, the first device resets the first AI model to obtain the third AI model by setting the hidden state parameters and / or memory cell parameters in the first AI model to zero to obtain the third AI model.
[0116] Similarly, after the hidden state parameters in the first AI model are set to zero and the third AI model is obtained, the hidden state parameters output by the third AI model based on the first speech signal frame will no longer be affected by the hidden state parameters output by the first AI model. Similarly, after the memory cell parameters in the first AI model are set to zero and the third AI model is obtained, the memory cell parameters output by the third AI model when processing the first speech signal frame will no longer be affected by the memory cell parameters output by the first AI model.
[0117] It can be seen that in the embodiment of the present application, the third AI model is obtained by setting the hidden state parameters and / or memory cell parameters in the first AI model to zero, which is conducive to obtaining the third AI model more flexibly.
[0118] It should be noted that the third AI model in this step may be the same as the second AI model in the aforementioned step S203. For example, both the third AI model and the second AI model may be AI models obtained by setting the hidden state parameters in the first AI model to zero. The third AI model in this step may also be different from the second AI model in the aforementioned step S203. For example, the third AI model may be an AI model obtained by setting the hidden state parameters in the first AI model to zero, and the second AI model may be an AI model obtained by setting both the hidden state parameters and the memory cell parameters in the first AI model to zero. This is not specifically limited in the embodiments of the present application.
[0119] S12. The first device inputs the first speech signal frame and the second speech signal frame into the third AI model to obtain a second mask output by the third AI model.
[0120] In an embodiment of the present application, after acquiring the above-mentioned third AI model, the first device can use the first voice signal frame and the second voice signal frame as inputs of the third AI model. The third AI model performs echo cancellation processing based on the first voice signal frame and the second voice signal frame, and then outputs a second mask.
[0121] In some embodiments, the structure of the third AI model used by the first device can be as follows: Figure 2B In the structure one shown, the third AI model includes an encoder, a feature extraction module and a decoder. The first device can obtain the first complex spectrum of the first voice signal frame; and obtain the second complex spectrum of the second voice signal frame; then concatenate the first complex spectrum and the second complex spectrum to obtain a third complex spectrum; then encode the third complex spectrum through the encoder to obtain a third feature vector; then perform deep feature extraction on the third feature vector through the feature extraction module to obtain a fourth feature vector; finally, decode the fourth feature vector through the decoder to obtain a second mask. It can be seen that in the embodiment of the present application, the first device uses an AI model including an encoder, a feature extraction module and a decoder structure to perform echo cancellation processing on the first voice signal frame to obtain the second mask of the first voice signal frame, which is conducive to more reliably determining the second mask.
[0122] In some embodiments, the structure of the third AI model used by the first device can be as follows: Figure 2C In the structure 2 shown, the third AI model may include a signal processing module, an encoder, a feature extraction module and a decoder; the first device may obtain the first complex spectrum of the first speech signal frame through the signal processing module; and obtain the second complex spectrum of the second speech signal frame through the signal processing module; then the first complex spectrum and the second complex spectrum are spliced through the signal processing module to obtain a third complex spectrum; then the third complex spectrum is encoded through the encoder to obtain a third feature vector; then the feature extraction module performs deep feature extraction on the third feature vector to obtain a fourth feature vector; finally, the fourth feature vector is decoded through the decoder to obtain a second mask.
[0123] It can be seen that in the embodiment of the present application, the first device performs echo cancellation processing on the first voice signal frame by adopting an AI model including a signal processing module, an encoder, a feature extraction module and a decoder structure to obtain the second mask of the first voice signal frame, which is conducive to determining the second mask more conveniently and accurately.
[0124] In some embodiments, the structure of the third AI model used by the first device may also be other structures, such as including Figure 2C The present application is not limited to more or fewer components shown, or combinations of certain components, or different arrangements of components.
[0125] S13. The first device determines a fourth speech signal frame based on the second mask and the second speech signal frame.
[0126] In some embodiments, the first device may determine the fourth voice signal frame based on the second mask and the second voice signal frame in the following manner: after acquiring the second mask and the second complex spectrum, the first device may first determine the fifth complex spectrum based on the second mask and the second complex spectrum; and then perform speech synthesis processing on the fifth complex spectrum to obtain the fourth voice signal frame. Specifically, the first device may multiply the second mask and the second complex spectrum to obtain the fifth complex spectrum, and then perform inverse Fourier transform on the fifth complex spectrum to obtain the fourth voice signal frame.
[0127] It can be seen that in the embodiment of the present application, the first device determines the fourth voice signal frame through the second mask output by the second AI model and the second complex spectrum of the second voice signal frame, which is conducive to more reliably filtering out the acoustic echo in the second voice signal frame.
[0128] In some embodiments, the first device determines the fourth voice signal frame based on the second mask and the second voice signal frame in the following manner: after receiving the first voice signal frame, the first device may first perform preliminary echo filtering on the second voice signal frame based on the first voice signal frame to obtain the fifth voice signal frame; then determine the seventh complex spectrum based on the aforementioned second mask obtained and the sixth complex spectrum of the fifth voice signal frame; and finally perform speech synthesis processing on the seventh complex spectrum to obtain the fourth voice signal frame. The sixth complex spectrum is the complex spectrum obtained by the first device performing Fourier transform on the fifth voice signal frame, and the seventh complex spectrum is the complex spectrum obtained by multiplying the second mask and the fifth voice signal frame.
[0129] It can be seen that in the embodiment of the present application, the first device obtains the fifth voice signal frame after preliminarily filtering out the acoustic echo from the second voice signal frame, and determines the fourth voice signal frame based on the fifth voice signal frame and the second mask output by the second AI model, which is conducive to more accurate and detailed filtering of the acoustic echo in the second voice signal frame.
[0130] In some embodiments, the preliminary echo filtering processing method adopted by the first device may be, but is not limited to, least mean square (LMS) adaptive filtering, normalized least mean square (NLMS), recursive least squares (RLS) adaptive filtering, frequency domain adaptive filter (FDAF), Kalman filtering, etc. The preliminary echo filtering processing method adopted by the first device is not specifically limited.
[0131] S14: The first device sends a fourth voice signal frame to the second device. Correspondingly, the second device receives the fourth voice signal frame from the first device.
[0132] In some embodiments, after the second device receives the fourth voice signal frame from the first device, the fourth voice signal frame can be played through the remote speaker, thereby realizing voice communication between the first device and the second device.
[0133] It can be seen that in the embodiment of the present application, the first device can, when using the first AI model for acoustic echo suppression, reset the first AI model to obtain the second AI model based on the presence of acoustic echo in the near-end voice signal frame currently processed by the first device, and the first AI model processes the near-end voice signal frame that does not include the user voice of the second device for a long time, and then perform echo suppression processing on the currently processed near-end voice signal frame through the second AI model to obtain a higher-quality communication voice signal frame, which is beneficial to avoid the residual acoustic echo of the first device, improve the comprehensiveness and accuracy of the acoustic echo suppression performed by the first device, and realize voice communication between the first device and the second device through the higher-quality communication voice signal frame, which is beneficial to further improve the quality of voice communication, and at the same time, it is beneficial to further improve the user experience.
[0134] In some embodiments, the first device may perform echo suppression processing on each near-end voice signal frame in order from front to back in acquisition time. During the processing, when the first device determines that there is no user voice of the second device in the far-end voice signal frame, the near-end voice signal frame having a correlation with the far-end voice signal frame is added to the second voice signal frame set; when the first device determines that there is user voice of the second device in the far-end voice signal frame, the voice signal frame in the second voice signal frame set is cleared. Optionally, the first device may increase the second parameter value by 1 when adding the second voice signal frame to the second voice signal frame set, so as to achieve synchronous update of the second parameter value. Optionally, the first device may set the second parameter value to 0 when clearing the voice signal frame in the second voice signal frame set, so as to achieve recounting of the number of frames in the second voice signal frame set. The second parameter value is used to indicate the number of frames in the second voice signal frame set.
[0135] In some embodiments, after the first device updates the second voice signal frame set for the i-th time (including adding the near-end voice signal frame to the second voice signal frame set and clearing the voice signal frame in the second voice signal frame set), it can obtain the number of frames of the second voice signal frame set after the i-th update (that is, the second parameter value after the i-th update), and store the second parameter value after the i-th update in the storage space of the first device system. When the i-th updated second parameter value is needed, it can be directly obtained from the storage space. In some embodiments, after the first device updates the second voice signal frame set for the i-th time, it can obtain the second voice signal frame set after the i-th update, and store the second voice signal frame set after the i-th update in the storage space of the first device system. When the number of frames of the second voice signal frame set after the i-th update is needed, it can first obtain the second voice signal frame set after the i-th update from the storage space, and then determine the number of frames of the second voice signal frame set after the i-th update, where i is a positive integer.
[0136] In some embodiments, after step S202, the speech signal processing method may further include the following steps S21-S23 ( Figure 2A Not shown):
[0137] S21. In response to the first speech signal frame and the number of frames of the first speech signal frame set satisfying the first condition, the first device inputs the first speech signal frame and the second speech signal frame into the first AI model to obtain a third mask output by the first AI model.
[0138] In an embodiment of the present application, the number of frames of the first voice signal frame and / or the first voice signal frame set satisfies the first condition including: ① there is no first user voice signal in the first voice signal frame, and the number of frames of the first voice signal frame set is less than or equal to the first threshold; ② there is a first user voice signal in the first voice signal frame, and the number of frames of the second voice signal frame set is less than or equal to the third threshold; either of the above two conditions can be met.
[0139] In some embodiments, the structure of the first AI model used by the first device can be as follows: Figure 2B In the structure one shown, the first AI model includes an encoder, a feature extraction module and a decoder. The first device can obtain the first complex spectrum of the first voice signal frame; and obtain the second complex spectrum of the second voice signal frame; then concatenate the first complex spectrum and the second complex spectrum to obtain a third complex spectrum; then encode the third complex spectrum through the encoder to obtain a fifth feature vector; then perform deep feature extraction on the fifth feature vector through the feature extraction module to obtain a sixth feature vector; finally, decode the sixth feature vector through the decoder to obtain a third mask. It can be seen that in the embodiment of the present application, the first device uses an AI model including an encoder, a feature extraction module and a decoder structure to perform echo cancellation processing on the first voice signal frame to obtain the third mask of the first voice signal frame, which is conducive to more reliably determining the third mask.
[0140] In some embodiments, the structure of the first AI model used by the first device can be as follows: Figure 2C In the structure 2 shown, the first AI model may include a signal processing module, an encoder, a feature extraction module and a decoder; the first device may obtain the first complex spectrum of the first speech signal frame through the signal processing module; and obtain the second complex spectrum of the second speech signal frame through the signal processing module; then the first complex spectrum and the second complex spectrum are spliced through the signal processing module to obtain a third complex spectrum; then the third complex spectrum is encoded through the encoder to obtain a fifth feature vector; then the fifth feature vector is deep-featured extracted through the feature extraction module to obtain a sixth feature vector; finally, the sixth feature vector is decoded through the decoder to obtain a third mask.
[0141] It can be seen that in the embodiment of the present application, the first device performs echo cancellation processing on the first voice signal frame by adopting an AI model including a signal processing module, an encoder, a feature extraction module and a decoder structure to obtain the third mask of the first voice signal frame, which is conducive to more convenient and accurate determination of the third mask.
[0142] In some embodiments, the structure of the first AI model used by the first device may also be other structures, such as including Figure 2CThe present application is not limited to more or fewer components shown, or combinations of certain components, or different arrangements of components.
[0143] S22. The first device determines a sixth speech signal frame based on the third mask and the second speech signal frame.
[0144] In some embodiments, the first device may determine the sixth voice signal frame based on the third mask and the second voice signal frame in the following manner: after acquiring the third mask and the second complex spectrum, the first device may first determine the fifth complex spectrum based on the third mask and the second complex spectrum; and then perform speech synthesis processing on the fifth complex spectrum to obtain the sixth voice signal frame. Specifically, the first device may multiply the third mask and the second complex spectrum to obtain the fifth complex spectrum, and then perform inverse Fourier transform on the fifth complex spectrum to obtain the sixth voice signal frame.
[0145] It can be seen that in the embodiment of the present application, the first device determines the sixth voice signal frame through the third mask output by the first AI model and the second complex spectrum of the second voice signal frame, which is conducive to more reliably filtering out the acoustic echo in the second voice signal frame.
[0146] In some embodiments, the first device determines the sixth voice signal frame based on the third mask and the second voice signal frame in the following implementation manner: after receiving the first voice signal frame, the first device may first perform preliminary echo filtering on the second voice signal frame based on the first voice signal frame to obtain the seventh voice signal frame; then determine the seventh complex spectrum based on the aforementioned third mask and the sixth complex spectrum of the seventh voice signal frame; and finally perform speech synthesis processing on the seventh complex spectrum to obtain the sixth voice signal frame. The sixth complex spectrum is the complex spectrum obtained by the first device performing Fourier transform on the seventh voice signal frame, and the seventh complex spectrum is the complex spectrum obtained by multiplying the third mask and the seventh voice signal frame.
[0147] It can be seen that in the embodiment of the present application, the first device obtains the seventh voice signal frame after preliminarily filtering out the acoustic echo from the second voice signal frame, and determines the sixth voice signal frame based on the seventh voice signal frame and the third mask output by the first AI model, which is conducive to more accurate and detailed filtering of the acoustic echo in the second voice signal frame.
[0148] S23: The first device sends a sixth voice signal frame to the second device. Correspondingly, the second device receives the sixth voice signal frame from the first device.
[0149] In some embodiments, after the second device receives the sixth voice signal frame from the first device, the sixth voice signal frame can be played through a remote speaker, thereby achieving voice communication between the first device and the second device.
[0150] It can be seen that in the embodiment of the present application, the first device can, in the case of adopting the first AI model for acoustic echo suppression, respond to the number of frames of the first voice signal frame and the first voice signal frame set satisfying the first condition, perform echo suppression processing on the currently processed near-end voice signal frame through the first AI model to obtain a communication voice signal frame, which is beneficial to further improve the comprehensiveness and accuracy of the acoustic echo suppression performed by the first device, and realize voice communication between the first device and the second device through the communication voice signal frame, thereby helping to further improve the quality of voice communication, and at the same time, helping to further improve the user experience.
[0151] It can be understood that after the model structure of the first AI model is determined, the model structures of the second AI model and the third AI model are also determined. In other words, the model structures of the first AI model, the second AI model and the third AI model are the same.
[0152] In some embodiments, the first device resets the first AI model to obtain the second AI model in a manner that: when the number of frames in the third speech signal frame set is greater than a sixth threshold, the first device resets the first AI model to obtain the second AI model. The sixth threshold is greater than the first threshold, and by further setting the first AI model to be reset to obtain the second AI model when the number of frames in the third speech signal frame set is greater than the sixth threshold, frequent resetting of the AI model is prevented.
[0153] In some embodiments, the first device resets the first AI model to obtain the third AI model in the following manner: the first device resets the first AI model to obtain the third AI model when the number of frames in the third speech signal frame set is greater than the seventh threshold. The seventh threshold is greater than the third threshold, and the first AI model is reset to obtain the third AI model when the number of frames in the third speech signal frame set is greater than the seventh threshold, so as to prevent frequent resetting of the AI model. The seventh threshold may be the same as or different from the sixth threshold, and is not specifically limited.
[0154] In an embodiment of the present application, the third voice signal frame set is a set of continuous voice signal frames processed by the first AI model within a first time period; the first time period refers to the time period from the first time point to the second time node, the first time point refers to the time node when the first AI model was obtained by resetting the AI model for the last time, and the second time node refers to the current time of the first device system.
[0155] In some embodiments, the first device may perform echo suppression processing on each near-end voice signal frame in order from front to back in acquisition time. During the processing, when the AI model is reset for the i-th time, the first device uses the AI model after the i-th reset to process the far-end voice signal frame, and after the AI model after the i-th reset processes the far-end voice signal frame, the far-end voice signal frame is added to the third voice signal frame set until the AI model is reset for the i+1th time, and the voice signal frames in the third voice signal frame set are cleared after the AI model is reset for the i+1th time, where i is a positive integer. Optionally, the first device may synchronously increase the third parameter value by 1 when adding the near-end voice signal frame to the third voice signal frame set, so as to achieve synchronous update of the third parameter value. Optionally, the first device may synchronously set the third parameter value to zero when clearing the voice signal frames in the third voice signal frame set, so as to achieve recounting of the number of frames in the third voice signal frame set. Wherein, the third parameter value is used to indicate the number of frames in the third voice signal frame set.
[0156] In some embodiments, after the first device updates the third voice signal frame set for the i-th time (including adding the near-end voice signal frame to the third voice signal frame set and clearing the voice signal frame in the third voice signal frame set), it can obtain the number of frames of the third voice signal frame set after the i-th update (that is, the third parameter value after the i-th update), and store the third parameter value after the i-th update in the storage space of the first device system. When the i-th updated third parameter value is needed, it can be directly obtained from the storage space. In some embodiments, after the first device updates the third voice signal frame set for the i-th time, it can obtain the third voice signal frame set after the i-th update, and store the third voice signal frame set after the i-th update in the storage space of the first device system. When the number of frames of the third voice signal frame set after the i-th update is needed, the third voice signal frame set after the i-th update is first obtained from the storage space, and then the number of frames of the third voice signal frame set after the i-th update is determined, where i is a positive integer.
[0157] In some embodiments, the first device storage may also use data lists, dictionaries, or other methods to store the voice signal frames in the aforementioned first voice signal frame set. Similarly, the first device may also use data lists, dictionaries, or other methods to store the voice signal frames in the aforementioned second voice signal frame set. Similarly, the first device may also use data lists, dictionaries, or other methods to store the voice signal frames in the aforementioned third voice signal frame set. The embodiments of the present application do not specifically limit this.
[0158] The following is a general overview of the signal processing method provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 3 See Figure 3 , Figure 3 : is a flow chart of another speech signal processing method provided in an embodiment of the present application, the method includes but is not limited to the following steps:
[0159] The first device first receives the first voice signal frame 301 from the second device, plays the first voice signal frame 301 through the near-end speaker, and obtains the second voice signal frame 302 collected by the near-end microphone, wherein the first voice signal frame 301 and the second voice signal frame 302 are related, that is, the second voice signal frame 302 is a voice signal frame collected by the near-end microphone when the first voice signal frame 301 is played through the near-end speaker and propagated to the near-end microphone through the air.
[0160] Then, the first device inputs the first speech signal frame 301 and the second speech signal frame 302 into the adaptive filter 303 to obtain the fifth speech signal frame 304 output by the adaptive filter 303. Afterwards, the first device obtains the first complex spectrum of the first speech signal frame 301 and the second complex spectrum 306 of the fifth speech signal frame 304 through the signal processing module 305, and splices the first complex spectrum and the second complex spectrum to obtain the third complex spectrum 307. The first device also determines whether the first speech signal frame 301, the number of frames of the first speech signal frame set, and the number of frames 317 of the second speech signal frame set meet the fourth condition through the judgment module 308; if so, the first device resets the AI model 314 ( Figure 3 (not shown) to obtain the AI model 309. The first voice signal frame 301, the number of frames of the first voice signal frame set, and the number of frames of the second voice signal frame set satisfy the fourth condition including: ① the first user voice signal does not exist in the first voice signal frame 301, and the number of frames of the first voice signal frame set is greater than the first threshold; ② the first user voice signal exists in the first voice signal frame 301, and the number of frames of the second voice signal frame set is greater than the third threshold; either of the above two conditions can be satisfied.
[0161] After resetting the AI model 314 to obtain the AI model 309, the first device inputs the third complex spectrum 307 into the AI model 309, and the AI model 309 includes an encoder 331, a feature extraction module 312, and a decoder 313. Specifically, the third complex spectrum 307 is first encoded by the encoder 331 to obtain a first feature vector; then the first feature vector is subjected to deep feature extraction by the feature extraction module 312 to obtain a second feature vector; finally, the second feature vector is decoded by the decoder 313 to obtain a mask 310 output by the AI model 309.
[0162] Then, the first device performs speech synthesis processing on the mask 310 and the second complex spectrum 306 through the speech synthesis module 315 to obtain a communication speech signal frame 316. Finally, the first device sends the communication speech signal frame 316 to the second device. After the second device receives the communication speech signal frame 316 from the first device, it can play the communication speech signal frame 316 through the remote speaker, thereby realizing the voice communication between the first device and the second device.
[0163] It should be noted that Figure 3 The contents not mentioned in the corresponding embodiments and the specific implementation methods of each step can be found in Figure 2A The illustrated embodiments and the aforementioned contents will not be described in detail here.
[0164] It can be seen that in the embodiment of the present application, the first device can, when using the first AI model for acoustic echo suppression, reset the first AI model to obtain the reset AI model based on the fact that there is no acoustic echo in the near-end voice signal frame currently processed by the first device and the first AI model is in a strong suppression state for a long time; or reset the first AI model to obtain the reset AI model based on the fact that there is an acoustic echo in the near-end voice signal frame currently processed by the first device and the first AI model processes the near-end voice signal frame that does not include the user voice of the second device for a long time; then perform echo suppression processing on the currently processed near-end voice signal frame through the reset AI model to obtain a higher-quality communication voice signal frame, which is beneficial to avoid the user voice signal of the first device being suppressed and distorted, and is beneficial to avoid the residual acoustic echo of the first device, thereby improving the comprehensiveness and accuracy of the acoustic echo suppression performed by the first device, and realizing voice communication between the first device and the second device through the higher-quality communication voice signal frame, thereby helping to improve the voice communication quality and user experience.
[0165] See also Figure 4 , Figure 4 is a structural diagram of a speech signal processing device provided by an embodiment of the present invention. Specifically, the device is applied to a first device, the first device includes a speaker, a first microphone and a second microphone; Figure 4 As shown, the speech signal processing device 400 may include:
[0166] The acquisition unit 401 is used to receive a first voice signal frame from a second device, play the first voice signal frame through the speaker, and acquire a second voice signal frame collected by the microphone;
[0167] A model resetting unit 402 is used to reset the first AI model in response to the absence of the first user voice signal in the first voice signal frame and the number of frames in the first voice signal frame set being greater than a first threshold, to obtain a second AI model; wherein the first voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the mask of each voice signal frame in the first voice signal frame set output by the first AI model meets the reset condition;
[0168] A mask acquisition unit 403, configured to input the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model;
[0169] A determining unit 404, configured to determine a third speech signal frame based on the first mask and the second speech signal frame;
[0170] The sending unit 405 is configured to send the third voice signal frame to the second device.
[0171] In one possible implementation, the second AI model includes an encoder, a feature extraction module and a decoder; in the above-mentioned aspect of inputting the first speech signal frame and the second speech signal frame into the second AI model to obtain the first mask output by the second AI model, the mask acquisition unit 403 is specifically used to: obtain the first complex spectrum of the first speech signal frame; and obtain the second complex spectrum of the second speech signal frame; splice the first complex spectrum and the second complex spectrum to obtain a third complex spectrum; encode the third complex spectrum through the encoder to obtain a first feature vector; perform deep feature extraction on the first feature vector through the feature extraction module to obtain a second feature vector; decode the second feature vector through the decoder to obtain the first mask.
[0172] In one possible implementation, the second AI model includes a signal processing module, an encoder, a feature extraction module and a decoder; in the above-mentioned inputting the first speech signal frame and the second speech signal frame into the second AI model, obtaining the first mask output by the second AI model, including: obtaining the first complex spectrum of the first speech signal frame through the signal processing module; and obtaining the second complex spectrum of the second speech signal frame through the signal processing module; and splicing the first complex spectrum and the second complex spectrum through the signal processing module to obtain a third complex spectrum; encoding the third complex spectrum through the encoder to obtain a first feature vector; performing deep feature extraction on the first feature vector through the feature extraction module to obtain a second feature vector; decoding the second feature vector through the decoder to obtain a first mask.
[0173] In a possible implementation, in the aspect of determining the third speech signal frame based on the first mask and the second speech signal frame, the determination unit 404 is specifically used to: determine a fourth complex spectrum based on the first mask and the second complex spectrum; and perform speech synthesis processing on the fourth complex spectrum to obtain the third speech signal frame.
[0174] In a possible implementation, in the above-mentioned resetting of the first AI model to obtain the second AI model, the model resetting unit 402 is specifically used to: set the hidden state parameters and / or memory cell parameters in the first AI model to zero to obtain the second AI model.
[0175] In a possible implementation, the mask of each speech signal frame in the first speech signal frame set satisfies a reset condition, including: the maximum value of multiple mask values corresponding to each speech signal frame in the first speech signal frame set is less than a second threshold.
[0176] In one possible implementation, the model resetting unit 402 is also used to, in response to the presence of a first user voice signal in the first voice signal frame and the number of frames in the second voice signal frame set being greater than a third threshold, reset the first AI model to obtain a third AI model; wherein the second voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the voice signal frames in the second voice signal frame set do not include the user voice of the second device; the mask acquisition unit 403 is also used to input the first voice signal frame and the second voice signal frame into the third AI model to obtain a second mask output by the third AI model; the determination unit 404 is also used to determine a fourth voice signal frame based on the second mask and the second voice signal frame; the sending unit 405 is also used to send the fourth voice signal frame to the second device.
[0177] The present application also provides a chip that can execute the 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 execute the method executed by the first device in the above method embodiment.
[0178] 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.
[0179] like Figure 5 As shown, Figure 51 is a schematic diagram of a module device provided in an embodiment of the present application. The module device 500 can execute the relevant steps of the electronic device or the proximal device in the aforementioned method embodiment, and the module device 500 includes: a communication module 501, a power module 502, a storage module 503 and a chip 504.
[0180] Among them, the power module 502 is used to provide power to the module device; the storage module 503 is used to store data and instructions; the communication module 501 is used for internal communication of the module device, or for the module device to communicate with external devices; the chip 504 is used to execute the method executed by the first device in the above method embodiment.
[0181] It should be noted that Figure 5 The contents not mentioned in the corresponding embodiments and the specific implementation methods of each step can be found in Figure 2A and Figure 3 The illustrated embodiments and the aforementioned contents will not be described in detail here.
[0182] 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.
[0183] 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.
[0184] 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.
[0185] 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.
[0186] 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.
[0187] 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 speech signal processing method, characterized in that: Applied to a first device, the first device includes a speaker and a microphone; the method includes: Receiving a first voice signal frame from a second device, playing the first voice signal frame through the speaker, and acquiring a second voice signal frame collected by the microphone; In response to the absence of a first user voice signal in the first voice signal frame, and the number of frames in the first voice signal frame set is greater than a first threshold, resetting the first AI model to obtain a second AI model; wherein the first voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the mask of each voice signal frame in the first voice signal frame set output by the first AI model meets the reset condition; Inputting the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model; Determining a third speech signal frame based on the first mask and the second speech signal frame; Send the third voice signal frame to the second device.
2. The method according to claim 1, characterized in that: The second AI model includes an encoder, a feature extraction module and a decoder; The step of inputting the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model includes: Acquire a first complex spectrum of the first speech signal frame; and acquire a second complex spectrum of the second speech signal frame; splicing the first complex spectrum and the second complex spectrum to obtain a third complex spectrum; Performing encoding processing on the third complex spectrum by the encoder to obtain a first eigenvector; Performing deep feature extraction on the first feature vector by the feature extraction module to obtain a second feature vector; The second feature vector is decoded by the decoder to obtain a first mask.
3. The method according to claim 1, characterized in that The second AI model includes a signal processing module, an encoder, a feature extraction module and a decoder; The step of inputting the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model includes: Acquire a first complex spectrum of the first speech signal frame through the signal processing module; acquire a second complex spectrum of the second speech signal frame through the signal processing module; and concatenate the first complex spectrum and the second complex spectrum through the signal processing module to obtain a third complex spectrum; Performing encoding processing on the third complex spectrum by the encoder to obtain a first eigenvector; Performing deep feature extraction on the first feature vector by the feature extraction module to obtain a second feature vector; The second feature vector is decoded by the decoder to obtain a first mask.
4. The method according to claim 2 or 3, characterized in that: The determining, based on the first mask and the second speech signal frame, a third speech signal frame comprises: determining a fourth complex spectrum based on the first mask and the second complex spectrum; Perform speech synthesis processing on the fourth complex spectrum to obtain a third speech signal frame.
5. The method according to claim 1, characterized in that The resetting the first AI model to obtain a second AI model includes: The hidden state parameters and / or memory cell parameters in the first AI model are set to zero to obtain a second AI model.
6. The method according to claim 1, characterized in that The mask of each speech signal frame in the first speech signal frame set satisfies a reset condition, including: The maximum value of the multiple mask values corresponding to each speech signal frame in the first speech signal frame set is smaller than the second threshold.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to the presence of the first user voice signal in the first voice signal frame, and the number of frames in the second voice signal frame set is greater than a third threshold, resetting the first AI model to obtain a third AI model; wherein the second voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the voice signal frames in the second voice signal frame set do not include the user voice of the second device; Inputting the first speech signal frame and the second speech signal frame into the third AI model to obtain a second mask output by the third AI model; Determining a fourth speech signal frame based on the second mask and the second speech signal frame; The fourth voice signal frame is sent to the second device.
8. A speech signal processing device, characterized in that: Applied to a first device, the first device includes a speaker and a microphone; the apparatus includes: an acquisition unit, configured to receive a first voice signal frame from a second device, play the first voice signal frame through the speaker, and acquire a second voice signal frame collected by the microphone; A model resetting unit, configured to reset the first AI model in response to the absence of the first user voice signal in the first voice signal frame and the number of frames in the first voice signal frame set being greater than a first threshold, to obtain a second AI model; wherein the first voice signal frame set is a set of continuous voice signal frames processed by the first AI model, and the mask of each voice signal frame in the first voice signal frame set output by the first AI model meets the reset condition; a mask acquisition unit, configured to input the first speech signal frame and the second speech signal frame into the second AI model to obtain a first mask output by the second AI model; a determining unit, configured to determine a third speech signal frame based on the first mask and the second speech signal frame; A sending unit is used to send the third voice signal frame to the second device.
9. An electronic device comprising a processor, a memory and a computer program or instruction stored in the memory, characterized in that: The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 7.
10. A chip, comprising a processor, characterized in that: The processor executes the steps of the method according to any one of claims 1 to 7.
11. A chip module, characterized in that: The chip module includes a communication interface and a chip, wherein: the communication interface is used for communication within the chip module, or for the chip module to communicate with an external device; the chip is used to execute the steps of the method as described in any one of claims 1-7.
12. A computer-readable storage medium, characterized in that: The computer stores a computer program or an instruction, and when the computer program or the instruction is executed, the steps of the method according to any one of claims 1 to 7 are implemented.
