Voice signal processing method and related device
By setting up multiple microphones on wearable devices and adaptively switching voice signals, the problem of voice signal distortion in bone conduction microphones under complex noise environments is solved, enabling clear calls in different noise scenarios.
Patent Information
- Application Number
- CN202311242905.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-09-22
AI Technical Summary
In complex noisy environments, the voice signal collected by bone conduction microphones is severely distorted, resulting in poor voice clarity. This limits the application scenarios of the headphones and makes it difficult to guarantee call quality.
By setting at least two different microphones on a wearable device, the first microphone is used to collect ambient noise signals, and the voice signal is adaptively switched according to the duration of the noise energy. The voice signal with a higher signal-to-noise ratio is selected for voice services, thus achieving adaptive switching.
In complex noisy environments, it ensures the stability and clarity of voice signals, improves the quality and stability of voice services, and adapts to the needs of different noise scenarios.
Smart Images

Figure CN119697560B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of acoustic technology, and in particular to a speech signal processing method and related equipment. Background Technology
[0002] During calls, the microphone on the electronic device is generally required to capture a clear voice signal to ensure call quality. However, real-world environments are often quite complex, especially in noisy settings such as roadsides, workshops, and mining areas, where the ambient noise is extremely high, posing a significant challenge to clear calls through headphones.
[0003] Bone conduction microphones can effectively pick up speech signals in high-noise environments, ensuring call quality even in such conditions. The working principle of a bone conduction microphone is that when a person speaks, the skin and jawbone vibrate. The bone conduction microphone picks up these vibration signals and converts them into speech signals.
[0004] However, bone conduction microphones suffer from significant distortion in the acquired speech signal, resulting in poor voice clarity and limiting their application scenarios. Therefore, there is an urgent need for a technical solution that can handle various noise levels, ensuring clear sound pickup and call quality even in complex noise environments. Summary of the Invention
[0005] This application provides a speech signal processing method and related equipment to solve the problem in the related art that headphones are unable to guarantee the acquisition of stable speech signals with high signal-to-noise ratio in complex noise scenarios.
[0006] A first aspect provides a speech signal processing method. The method includes: acquiring a first speech signal collected by a first microphone, the first speech signal including an ambient noise signal indicating the ambient noise of the environment in which a wearable device is located. The first microphone is used to collect ambient noise, and the ambient noise in the first speech signal accurately characterizes the ambient noise situation of the environment in which the wearable device is located. During the execution of a voice service using a second speech signal collected by a second microphone of the wearable device, a first duration is acquired based on the first speech signal, the first duration being the duration during which the noise energy of the current ambient noise signal has continuously exceeded a first energy threshold. Based on the first duration, a decision is made on whether to switch to using a third speech signal to execute the voice service, the third speech signal being collected by a third microphone of the wearable device, and the signal-to-noise ratio (SNR) of the third speech signal being greater than that of the second speech signal when the noise energy of the ambient noise exceeds the first energy threshold.
[0007] By incorporating at least two different microphones in the wearable device, the third microphone exhibits a higher signal-to-noise ratio in high-noise environments. Based on the first voice signal, the device acquires the duration for which the ambient noise energy in the current environment continuously exceeds a first energy threshold. This duration allows the device to determine whether the current environment is high-noise or low-noise, and whether the ambient noise is consistently in a high-noise state. Consequently, the device adaptively switches the voice signal used for voice services based on the first duration, ensuring a high signal-to-noise ratio, clear and reliable voice communication even in complex environments, thus guaranteeing stable voice service operation.
[0008] In one possible implementation, determining whether to switch to using the third voice signal to perform voice services based on the first duration includes: when the first duration is greater than a first duration threshold, determining to switch to using the third voice signal to perform voice services; when the first duration is less than or equal to the first duration threshold, determining to still use the second voice signal to perform voice services.
[0009] If the first duration is greater than the first duration threshold, it indicates that the environment is currently in a relatively stable high-noise state. The voice signal used for voice services can be switched to a third voice signal with a higher signal-to-noise ratio in this environment, thereby improving voice clarity and ensuring stable voice services. If the first duration is less than or equal to the first duration threshold, it indicates that the current environmental noise is still unstable. To avoid frequent voice signal switching, the switching can be temporarily suspended, and the currently used voice signal can be maintained.
[0010] In one possible implementation, determining whether to switch to using a third voice signal to perform voice services based on a first duration includes: determining whether to switch to using a third voice signal to perform voice services based on a first duration and a second duration, wherein the second duration is the duration for which the second voice signal has been continuously used to perform voice services.
[0011] Including the duration of the current continuous use of the second voice signal to perform voice services in the switching conditions can avoid frequent switching of voice signals and improve the stability of voice services.
[0012] In one possible implementation, determining whether to switch to using a third voice signal to perform voice services based on a first duration and a second duration includes: determining to switch to using a third voice signal to perform voice services when the first duration is greater than a first duration threshold and the second duration is greater than a second duration threshold; and determining to continue using the second voice signal to perform voice services when the first duration is less than or equal to the first duration threshold and / or the second duration is less than or equal to the second duration threshold. Optionally, the second duration threshold is greater than the first duration threshold.
[0013] Switching the voice signal when both the first duration is greater than the first duration threshold and the second duration is greater than the second duration threshold, and after the environmental noise has stabilized and the voice service has been executed for one period of time using the second duration threshold, can avoid frequent switching of the voice signal, ensure the stability of the voice service, and switch to a voice signal with a higher signal-to-noise ratio can improve the quality of the voice service.
[0014] In one possible implementation, during the execution of voice services using the third voice signal, a third duration is obtained based on the first voice signal. The third duration is the duration during which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold, and the second energy threshold is less than or equal to a first energy threshold. Based on the third duration, it is determined whether to switch to using the second voice signal to execute voice services. When the noise energy of the ambient noise is less than or equal to the second energy threshold, the signal-to-noise ratio of the second voice signal is greater than the signal-to-noise ratio of the third voice signal.
[0015] In one possible implementation, determining whether to switch to using the second voice signal to perform voice services based on the third duration includes: when the third duration is greater than a third duration threshold, determining to switch to using the second voice signal to perform voice services; when the third duration is less than or equal to the third duration threshold, determining to still use the third voice signal to perform voice services.
[0016] In one possible implementation, determining whether to switch to using the second voice signal to perform voice services based on a third duration includes: determining whether to switch to using the third voice signal to perform voice services based on the third duration and a fourth duration, wherein the fourth duration is the duration for which the third voice signal has been continuously used to perform voice services.
[0017] In one possible implementation, determining whether to switch to using the third voice signal to perform voice services based on the third duration and the fourth duration includes: when the third duration is greater than a third duration threshold and the fourth duration is greater than a fourth duration threshold, determining to switch to using the second voice signal to perform voice services; when the third duration is less than or equal to the third duration threshold and / or the fourth duration is less than or equal to the fourth duration threshold, determining to still use the third voice signal to perform voice services.
[0018] In one possible implementation, the method further includes: obtaining a forced switching instruction, which instructs the use of a target voice signal to perform voice services, wherein the target voice signal is one of a second voice signal and a third voice signal; and switching to use the target voice signal to perform voice services when the voice signal currently used to perform voice services is different from the target voice signal.
[0019] It allows users to force a switch of the voice signal used to perform voice services when needed, making the switching more flexible and better able to adapt to user needs.
[0020] In one possible implementation, after switching to use the target voice signal for voice service execution, the method further includes: when the target voice signal is the second voice signal, obtaining a fifth duration based on the first voice signal, and determining whether to switch to use the third voice signal for voice service execution based on the fifth duration, where the fifth duration is the duration for which the noise energy of the current ambient noise signal has been continuously greater than a first energy threshold; when the target voice signal is the third voice signal, obtaining a sixth duration based on the first voice signal, and determining whether to switch to use the second voice signal for voice service execution based on the sixth duration, where the sixth duration is the duration for which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold. The combination of forced switching and adaptive switching can both meet user needs and ensure the stability of voice services.
[0021] In one possible implementation, the method further includes: at the start of a voice service, obtaining the initial noise energy of the ambient noise based on the first voice signal; if the initial noise energy is greater than a fifth energy threshold, determining to use the third voice signal to execute the voice service; and if the initial noise energy is less than or equal to the fifth energy threshold, determining to use the second voice signal to execute the voice service. Selecting the voice signal for execution based on the initial noise energy at the start of the voice service ensures a high signal-to-noise ratio for the voice signal in the initial stage of the voice service, thus guaranteeing the quality of the voice service.
[0022] In one possible implementation, the method further includes: extracting non-speech segments from the first speech signal to obtain an environmental noise signal; and acquiring the noise energy of the environmental noise signal. The first speech signal may also contain user speech signals. Extracting non-speech segments from the first speech signal yields a relatively pure environmental noise signal, thus accurately representing the current environmental noise state. Therefore, speech switching decisions based on the environmental noise state are more timely and accurate.
[0023] In one possible implementation, the first microphone is located on a microphone in a wearable device; or the first microphone is located on a microphone in a smart device connected to the wearable device.
[0024] In one possible implementation, performing voice services using a second voice signal acquired by a second microphone from a wearable device includes: denoising the second voice signal using a first voice signal to obtain a denoised voice signal; and performing voice services using the denoised voice signal. The first voice signal can accurately represent the current environmental noise level, and since both the first and second voice signals are acquired in the same environment, denoising the second voice signal using the first voice signal can more accurately filter out environmental noise in the second voice signal, resulting in a denoised voice signal with a higher signal-to-noise ratio. This improves the clarity of the user's voice and ensures the quality of voice services.
[0025] In one possible implementation, the second pickup is an air conduction microphone and the third pickup is a bone conduction microphone; or the second pickup is an omnidirectional air conduction microphone and the third pickup is a directional air conduction microphone.
[0026] A second aspect provides a speech signal processing apparatus. The apparatus includes a processing module for performing speech signal processing methods as described in the first aspect or any possible implementation thereof.
[0027] Specifically, the processing module is used to acquire a first-channel voice signal collected by a first microphone. This first-channel voice signal includes an ambient noise signal, which indicates the ambient noise level in the environment where the wearable device is located. The first microphone is used to collect ambient noise, and the ambient noise in the first-channel voice signal accurately characterizes the ambient noise level in the environment where the wearable device is located. During voice service execution using a second-channel voice signal collected by a second microphone of the wearable device, the processing module is used to acquire a first duration based on the first-channel voice signal. The first duration is the duration during which the noise energy of the current ambient noise signal has consistently exceeded a first energy threshold. The processing module is used to determine, based on the first duration, whether to switch to using a third-channel voice signal for voice service execution. This third-channel voice signal is collected by a third microphone of the wearable device, and when the noise energy of the ambient noise exceeds the first energy threshold, the signal-to-noise ratio (SNR) of the third-channel voice signal is greater than that of the second-channel voice signal.
[0028] In one possible implementation, the processing module is configured to: determine to switch to using the third voice signal to perform voice services when the first duration is greater than the first duration threshold; and determine to still use the second voice signal to perform voice services when the first duration is less than or equal to the first duration threshold.
[0029] In one possible implementation, the processing module is used to: determine whether to switch to using a third voice signal to perform voice services based on a first duration and a second duration, wherein the second duration is the duration for which the second voice signal has been continuously used to perform voice services.
[0030] In one possible implementation, the processing module is configured to: determine, when the first duration is greater than a first duration threshold and the second duration is greater than a second duration threshold, switch to using a third voice signal to perform voice services; and determine, when the first duration is less than or equal to the first duration threshold and / or the second duration is less than or equal to the second duration threshold, continue using the second voice signal to perform voice services. Optionally, the second duration threshold is greater than the first duration threshold.
[0031] In one possible implementation, the processing module is configured to: during the execution of voice services using the third voice signal, obtain a third duration based on the first voice signal, wherein the third duration is the duration during which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold, and the second energy threshold is less than or equal to a first energy threshold; determine whether to switch to using the second voice signal to execute voice services based on the third duration, wherein when the noise energy of the ambient noise is less than or equal to the second energy threshold, the signal-to-noise ratio of the second voice signal is greater than the signal-to-noise ratio of the third voice signal.
[0032] In one possible implementation, the processing module is configured to: determine to switch to using the second voice signal to perform voice services when the third duration is greater than the third duration threshold; and determine to still use the third voice signal to perform voice services when the third duration is less than or equal to the third duration threshold.
[0033] In one possible implementation, the processing module is used to: determine whether to switch to using the third voice signal to perform voice services based on the third duration and the fourth duration, where the fourth duration is the duration for which the third voice signal has been continuously used to perform voice services.
[0034] In one possible implementation, the processing module is configured to: determine to switch to using the second voice signal to perform voice services when the third duration is greater than the third duration threshold and the fourth duration is greater than the fourth duration threshold; and determine to still use the third voice signal to perform voice services when the third duration is less than or equal to the third duration threshold and / or the fourth duration is less than or equal to the fourth duration threshold.
[0035] In one possible implementation, the processing module is configured to: obtain a forced switching instruction, which instructs the use of a target voice signal to perform voice services, wherein the target voice signal is one of the second and third voice signals; and switch to using the target voice signal to perform voice services when the voice signal currently used to perform voice services is different from the target voice signal.
[0036] In one possible implementation, the processing module is configured to: when the target voice signal is the second voice signal, obtain a fifth duration based on the first voice signal, and determine whether to switch to using the third voice signal to perform voice services based on the fifth duration, wherein the fifth duration is the duration for which the noise energy of the current ambient noise signal has been continuously greater than a first energy threshold; when the target voice signal is the third voice signal, obtain a sixth duration based on the first voice signal, and determine whether to switch to using the second voice signal to perform voice services based on the sixth duration, wherein the sixth duration is the duration for which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold. The combination of forced switching and adaptive switching can both meet user needs and ensure the stability of voice services.
[0037] In one possible implementation, the processing module is configured to: at the start of a voice service, obtain the initial noise energy of the ambient noise based on the first voice signal; if the initial noise energy is greater than a fifth energy threshold, determine to use the third voice signal to execute the voice service; if the initial noise energy is less than or equal to the fifth energy threshold, determine to use the second voice signal to execute the voice service. Selecting the voice signal to be used for the voice service based on the initial noise energy at the start of the voice service ensures a high signal-to-noise ratio for the voice signal in the initial stage of the voice service, thus guaranteeing the quality of the voice service.
[0038] In one possible implementation, the processing module is used to: extract non-speech segments from the first speech signal to obtain an environmental noise signal; and acquire the noise energy of the environmental noise signal. The first speech signal may also contain user speech signals. Extracting non-speech segments from the first speech signal yields a relatively pure environmental noise signal, thus accurately representing the current environmental noise state. Therefore, speech switching decisions based on the environmental noise state are more timely and accurate.
[0039] In one possible implementation, the first microphone is located on a microphone in a wearable device; or the first microphone is located on a microphone in a smart device connected to the wearable device.
[0040] In one possible implementation, the processing module is used to: perform noise reduction processing on the second voice signal using the first voice signal to obtain a noise-reduced voice signal; and use the noise-reduced voice signal to perform voice services. The first voice signal can accurately represent the current environmental noise state, and since the first and second voice signals are acquired in the same environment, using the first voice signal to perform noise reduction processing on the second voice signal can more accurately filter out environmental noise in the second voice signal, thereby obtaining a noise-reduced voice signal with a higher signal-to-noise ratio. This improves the clarity of the user's voice and ensures the quality of voice services.
[0041] In one possible implementation, the second pickup is an air conduction microphone and the third pickup is a bone conduction microphone; or the second pickup is an omnidirectional air conduction microphone and the third pickup is a directional air conduction microphone.
[0042] A third aspect provides an electronic device, characterized in that the electronic device includes a processor and a memory, the processor being coupled to the memory, the processor being configured to execute the speech signal processing method of the first aspect or any embodiment of the first aspect based on instructions stored in the memory.
[0043] In one possible implementation, the electronic device is a wearable device, and the electronic device also includes a second microphone and a third microphone, the second microphone being used to acquire a second voice signal and the third microphone being used to acquire a third voice signal.
[0044] In one possible implementation, the electronic device further includes a first microphone for acquiring a first voice signal.
[0045] A fourth aspect provides a computer-readable storage medium, characterized in that it includes instructions that, when the computer-readable storage medium is run on a computer, cause the computer to perform the speech signal processing method of the first aspect or any embodiment of the first aspect. Attached Figure Description
[0046] Figure 1a A schematic diagram illustrating a real-time call between an air conduction microphone and a mobile phone provided in this application;
[0047] Figure 1b A schematic diagram illustrating a real-time call between a bone conduction microphone and a mobile phone provided in this application;
[0048] Figure 2 A schematic diagram of the system architecture involved in a speech processing method provided in this application;
[0049] Figure 3 A schematic diagram illustrating a microphone deployment method for a wearable device provided in this application;
[0050] Figure 4 A schematic diagram of the structure of an electronic device provided in this application;
[0051] Figure 5a A schematic diagram of the logic structure of an electronic device provided in this application;
[0052] Figure 5b for Figure 5a A diagram illustrating the interactions between the various modules;
[0053] Figure 6 A flowchart illustrating a speech processing method provided in this application;
[0054] Figure 7 A simulation diagram of voice switching based on the solution provided in this application;
[0055] Figure 8 This is a schematic diagram of the structure of a speech processing device provided in this application. Detailed Implementation
[0056] This application provides a voice signal processing method and related equipment to ensure the voice quality of voice services in complex scenarios.
[0057] The embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. As those skilled in the art will understand, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0058] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0059] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0060] In the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of different embodiments are consistent and can be referenced by each other. The technical features of different embodiments can be combined to form new embodiments according to their inherent logical relationship.
[0061] In voice scenarios such as calls, voice interaction, recording, voice entertainment, and video conferencing, users sometimes wear wearable devices such as headsets. These wearable devices collect user voice signals, enabling them or connected electronic devices to provide relevant voice services. Using wearable devices for voice services offers several advantages: firstly, it frees up users' hands, allowing them to perform other activities simultaneously; secondly, the closer proximity of the wearable device to the user's sound source allows for higher signal-to-noise ratio voice signal pickup, improving voice service quality; and thirdly, it reduces the risk of user privacy breaches and minimizes the impact on others, bringing convenience to users' work, study, and daily life.
[0062] Taking a phone call as an example, voice signals are mostly transmitted via air conduction, and the transmission process can be as follows: Figure 1a As shown, users A and B conduct voice calls using a wearable device (here, an earphone is used as an example) and an electronic device connected to the wearable device (here, a mobile phone is used as an example, but it could also be a computer or tablet, etc.). Taking A as the speaker and B as the listener, the transmission process is as follows: ① User A speaks, emitting a voice signal S; ② The air conduction microphone on the earphone of user A collects the voice signal S; ③ The earphone of user A sends the voice signal S to the mobile phone of user A; ④ The mobile phone of user A encodes and compresses the voice signal S and transmits it to the mobile phone of user B via a wireless network; ⑤ The mobile phone of user B decodes and restores the received signal to obtain the voice signal S; ⑥ The mobile phone of user B plays the voice signal S through the speaker of the mobile phone of user B (or the wearable device connected to the mobile phone of user B).
[0063] When the aforementioned air conduction speech signal is transmitted, the speech signal S, in addition to the user's voice on side A, also simultaneously captures ambient noise. If the ambient noise is high, it will affect the hearing effect of the user on side B. Therefore, in some high-noise scenarios, such as mines and rescue operations, bone conduction speech signals are generally used for information transmission. This is because bone conduction microphones capture less ambient noise and have a higher audio signal-to-noise ratio, which can greatly ensure the communication efficiency in these scenarios. Its transmission process is as follows: Figure 1b As shown, in a voice call between user A and user B via mobile phone, taking user A speaking and user B (assuming user B remains unchanged) listening as an example, the transmission process is as follows: ① User A speaks, emitting a voice signal S1; ② The bone conduction microphone on the head-mounted device (such as headphones) of user A is placed close to the face of user A, and the audio signal S2 (also called bone conduction voice signal S2) is collected based on skin vibration. This bone conduction voice signal S2 is sent to the mobile phone of user A (e.g., via Bluetooth connection between the head-mounted device and the mobile phone); ③ The mobile phone of user A encodes and compresses the bone conduction voice signal S2 and transmits it to the mobile phone of user B via wireless network; ④ The mobile phone of user B decodes and restores the received signal to obtain the bone conduction voice signal S2; ⑤ The mobile phone of user B plays the bone conduction voice signal S2 through the air conduction speaker of the mobile phone of user B.
[0064] Both air conduction and bone conduction speech signals are generated using the method of convolution of an excitation source into an excitation channel (i.e., excitation source * excitation channel = speech signal). However, their specific generation principles differ: While both use the vocal cords as the excitation source, the excitation channel for air conduction speech signals is the pharynx and oral cavity, while the excitation channel for bone conduction speech signals is muscles and bones. Because of these different excitation channels, the final sound quality differs significantly. Air conduction speech signals, due to air transmission, exhibit less distortion and higher brightness, but the sensitivity of air conduction microphones to environmental noise results in a higher level of ambient noise. Bone conduction speech signals, on the other hand, use solid and soft transmission channels. While this results in a higher signal-to-noise ratio, it also leads to greater distortion and a darker sound compared to air conduction, resulting in poorer listening comfort. More seriously, it can cause the other end (e.g., side B) to hear an unnatural sound from side A, potentially making it difficult to identify the speaker and impacting communication efficiency.
[0065] Therefore, there is an urgent need for a technical solution that can take into account various noise scenarios and ensure clear and stable voice signals under various complex noise conditions.
[0066] To address the aforementioned technical problems, this application provides the following technical solution.
[0067] like Figure 2 As shown, Figure 2 A schematic diagram of the system architecture involved in the speech processing method provided in this application. See also... Figure 2 The system may include a wearable device 201 and a smart device 202. The wearable device 201 and the smart device 202 communicate via a wired or wireless connection. Specifically, the wireless connection may be Bluetooth, wireless local area network (WLAN), ZigBee, or near field communication (NFC), or other next-generation short-range wireless communication technologies such as NearLink. In embodiments, the wearable device 201 may be a headset, smart glasses, an augmented reality (AR) headset, a virtual reality (VR) headset, or a neck massager. The smart device 202 may be a mobile phone, tablet, computer, or in-vehicle infotainment system.
[0068] In this embodiment, the wearable device 201 is used to collect voice signals and send the collected voice signals to the smart device 202. The smart device 202 is used to receive the voice signals sent by the wearable device 201 and perform corresponding voice tasks based on the received voice signals. In this embodiment, the voice service can be a call service, a voice interaction service, a recording service, a voice entertainment service (such as karaoke), or a video conferencing service, etc., that involves voice signal processing.
[0069] The system includes a first microphone (or sound sensor, microphone, etc.) for collecting ambient sound signals from the environment where the wearable device 201 is located. In one possible implementation, the first microphone can be a microphone mounted on the wearable device 201. In another possible implementation, the first microphone can also be a microphone mounted on the smart device 202. Since the wearable device 201 and the smart device 202 are close to each other and in the same environment, the ambient sound signal collected by the microphone on the smart device 202 can be considered as the ambient sound signal of the environment where the wearable device 201 is located. Furthermore, since the smart device 202 is at a certain distance from the user's sound source, the collected ambient sound signal contains less user voice signal, which can more accurately represent the noise situation in the environment. Optionally, in one possible implementation, the system also includes other devices in the same environment and connected to the smart device, such as wearable devices (e.g., smartwatches), smart devices (tablets, laptops), or IoT devices (smart home appliances, smart toys, smart robots, or industrial IoT devices), etc., and the first microphone can be a microphone on these other devices.
[0070] When the first microphone is a microphone on wearable device 201, it can be either a bone conduction microphone or an air conduction microphone. Optionally, the first microphone can be deployed facing the external environment and away from the human voice source to collect more accurate ambient noise. When the first microphone is a microphone on smart device 202, it can be an air conduction microphone. Of course, when the first microphone is a microphone on smart device 202, it can also be a bone conduction microphone.
[0071] Wearable device 201 includes at least two microphones, such as a second microphone and a third microphone. The second microphone and the third microphone are different microphones. In a low-noise environment, the signal-to-noise ratio (SNR) of the speech signal acquired by the second microphone is higher than that of the speech signal acquired by the third microphone, meaning that human voices are clearer in the speech signal acquired by the second microphone in a low-noise environment. In a high-noise environment, the SNR of the speech signal acquired by the third microphone is higher than that of the speech signal acquired by the second microphone, meaning that human voices are clearer in the speech signal acquired by the third microphone in a high-noise environment. In one possible implementation, the second microphone is an air conduction microphone, and the third microphone is a bone conduction microphone. In another possible implementation, the second microphone is an omnidirectional air conduction microphone, and the third microphone is a directional air conduction microphone.
[0072] The voice signal acquired in real time by the first microphone is called the first voice signal, which includes ambient noise. The voice signal acquired in real time by the second microphone is called the second voice signal. The voice signal acquired in real time by the third microphone is called the third voice signal. The second and third microphones are the main microphones, meaning the second and third voice signals are used to execute voice services. In this embodiment, the first microphone is an auxiliary microphone, and its acquired first voice signal is mainly used to analyze ambient noise conditions. The ambient noise conditions can be used to decide which voice signal, the second or the third, to use for voice services, achieving adaptive switching of voice signals. When executing voice services, at most one of the second or the third voice signal is used for processing at the same time. When preset voice switching conditions are met, the voice signal currently used for executing voice services can be switched from one voice signal to the other.
[0073] When the first microphone is a microphone on the wearable device 201, in one possible implementation, the first microphone and the second microphone can be the same microphone, and the first voice signal and the second voice signal are the same voice signal. This can reduce the number of microphones on the wearable device 201 and reduce the cost of the wearable device 201.
[0074] When the first microphone is a microphone on the wearable device 201, in another possible implementation, the first, second, and third microphones on the wearable device 201 are three different microphones. By setting a dedicated first microphone for collecting ambient noise, the accuracy of estimating the energy of ambient noise based on the first speech signal can be improved, thereby ensuring timely and accurate timing of voice switching and improving voice switching efficiency. Optionally, a microphone with lower sensitivity than the second microphone can be selected as the first microphone to reduce the influence of the user's voice signal in the first speech signal, increase the proportion of ambient noise, and enable the first speech signal to more accurately represent the ambient noise situation. Figure 3 As shown, Figure 3 A schematic diagram of a wearable device provided in this application. Figure 3 Taking headphones as an example of a wearable device, it's important to understand that the shape of the headphones here is for illustrative purposes only; headphones can also have other shapes, such as in-ear or neckband styles. The second and third microphones can be positioned close to the user, near their vocal cords, allowing them to more clearly capture the user's voice signal and improve the signal-to-noise ratio of the second and third voice signals. The position and orientation of the first microphone on the wearable device 201 can be carefully designed. For example, the first microphone can be positioned on the outside of the wearable device 21, facing away from the user. This ensures that when the user wears the device, the first microphone is further from the user's sound source, allowing for better acquisition of ambient noise signals while minimizing the acquisition of the user's own voice signal. Figure 3 The image only shows the possible configurations of the first, second, and third microphones of the wearable device 201 and should not be construed as a limitation of this application. The actual implementation may vary depending on the product form of the wearable device 201.
[0075] In one possible implementation, the wearable device 201 can determine in real time whether the voice switching conditions are met based on the first voice signal. If the conditions are met, it determines to switch to using the other voice signal between the second and third voice signals to perform the voice service. In this case, after determining the voice signal to be used for the voice service, the wearable device 201 can send only the switched voice signal to the smart device 202, without sending the original voice signal. The smart device 202 then uses the switched voice signal to perform the voice service. At this time, both the second and third microphones can be on, meaning they are still collecting voice signals in real time, but the wearable device 201 only sends the switched voice signal to the smart device 202. Alternatively, after determining which voice signal to switch to for voice services, the wearable device 201 can turn off the microphone corresponding to the voice signal used for voice services before the switch and turn on the microphone corresponding to the voice signal used for voice services after the switch. This activates the microphone currently needed between the second and third microphones and temporarily turns off the other microphone that is not currently needed, reducing the power consumption of the wearable device 201. Of course, the wearable device 201 can also simultaneously send the first and second voice signals to the smart device 202. After determining which voice signal to switch to for voice services, the wearable device 201 can send a switching command to the smart device 202, which will then switch the voice signal used for voice services according to the switching command and use the switched voice signal to perform the voice services.
[0076] In another possible implementation, the smart device 202 can determine in real time whether the voice switching conditions are met based on the first voice signal. When the first microphone is the microphone on the wearable device 201, the wearable device sends the first voice signal to the smart device 202 in real time. When the first microphone is the microphone on the smart device 202, the smart device 202 collects the first voice signal in real time through the first microphone. If the smart device 202 determines whether the voice switching conditions are met, the wearable device 201 can simultaneously send the first and second voice signals to the smart device 202. When the smart device 202 determines that the voice switching conditions are met, it determines to switch to using the other voice signal between the second and third voice signals to perform the voice service, and uses the switched voice signal to perform the voice service. Switching the voice signal used to perform the voice service at the backend (smart device 202) can reduce switching latency and reduce the voice stuttering and disjointed feeling introduced by the switching. Alternatively, if the smart device 202 determines whether the voice switching conditions are met, it sends a switching command to the wearable device 201 when the smart device 202 determines that the voice switching conditions are met. The wearable device 201 then sends the switched voice signal to the smart device 202.
[0077] The specific implementation of determining in real time whether the voice switching conditions are met based on the first voice signal will be described in the following method embodiment.
[0078] By setting at least two different microphones on the wearable device 201, the appropriate voice signal can be adaptively adjusted to perform voice services when the ambient noise changes. This ensures that voice services are performed with a higher signal-to-noise ratio and clearer voice signal, regardless of whether the environment is high-noise, low-noise, or when the ambient noise changes drastically, thereby improving the quality of voice services.
[0079] It should be noted that the system architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0080] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Optionally, the electronic device is... Figure 2 The wearable device 201 or smart device 202 shown is illustrated. The electronic device includes one or more processors 401, a communication bus 402, a memory 403, and one or more communication interfaces 404.
[0081] The processor 401 is a general-purpose central processing unit (CPU), a network processing unit (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. Optionally, the PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0082] The communication bus 402 is used to transmit information between the aforementioned components. Optionally, the communication bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus.
[0083] Optionally, the memory 403 may be a read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), optical disc (including compact disc read-only memory (CD-ROM), compressed optical disc, laser disc, digital versatile optical disc, Blu-ray disc, etc.), magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited thereto. The memory 403 exists independently and is connected to the processor 401 via a communication bus 402, or the memory 403 is integrated with the processor 401.
[0084] Communication interface 404 uses any transceiver-like device for communicating with other devices or communication networks. Communication interface 404 includes a wired communication interface, and optionally, a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. Optionally, the Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a Bluetooth interface, a ZigBee interface, an NFC interface, a Starlink interface, a cellular network communication interface, or a combination thereof.
[0085] Optionally, in some embodiments, the electronic device includes multiple processors, such as Figure 4 The processors 401 and 405 are shown. Each of these processors is a single-core processor or a multi-core processor. Optionally, a processor here refers to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0086] When electronic devices are Figure 2 The wearable device 201 shown also includes a second microphone (not shown) and a third microphone (not shown). The second microphone is used to acquire a second voice signal, and the third microphone is used to acquire a third voice signal. The communication interface 404 is used to send the second voice signal and / or the third voice signal to the smart device. Optionally, the electronic device may also include a first microphone for acquiring the first voice signal. Thus, the electronic device can determine whether the voice switching conditions are met based on the first voice signal, and determine whether to switch the voice signal used for performing voice services from the second voice signal to the third voice signal, or vice versa. Optionally, the communication interface 404 is also used to send the first voice signal to the smart device. Thus, the smart device can determine whether the voice switching conditions are met based on the first voice signal, and determine whether to switch the voice signal used for performing voice services from the second voice signal to the third voice signal, or vice versa.
[0087] When electronic devices are Figure 2When the smart device 202 shown is included, optionally, the electronic device also includes an output device (not shown) and an input device (not shown). The output device communicates with the processor and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor and can receive user input in various ways. For example, the input device 407 includes one or more of a mouse, keyboard, touch screen device, or sensing device. The communication interface 404 is used to receive a second and / or a third voice signal sent by the wearable device. Optionally, the communication interface 404 is used to receive a first voice signal sent by the wearable device. Optionally, the electronic device may also include a first microphone for acquiring the first voice signal. Thus, the intelligent device can determine whether the voice switching conditions are met based on the first voice signal, and decide whether to switch the voice signal used to perform voice services from the second voice signal to the third voice signal, or from the third voice signal to the second voice signal.
[0088] In some embodiments, memory 403 stores program code 406 for executing the scheme of this application, and processor 401 is capable of executing the program code 406 stored in memory 403. The program code 406 includes one or more software modules, and the electronic device can implement the following by means of processor 401 and program code 406 in memory 403. Figure 6 The speech processing method provided in the embodiment.
[0089] like Figure 5a and Figure 5b As shown, Figure 5a A schematic diagram of the logic structure of an electronic device provided in this application; Figure 5b for Figure 5a A schematic diagram illustrating the interactions between the various modules. In this embodiment, the electronic device includes a first-channel voice signal acquisition module, a second-channel voice signal acquisition module, a third-channel voice signal acquisition module, an environmental noise energy calculation module, a handover judgment module, a handover control module, and a voice service processing module.
[0090] The system includes a first-channel voice signal acquisition module for acquiring the first-channel voice signal collected in real-time by the first microphone. A second-channel voice signal acquisition module for acquiring the second-channel voice signal collected in real-time by the second microphone. A third-channel voice signal acquisition module for acquiring the third-channel voice signal collected in real-time by the third microphone.
[0091] The environmental noise energy calculation module is used to calculate the noise energy of the environmental noise signal in the first voice signal in real time based on the first voice signal.
[0092] During the current period of performing voice service using the second voice signal, the switching determination module compares the noise energy with a first noise threshold after each acquisition of noise energy, and counts the first duration for which the noise energy is continuously greater than the first noise threshold. In one possible implementation, the switching determination module compares the first duration with a first duration threshold; when the first duration is greater than the first duration threshold, it determines to switch to performing voice service using the third voice signal and generates a switching instruction. In another possible implementation, the switching determination module compares the first duration with the first duration threshold and also compares a second duration with a second duration threshold; when both the first duration and the second duration are greater than the second duration threshold, it determines to switch to performing voice service using the third voice signal. Here, the second duration is the duration for which the second voice signal has been continuously acquired to perform the voice service, and a switching instruction is generated.
[0093] During the current period of using the third voice signal to perform voice service, the switching determination module compares the noise energy with a second noise threshold after each acquisition of noise energy, and counts the third duration during which the noise energy is continuously greater than the second noise threshold. In one possible implementation, the switching determination module compares the third duration with a third duration threshold; if the third duration is greater than the third duration threshold, it determines to switch to using the second voice signal to perform voice service and generates a switching command. In another possible implementation, the switching determination module compares the third duration with the third duration threshold and also compares a fourth duration with a fourth duration threshold; if both the third duration and the fourth duration are greater than the third duration threshold, it determines to switch to using the second voice signal to perform voice service. Here, the fourth duration is the duration during which the third voice signal has been continuously acquired to perform the voice service, and a switching command is generated.
[0094] According to the switching instruction, the switching control module switches the voice signal used to perform voice services from the second voice signal to the third voice signal, or switches the voice signal used to perform voice services from the third voice signal to the second voice signal.
[0095] The voice service processing module is used to execute voice services based on the switched voice signal. This module can perform noise reduction, echo reduction, and encoding on the voice signal, and then execute the corresponding voice services based on the processed voice signal.
[0096] like Figure 6 As shown, Figure 6 This is a flowchart illustrating a speech processing method provided in this application. This embodiment is derived from... Figure 4 The electronic device in the middle can perform the operation, and the electronic device can be Figure 2 Wearable devices in the middle can also provide Figure 2 The smart device in the example. This embodiment includes the following steps:
[0097] S601: Acquire the first voice signal collected by the first microphone. The first voice signal includes an ambient noise signal, which indicates the ambient noise of the environment in which the wearable device is located.
[0098] The first microphone can be a microphone on a wearable device or a microphone on a smart device connected to the wearable device. The first microphone is used to collect ambient noise from the environment in which the wearable device is located. Therefore, the first voice signal collected by the first microphone includes the ambient noise signal. The first voice signal is the voice signal collected by the first microphone in real time, and the electronic device also performs noise analysis on the latest voice signal collected by the first microphone in real time.
[0099] In one possible implementation, the first audio signal can be used as an ambient noise signal.
[0100] In another possible implementation, non-speech segments from the first speech signal can be extracted as ambient sound signals. For example, voice activity detection (VAD) can be used to extract non-speech segments from the first speech signal. Thus, the ambient sound signals can more accurately represent the noise level in the environment, ensuring the accuracy and efficiency of voice switching decisions.
[0101] S602: During the execution of voice services using the second voice signal acquired by the second microphone of the wearable device, a first duration is obtained based on the first voice signal. The first duration is the duration during which the noise energy of the current environmental noise signal has been continuously greater than a first energy threshold.
[0102] During the execution of voice services using the second voice signal, a first duration is obtained based on the first voice signal. The first duration is the duration for which the noise energy of the current ambient noise signal has consistently exceeded a first energy threshold.
[0103] The electronic device calculates the noise energy of the latest environmental noise signal and determines whether the noise energy is greater than a first noise threshold. If the noise energy is greater than the first noise threshold, it records the first duration in the time domain for which the noise energy of the environmental noise signal is continuously greater than the first energy threshold up to the present.
[0104] Specifically, the electronic device segments the ambient noise signal into frames in the time domain and then calculates the noise energy of each frame. The noise energy can be the square of the amplitude of the ambient noise signal in that frame. In another implementation, the noise energy can also refer to parameters characterizing the intensity of ambient noise, such as loudness, power, sound intensity, or sound pressure. The noise energy of each frame is compared with a first energy threshold. If the noise energy of the frame is greater than the first energy threshold, the value of a first counter is incremented by 1. If the noise energy of the frame is less than or equal to the first energy threshold, the value of the first counter is reset to 0. It should be noted that the first counter needs to count according to the time sequence of the frames. For example, a set of time-domain consecutive frames (frame 1, frame 2, frame 3, frame 4), where frame 1 is the earliest frame in the time domain and frame 4 is the latest frame in the time domain, if the noise energy of frame 1 is greater than a first energy threshold, the value of the first counter is incremented by 1; if the noise energy of frame 2 is greater than the first energy threshold, the value of the first counter is incremented by 1 again; if the noise energy of frame 3 is less than the first energy threshold, the value of the first counter is cleared to 0, and the first duration is 0; if the noise energy of frame 4 is greater than the first energy threshold, the value of the first counter is incremented by 1, and the value of the first counter is 1.
[0105] Of course, the duration for which the noise energy of the environmental noise signal has been greater than the first energy threshold can also refer to the cumulative duration within the sliding time window for which the noise energy of the environmental noise signal is greater than the first energy threshold in the time domain.
[0106] S603: Determine whether to switch to using the third voice signal to perform voice services based on the first duration. The third voice signal is collected by the third microphone of the wearable device. When the noise energy of the ambient noise is greater than the first energy threshold, the signal-to-noise ratio of the third voice signal is greater than that of the second voice signal.
[0107] The first duration is a key condition for determining whether to switch the voice signal used to perform voice services to the third voice signal. If the first duration is greater than the first duration threshold, it indicates that the current ambient noise is in a relatively stable high-noise state, which can avoid frequent switching of voice signals in complex ambient noise, thus preventing the continuity of speech from being affected.
[0108] In one possible implementation, a first duration exceeding a first duration threshold can be used as the sole condition for satisfying the voice switching condition. Specifically, the electronic device determines whether the first duration is greater than the first duration threshold. If the first duration is greater than the first duration threshold, it determines to switch to using the third voice signal to perform voice services. If the first duration is less than or equal to the first duration threshold, it determines to still use the second voice signal to perform voice services. In another possible implementation, the current value m of the first counter (m is a natural number, representing that the noise energy of m consecutive frames in the time domain is greater than the first energy threshold; since the frame length is fixed, the value m can represent the first duration) can be compared with a first preset value n (n is a positive integer, representing the threshold number of consecutive frames greater than the first energy threshold; since the frame length is fixed, n can also represent the first duration threshold). When m is greater than n, the first duration can be considered to be greater than the first duration threshold; when m is less than or equal to n, the first duration can be considered to be less than or equal to the first duration threshold.
[0109] In another possible implementation, a voice switching condition can be established if the first duration is greater than a first duration threshold and the second duration is greater than a second duration threshold. The second duration is the duration during which the second voice signal has been continuously used to perform voice services. Optionally, the second duration threshold is greater than the first duration threshold. The second duration threshold can be considered a switching protection period; that is, after switching voice signals, the duration of using the switched voice signal must be greater than the second duration threshold before switching voice signals again is allowed, to avoid frequent voice signal switching and affecting voice service quality. Specifically, the electronic device compares the first duration with the first duration threshold and compares the second duration with the second duration threshold. If the first duration is greater than the first duration threshold and the second duration is greater than the second duration threshold, the voice switching condition is considered met, and the system determines to switch to using the third voice signal to perform voice services. If the first duration is less than or equal to the first duration threshold and / or the second duration is less than or equal to the second duration threshold, the voice switching condition is considered not met, and the system determines to continue using the second voice signal to perform voice services.
[0110] The first duration threshold ensures that the voice signal will not switch if the noise energy of a particular frame exceeds the first energy threshold, thus guaranteeing the stability and continuity of the voice service. The second duration threshold ensures that when switching to the second voice signal for voice service execution, the signal will not immediately switch to the third voice signal within a short period of time, thus guaranteeing the stability and continuity of the voice service.
[0111] In this embodiment, when the noise energy of the ambient noise is greater than the first energy threshold, the signal-to-noise ratio of the third voice signal is greater than that of the second voice signal. That is, in a relatively noisy environment, the voice signal used to perform voice services is switched to a voice signal with a higher signal-to-noise ratio in the current environment, so as to ensure that the voice signal remains clear in a high-noise environment, thereby ensuring the quality of voice services.
[0112] S604: During the execution of voice services using the third voice signal, a third duration is obtained based on the first voice signal. The third duration is the duration during which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold, and the second energy threshold is less than or equal to a first energy threshold.
[0113] During the execution of voice services using the third voice signal, a third duration is obtained based on the first voice signal. The third duration is the duration for which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold.
[0114] The electronic device calculates the noise energy of the latest environmental noise signal and determines whether the noise energy is less than or equal to a second energy threshold. When the noise energy is less than or equal to the second energy threshold, it records the third duration in the time domain for which the noise energy of the environmental noise signal is continuously less than or equal to the second energy threshold.
[0115] Specifically, the electronic device divides the ambient noise signal into frames in the time domain and then calculates the noise energy of each frame. The noise energy is the square of the amplitude of the ambient noise signal in that frame. The noise energy of each frame is compared with a second energy threshold. If the noise energy of the frame is greater than the second energy threshold, the value of the second counter is incremented by 1. If the noise energy of the frame is greater than the second energy threshold, the value of the first counter is reset to 0. It should be noted that the second counter needs to count according to the time sequence of the frames.
[0116] Of course, the duration during which the noise energy of the environmental noise signal has been continuously less than or equal to the second energy threshold can also refer to the cumulative duration within the sliding time window during which the noise energy of the environmental noise signal is less than or equal to the second energy threshold in the time domain.
[0117] In this embodiment, the second energy threshold is less than or equal to the first energy threshold. The first duration threshold and the third duration threshold can be the same or different. The second duration threshold and the fourth duration threshold can be the same or different.
[0118] S605: Determine whether to switch to using the second voice signal to perform voice services based on the third duration. When the noise energy of the ambient noise is less than or equal to the second energy threshold, the signal-to-noise ratio of the second voice signal is greater than that of the third voice signal.
[0119] The third duration is a crucial condition for determining whether to switch the voice signal used for voice services to the second voice signal. If the second duration is longer than the first duration threshold, it indicates that the current ambient noise is in a relatively stable low-noise state, which can avoid frequent switching of voice signals affecting the continuity of speech in complex ambient noise.
[0120] In one possible implementation, a third duration exceeding a third duration threshold can be used as the sole condition for satisfying the current voice switching condition. Specifically, the electronic device determines whether the third duration is greater than the third duration threshold. If the third duration is greater than the third duration threshold, it determines to switch to using the second voice signal to perform voice services. If the third duration is less than or equal to the third duration threshold, it determines to still use the third voice signal to perform voice services. In another possible implementation, the current value p of the second counter (p is a natural number, representing that the noise energy of p consecutive frames in the time domain is greater than the first energy threshold; since the frame length is fixed, the value p can represent the third duration) can be compared with a second preset value q (q is a positive integer, representing the threshold for the number of consecutive frames greater than the second energy threshold; since the frame length is fixed, q can also represent the third duration threshold). When p is greater than q, the third duration can be considered to be greater than the third duration threshold; when p is less than or equal to q, the third duration can be considered to be less than or equal to the third duration threshold.
[0121] In another possible implementation, a third duration greater than a third duration threshold and a fourth duration greater than a fourth duration threshold can be used as voice switching conditions. The fourth duration is the duration during which the third voice signal has been continuously used to perform voice services. Optionally, the fourth duration threshold is greater than the third duration threshold. The fourth duration threshold can be considered a switching protection period; that is, after switching voice signals, the duration of using the switched voice signal must be greater than the fourth duration threshold before switching voice signals again is allowed, to avoid frequent voice signal switching and affecting voice service quality. Specifically, the electronic device compares the third duration with the third duration threshold and compares the fourth duration with the fourth duration threshold. When both the third duration and the fourth duration are greater than the third duration threshold, the voice switching conditions are considered met, and the system determines to switch to using the third voice signal to perform voice services. When the third duration is less than or equal to the third duration threshold and / or the fourth duration is less than or equal to the fourth duration threshold, the voice switching conditions are considered not met, and the system determines to continue using the third voice signal to perform voice services.
[0122] The third duration threshold ensures that the voice signal will not switch even if the noise energy of a frame is less than or equal to the second energy threshold, thus guaranteeing the stability and continuity of the voice service. The fourth duration threshold ensures that when switching to the third voice signal for voice service, the system will not immediately switch back to the second voice signal within a short period of time, thus guaranteeing the stability and continuity of the voice service.
[0123] In this embodiment, when the noise energy of the ambient noise is less than or equal to the second energy threshold, the signal-to-noise ratio of the second voice signal is greater than that of the third voice signal. That is, in a low-noise environment, the voice signal used to perform voice services is switched to a voice signal with a higher signal-to-noise ratio in the current environment, so as to ensure that the voice signal remains clear in a high-noise environment, thereby ensuring the quality of voice services.
[0124] In this embodiment, the wearable device is equipped with at least two different microphones. The second microphone has a higher signal-to-noise ratio (SNR) in low-noise environments, and the third microphone has a higher SNR in high-noise environments. The duration of the current environment continuously in a certain state is obtained based on the ambient noise signal, and the environment is determined to be either high-noise or low-noise based on the duration. The system then adaptively switches the voice signal used for voice services, supporting bidirectional switching to ensure high SNR in complex environments, clear and reliable voice communication, and stable voice service. Furthermore, this embodiment sets a switching protection time interval to prevent frequent voice signal switching from affecting voice service quality. Moreover, this embodiment does not require complex noise reduction algorithms, yet it can ensure voice service processing based on high SNR voice signals in all scenarios. This reduces the computational requirements of electronic devices and the requirements for noise reduction algorithms, ensuring stable voice services at a low cost.
[0125] Optionally, the electronic device has an adaptive switching function (i.e. Figure 6 The system includes a forced switching function and an adaptive switching function. When the forced switching function is on and the adaptive switching function is off, the voice signal used for voice services is switched according to the forced switching instruction. When the forced switching function is on and the adaptive switching function is on, the forced switching instruction is executed first. Specifically, when a user issues a forced switching instruction due to actual needs, the forced switching instruction instructs the user to switch to the target voice signal between the first and second voice signals. The forced switching instruction is executed first. If the current voice signal used for voice services is inconsistent with the target voice signal, the system switches to use the target voice signal to perform voice services. After a forced switching is executed, the voice signal is switched according to the adaptive switching instruction when the switching conditions are met. When the forced switching function is off and the adaptive switching function is on, the voice signal is switched only according to the adaptive switching instruction. When both the forced switching function and the adaptive switching function are off, the current voice signal is used to perform voice services, and no switching is performed.
[0126] Optionally, the above description outlines how to adaptively switch the voice signal used to perform the voice service during its execution. At the start of a voice service, the initial voice signal used to perform the service can be selected using the following methods. For example, a default initial voice signal can be set, and the service can be performed using this default signal at the start of the service. The default initial voice signal can be either the second or third voice signal. Alternatively, the choice of which voice signal to use can be determined based on the noise energy of the ambient noise signal at the start of the service. Specifically, if the initial noise energy of the ambient noise signal is greater than a third energy threshold, the third voice signal is selected to perform the voice service; if the initial noise energy is less than or equal to the third energy threshold, the second voice signal is selected. The third energy threshold can be greater than or equal to the second energy threshold and less than or equal to the first energy threshold. Of course, the third energy threshold can also be greater than the first energy threshold or less than the second energy threshold; this is not limited here.
[0127] Optionally, when using the second audio signal to perform a speech task, the first audio signal can be used to denoise the second audio signal. The denoising process of the first audio signal on the second audio signal is shown in the formula below. This processing is performed in the frequency domain; that is, a Fast Fourier Transform (FFT) is first performed on y (the first audio signal) and x (the second audio signal) to transform them to the frequency domain before processing. It can be understood that when processing the first and second audio signals, each frame of data after windowing and segmentation of both the first and second audio signals is processed separately.
[0128]
[0129] Where s(w) is the denoised speech signal, which is a frequency domain signal. x(w) is the frequency domain signal corresponding to the second speech signal, and y(w) is the frequency domain signal corresponding to the first speech signal. This represents the frequency domain signal related to x(w) and y(w). The formula means that by subtracting the frequency domain signal (i.e., the frequency domain signal of noise) related to x(w) from x(w), the denoised speech signal in the frequency domain is obtained.
[0130] That is, the part of the second voice signal that is strongly correlated with the first voice signal is filtered out. Since the first voice signal is mainly noise signal and the first and second voice signals are voice signals collected in the same environment, the part of the second voice signal that is strongly correlated with the first voice signal can be considered as noise. The remaining signal s(w) after filtering out noise is mainly human voice signal with a higher signal-to-noise ratio, which is used as the noise-reduced voice signal for subsequent business processing.
[0131] In call scenarios, subsequent processing includes acoustic processing such as echo cancellation and reverberation cancellation. The encoded audio signal, after undergoing these processes, is then transmitted to the other end via the wireless network. In recording scenarios, subsequent processing includes storing the denoised audio signal. In voice interaction scenarios, subsequent processing includes performing speech recognition on the denoised audio signal and executing related tasks.
[0132] To make this solution easier to understand, for example, such as Figure 7 As shown, Figure 7 A simulation diagram of voice switching based on the scheme provided in this application. Figure 7 Taking an air conduction microphone and a bone conduction microphone as examples, the first capability threshold is E2, and the second energy threshold is E1. At the start of the voice service, the voice signal collected by the air conduction microphone is used. The timing time T1 is the first duration threshold, the protection time T2 is the second duration threshold, the duration T3 is the third duration threshold, and the protection time T4 is the fourth duration threshold. It can be seen that after the noise energy (ambient sound energy) of the ambient noise signal reaches the threshold E2 for a first duration (the number of consecutive frames with ambient sound energy greater than the threshold E2 in the time domain satisfies count A1) and this duration exceeds the duration T1, the voice signal collected by the bone conduction microphone is switched to be used for the voice service. After switching to the bone conduction microphone, if the second duration (satisfying count A2) of continuously using the voice signal collected by the bone conduction microphone for the voice service exceeds the protection time T2, switching back to the air conduction microphone is allowed. However, at this time, the ambient sound energy condition is not met, and the voice signal collected by the bone conduction microphone is still used for the voice service. Once the ambient sound energy of a frame is less than the threshold E1, the system begins counting the number of consecutive frames with ambient sound energy less than E1. When the count reaches the third duration (satisfying count A3), the system switches to using the voice signal collected by the air conduction microphone for voice service execution. After switching to the air conduction microphone, if the fourth duration (satisfying count A4) of continuous use of the voice signal collected by the air conduction microphone for voice service execution exceeds the protection time T4, switching to the bone conduction microphone is permitted. However, if the ambient sound energy condition is not met at this point, the voice signal collected by the air conduction microphone will still be used for voice service execution.
[0133] Based on the same inventive concept, such as Figure 8 As shown, this application also provides a voice processing device. The voice processing device 800 includes a processing module 801. The voice processing device 800 can be applied to wearable devices, such as headphones, smart glasses, AR headsets, VR headsets, or neck massagers. The voice processing device 800 can be a wearable device, or a functional module or hardware module (such as a chip) within a wearable device. The voice processing device 800 can be applied to smart devices, such as mobile phones, tablets, computers, and in-vehicle systems. The voice processing device 800 can be a smart device, or a functional module or hardware module (such as a chip) within a smart device.
[0134] Processing module 801 is used to acquire a first-channel voice signal collected by a first microphone. The first-channel voice signal includes an ambient noise signal, which indicates the ambient noise level of the environment in which the wearable device is located. The first microphone is used to collect ambient noise, and the ambient noise in the first-channel voice signal accurately characterizes the ambient noise level of the environment in which the wearable device is located. During the execution of voice services using a second-channel voice signal collected by a second microphone of the wearable device, the processing module is used to acquire a first duration based on the first-channel voice signal. The first duration is the duration during which the noise energy of the current ambient noise signal has been continuously greater than a first energy threshold. The processing module is used to determine, based on the first duration, whether to switch to using a third-channel voice signal to execute voice services. The third-channel voice signal is collected by a third microphone of the wearable device. When the noise energy of the ambient noise is greater than the first energy threshold, the signal-to-noise ratio (SNR) of the third-channel voice signal is greater than that of the second-channel voice signal.
[0135] In one possible implementation, processing module 801 is configured to determine, when the first duration is greater than a first duration threshold, to switch to using a third voice signal to perform voice services. Processing module 801 is also configured to determine, when the first duration is less than or equal to the first duration threshold, to still use the second voice signal to perform voice services.
[0136] In one possible implementation, the processing module 801 is used to determine whether to switch to using a third voice signal to perform voice services based on a first duration and a second duration, wherein the second duration is the duration during which the second voice signal has been continuously used to perform voice services.
[0137] In one possible implementation, processing module 801 is configured to determine, when the first duration is greater than a first duration threshold and the second duration is greater than a second duration threshold, to switch to using a third voice signal to perform voice services. Processing module 801 is also configured to determine, when the first duration is less than or equal to the first duration threshold and / or the second duration is less than or equal to the second duration threshold, to still use the second voice signal to perform voice services. Optionally, the second duration threshold is greater than the first duration threshold.
[0138] In one possible implementation, processing module 801 is configured to, during the execution of a voice service using a third voice signal, obtain a third duration based on the first voice signal. The third duration is the duration during which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold, where the second energy threshold is less than or equal to a first energy threshold. Processing module 801 is configured to determine, based on the third duration, whether to switch to executing the voice service using the second voice signal. When the noise energy of the ambient noise is less than or equal to the second energy threshold, the signal-to-noise ratio (SNR) of the second voice signal is greater than the SNR of the third voice signal.
[0139] In one possible implementation, processing module 801 is configured to determine, when the third duration is greater than a third duration threshold, to switch to using the second voice signal to perform voice services. Processing module 801 is also configured to determine, when the third duration is less than or equal to the third duration threshold, to still use the third voice signal to perform voice services.
[0140] In one possible implementation, the processing module 801 is used to determine whether to switch to using the third voice signal to perform voice services based on the third duration and the fourth duration, where the fourth duration is the duration for which the third voice signal has been continuously used to perform voice services.
[0141] In one possible implementation, processing module 801 is configured to determine, when the third duration is greater than a third duration threshold and the fourth duration is greater than a fourth duration threshold, to switch to using the second voice signal to perform voice services. Processing module 801 is also configured to determine, when the third duration is less than or equal to the third duration threshold and / or the fourth duration is less than or equal to the fourth duration threshold, to still use the third voice signal to perform voice services.
[0142] In one possible implementation, processing module 801 is configured to acquire a forced switching instruction, which instructs the use of a target voice signal to perform the voice service. The target voice signal is one of the second and third voice signals. Processing module 801 is also configured to switch to using the target voice signal to perform the voice service when the currently used voice signal differs from the target voice signal.
[0143] In one possible implementation, processing module 801 is used to, when the target voice signal is the second voice signal, obtain a fifth duration based on the first voice signal, and determine whether to switch to using the third voice signal to perform voice services based on the fifth duration. The fifth duration is the duration for which the noise energy of the current ambient noise signal has been continuously greater than a first energy threshold. Processing module 801 is also used to, when the target voice signal is the third voice signal, obtain a sixth duration based on the first voice signal, and determine whether to switch to using the second voice signal to perform voice services based on the sixth duration. The sixth duration is the duration for which the noise energy of the current ambient noise signal has been continuously less than or equal to a second energy threshold. The combination of forced switching and adaptive switching can both meet user needs and ensure the stability of voice services.
[0144] In one possible implementation, processing module 801 is used to obtain the initial noise energy of the ambient noise based on the first voice signal at the start of the voice service. Processing module 801 is also used to determine whether to use the third voice signal to perform the voice service if the initial noise energy is greater than a fifth energy threshold. Furthermore, processing module 801 is used to determine whether to use the second voice signal to perform the voice service if the initial noise energy is less than or equal to the fifth energy threshold. By selecting the voice signal to be used for the voice service based on the initial noise energy at the start of the voice service, a high signal-to-noise ratio can be ensured for the voice signal in the initial stage of the voice service, thus guaranteeing the quality of the voice service.
[0145] In one possible implementation, processing module 801 is used to extract non-speech segments from the first speech signal to obtain an environmental noise signal. Processing module 801 is also used to acquire the noise energy of the environmental noise signal. The first speech signal may also contain user speech signals; extracting non-speech segments from the first speech signal yields a relatively pure environmental noise signal. Therefore, the environmental noise signal can accurately characterize the current environmental noise state, making speech switching decisions based on the environmental noise state more timely and accurate.
[0146] In one possible implementation, the first microphone is located on a microphone in a wearable device; or the first microphone is located on a microphone in a smart device connected to the wearable device.
[0147] In one possible implementation, processing module 801 is used to perform noise reduction processing on the second voice signal using the first voice signal to obtain a noise-reduced voice signal. Processing module 801 is then used to perform voice services using the noise-reduced voice signal. The first voice signal can accurately represent the current environmental noise state, and since the first and second voice signals are acquired in the same environment, using the first voice signal to perform noise reduction processing on the second voice signal can more accurately filter out environmental noise in the second voice signal, thereby obtaining a noise-reduced voice signal with a higher signal-to-noise ratio. This improves the clarity of the user's voice and ensures the quality of voice services.
[0148] In one possible implementation, the second pickup is an air conduction microphone and the third pickup is a bone conduction microphone; or the second pickup is an omnidirectional air conduction microphone and the third pickup is a directional air conduction microphone.
[0149] Optionally, the voice processing device 800 may further include a transceiver module 802. When the voice processing device 800 is applied to a wearable device, the transceiver module 802 is used to send a second or third voice signal to the smart device. Optionally, the transceiver module 802 is also used to send a first voice signal to the smart device.
[0150] When the voice processing device 800 is applied to a smart device, the transceiver module 802 is used to receive a second or third voice signal sent by the wearable device. Optionally, the transceiver module 802 is also used to receive a first voice signal sent by the wearable device.
[0151] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the signal processing method flow of any of the above method embodiments.
[0152] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0153] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical or other forms.
[0154] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0155] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0156] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of this application can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A speech signal processing method, characterized in that, The method includes: A first voice signal collected by a first microphone is acquired, the first voice signal including an ambient noise signal, the ambient noise signal indicating the ambient noise of the environment in which the wearable device is located; the proportion of ambient noise in the first voice signal is higher than the proportion of ambient noise in the second voice signal collected by the second microphone of the wearable device. During the execution of voice services using the second voice signal collected by the second microphone of the wearable device, a first duration is obtained based on the first voice signal. The first duration is the duration during which the noise energy of the current environmental noise signal has been greater than a first energy threshold. Whether to switch to using a third voice signal to perform the voice service is determined based on the first duration and the second duration. The third voice signal is collected by the third microphone of the wearable device. When the noise energy of the ambient noise is greater than the first energy threshold, the signal-to-noise ratio of the third voice signal is greater than the signal-to-noise ratio of the second voice signal. The second duration is the duration during which the second voice signal has been continuously used to perform the voice service. The first pickup, the second pickup, and the third pickup are three different pickups.
2. The method according to claim 1, characterized in that, The step of determining whether to switch to using the third voice signal to perform the voice service based on the first duration includes: When the first duration exceeds the first duration threshold, it is determined to switch to using the third voice signal to perform the voice service; If the first duration is less than or equal to the first duration threshold, it is determined that the second voice signal will still be used to perform the voice service.
3. The method according to claim 1, characterized in that, The step of determining whether to switch to using the third voice signal to perform the voice service based on the first duration and the second duration includes: When the first duration is greater than the first duration threshold and the second duration is greater than the second duration threshold, it is determined that the voice service will be switched to be performed using the third voice signal. If the first duration is less than or equal to the first duration threshold, and / or the second duration is less than or equal to the second duration threshold, it is determined that the second voice signal will still be used to perform the voice service.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: During the execution of voice services using the third voice signal, a third duration is obtained based on the first voice signal. The third duration is the duration during which the noise energy of the current environmental noise signal has been continuously less than or equal to a second energy threshold, where the second energy threshold is less than or equal to the first energy threshold. Based on the third duration, it is determined whether to switch to using the second voice signal to perform the voice service. When the noise energy of the ambient noise is less than or equal to the second energy threshold, the signal-to-noise ratio of the second voice signal is greater than the signal-to-noise ratio of the third voice signal.
5. The method according to claim 4, characterized in that, The step of determining whether to switch to using the second voice signal to perform the voice service based on the third duration includes: When the third duration exceeds the third duration threshold, it is determined to switch to using the second voice signal to perform the voice service; If the third duration is less than or equal to the third duration threshold, it is determined that the third voice signal will still be used to perform the voice service.
6. The method according to claim 4, characterized in that, The step of determining whether to switch to using the second voice signal to perform the voice service based on the third duration includes: Whether to switch to using the third voice signal to perform the voice service is determined based on the third duration and the fourth duration, wherein the fourth duration is the duration during which the third voice signal has been continuously used to perform the voice service.
7. The method according to claim 6, characterized in that, The step of determining whether to switch to using the third voice signal to perform the voice service based on the third and fourth durations includes: When the third duration is greater than the third duration threshold and the fourth duration is greater than the fourth duration threshold, it is determined that the voice service will be switched to be performed using the second voice signal. When the third duration is less than or equal to the third duration threshold, and / or the fourth duration is less than or equal to the fourth duration threshold, it is determined that the third voice signal will still be used to perform the voice service.
8. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain a forced handover instruction, the forced handover instruction instructing the use of a target voice signal to execute the voice service, the target voice signal being one of the second voice signal and the third voice signal; When the voice signal currently used to perform the voice service is different from the target voice signal, the system switches to use the target voice signal to perform the voice service.
9. The method according to claim 8, characterized in that, After switching to using the target voice signal to perform the voice service, the method further includes: When the target voice signal is the second voice signal, a fifth duration is obtained based on the first voice signal, and it is determined whether to switch to using the third voice signal to perform the voice service based on the fifth duration. The fifth duration is the duration during which the noise energy of the current environmental noise signal has been greater than the first energy threshold. When the target voice signal is the third voice signal, a sixth duration is obtained based on the first voice signal, and it is determined whether to switch to using the second voice signal to perform the voice service based on the sixth duration. The sixth duration is the duration during which the noise energy of the current environmental noise signal has been continuously less than or equal to a second energy threshold.
10. The method according to any one of claims 1 to 3, characterized in that, The method further includes: When the voice service begins, the initial noise energy of the environmental noise is obtained based on the first voice signal; When the initial noise energy is greater than the fifth energy threshold, it is determined that the third voice signal will be used to perform the voice service. When the initial noise energy is less than or equal to the fifth energy threshold, it is determined that the second voice signal will be used to perform the voice service.
11. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Extract non-speech segments from the first speech signal to obtain the environmental noise signal; Obtain the noise energy of the environmental noise signal.
12. The method according to any one of claims 1 to 3, characterized in that, The first microphone is disposed on the microphone of the wearable device; or The first microphone is located on a smart device connected to the wearable device.
13. The method according to any one of claims 1 to 3, characterized in that, The second voice signal acquired by the second microphone of the wearable device to perform voice services includes: The first audio signal is used to denoise the second audio signal to obtain a denoised audio signal. The voice service is performed using the noise-reduced voice signal.
14. The method according to any one of claims 1 to 3, characterized in that, The second pickup is an air conduction microphone, and the third pickup is a bone conduction microphone; or The second pickup is an omnidirectional air conduction microphone, and the third pickup is a directional air conduction microphone.
15. A speech signal processing device, characterized in that, The apparatus includes a processing module for performing the speech signal processing method as described in any one of claims 1-14.
16. An electronic device, characterized in that, The electronic device includes a processor and a memory, the processor being coupled to the memory, the processor being configured to perform the speech signal processing method as described in any one of claims 1-14 based on instructions stored in the memory.
17. The electronic device according to claim 16, characterized in that, The electronic device is the wearable device, and the electronic device further includes a second microphone and a third microphone. The second microphone is used to collect the second voice signal, and the third microphone is used to collect the third voice signal.
18. The electronic device according to claim 16 or 17, characterized in that, The electronic device further includes the first microphone, which is used to collect the first voice signal.
19. A computer-readable storage medium, characterized in that, The instructions include, when the computer-readable storage medium is run on a computer, causing the computer to perform the speech signal processing method as described in any one of claims 1-14.
Citation Information
Patent Citations
Communication mode switching method and communication terminal
CN108513733A
Broadcast signal receiver
JP2000196974A
Apparatus and method for transmitting / receiving voice signal through headset
US20080175399A1
