A method and device for detecting voice orientation
By collecting and analyzing voice signals in the conference call, and using cross-correlation curves and coefficients to determine the user orientation, the problem of being unable to distinguish between the speaker's positive and lateral directions in the prior art is solved, and the accuracy of user interference detection is improved.
Patent Information
- Application Number
- CN202111050531.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-08
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-09-08
AI Technical Summary
In a conference call, prior art cannot distinguish whether the speaker is in the forward or sideways of the device when the speaker is in front of the device, resulting in the inability to determine whether the user has been disturbed.
The voice acquisition device collects two voice signals, performs correlation estimation, obtains a cross-correlation curve, uses the mutual correlation coefficient to determine the voice orientation as forward or sideways, and combines the signal reception angle of the voice acquisition device to determine the user's orientation.
Accurately distinguishing the speakers in the positive or side direction of the device reduces misjudgment of users and improves the effectiveness of conference calls.
Smart Images

Figure CN113936691B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech processing technologies, and in particular, to a method and apparatus for detecting speech orientation. Background Art
[0002] Currently, in the scenario of a conference call, the facial orientation of the speaker can be determined through the video data collected by a camera, so as to determine whether the speaker is disturbed; in the scenario where the camera is disabled, an existing solution provides a method for positioning based on the sound source, which can estimate the orientation of the user. However, when the speaker is in front of the device, it is impossible to distinguish whether the speaker is in the front or side direction of the device, and thus it is impossible to determine whether the user is disturbed. Summary of the Invention
[0003] The purpose of this application is to provide a method and apparatus for detecting speech orientation, so as to at least solve the above technical problems existing in the prior art.
[0004] This application provides a method for detecting speech orientation on the one hand, including:
[0005] Collect speech signals through a speech collection device to obtain two speech signals;
[0006] Estimate the correlation of the two speech signals to obtain a cross-correlation curve of the two speech signals, where the cross-correlation curve represents the change rate of the cross-correlation coefficient of the two speech signals with respect to the signal reception angle of the speech collection device;
[0007] Obtain the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the speech collection device based on the cross-correlation curve;
[0008] Determine the detection result of the speech orientation as forward or sideward according to the cross-correlation coefficient corresponding to the central angle.
[0009] Among them, the collecting speech signals through a speech collection device to obtain two speech signals includes:
[0010] Collect speech signals through a dual speech collection device to obtain two speech signals; or,
[0011] Collect speech signals through more than two speech collection devices to obtain multiple speech signals, and synthesize the multiple speech signals into two speech signals;
[0012] Determining the detection result of the speech orientation as forward or sideward according to the cross-correlation coefficient corresponding to the central angle includes:
[0013] Compare the cross - correlation coefficient corresponding to the central angle with the cross - correlation coefficient threshold. If the cross - correlation coefficient corresponding to the central angle is greater than or equal to the cross - correlation coefficient threshold, determine that the detection result of the voice orientation is the front of the microphone voice collection device; otherwise, determine that the detection result of the voice orientation is the side of the microphone voice collection device.
[0014] Among them, if the two - channel voice signals are the first - arrival voice signals, determine the cross - correlation coefficient threshold according to the two - channel voice signals;
[0015] If the two - channel voice signals are non - first - arrival voice signals, perform correlation estimation on the two - channel voice signals.
[0016] Among them, at the moment when the mute state switches from mute to non - mute, collect voice signals through the voice collection device. When the collected voice signals reach the set duration, obtain the first - arrival voice signals;
[0017] The voice signals collected through the voice collection device after the set duration are non - first - arrival voice signals.
[0018] Determining the cross - correlation coefficient threshold according to the two - channel voice signals includes:
[0019] Determine the cross - correlation coefficient of the two - channel first - arrival voice signals of the set duration, and adjust the cross - correlation coefficient setting threshold according to the determined cross - correlation coefficient to obtain the cross - correlation coefficient threshold;
[0020] The performing correlation estimation on the two - channel voice signals includes:
[0021] Perform correlation estimation on the two - channel non - first - arrival voice signals of the set duration.
[0022] The obtaining the cross - correlation coefficient corresponding to the central angle of the signal reception angle of the voice collection device from the cross - correlation curve includes:
[0023] According to the correspondence between the voice signal sampling points and the signal reception angle of the voice collection device, determine all the sampling points included in the central angle;
[0024] Based on the cross - correlation curve, determine the cross - correlation coefficient of each sampling point included in the central angle;
[0025] Determine the cross - correlation coefficient corresponding to the central angle according to the cross - correlation coefficients of all the sampling points included in the central angle.
[0026] This method further includes:
[0027] Determine the number of sampling points of the voice signal according to the spacing between the voice acquisition devices, the speed of sound, and the voice signal sampling rate, and establish the corresponding relationship between the sampling points and the signal reception angles of the voice acquisition devices according to the number of sampling points.
[0028] This method further includes:
[0029] Take the maximum value among the cross-correlation coefficients of all sampling points included in the central angle as the peak value. If there are secondary peaks in the cross-correlation curve, determine that the voice orientation detection result is an invalid value; otherwise, determine the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle.
[0030] The secondary peak satisfies the following conditions: the magnitude of the secondary peak satisfies a set condition compared with the magnitude of the peak value, and the sampling point corresponding to the secondary peak is located at a reception angle outside the set angle range starting from the central angle.
[0031] This method further includes:
[0032] Obtain the current comparison result and multiple stored historical comparison results;
[0033] If all comparison results including the current comparison result and the historical comparison results are greater than or equal to the cross-correlation coefficient threshold, determine that the current voice orientation detection result is that the microphone voice acquisition device is facing forward; or, if all comparison results including the current comparison result and the historical comparison results are less than the cross-correlation coefficient threshold, determine that the current voice orientation detection result is that the microphone voice acquisition device is facing sideways.
[0034] On the one hand, the present application provides a voice orientation detection device, including:
[0035] An acquisition module for acquiring voice signals and obtaining two voice signals;
[0036] An estimation module for performing correlation estimation on the two voice signals to obtain the cross-correlation curve of the two voice signals, where the cross-correlation curve represents the change rate of the cross-correlation coefficient of the two voice signals with the signal reception angle of the voice acquisition device;
[0037] An obtaining module for obtaining the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the voice acquisition device based on the cross-correlation curve;
[0038] A determination module for determining that the detection result of the voice orientation is forward or sideways according to the cross-correlation coefficient corresponding to the central angle.
[0039] The voice signal is collected by a voice collection device, thereby obtaining two voice signals. Through correlation estimation, the correlation degree of the two voice signals can be known (represented by the cross-correlation coefficient, and the larger the cross-correlation coefficient, the greater the correlation degree of the two voice signals), and the change of the cross-correlation coefficient at the signal reception angles of different voice collection devices (i.e., the cross-correlation curve) can also be known. Thus, based on this cross-correlation curve, the cross-correlation coefficients of the two voice signals within the forward range and the lateral range of the device can be known. Then, according to the central angle, that is, the cross-correlation coefficient within the forward range, it can be determined whether the speaking user is located in the forward or lateral direction of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 FIG. shows a schematic diagram of an application scenario for voice orientation detection in an example;
[0041] Figure 2 FIG. shows a schematic flowchart of a voice orientation detection method according to an embodiment;
[0042] Figure 3 FIG. shows a schematic flowchart of determining the detection result of voice orientation according to an embodiment;
[0043] Figure 4 FIG. shows a schematic flowchart of determining the cross-correlation coefficient corresponding to the central angle according to an embodiment
[0044] Figure 5 FIG. shows a schematic diagram of a cross-correlation curve according to an embodiment;
[0045] Figure 6 FIG. shows a schematic structural diagram of a voice orientation detection device according to an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] To make the objectives, features, and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.
[0047] In the scenario of a telephone conference, there may be a situation where a user is disturbed. At this time, the user may turn sideways to talk to others, as Figure 1 shown. When the user is disturbed, the voice of the user can still be collected by the voice collection device of the conference terminal, which may affect the progress of the conference. In one example, the present disclosure provides a voice orientation detection method to achieve the detection of the orientation of the speaking user, as Figure 2 shown, and the method includes:
[0048] Step 201: Collect voice signals through a voice collection device to obtain two voice signals.
[0049] Step 202: Estimate the correlation of the two voice signals to obtain the cross-correlation curve of the two voice signals. The cross-correlation curve represents the change rate of the cross-correlation coefficient of the two voice signals with respect to the signal reception angle of the voice collection device.
[0050] Step 203: Obtain the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the voice collection device based on the cross-correlation curve.
[0051] Step 204: Determine whether the detection result of the voice orientation is forward or lateral according to the cross-correlation coefficient corresponding to the central angle.
[0052] In this example, voice signals are collected through a voice collection device to obtain two voice signals. Through correlation estimation, the correlation degree of the two voice signals can be known (represented by the cross-correlation coefficient, and the larger the cross-correlation coefficient, the greater the correlation degree of the two voice signals), and the change of the cross-correlation coefficient at different signal reception angles of the voice collection device can also be known (i.e., the cross-correlation curve). Thus, based on this cross-correlation curve, the cross-correlation coefficients of the two voice signals within the forward range and lateral range of the device can be known.
[0053] The cross-correlation coefficient of the signal calculated through correlation estimation is a floating-point number between 0 and 1 after normalization. The larger its value, the higher the correlation degree between the two signals. When the speaking user is in the forward direction in front of the device, the user's voice directly reaches the voice collection device. When the user is in the lateral direction in front of the device, part of the user's voice will enter the voice collection device after being reflected by the surrounding environment. When the direct sound component in the two signals received by the voice signal collection device such as a microphone is higher, its cross-correlation coefficient is higher, and when the reflected sound component in the two signals is higher, its cross-correlation coefficient is lower.
[0054] In this example, the signal reception angle corresponding to the forward range of the device is called the central angle. Then, according to the cross-correlation coefficient of the central angle, it can be determined whether the speaking user is in the forward direction of the device.
[0055] In one example, for the above step 204, the implementation manner of determining whether the detection result of the voice orientation is forward or lateral according to the cross-correlation coefficient corresponding to the central angle is as Figure 3 shown and includes:
[0056] Step 301: Compare the cross-correlation coefficient corresponding to the central angle with the cross-correlation coefficient threshold.
[0057] Step 302, if the cross-correlation coefficient corresponding to the central angle is greater than or equal to the cross-correlation coefficient threshold, determine that the detection result of the voice orientation is the front direction of the microphone voice acquisition device;
[0058] Step 303, if the cross-correlation coefficient corresponding to the central angle is less than the cross-correlation coefficient threshold, determine that the detection result of the voice orientation is the side direction of the microphone voice acquisition device.
[0059] Here, the front direction of the voice acquisition device is the front direction in front of the device, and the side direction of the voice acquisition device is the side direction in front of the device.
[0060] In another example, after performing the comparison in step 301 and obtaining the comparison result, the detection result of the front or side direction of the voice orientation is not immediately output. Instead, the detection result of the voice orientation can be smoothed, including:
[0061] Record the current comparison result and obtain multiple stored historical comparison results. If all comparison results including the current comparison result and historical comparison results are greater than or equal to the cross-correlation coefficient threshold, determine that the current voice orientation detection result is the front direction of the microphone voice acquisition device; if all comparison results including the current comparison result and historical comparison results are less than the cross-correlation coefficient threshold, determine that the current voice orientation detection result is the side direction of the microphone voice acquisition device.
[0062] This smoothing process is beneficial for the smooth switching between the two states of "front" and "side", and can reduce the error probability of the voice orientation detection result. For example, if the speaking user only makes a sideward speech for a very short time and then quickly switches back to the frontward speech, if it is determined that the user is speaking sideward because the comparison result of one time is less than the cross-correlation coefficient threshold and it is considered that the user is disturbed, then this detection result actually does not conform to the actual situation. On the contrary, if the user accidentally moves to the front of the device when talking to others, if it is determined that the user is speaking frontward because the comparison result of one time is greater than or equal to the cross-correlation coefficient threshold and it is considered that the user is participating in the meeting normally without being disturbed, then this detection result also does not conform to the actual situation.
[0063] In one example, the present disclosure can configure a buffer with a set length in the cache to store the comparison results. For example, if the buffer length is 5, then this buffer can store 5 consecutive comparison results. If all 5 times (including the current comparison result) are greater than or equal to the cross-correlation coefficient threshold, determine that the current voice orientation detection result is the front direction of the microphone voice acquisition device; otherwise, still use the previous voice orientation detection result; if all 5 times (including the current comparison result) are less than the cross-correlation coefficient threshold, determine that the current voice orientation detection result is the side direction of the microphone voice acquisition device; otherwise, still use the previous voice orientation detection result.
[0064] In one example, the above voice acquisition device may be located on a conference terminal, and the conference terminal may be a device with a conference client such as a mobile phone, a tablet computer, a laptop computer, etc. The voice orientation detection method provided by the present disclosure may be applicable to devices with dual voice acquisition devices, and may also be applicable to devices with more than two voice acquisition devices.
[0065] When the dual voice acquisition devices acquire voice signals, two voice signals can be obtained; when more than two voice acquisition devices acquire voice signals, multiple voice signals are obtained. Furthermore, the present disclosure combines the multiple voice signals into two voice signals.
[0066] It should be noted that when the two voice signals are the first-arrival voice signals, the present disclosure determines the above cross-correlation coefficient threshold according to the two voice signals; when the two voice signals are non-first-arrival voice signals, the correlation between the two voice signals is estimated. Here, the first-arrival sound is the first few frames of signals when the user starts speaking, and the subsequent ones are non-first-arrival sounds.
[0067] In order to adapt to environmental changes, the present disclosure needs to determine the cross-correlation coefficient threshold adapted to the current environment so as to accurately judge the voice orientation. For this purpose, the present disclosure adopts a voice activity detection (VAD) method to detect the state of the user's speech (referred to as the VAD state) in real time, that is, whether there is sound or no sound. Whenever the VAD state switches from no sound (mute) to sound (non-mute), the first-arrival sound is collected, and the cross-correlation coefficient threshold is calculated based on this. Correspondingly, based on the voice signals after the first-arrival sound, that is, the non-first-arrival sounds, the correlation estimation in step 202 is performed.
[0068] Specifically, at the moment when the VAD state switches from mute to non-mute, the voice acquisition device collects voice signals. When the collected voice signals reach the set duration, the first-arrival voice signals are obtained; the voice signals collected by the voice acquisition device after the set duration are non-first-arrival voice signals. In one example, the correlation between two non-first-arrival voice signals with the set duration is estimated. Here, the set duration of the first-arrival voice signals and the set duration of the non-first-arrival voice signals may be the same.
[0069] In one example, a buffer can be pre-set to cache enough voice signals for calculation. For example, if the transmission frequency of the voice signal is one frame per 10 ms, then when the VAD state switches from mute to non-mute, the voice signals will be continuously stored in the buffer. When there are enough voice signals, for example, when the buffer caches 100 ms (set duration) of voice signals, the cross-correlation coefficient threshold can be calculated based on the first-arrival voice signals of these 100 ms. Thereafter, whenever the buffer caches 100 ms (set duration) of non-first-arrival voice signals, the correlation estimation described in step 202 can be performed once.
[0070] In one example, the cross-correlation coefficient threshold is determined as follows: Determine the cross-correlation coefficient of two first-arrival voice signals of a set duration, and adjust the cross-correlation coefficient setting threshold according to the determined cross-correlation coefficient to obtain the cross-correlation coefficient threshold. In the present disclosure, a cross-correlation coefficient setting threshold can be pre-configured. This threshold can be an empirical value. After obtaining the two first-arrival voice signals, the cross-correlation coefficient of the two first-arrival voice signals can be calculated through correlation calculation. Based on this cross-correlation coefficient, the cross-correlation coefficient setting threshold can be dynamically adjusted to obtain the cross-correlation coefficient threshold. For example, according to experience, if it is determined that the cross-correlation coefficient should be at least 0.4 for the speech direction to be positive, then the cross-correlation coefficient setting threshold can be set to 0.4. If the cross-correlation coefficient of the two first-arrival voice signals calculated this time is 0.7, then in order to adapt to the current environment, the cross-correlation coefficient setting threshold can be increased, for example, adjusted to 0.6, and then 0.6 is the cross-correlation coefficient threshold. For another example, according to experience, if it is determined that the cross-correlation coefficient should be at least 0.5 for the speech direction to be positive, then the cross-correlation coefficient setting threshold can be set to 0.5. If the cross-correlation coefficient of the two first-arrival voice signals calculated this time is 0.38, then in order to adapt to the current environment, the cross-correlation coefficient setting threshold can be decreased, for example, adjusted to 0.4, and then 0.4 is the cross-correlation coefficient threshold. Therefore, the cross-correlation coefficient threshold of the present disclosure will fluctuate with the change of the environment, and the judged speech orientation is more accurate in this way.
[0071] After obtaining the cross-correlation curve of the non-first-arrival voice signal, it is necessary to obtain the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the voice acquisition device from the cross-correlation curve, as Figure 4 shown, including:
[0072] Step 401, according to the correspondence between the voice signal sampling points and the signal reception angle of the voice acquisition device, determine all the sampling points included in the central angle.
[0073] In the present disclosure, it is necessary to first determine the number of sampling points of the voice signal. In one example, the number of sampling points of the voice signal can be determined according to the spacing between the voice acquisition devices, the speed of sound, and the voice signal sampling rate. Here, when the device has two voice acquisition devices, the spacing between the voice acquisition devices is the distance between the two voice acquisition devices; when the device has more than two voice acquisition devices, the spacing between the voice acquisition devices can be the distance between the two voice acquisition devices that are the farthest apart among the multiple voice acquisition devices.
[0074] In one example, the number of sampling points N can be calculated by the following formula:
[0075]
[0076] Where d represents the spacing between the voice acquisition devices, in meters (m), c represents the speed of sound at room temperature, generally taking a value of 343 m / s, and fs represents the sampling rate of the voice signal, for example, it can be 48 kHz. For example, when the spacing between the voice acquisition devices is 0.2 m, the speed of sound is 343 m / s, and the sampling rate is 48 kHz, the number of sampling points is points.
[0077] After determining the number of sampling points, a correspondence relationship between the sampling points and the signal reception angles of the voice acquisition devices is established. For example, if the signal reception angle of the voice acquisition device is set to 0 to 180 degrees, then these sampling points can be evenly distributed within the range of 0 to 180 degrees to obtain the angle corresponding to each sampling point.
[0078] In one example, an index corresponding to each sampling point can also be generated. For example, the indexes of 55 sampling points can be 0 to 54 in sequence.
[0079] Step 402, determine the cross-correlation coefficient of each sampling point included in the central angle based on the cross-correlation curve.
[0080] In this example, the central angle includes at least three sampling points, that is, the middle three sampling points of the N sampling points sorted by index. For example, when N = 55, the indexes of the middle three sampling points are 27 / 28 / 29 respectively.
[0081] Step 403, determine the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle.
[0082] After calculating the cross-correlation curve, the cross-correlation coefficients of the three sampling points included in the central angle can be directly found in the cross-correlation curve. As Figure 5 shown in the cross-correlation curve, the cross-correlation coefficients of the three sampling points with indexes 26 / 27 / 28 included in the central angle are: 0.5, 0.53, 0.52 respectively.
[0083] Then, the cross-correlation coefficient corresponding to the central angle can be determined according to the cross-correlation coefficients of the sampling points included in the central angle. For example, it can be done by taking the average value or by weighted summation. This can significantly improve the determination redundancy for situations such as when the user turns the head at a small angle or the head deviates slightly from the midpoint within a small range.
[0084] Furthermore, by performing step 301 based on the cross-correlation coefficient of the central angle, the orientation of the voice can be determined.
[0085] In one example, due to the influence of environmental factors such as room reverberation, background noise, and other speakers, directly using the sampling points of the central angle of the cross-correlation curve as the basis for determining the voice orientation is very unstable. Therefore, the redundancy and smoothness of the detection method can also be increased in combination with the actual situation. Specifically, the following method can be used to detect whether there is interference:
[0086] Take the maximum value among the cross-correlation coefficients of all sampling points included in the central angle as the peak value;
[0087] If there is a secondary peak in the cross-correlation curve, determine that the result of this voice orientation detection is an invalid value, and still use the previous voice detection result; otherwise, determine the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle;
[0088] Among them, the secondary peak satisfies the following conditions: the size of the secondary peak satisfies a set condition compared with the size of the peak value, and the sampling point corresponding to the secondary peak is located at a receiving angle outside a set angle range starting from the central angle.
[0089] In one example, the condition that the size of the secondary peak satisfies a set condition compared with the size of the peak value can be: the secondary peak is greater than 50% of the peak value;
[0090] In another example, when the distance between the index of the secondary peak and the index of the peak is greater than N interfere it can be considered that the sampling point corresponding to the secondary peak is located at a receiving angle outside a set angle range starting from the central angle. Among them,
[0091]
[0092] If it is necessary to determine whether there is interference (i.e., secondary peak) outside 45 degrees of the central angle, θ can be taken as 45°, then N interfere = 19 is calculated, that is, the distance between the index of the peak and the index of the secondary peak is greater than 19. Combining Figure 5, if the index of the peak is 27 and the cross - correlation coefficient is 0.53, then among the indices that satisfy the distance from 27 being greater than 19, the cross - correlation coefficient of the sampling point with index 7 is 0.28, which is greater than 50% of 0.53. Then the sampling point with index 7 is a secondary peak. Thus, it can be determined that the speech orientation detection based on the non - first - arriving speech signal within this 100 ms is invalid.
[0093] If there is no secondary peak, by comparing the cross - correlation coefficient corresponding to the central angle with the cross - correlation coefficient threshold, the speech orientation can be determined.
[0094] To implement the above - mentioned speech orientation detection method, an example of the present disclosure also provides a speech orientation detection device, as Figure 6 shown, including:
[0095] A collection module 10, configured to collect speech signals and obtain two channels of speech signals;
[0096] An estimation module 20, configured to perform correlation estimation on the two channels of speech signals to obtain a cross - correlation curve of the two channels of speech signals, where the cross - correlation curve represents the change rate of the cross - correlation coefficient of the two channels of speech signals with respect to the signal reception angle of the speech collection device;
[0097] An obtaining module 30, configured to obtain the cross - correlation coefficient corresponding to the central angle of the signal reception angle of the speech collection device based on the cross - correlation curve;
[0098] A determination module 40, configured to determine whether the detection result of the speech orientation is forward or lateral according to the cross - correlation coefficient corresponding to the central angle.
[0099] In one example, the collection module 10 is further configured to collect speech signals through a dual - speech collection device to obtain two channels of speech signals; or, is further configured to collect speech signals through more than two speech collection devices to obtain multiple channels of speech signals, and synthesize the multiple channels of speech signals into two channels of speech signals;
[0100] In one example, the determination module 40 is further configured to compare the size of the cross - correlation coefficient corresponding to the central angle with the cross - correlation coefficient threshold. If the cross - correlation coefficient corresponding to the central angle is greater than or equal to the cross - correlation coefficient threshold, it is determined that the detection result of the speech orientation is forward with respect to the microphone speech collection device; otherwise, it is determined that the detection result of the speech orientation is lateral with respect to the microphone speech collection device.
[0101] If the two channels of speech signals are first - arriving speech signals, the estimation module 20 is further configured to determine the cross - correlation coefficient threshold according to the two channels of speech signals;
[0102] If the two channels of speech signals are non - first - arriving speech signals, the estimation module 20 is further configured to perform correlation estimation on the two channels of speech signals.
[0103] In one example, the acquisition module 10 is further configured to acquire a voice signal at the moment when the mute suppression state switches from mute to non-mute, and when the acquired voice signal reaches a set duration, obtain a first-arrival voice signal; the voice signal acquired by the acquisition module 10 after the set duration is a non-first-arrival voice signal.
[0104] In one example, the estimation module 20 is further configured to determine the cross-correlation coefficient of two first-arrival voice signals of a set duration, and adjust a set threshold for the cross-correlation coefficient according to the determined cross-correlation coefficient to obtain the cross-correlation coefficient threshold;
[0105] The estimation module 20 is further configured to perform correlation estimation on two non-first-arrival voice signals of a set duration.
[0106] In one example, the obtaining module 30 is further configured to determine all sampling points included in the central angle according to the correspondence between the voice signal sampling points and the signal reception angles of the voice acquisition devices; determine the cross-correlation coefficient of each sampling point included in the central angle based on the cross-correlation curve; and determine the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle.
[0107] Wherein, the estimation module 20 is further configured to determine the number of sampling points of the voice signal according to the spacing between the voice acquisition devices, the speed of sound, and the voice signal sampling rate, and establish a correspondence between the sampling points and the signal reception angles of the voice acquisition devices according to the number of sampling points.
[0108] In one example, the obtaining module 30 is further configured to use the maximum value among the cross-correlation coefficients of all sampling points included in the central angle as the peak value. If there is a secondary peak in the cross-correlation curve, determine that the voice orientation detection result is an invalid value; otherwise, determine the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle;
[0109] The secondary peak satisfies the following conditions: the magnitude of the secondary peak satisfies a set condition compared with the magnitude of the peak value, and the sampling point corresponding to the secondary peak is located at a reception angle outside a set angle range starting from the central angle.
[0110] In one example, the determination module 40 is further configured to obtain the current comparison result and multiple stored historical comparison results; if all comparison results including the current comparison result and the historical comparison results are greater than or equal to the cross-correlation coefficient threshold, determine that the current voice orientation detection result is that the microphone voice acquisition device is facing forward; or, if all comparison results including the current comparison result and the historical comparison results are less than the cross-correlation coefficient threshold, determine that the current voice orientation detection result is that the microphone voice acquisition device is facing sideways.
[0111] In one example, the present disclosure also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus; the memory is used to store a computer program; when the processor executes the program stored on the memory, the method steps of the voice orientation detection are implemented.
[0112] In one example, the present disclosure also provides a computer storage medium, characterized in that the storage medium stores computer-executable instructions, and when the instructions are executed, the method of voice orientation detection is executed.
[0113] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0114] In addition to the above methods and devices, the embodiments of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are run by a processor, the processor is caused to execute the steps in the methods according to various embodiments of the present application described in the "Exemplary Methods" section of this specification.
[0115] The computer program product may be written in any combination of one or more programming languages for the program code to execute the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0116] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. Moreover, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0117] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of this application, "a plurality" means two or more, unless otherwise specifically defined.
[0118] As mentioned above, the above are only the specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims
1. A method for detecting voice orientation, comprising: Collecting voice signals through a voice acquisition device to obtain two voice signals; Performing correlation estimation on the two voice signals to obtain a cross-correlation curve of the two voice signals, where the cross-correlation curve represents the change rate of the cross-correlation coefficient of the two voice signals with respect to the signal reception angle of the voice acquisition device; Obtaining the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the voice acquisition device based on the cross-correlation curve; Comparing the magnitude of the cross-correlation coefficient corresponding to the central angle with a cross-correlation coefficient threshold. If the cross-correlation coefficient corresponding to the central angle is greater than or equal to the cross-correlation coefficient threshold, determining that the detection result of the voice orientation is the front direction of the microphone voice acquisition device; otherwise, determining that the detection result of the voice orientation is the side direction of the microphone voice acquisition device.
2. The voice orientation detection method according to claim 1, wherein The step of collecting voice signals through a voice acquisition device to obtain two voice signals includes: Collecting voice signals through a dual voice acquisition device to obtain two voice signals; or, Collecting voice signals through more than two voice acquisition devices to obtain multiple voice signals, and synthesizing the multiple voice signals into two voice signals.
3. The voice orientation detection method according to claim 2, wherein, If the two voice signals are first-arrival voice signals, determining the cross-correlation coefficient threshold according to the two voice signals; If the two voice signals are non-first-arrival voice signals, performing correlation estimation on the two voice signals.
4. The voice orientation detection method according to claim 3, wherein, At the moment when the mute suppression state switches from mute to non-mute, collecting voice signals through a voice acquisition device. When the collected voice signals reach a set duration, obtaining first-arrival voice signals; The voice signals collected through the voice acquisition device after the set duration are non-first-arrival voice signals.
5. The voice orientation detection method according to claim 3, Determining the cross-correlation coefficient threshold according to the two voice signals includes: Determining the cross-correlation coefficient of the two first-arrival voice signals within the set duration, and adjusting the set threshold of the cross-correlation coefficient according to the determined cross-correlation coefficient to obtain the cross-correlation coefficient threshold; The step of performing correlation estimation on the two voice signals includes: Performing correlation estimation on two non-first-arrival voice signals within the set duration.
6. The voice orientation detection method according to claim 1, the step of obtaining the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the voice acquisition device based on the cross-correlation curve includes: Determining all sampling points included in the central angle according to the correspondence between the voice signal sampling points and the signal reception angle of the voice acquisition device; Determining the cross-correlation coefficient of each sampling point included in the central angle based on the cross-correlation curve; Determining the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle.
7. The voice orientation detection method according to claim 6, the method further includes: Determine the number of sampling points of the voice signal according to the spacing between the voice acquisition devices, the speed of sound, and the voice signal sampling rate, and establish the corresponding relationship between the sampling points and the signal reception angles of the voice acquisition devices according to the number of sampling points.
8. The voice orientation detection method according to claim 6, the method further comprising: Taking the maximum value among the cross-correlation coefficients of all sampling points included in the central angle as the peak value. If there are secondary peak values in the cross-correlation curve, determining that the voice orientation detection result is an invalid value; otherwise, determining the cross-correlation coefficient corresponding to the central angle according to the cross-correlation coefficients of all sampling points included in the central angle. The secondary peak value satisfies the following conditions: the magnitude of the secondary peak value satisfies a set condition compared with the magnitude of the peak value, and the sampling point corresponding to the secondary peak value is located at a reception angle outside a set angle range starting from the central angle.
9. The voice orientation detection method according to claim 2, the method further comprising: Obtaining the current comparison result and a plurality of stored historical comparison results; If all comparison results including the current comparison result and the historical comparison results are greater than or equal to the cross-correlation coefficient threshold, determining that the current voice orientation detection result is that the microphone voice acquisition device is facing forward; or, if all comparison results including the current comparison result and the historical comparison results are less than the cross-correlation coefficient threshold, determining that the current voice orientation detection result is that the microphone voice acquisition device is facing sideways.
10. A voice orientation detection device, comprising: An acquisition module, configured to acquire voice signals and obtain two voice signals; An estimation module, configured to perform correlation estimation on the two voice signals to obtain a cross-correlation curve of the two voice signals, where the cross-correlation curve represents the change rate of the cross-correlation coefficient of the two voice signals with respect to the signal reception angle of the voice acquisition device; An obtaining module, configured to obtain the cross-correlation coefficient corresponding to the central angle of the signal reception angle of the voice acquisition device based on the cross-correlation curve; A determination module, configured to determine the voice orientation detection result as forward or sideways according to the cross-correlation coefficient corresponding to the central angle; Wherein, determining the voice orientation detection result as forward or sideways according to the cross-correlation coefficient corresponding to the central angle includes: Comparing the magnitude of the cross-correlation coefficient corresponding to the central angle with the cross-correlation coefficient threshold. If the cross-correlation coefficient corresponding to the central angle is greater than or equal to the cross-correlation coefficient threshold, determining that the voice orientation detection result is that the microphone voice acquisition device is facing forward; otherwise, determining that the voice orientation detection result is that the microphone voice acquisition device is facing sideways.
Citation Information
Patent Citations
Neural network sound source direction finding method and system based on double microphones
CN112034424A