Sound source direction determination method, device, terminal and storage medium
By calculating the matching degree and probability of the speech signal in multiple pickup directions, and combining it with the normalized sound source angle, the problem of inaccurate sound source positioning in a noisy environment is solved, and the clarity of speech signal collection is improved and the user experience is improved. efficiency of interaction.
Patent Information
- Application Number
- CN202210772845.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-06-30
AI Technical Summary
When the surrounding environment is noisy, it is difficult to accurately locate the direction of the sound source with existing technology, affecting the clarity of voice signal collection and user interaction efficiency.
By collecting speech signals in at least two pickup directions, calculating the matching degree and probability, combined with the normalized reference sound source angle and matching degree, using the probability and angle determination model to determine the target sound source direction, improving the accuracy of positioning .
Significantly improves the accuracy of sound source direction in noisy environments, improving voice signal collection quality and user interaction experience.
Smart Images

Figure CN115166633B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sound source localization, and in particular to a method, device, terminal and storage medium for determining a sound source direction. Background Art
[0002] At present, some terminals can recognize the user's voice signal and thus interact with the user. In order to save power consumption, the terminal is generally in a dormant state and wakes up only when a wake-up command is received.
[0003] In order to improve the clarity of the collected voice signal, the terminal can locate the direction of the sound source with the help of the voice signal carried in the wake-up command, and then collect the voice signal based on the direction of the sound source. However, in the case of high ambient noise, the accuracy of locating the direction of the sound source is poor. Summary of the invention
[0004] The embodiments of the present application provide a method, device, terminal and storage medium for determining the direction of a sound source, which can improve the accuracy of the determined direction of a sound source. The technical solution is as follows:
[0005] According to one aspect of an embodiment of the present application, a method for determining a sound source direction is provided, the method comprising:
[0006] Based on the collected voice signals of the target voice signal in at least two sound pickup directions, determining the matching degree corresponding to the at least two sound pickup directions, where the matching degree is the matching degree between the voice signal in the sound pickup direction and the wake-up word;
[0007] Based on the target speech signal, determining a reference sound source direction;
[0008] Normalizing the reference sound source angle corresponding to the reference sound source direction;
[0009] Extracting features of the speech signal in each of the sound pickup directions to obtain speech features corresponding to each of the sound pickup directions;
[0010] Based on the speech features corresponding to each of the sound pickup directions, determining the probability corresponding to each of the sound pickup directions, wherein the probability indicates the possibility that the sound pickup direction is the direction of the sound source;
[0011] The target sound source direction is determined based on the sound source parameters of the target speech signal, wherein the sound source parameters include the normalized reference sound source angle and the matching degrees and probabilities corresponding to the at least two sound pickup directions.
[0012] In a possible implementation manner, determining the probability corresponding to each sound pickup direction based on the speech feature corresponding to each sound pickup direction includes:
[0013] Based on the speech feature corresponding to each of the pickup directions, a probability determination model is called to determine the probability corresponding to each of the pickup directions, wherein the probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction.
[0014] In a possible implementation, the method further includes:
[0015] Acquire sample speech features and sound source labels corresponding to at least two sample sound pickup directions, wherein the sample speech features are determined based on sample speech signals in the sample sound pickup directions, and the sound source labels indicate whether the sample sound pickup directions are sound source directions;
[0016] For each of the sample sound pickup directions, based on the sample speech features corresponding to the sample sound pickup directions, calling the probability determination model to determine the predicted probability corresponding to the sample sound pickup directions, and determining a first loss value based on the predicted probability and the sound source label;
[0017] The probability determination model is trained based on each of the first loss values corresponding to each of the sample sound pickup directions.
[0018] In a possible implementation, determining the target sound source direction based on the sound source parameter of the target speech signal includes:
[0019] Based on the sound source parameters of the target speech signal, calling an angle determination model to determine the target sound source angle, the angle determination model being used to determine the sound source angle corresponding to the speech signal based on the sound source parameters of any speech signal;
[0020] The direction indicated by the target sound source angle is determined as the target sound source direction.
[0021] In a possible implementation, the method further includes:
[0022] Obtain a sample sound source angle corresponding to a sample sound source direction, a sample reference sound source angle corresponding to a sample reference sound source direction, and a sample matching degree corresponding to at least two sample sound pickup directions, wherein the sample matching degree is a matching degree between a sample voice signal in the sample sound pickup direction and the wake-up word;
[0023] Normalizing the sample reference sound source angle;
[0024] Based on the sample speech feature corresponding to each of the sample sound pickup directions, determine the sample probability corresponding to each of the sample sound pickup directions, wherein the sample probability indicates the possibility that the sample sound pickup direction is the direction of the sound source, and the sample speech feature is determined based on the sample speech signal in the sample sound pickup direction;
[0025] Based on the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to the at least two sample sound pickup directions, calling the angle determination model to determine the predicted sound source angle;
[0026] Based on the predicted sound source angle and the sample sound source angle, a second loss value is determined, and based on the second loss value, the angle determination model is trained.
[0027] In a possible implementation, determining the sample probability corresponding to each of the sample sound pickup directions based on the sample speech feature corresponding to each of the sample sound pickup directions includes:
[0028] For each of the sample sound pickup directions, based on the sample speech features corresponding to the sample sound pickup directions, a probability determination model is called to determine the sample probability corresponding to the sample sound pickup directions, wherein the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction;
[0029] The step of training the angle determination model based on the second loss value comprises:
[0030] Based on the second loss value, the angle determination model and the probability determination model are trained.
[0031] In a possible implementation, the method further includes:
[0032] Acquire sound source labels corresponding to the at least two sample sound pickup directions, wherein the sound source labels indicate whether the sample sound pickup directions are sound source directions;
[0033] The determining, based on the sample speech feature corresponding to each of the sample sound pickup directions, the sample probability corresponding to each of the sample sound pickup directions comprises:
[0034] For each of the sample sound pickup directions, based on the sample speech features corresponding to the sample sound pickup directions, calling a probability determination model to determine the sample probability corresponding to the sample sound pickup directions, and determining a third loss value based on the sample probability and the sound source label, wherein the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction;
[0035] The step of training the angle determination model based on the second loss value comprises:
[0036] The angle determination model and the probability determination model are trained based on the second loss value and each of the third loss values corresponding to each of the sample sound pickup directions.
[0037] In a possible implementation, extracting features from the speech signal in each sound pickup direction to obtain speech features corresponding to each sound pickup direction includes:
[0038] For each of the sound pickup directions, extracting a speech segment corresponding to the wake-up word from the speech signal in the sound pickup direction;
[0039] Feature extraction is performed on the speech segment to obtain speech features corresponding to the sound pickup direction.
[0040] According to another aspect of an embodiment of the present application, a device for determining a sound source direction is provided, the device comprising:
[0041] A matching degree determination module, configured to determine the matching degree corresponding to the at least two sound pickup directions based on the collected target speech signal in the at least two sound pickup directions, wherein the matching degree is the matching degree between the speech signal in the sound pickup direction and the wake-up word;
[0042] A first direction determination module, used to determine a reference sound source direction based on the target speech signal;
[0043] A normalization module, used for normalizing the reference sound source angle corresponding to the reference sound source direction;
[0044] A feature extraction module, used to extract features of the speech signal in each sound pickup direction to obtain speech features corresponding to each sound pickup direction;
[0045] A probability determination module, used to determine the probability corresponding to each sound pickup direction based on the speech feature corresponding to each sound pickup direction, wherein the probability indicates the possibility that the sound pickup direction is the direction of the sound source;
[0046] The second direction determination module is used to determine the target sound source direction based on the sound source parameters of the target speech signal, wherein the sound source parameters include the normalized reference sound source angle and the matching degree and probability corresponding to the at least two sound pickup directions.
[0047] In a possible implementation, the probability determination module is used to:
[0048] Based on the speech feature corresponding to each of the pickup directions, a probability determination model is called to determine the probability corresponding to each of the pickup directions, wherein the probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction.
[0049] In a possible implementation manner, the device further includes:
[0050] A first acquisition module, configured to acquire sample speech features and sound source labels corresponding to at least two sample sound pickup directions, wherein the sample speech features are determined based on sample speech signals in the sample sound pickup directions, and the sound source labels indicate whether the sample sound pickup directions are sound source directions;
[0051] A prediction probability determination module, configured to call the probability determination model for each of the sample sound pickup directions based on the sample speech features corresponding to the sample sound pickup directions, determine the prediction probability corresponding to the sample sound pickup directions, and determine a first loss value based on the prediction probability and the sound source label;
[0052] The first training module is used to train the probability determination model based on each of the first loss values corresponding to each of the sample pickup directions.
[0053] In a possible implementation manner, the second direction determining module is configured to:
[0054] Based on the sound source parameters of the target speech signal, calling an angle determination model to determine the target sound source angle, the angle determination model being used to determine the sound source angle corresponding to the speech signal based on the sound source parameters of any speech signal;
[0055] The direction indicated by the target sound source angle is determined as the target sound source direction.
[0056] In a possible implementation manner, the device further includes:
[0057] A second acquisition module is used to obtain a sample sound source angle corresponding to a sample sound source direction, a sample reference sound source angle corresponding to a sample reference sound source direction, and a sample matching degree corresponding to at least two sample sound pickup directions, wherein the sample matching degree is a matching degree between a sample voice signal in the sample sound pickup direction and the wake-up word;
[0058] The normalization module is used to perform normalization processing on the sample reference sound source angle;
[0059] A sample probability determination module, used to determine the sample probability corresponding to each of the sample sound pickup directions based on the sample speech feature corresponding to each of the sample sound pickup directions, wherein the sample probability indicates the possibility that the sample sound pickup direction is the direction of the sound source, and the sample speech feature is determined based on the sample speech signal in the sample sound pickup direction;
[0060] A predicted sound source angle determination module, configured to call the angle determination model to determine a predicted sound source angle based on the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to the at least two sample sound pickup directions;
[0061] The second training module is used to determine a second loss value based on the predicted sound source angle and the sample sound source angle, and to train the angle determination model based on the second loss value.
[0062] In a possible implementation, the sample probability determination module is used to call a probability determination model for each of the sample sound pickup directions based on the sample speech features corresponding to the sample sound pickup directions to determine the sample probability corresponding to the sample sound pickup directions, wherein the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction;
[0063] The second training module is used to train the angle determination model and the probability determination model based on the second loss value.
[0064] In a possible implementation manner, the device further includes:
[0065] The second acquisition module is further used to acquire the sound source labels corresponding to the at least two sample sound pickup directions, wherein the sound source labels indicate whether the sample sound pickup directions are sound source directions;
[0066] The sample probability determination module is used to call a probability determination model for each of the sample sound pickup directions based on the sample speech features corresponding to the sample sound pickup directions, determine the sample probability corresponding to the sample sound pickup directions, and determine a third loss value based on the sample probability and the sound source label, wherein the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction;
[0067] The second training module is used to train the angle determination model and the probability determination model based on the second loss value and each of the third loss values corresponding to each of the sample pickup directions.
[0068] In a possible implementation, the feature extraction module is used to:
[0069] For each of the sound pickup directions, extracting a speech segment corresponding to the wake-up word from the speech signal in the sound pickup direction;
[0070] Feature extraction is performed on the speech segment to obtain speech features corresponding to the sound pickup direction.
[0071] According to another aspect of an embodiment of the present application, a terminal is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the method for determining the direction of a sound source described in any of the above possible implementations.
[0072] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the method for determining the direction of a sound source described in any possible implementation manner described above.
[0073] According to another aspect of an embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program code, the computer program code being stored in a computer-readable storage medium, a processor reading the computer program code from the computer-readable storage medium, and the processor executing the computer program code to implement the method for determining the direction of a sound source as described in any one of the possible implementations described above.
[0074] An embodiment of the present application provides a solution for determining the direction of a sound source. The matching degree corresponding to a sound pickup direction is the matching degree between a voice signal in the sound pickup direction and a wake-up word. The greater the matching degree, the closer the sound pickup direction is to the sound source direction. The voice signals in different sound pickup directions are different. The voice features corresponding to the sound pickup direction can reflect the characteristics of the voice signal in the sound pickup direction. Therefore, based on the voice features corresponding to the sound pickup direction, the probability indicating the possibility that the sound pickup direction is the sound source direction can be determined. By determining a reference sound source direction, the reference sound source angle corresponding to the reference sound source direction is normalized. By combining the normalized reference sound source angle and the matching degrees and probabilities corresponding to at least two sound pickup directions, the target sound source direction is jointly determined from multiple angles. This realizes the determination of the final sound source direction in combination with at least two sound pickup directions on the basis of the reference sound source direction, thereby improving the accuracy of the determined sound source direction. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0076] Figure 1 is a flow chart of a method for determining a sound source direction provided by an embodiment of the present application;
[0077] Figure 2 is a flow chart of another method for determining the direction of a sound source provided by an embodiment of the present application;
[0078] Figure 3 It is a flowchart of a training process of a probability determination model provided in an embodiment of the present application;
[0079] Figure 4is a flow chart of a training process of an angle determination model provided in an embodiment of the present application;
[0080] Figure 5 It is a flowchart of a joint training process of a probability determination model and an angle determination model provided in an embodiment of the present application;
[0081] Figure 6 is a flowchart of another joint training process of a probability determination model and an angle determination model provided in an embodiment of the present application;
[0082] Figure 7 is a structural block diagram of a device for determining a sound source direction provided in an embodiment of the present application;
[0083] Figure 8 It is a structural block diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0085] It can be understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept.
[0086] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0087] It should be noted that the signals and data involved in this application (including but not limited to data for processing, data for storage, data for display, etc.) are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the voice signals involved in this application are all obtained with full authorization.
[0088] The embodiment of the present application provides a method for determining the direction of a sound source, which is performed by a terminal. Optionally, the terminal includes but is not limited to an intelligent robot, a smart home device, a smart wearable device, a smart phone, a tablet computer, a laptop computer or a desktop computer, etc. Among them, the smart home device includes a voice assistant, a smart TV, a smart mirror, a smart refrigerator or other smart home devices.
[0089] Optionally, the terminal includes a voice collection component or the terminal is connected to a voice collection component, and the voice collection component is used to collect voice signals. The voice collection component includes components such as a microphone array, earphones or a microphone.
[0090] In an embodiment of the present application, the terminal has a voice interaction function. The terminal collects a voice signal based on a voice collection component. If the voice signal is a voice signal containing a wake-up word, the terminal is awakened, and then interacts with the target sound source that sends the voice signal. Among them, the target sound source is a user who sends a voice signal containing a wake-up word, and the user has the intention to interact with the terminal by voice. In addition to the target sound source, there may be other sound sources in the environment where the terminal is located. Other sound sources can be regarded as interference sound sources. The voice signals emitted by the interference sound sources have nothing to do with voice interaction and can be regarded as noise. When the target sound source emits a voice signal containing a wake-up word, the interference sound source may emit noise, causing the voice signal collected by the terminal to contain both the voice signal emitted by the target sound source and noise, so that the terminal needs to determine the sound source direction corresponding to the target sound source, and then collect voice signals for the determined sound source direction. By identifying the collected voice signal and performing corresponding operations, voice interaction with the target sound source is realized.
[0091] The method for determining the direction of the sound source provided in the embodiment of the present application can be applied to a variety of voice interaction scenarios. The application scenarios of the method for determining the direction of the sound source are introduced below. For example, if the terminal has a music playing function and the user wants to control the terminal to play music, the user can first say the wake-up word "XXXX". The terminal collects the voice signal containing the wake-up word. The method for determining the direction of the sound source provided in the embodiment of the present application determines the direction of the sound source, that is, the direction where the user is located. Even if there is noise in the surrounding environment, a more accurate direction of the sound source can be determined. After the user says "play music", the terminal can collect a more accurate voice signal containing "play music" based on the determined direction of the sound source, recognize the voice signal, and perform corresponding operations, such as playing music, thereby improving the interaction efficiency with the user and improving the user experience.
[0092] It should be noted that the above application scenarios are only exemplary descriptions and do not limit the voice interaction scenarios. In addition to being applied to the above scenarios, this application can also be applied to any other voice interaction scenarios.
[0093] Figure 1 is a flow chart of a method for determining the direction of a sound source provided by an embodiment of the present application. The method is executed by a terminal, see Figure 1 , the method comprises the following steps:
[0094] 101. Based on the collected voice signals of the target voice signal in at least two pickup directions, determine the matching degree corresponding to the at least two pickup directions, where the matching degree is the matching degree between the voice signal in the pickup direction and the wake-up word.
[0095] Among them, the target voice signal is any voice signal collected by the terminal. Optionally, a voice collection component is provided on the terminal, and the voice collection component is used to collect voice signals. Accordingly, the terminal collects the target voice signal through the voice collection component. After collecting the target voice signal, the terminal determines the sound source direction corresponding to the target voice signal based on the target voice signal, so that the voice signal can be collected for the sound source direction in the future to improve the accuracy of the collected voice signal. The sound source direction corresponding to the voice signal is the direction of the sound source that emits the voice signal relative to the terminal.
[0096] The pickup direction is the direction of picking up the voice signal, and the terminal is provided with at least two pickup directions. The embodiment of the present application extracts the voice signal in each pickup direction from the target voice signal. Optionally, when the number of pickup directions is multiple, there is an angle between two adjacent pickup directions, and the angle can be the same or different. For example, the four pickup directions include a 30-degree pickup direction, a 60-degree pickup direction, a 90-degree pickup direction, and a 120-degree pickup direction, and the angle between two adjacent pickup directions is the same, both 30 degrees. For another example, the three pickup directions include a 45-degree pickup direction, a 90-degree pickup direction, and a 180-degree pickup direction, and the angle between any two adjacent pickup directions is different. The embodiment of the present application does not limit the size of the angle between two adjacent pickup directions.
[0097] The wake-up word is used to wake up the terminal. The wake-up word can be set as needed, and the embodiment of the present application is not limited to this. For example, the wake-up word is "Xiaobai" or "Mirror Mirror". To save power consumption, the terminal is generally in a dormant state, and the terminal can also collect voice signals in the dormant state. The match between the voice signal and the wake-up word indicates the degree of similarity between the voice signal and the wake-up word. The greater the match, the more similar the voice signal is to the wake-up word; the smaller the match, the less similar the voice signal is to the wake-up word. The representation of the match can be set as needed, and the embodiment of the present application is not limited to this. For example, the match is expressed as a decimal between 0 and 1, such as a match of 0.6 or 0.8.
[0098] 102. Determine a reference sound source direction based on the target speech signal.
[0099] Optionally, the terminal determines the reference sound source direction based on the target voice signal through a DOA (Direction Of Arrival) estimation algorithm or other sound source localization algorithm. When there is noise in the surrounding environment, the collected target voice signal is likely to contain noise, and the determined reference sound source direction may also be the sound source direction corresponding to the interfering sound source emitting the noise, so the reference sound source direction is not accurate enough.
[0100] 103. Perform normalization processing on the reference sound source angle corresponding to the reference sound source direction.
[0101] Among them, the reference sound source angle is the sound source angle corresponding to the reference sound source direction. For example, if the reference sound source direction is 30 degrees, the reference sound source angle is 30 degrees. For example, if the reference sound source direction is 90 degrees, the reference sound source angle is 90 degrees. Normalization is to map the data to a certain data range to facilitate subsequent data processing. The data range of the normalization process can be set as needed, and the embodiment of the present application is not limited to this. For example, the data range is 0 to 1. Accordingly, if the range to which the reference sound source angle belongs is 0 to 180 degrees, the normalization process is to divide the reference sound source angle by 180 degrees; if the range to which the reference sound source angle belongs is 0 to 360 degrees, the normalization process is to divide the reference sound source angle by 360 degrees.
[0102] In the embodiment of the present application, the data range is unified by normalizing the reference sound source angle.
[0103] 104. Perform feature extraction on the speech signal in each sound pickup direction to obtain speech features corresponding to each sound pickup direction.
[0104] There are differences in speech signals in different pickup directions. By extracting features from the speech signals, the extracted speech features can reflect the characteristics of the speech signals. Therefore, the speech features corresponding to the pickup direction can reflect the difference between the pickup direction and other pickup directions.
[0105] 105. Based on the speech features corresponding to each sound pickup direction, determine the probability corresponding to each sound pickup direction, where the probability represents the possibility that the sound pickup direction is the direction of the sound source.
[0106] The sound source direction is the sound source direction corresponding to the target sound source. Since the voice feature can reflect the difference between the sound pickup direction and other sound pickup directions, the possibility that the sound pickup direction is the sound source direction can be determined based on the voice feature, that is, the probability corresponding to the sound pickup direction.
[0107] 106. Determine a target sound source direction based on sound source parameters of the target speech signal, where the sound source parameters include a normalized reference sound source angle and matching degrees and probabilities corresponding to at least two sound pickup directions.
[0108] Among them, the target sound source direction is the sound source direction determined by the terminal. The terminal regards the target sound source direction as the sound source direction corresponding to the target sound source, so that the voice signal can be collected for the target sound source direction subsequently, which can improve the accuracy of the collected voice signal.
[0109] An embodiment of the present application provides a solution for determining the direction of a sound source. The matching degree corresponding to a sound pickup direction is the matching degree between a voice signal in the sound pickup direction and a wake-up word. The greater the matching degree, the closer the sound pickup direction is to the sound source direction. The voice signals in different sound pickup directions are different. The voice features corresponding to the sound pickup direction can reflect the characteristics of the voice signal in the sound pickup direction. Therefore, based on the voice features corresponding to the sound pickup direction, the probability indicating the possibility that the sound pickup direction is the sound source direction can be determined. By determining a reference sound source direction, the reference sound source angle corresponding to the reference sound source direction is normalized. By combining the normalized reference sound source angle and the matching degrees and probabilities corresponding to at least two sound pickup directions, the target sound source direction is jointly determined from multiple angles. This realizes the determination of the final sound source direction in combination with at least two sound pickup directions on the basis of the reference sound source direction, thereby improving the accuracy of the determined sound source direction.
[0110] Figure 2 is a flowchart of another method for determining the direction of a sound source provided by an embodiment of the present application. The method is executed by a terminal, see Figure 2 , the method comprises the following steps:
[0111] 201. Determine speech signals of the collected target speech signal in at least two sound pickup directions.
[0112] Among them, the target voice signal is any voice signal collected by the terminal. Optionally, a voice collection component is provided on the terminal, and the voice collection component is used to collect voice signals. Accordingly, the terminal collects the target voice signal through the voice collection component. After collecting the target voice signal, the terminal determines the sound source direction corresponding to the target voice signal based on the target voice signal, so that the voice signal can be collected for the sound source direction in the future to improve the accuracy of the collected voice signal. The sound source direction corresponding to the voice signal is the direction of the sound source that emits the voice signal relative to the terminal.
[0113] The sound pickup direction is the direction of picking up the voice signal, and the sound pickup direction can be set as needed. Optionally, when the number of sound pickup directions is multiple, there is an angle between two adjacent sound pickup directions, and the angle can be the same or different. For example, the four sound pickup directions include a 30-degree sound pickup direction, a 60-degree sound pickup direction, a 90-degree sound pickup direction, and a 120-degree sound pickup direction. At this time, the angle between two adjacent sound pickup directions is the same, both 30 degrees. For another example, the three sound pickup directions include a 45-degree sound pickup direction, a 90-degree sound pickup direction, and a 180-degree sound pickup direction. At this time, the angle between any two adjacent sound pickup directions is different. The embodiment of the present application does not limit the size of the angle between two adjacent sound pickup directions.
[0114] The embodiment of the present application extracts a speech signal in each pickup direction from the target speech signal. The target speech signal includes an initial speech signal in each pickup direction of at least two pickup directions. Optionally, the implementation method of step 201 includes: for each pickup direction, performing noise suppression on the initial speech signals in other pickup directions except the pickup direction in the target speech signal, and determining the target speech signal after noise suppression as the speech signal in the pickup direction.
[0115] In the embodiment of the present application, each pickup direction may be a real sound source direction, so for each pickup direction, the pickup direction can be regarded as the main pickup direction, and the initial voice signal in the pickup direction can be regarded as the main voice signal. The initial voice signals in other pickup directions except the pickup direction may be noise in the environment. By performing noise suppression on the initial voice signals in other pickup directions, the voice signal in the pickup direction is more prominent in the target voice signal after noise suppression and is the main voice signal, thereby being able to more accurately reflect the situation of the voice signal in the pickup direction.
[0116] 202. Determine a matching degree corresponding to at least two sound pickup directions based on the speech signal of the target speech signal in at least two sound pickup directions, where the matching degree is a matching degree between the speech signal in the sound pickup direction and the wake-up word.
[0117] Among them, the wake-up word is used to wake up the terminal, and the wake-up word can be set as needed, which is not limited in the embodiments of the present application. To save power consumption, the terminal is generally in a dormant state, and the terminal can also collect voice signals in a dormant state. The matching degree between the voice signal and the wake-up word indicates the similarity between the voice signal and the wake-up word. The greater the matching degree, the more similar the voice signal is to the wake-up word; the smaller the matching degree, the less similar the voice signal is to the wake-up word.
[0118] Optionally, the degree of match is determined based on a wake-up model, and the wake-up model is used to determine the degree of match between any voice signal and the wake-up word. Accordingly, the implementation method of step 202 includes: based on the voice signal in at least two pickup directions, calling the wake-up model, and determining the degree of match corresponding to at least two pickup directions. Among them, the wake-up model is trained for the wake-up word, and the wake-up model includes the wake-up word. The input data of the wake-up model is the voice signal in the pickup direction, and the output data is the degree of match between the voice signal and the wake-up word.
[0119] Optionally, the training process of the wake-up model includes: taking the label corresponding to the sample voice signal as supervision, training the wake-up model based on the sample voice signal, wherein the label corresponding to the sample voice signal indicates whether the sample voice signal is the voice signal corresponding to the wake-up word. Accordingly, the wake-up model is called to determine the predicted matching degree between the sample voice signal and the wake-up word, determine the loss value based on the predicted matching degree and the label, and train the wake-up model based on the loss value. The smaller the difference between the predicted matching degree and the label, the smaller the loss value, and the more accurate the prediction of the wake-up model. The greater the difference between the predicted matching degree and the label, the greater the loss value, and the less accurate the prediction of the wake-up model. Then the training goal of the wake-up model is to minimize the loss value, that is, to make the predicted matching degree between the sample voice signal and the wake-up word approach the label corresponding to the sample voice signal. The wake-up model can learn a large number of relationships between sample voice signals and wake-up words during the training process, so that after the voice signal is input into the trained wake-up model, the wake-up model can output a relatively accurate matching degree between the voice signal and the wake-up word, so that the accuracy of the determined matching degree is high.
[0120] In an embodiment of the present application, after determining the matching degree corresponding to at least two pickup directions, it is first determined whether to wake up the terminal based on the matching degree corresponding to at least two pickup directions. If the terminal is woken up, the terminal is in a working state. In the working state, the terminal performs subsequent operations to determine the target sound source direction. Accordingly, after step 202, the terminal executes step 203.
[0121] 203. If there is a matching degree greater than a matching degree threshold among the matching degrees corresponding to at least two sound pickup directions, the terminal is woken up.
[0122] Among them, the matching degree threshold can be set as needed, and the embodiment of the present application does not limit this. For example, the matching degree threshold is a real number between 0 and 1, such as 0.7, 0.8 or 0.9. If the matching degree between the voice signal and the wake-up word is greater than the matching degree threshold, it means that the voice signal is similar to the wake-up word, then the voice signal is likely to contain the wake-up word, and the voice signal can be used to wake up the terminal; if the matching degree between the voice signal and the wake-up word is not greater than the matching degree threshold, it means that the voice signal is not very similar to the wake-up word, then the voice signal is likely not a voice signal used to wake up the terminal. Correspondingly, if there is a matching degree greater than the matching degree threshold in the matching degree corresponding to at least two pickup directions, the terminal is woken up and the terminal is switched from a dormant state to a working state so that the terminal can interact with the sound source by voice. If there is no matching degree greater than the matching degree threshold in the matching degree corresponding to at least two pickup directions, it means that the target voice signal may not be a voice signal used to wake up the terminal, then the terminal is not woken up, and the terminal is kept in a dormant state. When in a dormant state, if a voice signal is collected, step 201 is executed.
[0123] 204. Determine a reference sound source direction based on the target speech signal.
[0124] Optionally, the terminal determines the reference sound source direction based on the target voice signal through a DOA estimation algorithm or other sound source localization algorithm. However, when there is noise in the surrounding environment, the collected target voice signal is likely to contain noise, and the determined reference sound source direction may also be the sound source direction corresponding to the interfering sound source emitting the noise, so the reference sound source direction is not accurate enough.
[0125] 205. Perform normalization processing on the reference sound source angle corresponding to the reference sound source direction.
[0126] Among them, the reference sound source angle is the sound source angle corresponding to the reference sound source direction. For example, if the reference sound source direction is 30 degrees, the reference sound source angle is 30 degrees. For example, if the reference sound source direction is 90 degrees, the reference sound source angle is 90 degrees. Normalization is to map the data to a certain data range to facilitate subsequent data processing. The data range of the normalization process can be set as needed, and the embodiment of the present application is not limited to this. For example, the data range is 0 to 1. Accordingly, if the range to which the reference sound source angle belongs is 0 to 180 degrees, the normalization process is to divide the reference sound source angle by 180 degrees; if the range to which the reference sound source angle belongs is 0 to 360 degrees, the normalization process is to divide the reference sound source angle by 360 degrees.
[0127] In the embodiment of the present application, the data range is unified by normalizing the reference sound source angle.
[0128] 206. Perform feature extraction on the speech signal in each sound pickup direction to obtain speech features corresponding to each sound pickup direction.
[0129] In addition to the voice segment corresponding to the wake-up word, the voice signal in the pickup direction may also include other voice segments, and the other voice segments are voice segments unrelated to the wake-up word, so the voice signal can be intercepted. Optionally, the implementation method of step 206 includes: for each pickup direction, intercepting the voice segment corresponding to the wake-up word from the voice signal in the pickup direction; extracting features of the voice segment to obtain the voice features corresponding to the pickup direction. Among them, there are many ways to extract features, such as extracting frequency domain features, extracting FBank (Filter Bank) features, extracting MFCC (Mel Frequency Cepstral Coefficent) features or other feature extraction methods.
[0130] In an embodiment of the present application, if the extracted voice features also include voice features of other voice segments, the voice features will not accurately represent the characteristics of the voice segment corresponding to the wake-up word. Therefore, by first intercepting the voice segment corresponding to the wake-up word from the voice signal, and then performing feature extraction on the voice segment, the extracted voice features are more correlated with the wake-up word, so that the accuracy of the obtained voice features is higher. There are differences in voice signals in different pickup directions. By performing feature extraction on the voice signals, the extracted voice features can better reflect the characteristics of the voice signals. Therefore, the voice features corresponding to the pickup direction can reflect the difference between the pickup direction and other pickup directions.
[0131] 207. Determine the probability corresponding to each sound pickup direction based on the speech feature corresponding to each sound pickup direction, where the probability represents the possibility that the sound pickup direction is the direction of the sound source.
[0132] Wherein, the sound source direction is the sound source direction corresponding to the target sound source. Since the speech feature can reflect the difference between the pickup direction and other pickup directions, the possibility that the pickup direction is the sound source direction can be determined based on the speech feature, that is, the probability corresponding to the pickup direction. Optionally, the probability corresponding to the pickup direction is determined by a probability determination model, and the probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction. Correspondingly, the implementation method of step 207 includes: based on the speech feature corresponding to each pickup direction, calling the probability determination model to determine the probability corresponding to each pickup direction. Wherein, the input data of the probability determination model is the speech feature corresponding to the pickup direction, and the output data is the probability corresponding to the pickup direction. Since the probability determination model can determine the probability that the pickup direction corresponding to the input speech feature is the sound source direction, by calling the probability determination model based on the speech feature corresponding to each pickup direction, the probability corresponding to each pickup direction can be determined, and the determined probability is more accurate.
[0133] Optionally, the probability determination model is a neural network model, such as a CNN (Convolutional Neural Networks) model, an LSTM (Long Short-Term Memory) model or other neural network models, etc., which is not limited in the embodiments of the present application. Optionally, the probability determination model includes a softmax layer (a neural network layer) and other network layers, wherein the softmax layer is located behind the other networks. The other network layers are used to process the input data of the probability determination model to obtain the output data of the other network layers, and the softmax layer is used to normalize the output data of the network layer before the softmax in the probability determination model, and convert the output data into probability.
[0134] The training process of the probability determination model is as follows Figure 3 The embodiments shown in the figure are not described here for the time being.
[0135] 208. Determine a target sound source direction based on sound source parameters of the target speech signal, where the sound source parameters include a normalized reference sound source angle, and matching degrees and probabilities corresponding to at least two sound pickup directions.
[0136] After determining the probabilities corresponding to at least two pickup directions, the target sound source direction can be jointly determined by the angle determination model based on the normalized reference sound source angle and the matching degree and probability corresponding to at least two pickup directions. The angle determination model is used to determine the sound source angle corresponding to the speech signal based on the sound source parameters of any speech signal. Optionally, the implementation of step 208 includes: based on the sound source parameters, calling the angle determination model to determine the target sound source angle; and determining the direction indicated by the target sound source angle as the target sound source direction.
[0137] Optionally, if the matching degree or probability does not belong to the same data range as the normalized reference sound source angle, the matching degree or probability is normalized, and based on the normalized reference sound source angle, the normalized matching degree and the normalized probability, the angle determination model is called to determine the target sound source angle, thereby facilitating the angle determination model to process data. The input data of the angle determination model is the normalized reference sound source angle and the matching degree and probability corresponding to at least two sound pickup directions, and the output data is the target sound source angle.
[0138] Accordingly, if the target sound source angle output by the angle determination model belongs to the normalized data range but does not conform to the real angle range, the output target sound source angle is denormalized so that the denormalized target sound source angle conforms to the real angle range, thereby determining the direction indicated by the denormalized target sound source angle as the target sound source direction. For example, the output target sound source angle is multiplied by 180 degrees or 360 degrees to obtain the denormalized target sound source angle. If the denormalized target sound source angle is 45 degrees, the target sound source direction is the 45-degree direction.
[0139] Optionally, the angle determination model is a neural network model, such as a CNN model, an LSTM model or other neural network models, etc., which is not limited in the present embodiment of the application. The training process of the angle determination model is as follows Figure 4 The embodiments shown in the figure are not described here for the time being.
[0140] An embodiment of the present application provides a solution for determining the direction of a sound source. The matching degree corresponding to a pickup direction is the matching degree between a voice signal in the pickup direction and a wake-up word. The greater the matching degree, the closer the pickup direction is to the sound source direction. The probability corresponding to the pickup direction is determined based on the voice feature corresponding to the pickup direction. Voice signals in different pickup directions are different, and voice features can better reflect the characteristics of voice signals in different pickup directions. Therefore, based on the voice feature corresponding to the pickup direction, the probability indicating the possibility that the pickup direction is the sound source direction can be determined. By determining a reference sound source direction, the reference sound source angle corresponding to the reference sound source direction is normalized. Thus, by combining the normalized reference sound source angle and the matching degrees and probabilities corresponding to at least two pickup directions, the target sound source direction is jointly determined from multiple angles, thereby achieving determination of the final sound source direction in combination with at least two pickup directions on the basis of the reference sound source direction, thereby improving the accuracy of the determined sound source direction.
[0141] The above embodiment describes the process of determining the direction of the sound source, and the following describes the training process of the probability determination model and the angle determination model. In the embodiment of the present application, the probability determination model and the angle determination model are trained with the terminal or the server as the execution subject. When the execution subject is the server, the server trains the probability determination model and the angle determination model, and deploys the trained probability determination model and the angle determination model on the terminal.
[0142] Alternatively, the trained probability determination model and angle determination model are deployed on the server. When the terminal needs to determine the direction of the sound source, the server calls the probability determination model and the angle determination model to determine the target sound source direction. The server sends the determined target sound source direction to the terminal, and the terminal receives the target sound source direction, thereby realizing the sound source direction determination process.
[0143] Figure 3 is a flow chart of a training process of a probability determination model provided in an embodiment of the present application. Taking the training process executed by the server as an example, see Figure 3 , the training process includes the following steps:
[0144] 301. Obtain sample speech features and sound source labels corresponding to at least two sample sound pickup directions, where the sample speech features are determined based on sample speech signals in the sample sound pickup directions, and the sound source labels indicate whether the sample sound pickup directions are sound source directions.
[0145] Wherein, each sample sound pickup direction has its own corresponding sample voice feature and sound source label. The sample sound pickup direction can be set as needed. Optionally, the sound source sends a voice signal, the terminal collects the voice signal, and sends the collected voice signal to the server, the server receives the collected voice signal, and extracts at least two sample sound pickup directions from the collected voice signal, thereby determining the sample voice feature corresponding to each sample sound pickup direction based on the sample voice signal in each sample sound pickup direction. The sound source direction of the sound source that sends the voice signal can be determined, and then the sound source label corresponding to each sample sound pickup direction is determined based on the sound source direction. Wherein, the representation form of the sound source label can be set as needed, for example, the sound source label is 1 or 0, the sound source label is 1, indicating that the sample sound pickup direction is the sound source direction, and the sound source label is 0, indicating that the sample sound pickup direction is not the sound source direction. Optionally, the implementation method of extracting the sample voice signals in at least two sample sound pickup directions from the collected voice signal and the implementation method of determining the sample voice feature corresponding to each sample sound pickup direction based on the sample voice signals in each sample sound pickup direction refer to the above Figure 2 The illustrated embodiments will not be described in detail here.
[0146] 302. For each sample sound pickup direction, based on the sample speech feature corresponding to the sample sound pickup direction, call the probability determination model to determine the predicted probability corresponding to the sample sound pickup direction, and determine the first loss value based on the predicted probability and the sound source label.
[0147] Among them, the input data of the probability determination model is the speech feature corresponding to the pickup direction, and the output data is the predicted probability corresponding to the pickup direction. The predicted probability is the probability determination model's prediction of the possibility that the sample pickup direction is the sound source direction. The sound source label indicates whether the sample pickup direction is the sound source direction. The training goal of the probability determination model is to make the predicted probability corresponding to the sample pickup direction approach its corresponding sound source label. Optionally, the smaller the difference between the predicted probability and the sound source label, the smaller the determined first loss value, and the greater the difference between the predicted probability and the sound source label, the greater the determined first loss value, that is, the first loss value is positively correlated with the difference between the predicted probability and the sound source label. Optionally, based on the predicted probability and the sound source label, the loss function is called to determine the first loss value. The loss function can be a cross entropy loss function or other loss functions.
[0148] 303. Based on each first loss value corresponding to each sample pickup direction, train a probability determination model.
[0149] Wherein, the number of first loss values is the same as the number of sample pickup directions. Optionally, the model loss value is determined based on at least two first loss values, and the probability determination model is trained based on the model loss value. Wherein, the model loss value can be the average of at least two first loss values. In an embodiment of the present application, based on the model loss value, the model parameters of the probability determination model are adjusted, and the above steps 301-303 are repeated for the adjusted probability determination model until the training meets the target conditions, and the trained probability determination model is obtained. Wherein, the target condition can be that the number of training times reaches a number threshold, or the model loss value reaches a loss value threshold. Both the number threshold and the loss value threshold can be set as needed. For example, the number threshold is 100, 200 or 500, etc., and the loss value threshold is 0.01, 0.001 or 0.0001, etc.
[0150] It should be noted that the embodiment of the present application takes one iteration of the probability determination model as an example for explanation, and the sample data of one iteration is the sample speech features corresponding to at least two sample pickup directions, and the sample speech signals corresponding to at least two sample pickup directions are extracted from the same collected speech signal. The training process of the probability determination model includes multiple iterations, and multiple speech signals can be obtained. For each speech signal, sample speech signals corresponding to at least two sample pickup directions are extracted from the speech signal to determine the corresponding sample speech features and sound source labels. Optionally, the probability determination model is iterated once for each speech signal, and each iteration is the same as the iterative process shown in the above embodiment, which will not be repeated here.
[0151] In an embodiment of the present application, by obtaining sample speech features and sound source labels corresponding to at least two sample sound pickup directions, the sample speech features corresponding to at least two sample sound pickup directions can be used as input data of a probability determination model, and the probability determination model is called to determine the predicted probability corresponding to each sample sound pickup direction, thereby determining a first loss value based on the predicted probability and the sound source label corresponding to it, and based on the first loss value, the probability determination model is trained so that the probability determination model can learn the relationship between the sample speech features corresponding to the sample sound pickup directions and the sound source labels, so that the trained probability determination model can more accurately predict the probability corresponding to the input sound pickup direction.
[0152] Figure 4 is a flow chart of a training process of an angle determination model provided in an embodiment of the present application. Taking the training process executed by the server as an example, see Figure 4 , the training process includes the following steps:
[0153] 401. Obtain a sample sound source angle corresponding to a sample sound source direction, a sample reference sound source angle corresponding to a sample reference sound source direction, and a sample matching degree corresponding to at least two sample sound pickup directions, where the sample matching degree is a matching degree between a sample voice signal and a wake-up word in the sample sound pickup direction.
[0154] Among them, the sample sound source direction is the sound source direction of the sound source. For example, if the sample sound source direction is 30 degrees, the sample sound source angle is 30 degrees. Optionally, the sound source sends a voice signal, the terminal collects the voice signal, and sends the collected voice signal to the server. The server receives the collected voice signal, and extracts at least two sample voice signals in the sample pickup direction from the collected voice signal, thereby determining the sample matching degree between the sample voice signal corresponding to each sample pickup direction and the wake-up word based on the sample voice signal in each sample pickup direction. The sound source direction of the sound source that emits the voice signal can be determined, and the sample sound source angle corresponding to the sample sound source direction can be determined. And the server also determines the sample reference sound source direction based on the collected voice signal. For example, the server determines the sample reference sound source direction based on the collected voice signal through a DOA estimation algorithm or other sound source localization algorithm.
[0155] Optionally, the implementation method of extracting at least two sample voice signals in the sample pickup directions from the collected voice signal and the implementation method of determining the sample matching degree between the sample voice signal corresponding to each sample pickup direction and the wake-up word refer to the above Figure 2 The illustrated embodiments will not be described in detail here.
[0156] 402. Normalize the sample reference sound source angle.
[0157] Optionally, the implementation method of this step refers to step 205 and will not be repeated here.
[0158] 403. Based on the sample speech feature corresponding to each sample sound pickup direction, determine the sample probability corresponding to each sample sound pickup direction, the sample probability indicating the possibility that the sample sound pickup direction is the sound source direction, the sample speech feature being determined based on the sample speech signal in the sample sound pickup direction.
[0159] Optionally, the sample probability corresponding to the sample pickup direction is determined by a probability determination model, the probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction, and the probability determination model is a trained model. The training process of the probability determination model is described above. Figure 3 The embodiment shown is not described in detail here. Accordingly, based on the sample speech features corresponding to each sample pickup direction, the probability determination model is called to determine the sample probability corresponding to each sample pickup direction. The implementation method of this step is referred to the above step 207, which is not described in detail here.
[0160] In the embodiment of the present application, by obtaining the sample reference sound source angle, the sample matching degree and the sample probability corresponding to the sample pickup direction, the sample data of the angle determination model is made richer.
[0161] 404. Based on the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to at least two sample pickup directions, call the angle determination model to determine the predicted sound source angle.
[0162] The input data of the angle determination model includes the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to at least two sample pickup directions, and the output data is the predicted sound source angle. The predicted sound source angle is the prediction of the sound source angle by the angle determination model.
[0163] Optionally, the implementation method of this step refers to step 208 and will not be repeated here.
[0164] 405. Determine a second loss value based on the predicted sound source angle and the sample sound source angle, and train an angle determination model based on the second loss value.
[0165] Among them, the sample sound source angle is the real sound source angle, and the training goal of the angle determination model is to make the predicted sound source angle approach the sample sound source angle. Optionally, the smaller the difference between the predicted sound source angle and the sample sound source angle, the smaller the determined second loss value, and the greater the difference between the predicted sound source angle and the sample sound source angle, the greater the determined second loss value, that is, the second loss value is positively correlated with the difference between the predicted sound source angle and the sample sound source angle. Optionally, based on the predicted sound source angle and the sample sound source angle, a loss function is called to determine the second loss value. The loss function can be a cross entropy loss function or other loss functions.
[0166] In the embodiment of the present application, based on the second loss value, the model parameters of the angle determination model are adjusted, and the above steps 401 to 404 are repeated for the adjusted angle determination model until the training meets the target condition, and the trained angle determination model is obtained. The target condition may be that the number of training times reaches the number threshold, or the second loss value reaches the loss value threshold. Both the number threshold and the loss value threshold can be set as needed.
[0167] It should be noted that the embodiment of the present application takes one iteration of the angle determination model as an example for explanation, and the sample data of one iteration are the sample matching degrees and sample probabilities corresponding to at least two sample pickup directions, and the sample voice signals corresponding to at least two sample pickup directions are extracted from the same collected voice signal. The training process of the angle determination model includes multiple iterations, and multiple voice signals can be obtained. For each voice signal, sample voice signals corresponding to at least two sample pickup directions are extracted from the voice signal to determine the corresponding sample matching degrees and sample probabilities. Optionally, the angle determination model is iterated once for each voice signal, and each iteration is the same as the iterative process shown in the above embodiment, which will not be repeated here.
[0168] In an embodiment of the present application, by obtaining the sample sound source angle corresponding to the sample sound source direction, the normalized sample reference sound source angle corresponding to the sample reference sound source direction, and the sample matching degree and sample probability corresponding to at least two sample sound pickup directions, the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to at least two sample sound pickup directions are used as input data of the angle determination model, and the angle determination model is called to determine the predicted sound source angle, so as to determine the second loss value based on the predicted sound source angle and the sample sound source angle, and based on the second loss value, the angle determination model is trained so that the angle determination model can learn the relationship between the sample reference sound source angle, the sample matching degree corresponding to the sample sound pickup direction, the sample probability and the sample sound source angle, so that the trained angle determination model can predict the sound source angle more accurately.
[0169] In the above Figure 3 and Figure 4 In the training process shown, the probability determination model and the angle determination model are trained separately. In a possible implementation, the probability determination model and the angle determination model can also be trained jointly, and the joint training process is described below.
[0170] Figure 5 is a flowchart of a joint training process of a probability determination model and an angle determination model provided in an embodiment of the present application. Taking the training process executed by the server as an example, see Figure 5 , the training process includes the following steps:
[0171] 501. Obtain a sample sound source angle corresponding to a sample sound source direction, a normalized sample reference sound source angle corresponding to a sample reference sound source direction, and sample voice features and sample matching degrees corresponding to at least two sample sound pickup directions, wherein the sample voice features are determined based on a sample voice signal in the sample sound pickup direction, and the sample matching degree is a matching degree between the sample voice signal in the sample sound pickup direction and the wake-up word.
[0172] The implementation of step 501 refers to step 301 and steps 401 to 402, which will not be described in detail here.
[0173] 502. For each sample sound pickup direction, based on the sample speech feature corresponding to the sample sound pickup direction, call a probability determination model to determine the sample probability corresponding to the sample sound pickup direction. The probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction.
[0174] The implementation method of step 502 is shown in step 403. It should be noted that the embodiment of the present application is to jointly train the probability determination model and the angle determination model, so the probability determination model is an untrained model, and the above Figure 4The illustrated embodiment is a separately trained angle determination model, and the probability determination model used is a trained model.
[0175] 503. Based on the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to at least two sample pickup directions, call the angle determination model to determine the predicted sound source angle.
[0176] 504. Determine a second loss value based on the predicted sound source angle and the sample sound source angle.
[0177] 505. Based on the second loss value, train the angle determination model and the probability determination model.
[0178] The implementation method of step 503-step 505 refers to step 404-step 405. It should be noted that in the embodiment of the present application, based on the second loss value, the model parameters of the probability determination model and the model parameters of the angle determination model are adjusted respectively, and the above steps are repeated for the adjusted probability determination model and the adjusted angle determination model until the training meets the target conditions, and the trained probability determination model and the trained angle determination model are obtained. Among them, the target condition can be that the number of training times reaches the number threshold, or the second loss value reaches the loss value threshold. The number threshold and the loss value threshold can be set as needed.
[0179] In an embodiment of the present application, the probability determination model is first called to determine the sample probability corresponding to the sample pickup direction, and then the angle determination model is called to determine the predicted sound source angle. Considering that the accuracy of the angle determination model is more important for determining the sound source angle, and the angle determination model refers to the sample probability output by the probability determination model when determining the predicted sound source angle, the second loss value is determined based on the predicted sound source angle output by the angle determination model and the sample sound source angle, and based on the second loss value, the probability determination model and the angle determination model are trained, thereby realizing the joint training of the probability determination model and the angle determination model and focusing more on the training of the angle determination model. The trained angle determination model has higher accuracy.
[0180] In the above Figure 5 In the joint training process shown in FIG. 1 , the loss values used by the angle determination model and the probability determination model are determined based on the output data of the angle determination model. In a possible implementation, the output data of the probability determination model can also be used to determine the loss value. Accordingly, Figure 6 is a flowchart of another joint training process of a probability determination model and an angle determination model provided in an embodiment of the present application. Taking the training process executed by the server as an example, see Figure 6 , the training process includes the following steps:
[0181] 601. Obtain a sample sound source angle corresponding to a sample sound source direction, a normalized sample reference sound source angle corresponding to a sample reference sound source direction, and a sample voice feature, a sample matching degree, and a sound source label corresponding to at least two sample pickup directions. The sample voice feature is determined based on a sample voice signal in the sample pickup direction. The sample matching degree is the matching degree between the sample voice signal in the sample pickup direction and the wake-up word. The sound source label indicates whether the sample pickup direction is a sound source direction.
[0182] The implementation of step 601 is similar to step 301 and step 401-step 402. Figure 5 What is different from the illustrated embodiment is that the embodiment of the present application also obtains the sound source label corresponding to the sample pickup direction, so that the probability determination model can be trained with the sound source label as supervision.
[0183] 602. For each sample pickup direction, based on the sample speech feature corresponding to the sample pickup direction, call the probability determination model to determine the sample probability corresponding to the sample pickup direction, and determine the third loss value based on the sample probability and the sound source label. The probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction.
[0184] The implementation of step 602 is similar to step 302. Figure 5 What is different from the shown embodiment is that, in the embodiment of the present application, after the probability determination model determines the sample probability, a third loss value is also determined based on the sample probability and the sound source label. The third loss value can represent the learning status of the probability determination model in the current iteration process. The smaller the third loss value, the better the learning effect of the probability determination model, and the larger the third loss value, the worse the learning effect of the probability determination model.
[0185] 603. Based on the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to at least two sample pickup directions, call the angle determination model to determine the predicted sound source angle.
[0186] 604. Determine a second loss value based on the predicted sound source angle and the sample sound source angle.
[0187] The implementation of step 603-step 604 refers to step 404-step 405, which will not be repeated here.
[0188] 605. Based on the second loss value and each third loss value corresponding to each sample pickup direction, train an angle determination model and a probability determination model.
[0189] Since the loss value is determined based on the output data of the probability determination model and the output data of the angle determination model, respectively, the model loss value can be determined in combination with the third loss value and the third loss value corresponding to each sample pickup direction, and the probability determination model and the angle determination model can be trained based on the model loss value. Among them, the model loss value can be the average of the second loss value and the third loss value corresponding to each sample pickup direction. In an embodiment of the present application, based on the model loss value, the model parameters of the probability determination model and the model parameters of the angle determination model are adjusted respectively, and the above steps are repeated for the adjusted probability determination model and the adjusted angle determination model until the training meets the target conditions, and the trained probability determination model and the trained angle determination model are obtained. Among them, the target condition can be that the number of training times reaches the number threshold, or the model loss value reaches the loss value threshold. Both the number threshold and the loss value threshold can be set as needed.
[0190] In an embodiment of the present application, the probability determination model is first called to determine the sample probability corresponding to the sample pickup direction, and the third loss value is determined based on the sample probability and the sound source label output by the probability determination model. Then, the angle determination model is called to determine the predicted sound source angle, and the second loss value is determined based on the predicted sound source angle output by the angle determination model and the sample sound source angle. Thus, the probability determination model and the angle determination model can be trained in combination with the determined second loss value and the determined at least one third loss value, so that the loss values used for training the probability determination model and the angle determination model refer to the outputs of these two models, so that the joint training of the probability determination model and the angle determination model is closer, and the trained probability determination model and the angle determination model have higher accuracy.
[0191] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0192] Figure 7 is a structural block diagram of a device for determining a sound source direction provided in an embodiment of the present application. Figure 7 , the device comprises:
[0193] A matching degree determination module 701 is used to determine the matching degree corresponding to at least two pickup directions based on the collected target voice signal in at least two pickup directions, where the matching degree is the matching degree between the voice signal in the pickup direction and the wake-up word;
[0194] A first direction determination module 702, configured to determine a reference sound source direction based on a target speech signal;
[0195] A normalization module 703 is used to perform normalization processing on the reference sound source angle corresponding to the reference sound source direction;
[0196] A feature extraction module 704 is used to extract features from the speech signal in each sound pickup direction to obtain speech features corresponding to each sound pickup direction;
[0197] A probability determination module 705 is used to determine the probability corresponding to each sound pickup direction based on the speech feature corresponding to each sound pickup direction, where the probability indicates the possibility that the sound pickup direction is the direction of the sound source;
[0198] The second direction determination module 706 is used to determine the target sound source direction based on the sound source parameters of the target speech signal, where the sound source parameters include the normalized reference sound source angle and the matching degree and probability corresponding to at least two pickup directions.
[0199] In a possible implementation, the probability determination module 705 is used to: based on the speech features corresponding to each pickup direction, call the probability determination model to determine the probability corresponding to each pickup direction, and the probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction.
[0200] In a possible implementation, the device further includes:
[0201] A first acquisition module is used to acquire sample speech features and sound source labels corresponding to at least two sample sound pickup directions, wherein the sample speech features are determined based on sample speech signals in the sample sound pickup directions, and the sound source labels indicate whether the sample sound pickup directions are sound source directions;
[0202] A prediction probability determination module is used to call a probability determination model for each sample sound pickup direction based on the sample speech feature corresponding to the sample sound pickup direction, determine the prediction probability corresponding to the sample sound pickup direction, and determine a first loss value based on the prediction probability and the sound source label;
[0203] The first training module is used to train the probability determination model based on each first loss value corresponding to each sample pickup direction.
[0204] In one possible implementation, the second direction determination module 706 is used to: call the angle determination model based on the sound source parameters of the target speech signal to determine the target sound source angle, where the angle determination model is used to determine the sound source angle corresponding to the speech signal based on the sound source parameters of any speech signal; and determine the direction indicated by the target sound source angle as the target sound source direction.
[0205] In a possible implementation, the device further includes:
[0206] The second acquisition module is used to obtain a sample sound source angle corresponding to the sample sound source direction, a sample reference sound source angle corresponding to the sample reference sound source direction, and a sample matching degree corresponding to at least two sample sound pickup directions, where the sample matching degree is the matching degree between the sample voice signal and the wake-up word in the sample sound pickup direction;
[0207] A normalization module 703 is used to perform normalization processing on the sample reference sound source angle;
[0208] A sample probability determination module, used to determine the sample probability corresponding to each sample sound pickup direction based on the sample speech feature corresponding to each sample sound pickup direction, the sample probability indicating the possibility that the sample sound pickup direction is the direction of the sound source, and the sample speech feature is determined based on the sample speech signal in the sample sound pickup direction;
[0209] A predicted sound source angle determination module is used to call an angle determination model to determine a predicted sound source angle based on a normalized sample reference sound source angle and a sample matching degree and a sample probability corresponding to at least two sample pickup directions;
[0210] The second training module is used to determine a second loss value based on the predicted sound source angle and the sample sound source angle, and to train an angle determination model based on the second loss value.
[0211] In a possible implementation, the sample probability determination module is used to call a probability determination model for each sample sound pickup direction based on the sample speech feature corresponding to the sample sound pickup direction to determine the sample probability corresponding to the sample sound pickup direction, and the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction;
[0212] The second training module is used to train the angle determination model and the probability determination model based on the second loss value.
[0213] In a possible implementation, the device further includes:
[0214] The second acquisition module is further used to acquire sound source labels corresponding to at least two sound pickup directions of the samples, where the sound source labels indicate whether the sound pickup directions of the samples are sound source directions;
[0215] A sample probability determination module is used to call a probability determination model for each sample sound pickup direction based on the sample speech feature corresponding to the sample sound pickup direction, determine the sample probability corresponding to the sample sound pickup direction, and determine a third loss value based on the sample probability and the sound source label. The probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction;
[0216] The second training module is used to train the angle determination model and the probability determination model based on the second loss value and each third loss value corresponding to each sample pickup direction.
[0217] In a possible implementation, the feature extraction module 704 is used to: for each sound pickup direction, intercept a speech segment corresponding to the wake-up word from the speech signal in the sound pickup direction; perform feature extraction on the speech segment to obtain a speech feature corresponding to the sound pickup direction.
[0218] An embodiment of the present application provides a device for determining the direction of a sound source, wherein the matching degree corresponding to a sound pickup direction is the matching degree between a voice signal in the sound pickup direction and a wake-up word, and the greater the matching degree, the closer the sound pickup direction is to the sound source direction, and the voice signals in different sound pickup directions are different, and the voice features corresponding to the sound pickup direction can reflect the characteristics of the voice signal in the sound pickup direction. Therefore, based on the voice features corresponding to the sound pickup direction, the probability indicating the possibility that the sound pickup direction is the sound source direction can be determined, and by determining a reference sound source direction, the reference sound source angle corresponding to the reference sound source direction is normalized, so that by combining the normalized reference sound source angle and the matching degrees and probabilities corresponding to at least two sound pickup directions, the target sound source direction is jointly determined from multiple angles, thereby achieving determination of the final sound source direction in combination with at least two sound pickup directions on the basis of the reference sound source direction, thereby improving the accuracy of the determined sound source direction.
[0219] Regarding the device for determining the direction of a sound source in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the relevant method, and will not be elaborated on here.
[0220] An embodiment of the present application provides a terminal, which includes a processor and a memory. The memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the sound source direction determination method in the above embodiment.
[0221] Figure 8 800 is a block diagram of a terminal 800 according to an embodiment of the present application. The terminal 800 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 800 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0222] Typically, the terminal 800 includes a processor 801 and a memory 802 .
[0223] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0224] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one computer program, which is used to be executed by the processor 801 to implement the sound source direction determination method provided in the method embodiment of the present application.
[0225] In some embodiments, the terminal 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808 and a power supply 809.
[0226] The peripheral device interface 803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0227] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0228] The display screen 805 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on the surface or above the surface of the display screen 805. The touch signal can be input to the processor 801 as a control signal for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 805 can be one, set on the front panel of the terminal 800; in other embodiments, the display screen 805 can be at least two, respectively set on different surfaces of the terminal 800 or in a folding design; in other embodiments, the display screen 805 can be a flexible display screen, set on the curved surface or folding surface of the terminal 800. Even, the display screen 805 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 805 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0229] The camera assembly 806 is used to capture images or videos. Optionally, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0230] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 801 for processing, or input them into the radio frequency circuit 804 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 800. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0231] The positioning component 808 is used to locate the current geographical location of the terminal 800 to implement navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Greninja system, or the European Union's Galileo system.
[0232] The power supply 809 is used to power various components in the terminal 800. The power supply 809 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 809 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0233] In some embodiments, the terminal 800 further includes one or more sensors 180 , including but not limited to: an acceleration sensor 811 , a gyroscope sensor 812 , a pressure sensor 813 , an optical sensor 814 , and a proximity sensor 815 .
[0234] The acceleration sensor 811 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 800. For example, the acceleration sensor 811 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 can also be used to collect game or user motion data.
[0235] The gyroscope sensor 812 can detect the body direction and rotation angle of the terminal 800, and the gyroscope sensor 812 can cooperate with the acceleration sensor 811 to collect the user's 3D actions on the terminal 800. The processor 801 can implement the following functions based on the data collected by the gyroscope sensor 812: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0236] The pressure sensor 813 can be set on the side frame of the terminal 800 and / or the lower layer of the display screen 805. When the pressure sensor 813 is set on the side frame of the terminal 800, it can detect the user's holding signal of the terminal 800, and the processor 801 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is set on the lower layer of the display screen 805, the processor 801 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 805. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0237] The optical sensor 814 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 814. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is reduced. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 814.
[0238] The proximity sensor 815, also called a distance sensor, is usually arranged on the front panel of the terminal 800. The proximity sensor 815 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 815 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from the screen-on state to the screen-off state; when the proximity sensor 815 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from the screen-off state to the screen-on state.
[0239] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the terminal 800, and the terminal 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0240] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the sound source direction determination method in the above embodiment. The computer-readable storage medium can be a memory. For example, the computer-readable storage medium can be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage terminal, etc.
[0241] In an exemplary embodiment, a computer program product is also provided, the computer program product includes a computer program code, the computer program code is stored in a computer-readable storage medium, a processor reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code to implement the sound source direction determination method as in the above embodiment.
[0242] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected through a communication network, and multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system. The computer device may be provided as a terminal or a server.
[0243] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0244] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for determining a sound source direction, characterized in that: The method comprises: Based on the collected voice signals of the target voice signal in at least two sound pickup directions, determining the matching degree corresponding to the at least two sound pickup directions, where the matching degree is the matching degree between the voice signal in the sound pickup direction and the wake-up word; Based on the target speech signal, determining a reference sound source direction; Normalizing the reference sound source angle corresponding to the reference sound source direction; Extracting features of the speech signal in each of the sound pickup directions to obtain speech features corresponding to each of the sound pickup directions; Based on the speech features corresponding to each of the sound pickup directions, determining the probability corresponding to each of the sound pickup directions, wherein the probability indicates the possibility that the sound pickup direction is the direction of the sound source; The target sound source direction is determined based on the sound source parameters of the target speech signal, wherein the sound source parameters include the normalized reference sound source angle and the matching degrees and probabilities corresponding to the at least two sound pickup directions.
2. The method according to claim 1, characterized in that The determining the probability corresponding to each sound pickup direction based on the speech feature corresponding to each sound pickup direction includes: Based on the speech feature corresponding to each of the pickup directions, a probability determination model is called to determine the probability corresponding to each of the pickup directions, wherein the probability determination model is used to determine the probability that the pickup direction corresponding to any speech feature is the sound source direction.
3. The method according to claim 2, characterized in that The method further comprises: Acquire sample speech features and sound source labels corresponding to at least two sample sound pickup directions, wherein the sample speech features are determined based on sample speech signals in the sample sound pickup directions, and the sound source labels indicate whether the sample sound pickup directions are sound source directions; For each of the sample sound pickup directions, based on the sample speech features corresponding to the sample sound pickup directions, calling the probability determination model to determine the predicted probability corresponding to the sample sound pickup directions, and determining a first loss value based on the predicted probability and the sound source label; The probability determination model is trained based on each of the first loss values corresponding to each of the sample sound pickup directions.
4. The method according to claim 1, characterized in that: The step of determining the target sound source direction based on the sound source parameter of the target speech signal comprises: Based on the sound source parameters of the target speech signal, calling an angle determination model to determine the target sound source angle, the angle determination model being used to determine the sound source angle corresponding to the speech signal based on the sound source parameters of any speech signal; The direction indicated by the target sound source angle is determined as the target sound source direction.
5. The method according to claim 4, characterized in that The method further comprises: Obtain a sample sound source angle corresponding to a sample sound source direction, a sample reference sound source angle corresponding to a sample reference sound source direction, and a sample matching degree corresponding to at least two sample sound pickup directions, wherein the sample matching degree is a matching degree between a sample voice signal in the sample sound pickup direction and the wake-up word; Normalizing the sample reference sound source angle; Based on the sample speech feature corresponding to each of the sample sound pickup directions, determine the sample probability corresponding to each of the sample sound pickup directions, wherein the sample probability indicates the possibility that the sample sound pickup direction is the direction of the sound source, and the sample speech feature is determined based on the sample speech signal in the sample sound pickup direction; Based on the normalized sample reference sound source angle and the sample matching degree and sample probability corresponding to the at least two sample sound pickup directions, calling the angle determination model to determine the predicted sound source angle; Based on the predicted sound source angle and the sample sound source angle, a second loss value is determined, and based on the second loss value, the angle determination model is trained.
6. The method according to claim 5, characterized in that The determining, based on the sample speech feature corresponding to each of the sample sound pickup directions, the sample probability corresponding to each of the sample sound pickup directions comprises: For each of the sample sound pickup directions, based on the sample speech features corresponding to the sample sound pickup directions, a probability determination model is called to determine the sample probability corresponding to the sample sound pickup directions, wherein the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction; The step of training the angle determination model based on the second loss value comprises: Based on the second loss value, the angle determination model and the probability determination model are trained.
7. The method according to claim 5, characterized in that The method further comprises: Acquire sound source labels corresponding to the at least two sample sound pickup directions, wherein the sound source labels indicate whether the sample sound pickup directions are sound source directions; The determining, based on the sample speech feature corresponding to each of the sample sound pickup directions, the sample probability corresponding to each of the sample sound pickup directions comprises: For each of the sample sound pickup directions, based on the sample speech features corresponding to the sample sound pickup directions, calling a probability determination model to determine the sample probability corresponding to the sample sound pickup directions, and determining a third loss value based on the sample probability and the sound source label, wherein the probability determination model is used to determine the probability that the sound pickup direction corresponding to any speech feature is the sound source direction; The step of training the angle determination model based on the second loss value comprises: The angle determination model and the probability determination model are trained based on the second loss value and each of the third loss values corresponding to each of the sample sound pickup directions.
8. The method according to any one of claims 1 to 7, characterized in that: The feature extraction of the speech signal in each sound pickup direction to obtain the speech feature corresponding to each sound pickup direction includes: For each of the sound pickup directions, extracting a speech segment corresponding to the wake-up word from the speech signal in the sound pickup direction; Feature extraction is performed on the speech segment to obtain speech features corresponding to the sound pickup direction.
9. A device for determining the direction of a sound source, characterized in that: The device comprises: A matching degree determination module, configured to determine the matching degree corresponding to the at least two sound pickup directions based on the collected target speech signal in the at least two sound pickup directions, wherein the matching degree is the matching degree between the speech signal in the sound pickup direction and the wake-up word; A first direction determination module, used to determine a reference sound source direction based on the target speech signal; A normalization module, used for normalizing the reference sound source angle corresponding to the reference sound source direction; A feature extraction module, used to extract features of the speech signal in each sound pickup direction to obtain speech features corresponding to each sound pickup direction; A probability determination module, used to determine the probability corresponding to each sound pickup direction based on the speech feature corresponding to each sound pickup direction, wherein the probability indicates the possibility that the sound pickup direction is the direction of the sound source; The second direction determination module is used to determine the target sound source direction based on the sound source parameters of the target speech signal, wherein the sound source parameters include the normalized reference sound source angle and the matching degree and probability corresponding to the at least two sound pickup directions.
10. A terminal, characterized in that: The terminal includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the sound source direction determination method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the sound source direction determination method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Image and voice recognition-based automatic food taking method and system and storage medium
CN109599105A
Automatic dish taking method and system based on voice recognition and storage medium
CN109822561A
Voice signal processing method, device and equipment and storage medium
CN111696570A
Body and body part orientation and posture monitoring
CN112236078A
Sound pickup method and device, electronic equipment and storage medium
CN112463103A
