A method and device for speech recognition, electronic equipment, and storage medium

By extracting the features of the current voice and comparing them with the pre-calculated average feature vector, the problem of users in the prior art need to pre-register voice is solved, and the function of identifying the user's identity without registration is realized, which simplifies the design and improves intelligence.

CN114141253BActive Publication Date: 2025-02-11QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111528479.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2025-02-11
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

The existing voice recognition technology requires users to register voice data in advance, and the design is complex and not intelligent enough, which is particularly inconvenient for special users such as the elderly.

Method used

By obtaining the current voice collected by the target device, extracting its voice characteristics, and comparing it with the average feature vector corresponding to each predetermined speaking category, calculating the score, determining the speaking category to which the current voice belongs, and then identifying the user's identity.

Benefits of technology

No user registration is required to pre-register voice, which simplifies application design, improves the intelligence of the device, and can accurately identify the current user's identity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114141253B_ABST
    Figure CN114141253B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for speech recognition, an electronic device, and a storage medium, wherein the method comprises: obtaining a current speech collected by a target device; extracting speech features of the current speech; calculating a score of the current speech belonging to each speaker category based on the speech features of the current speech and an average feature vector corresponding to each predetermined speaker category; wherein each speaker category is a category obtained by clustering each historical speech based on speech features of multiple historical speeches after dimensionality reduction; the average feature vector corresponding to each speaker category is calculated from speech features of the historical speeches belonging to the speaker category; and the speaker category corresponding to the maximum value of each score is determined as the speaker category to which the current speech belongs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech recognition technology, and in particular to a speech recognition method and device, electronic equipment, and storage medium. Background Art

[0002] With the continuous development of smart devices, many home appliances nowadays can support voice recognition control functions.

[0003] The current device's voice recognition requires the user to register voice data in advance, so as to extract the user's voice features from the registered voice data. During voice recognition, the voice features of the current user's input voice are compared with the voice features obtained during registration to determine the current user's identity type, and then perform corresponding control.

[0004] Therefore, for the existing voice recognition method, user pre-registration is an essential step. This not only makes the application design more complicated, but also not intelligent enough. Some special users such as the elderly may not know how to register. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a method and device for speech recognition, an electronic device, and a storage medium to solve the problem that the prior art application design is too complex and not intelligent enough.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a method for speech recognition, comprising:

[0008] Get the current voice collected by the target device;

[0009] Extracting speech features of the current speech;

[0010] Based on the speech features of the current speech and the average feature vectors corresponding to the predetermined speaker categories, the scores of the current speech belonging to the speaker categories are calculated; wherein each speaker category is a category obtained by clustering the historical speech based on the speech features of the multiple historical speech after dimensionality reduction; the average feature vector corresponding to each speaker category is calculated from the speech features of the historical speech belonging to the speaker category;

[0011] The speaker category corresponding to the maximum value among the scores is determined as the speaker category to which the current speech belongs.

[0012] Optionally, in the above-mentioned speech recognition method, extracting speech features of the current speech includes:

[0013] The speech features of the current speech are extracted using a pre-trained feature extractor; wherein the feature extractor is pre-trained using a plurality of sample speech samples collected by a device belonging to a target device type; the target device type is the device type to which the target device belongs.

[0014] Optionally, in the above-mentioned method for speech recognition, the step of calculating the score of the current speech belonging to each speaker category based on the speech feature of the current speech and the average feature vector corresponding to each predetermined speaker category includes:

[0015] The speech features of the current speech and the average feature vector corresponding to each speaker category are respectively input into a pre-trained discriminator to obtain a score of the current speech belonging to each speaker category; wherein the discriminator is pre-trained using a plurality of the sample speech.

[0016] Optionally, in the above-mentioned speech recognition method, a method for determining the average feature vector corresponding to each speaker category includes:

[0017] Acquire a plurality of historical voices collected by the target device;

[0018] Extracting speech features of each of the historical speech to obtain a plurality of original speech features;

[0019] Performing dimensionality reduction processing on each of the original speech features to obtain dimensionality-reduced speech features;

[0020] Clustering each of the dimensionality-reduced speech features to obtain a plurality of speaker categories;

[0021] For each speaker category, the mean of the original speech features corresponding to the multiple historical speech in the speaker category is calculated to obtain an average feature vector corresponding to the speaker category.

[0022] Optionally, in the above-mentioned speech recognition method, calculating, for each speaker category, the mean of the original speech features corresponding to the plurality of historical speech in the speaker category to obtain the average feature vector corresponding to the speaker category includes:

[0023] For each speaker category, from each of the historical voices belonging to the speaker category, select the historical voices whose distance to the cluster center in the speaker category is ranked in the top M positions; wherein the closer the distance to the cluster center, the higher the ranking position;

[0024] The mean of the original speech features corresponding to each of the selected historical speech is calculated to obtain an average feature vector corresponding to the speaker category.

[0025] Optionally, in the above-mentioned method for speech recognition, before determining the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs, the method further comprises:

[0026] Determine whether the maximum value among the scores is greater than a preset threshold;

[0027] If it is determined that the maximum value among the scores is greater than a preset threshold, the speaker category corresponding to the maximum value among the scores is determined as the speaker category to which the current speech belongs;

[0028] If it is determined that the maximum value among the scores is not greater than the preset threshold, it is fed back that the current speech does not belong to any of the speaker categories.

[0029] Optionally, in the above-mentioned method for speech recognition, after determining the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs, the method further comprises:

[0030] Determine the speaker category to which the current speech belongs and the corresponding target real identity;

[0031] The target device is controlled based on the control policy corresponding to the real identity of the target and the control instruction corresponding to the current voice.

[0032] A second aspect of the present application provides a speech recognition device, comprising:

[0033] A first acquisition unit, used to acquire the current voice collected by the target device;

[0034] A first extraction unit, used to extract the speech features of the current speech;

[0035] A scoring unit, configured to calculate a score of the current speech belonging to each of the speaker categories based on the speech features of the current speech and the average feature vectors corresponding to the predetermined speaker categories; wherein each of the speaker categories is a category obtained by clustering each of the historical speeches based on the speech features of the multiple historical speeches after dimensionality reduction; and the average feature vector corresponding to each of the speaker categories is calculated from the speech features of the historical speeches belonging to the speaker category;

[0036] The first identity determination unit is used to determine the speaker category corresponding to the maximum value of each of the scores as the speaker category to which the current speech belongs.

[0037] Optionally, in the above-mentioned speech recognition device, the first extraction unit includes:

[0038] The first extraction subunit is used to extract the speech features of the current speech using a pre-trained feature extractor; wherein the feature extractor is pre-trained using a plurality of sample speech samples collected from a device belonging to a target device type; the target device type is the device type to which the target device belongs.

[0039] Optionally, in the above-mentioned speech recognition device, the scoring unit includes:

[0040] The scoring subunit is used to input the speech features of the current speech and the average feature vector corresponding to each speaker category into a pre-trained discriminator to obtain the score of the current speech belonging to each speaker category; wherein the discriminator is pre-trained using multiple sample speech.

[0041] Optionally, in the above-mentioned speech recognition device, it also includes:

[0042] A second acquisition unit, used to acquire a plurality of historical voices collected by a target device;

[0043] A second extraction unit is used to extract the speech features of each of the historical speech to obtain a plurality of original speech features;

[0044] A dimension reduction unit, used for performing dimension reduction processing on each of the original speech features to obtain a reduced-dimensional speech feature;

[0045] A clustering unit, used for clustering each of the reduced-dimensional speech features to obtain a plurality of speaker categories;

[0046] The calculation unit is used to calculate the mean of the original speech features corresponding to the multiple historical speech in the speaker category for each speaker category, so as to obtain the average feature vector corresponding to the speaker category.

[0047] Optionally, in the above-mentioned speech recognition device, the computing unit includes:

[0048] A selection unit is used to select, for each speaker category, from the historical voices belonging to the speaker category, the historical voices whose distances to the cluster center in the speaker category are ranked in the top M positions; wherein the closer the distance to the cluster center, the higher the ranking position;

[0049] The calculation subunit is used to calculate the mean of the original speech features corresponding to each of the selected historical speech to obtain the average feature vector corresponding to the speaker category.

[0050] Optionally, in the above-mentioned speech recognition device, it also includes:

[0051] A judging unit, used to judge whether the maximum value among the scores is greater than a preset threshold;

[0052] If it is determined that the maximum value among the scores is greater than a preset threshold, the first identity determination unit determines the speaker category corresponding to the maximum value among the scores as the speaker category to which the current voice belongs;

[0053] The feedback unit is used for feeding back that the current speech does not belong to any of the speaker categories when it is determined that the maximum value of each of the scores is not greater than a preset threshold.

[0054] Optionally, in the above-mentioned speech recognition device, it also includes:

[0055] A second identity determination unit, used to determine the target real identity corresponding to the speaker category to which the current voice belongs;

[0056] The target device is controlled based on the control policy corresponding to the real identity of the target and the control instruction corresponding to the current voice.

[0057] A third aspect of the present application provides an electronic device, including:

[0058] Memory and processor;

[0059] Wherein, the memory is used to store programs;

[0060] The processor is used to execute the program, and when the program is executed, it is specifically used to implement the method of speech recognition as described in any one of the above.

[0061] A fourth aspect of the present application provides a computer storage medium, characterized in that it is used to store a computer program, and when the computer program is executed, it is used to implement the method of speech recognition as described in any one of the above.

[0062] The present application provides a method for speech recognition, which pre-acquires speech features of multiple historical speech collected by a target device, and after reducing the dimension of the speech features of each historical speech, clusters each historical speech based on the speech features of each historical speech after dimension reduction, obtains multiple speaker categories, and uses the speech features of the historical speech in each speaker category to calculate the average feature vector corresponding to each speaker category, without the need for user registration. When the current speech collected by the target device is subsequently acquired, the speech features of the current speech are extracted, and based on the speech features of the current speech and the average feature vector corresponding to each predetermined speaker category, the score of the current speech belonging to each speaker category is calculated, and finally the speaker category corresponding to the maximum value in each score is determined as the speaker category to which the current speech belongs, that is, the identity of the speaker of the current speech is determined, so that the identity of the current user can be accurately identified without the user having to register the speech in advance, which simplifies the design of the application and makes the device more intelligent. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0064] Figure 1 A flowchart of a method for speech recognition provided in an embodiment of the present application;

[0065] Figure 2 A flowchart of a method for determining an average feature vector corresponding to each speaker category provided in an embodiment of the present application;

[0066] Figure 3 A flowchart of a method for calculating an average feature vector corresponding to a speaker category provided in an embodiment of the present application;

[0067] Figure 4 A flowchart of another method for speech recognition provided in another embodiment of the present application;

[0068] Figure 5 A schematic diagram of the structure of a speech recognition device provided in another embodiment of the present application;

[0069] Figure 6 A schematic diagram of the structure of a computing unit provided in another embodiment of the present application;

[0070] Figure 7 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

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

[0072] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0073] The present application embodiment provides a method for speech recognition, such as Figure 1 As shown, including:

[0074] S101. Acquire the current voice collected by the target device.

[0075] Specifically, the target device collects the voice of the current speaker through the audio collection device, that is, collects the current voice.

[0076] S102: Extracting speech features of the current speech.

[0077] Specifically, the current speech may be analyzed to obtain the value of the current speech on a specified type of feature, such as intonation, speech speed, etc., and feature processing may be performed on the obtained features to obtain speech features of the current speech.

[0078] Optionally, in another embodiment of the present application, a specific implementation of step S102 includes:

[0079] The pre-trained feature extractor is used to extract the speech features of the current speech.

[0080] The feature extractor is pre-trained using a plurality of sample speech samples collected by a device belonging to a target device type. The target device type is the device type to which the target device belongs.

[0081] In an embodiment of the present application, by inputting the current speech into a pre-trained feature extractor and extracting the speech features of the current speech through the feature extractor, a more comprehensive and accurate speech feature can be obtained.

[0082] Specifically, in order to ensure the accuracy of feature extraction, in the implementation of this application, a large amount of speech collected by a device of the same type as the target device is obtained as a training sample to train the feature extraction device. For example, the speech of 700 people, 1000 sentences of each person, is collected, and these speech are used as training samples to train a privilege extractor. Optionally, the feature extractor can be an ivert extractor or a deep learning neural network.

[0083] S103: Based on the speech features of the current speech and the pre-determined average feature vectors corresponding to the speaker categories, the scores of the current speech belonging to the speaker categories are calculated.

[0084] Among them, each speaker category is a category obtained by clustering each historical speech based on the speech features of multiple historical speech collected by the target device after dimensionality reduction, that is, a large amount of speech of the speaker previously collected by the target device, that is, historical speech, is obtained, and then the speech features of the historical speech are extracted, and the extracted speech features are reduced in dimension, and finally, the speech features after dimensionality reduction are used to cluster each historical speech to obtain multiple clusters, so that the historical speech of the same speaker is clustered into the same cluster, so each cluster obtained is a speaker category.

[0085] Among them, the average feature vector corresponding to each speaker category is calculated by the speech features of the historical speech belonging to the speaker category, that is, after clustering to obtain multiple speaker categories, the average feature vector corresponding to each speaker category is calculated using the speech features of multiple historical speech in each speaker category.

[0086] Optionally, the similarity between the speech feature of the current speech and the average feature vector corresponding to each predetermined speaker category may be used as the score of the current speech belonging to each speaker category. Of course, other methods may also be used to calculate the probability that the current speech belongs to each speaker category.

[0087] Optionally, in another embodiment of the present application, a specific implementation of step S103 includes:

[0088] The speech features of the current speech and the average feature vector corresponding to each speaker category are respectively input into a pre-trained discriminator to obtain a score of the current speech belonging to each speaker category.

[0089] Among them, the discriminator is pre-trained using multiple sample voices, that is, in the embodiment of the present application, not only the feature extractor is pre-trained, but also the sample voice used to train the feature extractor is used to train the discriminator, and the score of the current voice belonging to each speaker category is calculated by the discriminator with good information. Since the training voice is the voice collected by the same type of device as the target device, the result obtained by the calculation can be made more consistent with the target device, that is, the result obtained is more accurate. Among them, the discriminator is mainly used to output the possibility that the two features of the input belong to the same speaker. The higher the possibility, the greater the possibility that the two features of the input belong to the same person. Therefore, the greater the possibility that the voice feature of the current voice and the average feature vector corresponding to the speaker category belong to the same person, the greater the possibility that the current voice belongs to the speaker category, and therefore the higher the score.

[0090] Optionally, in another embodiment of the present application, a method for determining the average feature vector corresponding to each speaker category is provided, such as Figure 2 As shown, the following steps are included:

[0091] S201. Acquire multiple historical voices.

[0092] It should be noted that a device is usually installed in a fixed place, and the number of people who mainly perform voice control on the device in that place is limited. For example, for device A in family Y, the people who mainly perform voice control on device A are the members of family Y. Therefore, a large amount of voice can be collected, and based on the collected voice, different speaker categories can be divided, and the average feature vectors corresponding to different speaker categories can be calculated, which can be used for voice recognition.

[0093] In some embodiments, the multiple historical voices in step S201 can be collected by a target device, or can be collected by multiple devices located in a specific local area network, which is not limited in this embodiment of the present application.

[0094] For example, the target device may collect the speech of each speaker in the early stage, and execute step S202 after obtaining a certain amount of historical speech.

[0095] S202: Extract speech features of each historical speech to obtain a plurality of original speech features.

[0096] Optionally, if a feature extractor as mentioned in step S102 has been pre-trained, the speech features of each historical speech can be extracted by the feature extractor.

[0097] It should be noted that step S202 should be consistent with step S102, that is, the same means should be used to extract the same type of speech features, so the specific implementation of step S202 can refer to step S102 in the above method embodiment, and will not be repeated here.

[0098] S203: Perform dimensionality reduction processing on each original speech feature to obtain a reduced-dimensional speech feature.

[0099] It should be noted that since the dimensions of the original speech features are relatively high, there will be overlaps between the dimensions, which is not conducive to clustering. Therefore, in the embodiment of the present application, the dimensions of the original speech features are reduced to obtain reduced-dimensional speech features, and then clustering is performed using the reduced-dimensional speech features.

[0100] Optionally, in the embodiment of the present application, the original speech features are combined into a feature sequence, and then the feature sequence is reduced in dimension using the t-SNE (t-Distributed Stochastic Neighbor Embedding) algorithm. Of course, other algorithms can also be used to reduce the dimension of the original speech features, which should also fall within the scope of protection of the present application.

[0101] S204: Cluster each dimensionality-reduced speech feature to obtain multiple speaker categories.

[0102] It should be noted that since the number of speakers is uncertain, the reduced-dimensional speech features can be subjected to cluster analysis with an uncertain number of categories. For example, a mixed Gaussian GMM model can be used to fit the reduced-dimensional speech feature data into the number of categories with the largest total likelihood. In this way, the probability that the number of items in the same category belongs to the same subcategory will be high, thereby achieving clustering and obtaining multiple speaker categories.

[0103] S205 . For each speaker category, respectively, calculate the mean of original speech features corresponding to multiple historical speech in the speaker category to obtain an average feature vector corresponding to the speaker category.

[0104] It should be noted that since the reduced-dimensional speech features have already been reduced in dimension, they cannot fully reflect the speech features of the speaker. Therefore, it is still necessary to calculate the average feature vector corresponding to the speaker category based on the original speech features.

[0105] Optionally, the mean of the original speech features corresponding to all historical speech in the speaker category may be calculated to obtain the average feature vector corresponding to the speaker category. Of course, the mean of the original speech features corresponding to some historical speech in the speaker category may also be calculated.

[0106] Optionally, in another embodiment of the present application, a specific implementation of step S205 is as follows: Figure 3 As shown, the following steps are included:

[0107] S301 . For each speaker category, from each historical speech belonging to the speaker category, select the historical speech whose distance to the cluster center in the speaker category ranks in the top M.

[0108] Among them, M is a positive integer, and the closer the distance to the cluster center, the higher the ranking position, that is, in the embodiment of the present application, only the M historical voices closest to the cluster center are selected to calculate the average feature vector corresponding to the speaker category.

[0109] Specifically, for each speaker category, the dimensionality reduction speech features corresponding to each historical speech can be used to calculate the distance between each historical speech under the speaker category and the cluster center, and the historical speech can be sorted in order of distance from small to large, and finally the historical speech ranked in the top M can be selected.

[0110] S302: Calculate the mean of the original speech features corresponding to each selected historical speech to obtain an average feature vector corresponding to the speaker category.

[0111] S104: Determine the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs.

[0112] In the embodiment of the present application, the speaker category corresponding to the maximum value among the scores is determined as the speaker category to which the current speech belongs, that is, it is determined that the current speech is spoken by the speaker corresponding to the speaker category.

[0113] Optionally, after determining the speaker category to which the current voice belongs, the target device can be controlled based on the speaker category to which the current voice belongs and the control instruction corresponding to the current voice. Optionally, the target device can be controlled based on the historical behavior habits of the speaker category to which the current voice belongs. For example, if the speaker category to which the current voice belongs often plays pop songs, when the control instruction corresponding to the current voice is to play music, the player of the target device is controlled to play pop songs. Of course, other strategies can also be used for control, or the user can identify strategies for each speaker category for control.

[0114] The embodiment of the present application provides a method for speech recognition, which pre-acquires the speech features of multiple historical speech collected by the target device, and after reducing the dimension of the speech features of each historical speech, clusters each historical speech based on the speech features of each historical speech after dimension reduction, obtains multiple speaker categories, and uses the speech features of the historical speech in each speaker category to calculate, and each speaker category corresponds to an average feature vector, without the need for user registration. When the current speech collected by the target device is subsequently acquired, the speech features of the current speech are extracted, and based on the speech features of the current speech and the average feature vector corresponding to each predetermined speaker category, the score of the current speech belonging to each speaker category is calculated, and finally the speaker category corresponding to the maximum value in each score is determined as the speaker category to which the current speech belongs, that is, the identity of the speaker of the current speech is determined, so that the identity of the current user can be accurately identified without the user having to register the speech in advance, which simplifies the design of the application and makes the device more intelligent.

[0115] Another embodiment of the present application provides another method for speech recognition, such as Figure 4 As shown, the following steps are included:

[0116] S401. Acquire the current voice collected by the target device.

[0117] It should be noted that the specific implementation of step S401 may refer to step S101 in the above method embodiment, and will not be described in detail here.

[0118] S402: Extract speech features of the current speech using a pre-trained feature extractor.

[0119] The feature extractor is pre-trained using a plurality of sample speech samples collected by a device belonging to a target device type. The target device type is the device type to which the target device belongs.

[0120] It should be noted that the specific implementation of step S402 may refer to a specific implementation of step S102 in the above method embodiment, and will not be described in detail here.

[0121] S403: Input the speech features of the current speech and the average feature vector corresponding to each speaker category into a pre-trained discriminator to obtain the score of the current speech belonging to each speaker category.

[0122] The discriminator is pre-trained using multiple sample voices.

[0123] It should be noted that the specific implementation of step S403 may refer to a specific implementation of step S103 in the above method embodiment, and will not be described in detail here.

[0124] S404: Determine whether the maximum value among the scores is greater than a preset threshold.

[0125] Since the current user may not be the person who mainly controls the target device, that is, the collected historical voice does not include the voice of the current user, or only includes a very small amount of voice, the current user actually does not belong to any speaker category. Therefore, in order to ensure the accuracy of the final result, in the embodiment of the present application, it is also necessary to determine whether the maximum value of each score is greater than the preset threshold. If it is determined that the maximum value of each score is greater than the preset threshold, step S405 is executed. If it is determined that the maximum value of each score is not greater than the preset threshold, step S406 is executed.

[0126] S405: Determine the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs.

[0127] It should be noted that after determining the speaker category to which the current voice belongs, the target device can be controlled according to the speaker category, so after executing step S405, step S407 is executed.

[0128] S406: Feedback that the current speech does not belong to any speaker category.

[0129] Optionally, when the current speech does not belong to any speaker category, the control instruction corresponding to the current speech may be responded to. Of course, other strategies may also be used for response.

[0130] S407: Determine the speaker category to which the current voice belongs and the corresponding target real identity.

[0131] It should be noted that in the embodiment of the present application, the real identity information corresponding to each speaker category is maintained in advance. After the current speaker category is determined, the real identity corresponding to the speaker category is used as the target real identity, and step S408 is executed.

[0132] S408: Control the target device based on the control strategy corresponding to the target real identity and the control instruction corresponding to the current voice.

[0133] Optionally, in an embodiment of the present application, different control strategies can be used for different real identities to control the target device. For example, when the speaker is an elderly person at home, the weight of opera is higher when pushing songs to be played. When the speaker is a child at home, the weight of nursery rhymes is increased.

[0134] Another embodiment of the present application provides a speech recognition device, such as Figure 5 As shown, including:

[0135] The first acquisition unit 501 is used to acquire the current voice collected by the target device.

[0136] The first extraction unit 502 is used to extract the speech features of the current speech.

[0137] The scoring unit 503 is used to calculate the score of the current speech belonging to each speaker category based on the speech feature of the current speech and the pre-determined average feature vector corresponding to each speaker category.

[0138] Each speaker category is a category obtained by clustering each historical speech based on the speech features of multiple historical speeches after dimensionality reduction. The average feature vector corresponding to each speaker category is calculated from the speech features of the historical speeches belonging to the speaker category.

[0139] The first identity determination unit 504 is configured to determine the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs.

[0140] Optionally, in a speech recognition device provided in another embodiment of the present application, the first extraction unit includes:

[0141] The first extraction subunit is used to extract speech features of the current speech using a pre-trained feature extractor.

[0142] The feature extractor is pre-trained using a plurality of sample voices collected by a device belonging to a target device type. The target device type is the device type to which the target device belongs.

[0143] Optionally, in a speech recognition device provided in another embodiment of the present application, the scoring unit includes:

[0144] The scoring subunit is used to input the speech features of the current speech and the average feature vector corresponding to each speaker category into a pre-trained discriminator to obtain the score of the current speech belonging to each speaker category. The discriminator is pre-trained using multiple sample speech.

[0145] Optionally, in the speech recognition device provided in another embodiment of the present application, the device further includes:

[0146] The second acquisition unit is used to acquire multiple historical voices collected by the target device.

[0147] The second extraction unit is used to extract the speech features of each historical speech to obtain a plurality of original speech features.

[0148] The dimension reduction unit is used to perform dimension reduction processing on each original speech feature to obtain a reduced-dimensional speech feature.

[0149] The clustering unit is used to cluster each dimensionality-reduced speech feature to obtain multiple speaker categories.

[0150] The calculation unit is used to calculate the mean of the original speech features corresponding to multiple historical speech in the speaker category for each speaker category, and obtain the average feature vector corresponding to the speaker category.

[0151] Optionally, in a speech recognition device provided in another embodiment of the present application, the computing unit, such as Figure 6 As shown, including:

[0152] The selection unit 601 is used to select, for each speaker category, historical speech that is ranked in the top M positions in terms of distance to the cluster center in the speaker category from each historical speech belonging to the speaker category. The closer the distance to the cluster center, the higher the ranking position.

[0153] The calculation subunit 602 is used to calculate the mean of the original speech features corresponding to each selected historical speech to obtain an average feature vector corresponding to the speaker category.

[0154] Optionally, in the speech recognition device provided in another embodiment of the present application, the device further includes:

[0155] The judging unit is used to judge whether the maximum value among the scores is greater than a preset threshold.

[0156] If it is determined that the maximum value among the scores is greater than a preset threshold, the first identity determination unit determines the speaker category corresponding to the maximum value among the scores as the speaker category to which the current voice belongs.

[0157] The feedback unit is used to feedback that the current speech does not belong to any speaker category when it is determined that the maximum value of each score is not greater than a preset threshold.

[0158] Optionally, in the speech recognition device provided in another embodiment of the present application, the device further includes:

[0159] The second identity determination unit is used to determine the real identity of the target corresponding to the speaker category to which the current voice belongs.

[0160] The target device is controlled based on the control strategy corresponding to the target's real identity and the control instructions corresponding to the current voice.

[0161] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.

[0162] Another embodiment of the present application provides an electronic device, such as Figure 7 As shown, including:

[0163] Memory 701 and processor 702 .

[0164] The memory 701 is used to store programs.

[0165] The processor 702 is used to execute the program stored in the memory 701, and when the program is executed, it is specifically used to implement the method of speech recognition provided in any one of the above embodiments.

[0166] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the method of speech recognition provided in any of the above embodiments.

[0167] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0168] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0169] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for speech recognition, characterized in that: include: Get the current voice collected by the target device; Extracting speech features of the current speech; Based on the speech features of the current speech and the average feature vectors corresponding to the predetermined speaker categories, the scores of the current speech belonging to the speaker categories are calculated; wherein each speaker category is a category obtained by clustering the historical speech based on the speech features of the multiple historical speech after dimensionality reduction; the average feature vector corresponding to each speaker category is calculated from the speech features of the historical speech belonging to the speaker category; Determine the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs; and control the target device based on the historical behavior habits of the speaker category to which the current speech belongs; The method for determining the average feature vector corresponding to each of the speaker categories includes: obtaining a plurality of the historical speech sounds collected by the target device; extracting the speech features of each of the historical speech sounds to obtain a plurality of original speech features; composing each of the original speech features into a feature sequence, and reducing the dimension of the feature sequence using the t-SNE algorithm to obtain reduced-dimensional speech features; clustering each of the reduced-dimensional speech features using a mixed Gaussian GMM model to obtain a plurality of the speaker categories; and calculating, for each of the speaker categories, the mean of the original speech features corresponding to the plurality of the historical speech sounds in the speaker category to obtain the average feature vector corresponding to the speaker category.

2. The method according to claim 1, characterized in that The extracting the speech feature of the current speech comprises: The speech features of the current speech are extracted using a pre-trained feature extractor; wherein the feature extractor is pre-trained using a plurality of sample speech samples collected by a device belonging to a target device type; the target device type is the device type to which the target device belongs.

3. The method according to claim 1, characterized in that The step of calculating the score of the current speech belonging to each speaker category based on the speech feature of the current speech and the average feature vector corresponding to each predetermined speaker category includes: The speech features of the current speech and the average feature vector corresponding to each speaker category are respectively input into a pre-trained discriminator to obtain a score of the current speech belonging to each speaker category; wherein the discriminator is pre-trained using multiple sample speech.

4. The method according to claim 1, characterized in that: The step of calculating the mean of the original speech features corresponding to the plurality of historical speech in the speaker category for each speaker category to obtain the average feature vector corresponding to the speaker category includes: For each speaker category, from each of the historical voices belonging to the speaker category, select the historical voices whose distance to the cluster center in the speaker category is ranked in the top M positions; wherein the closer the distance to the cluster center, the higher the ranking position; The mean of the original speech features corresponding to each of the selected historical speech is calculated to obtain an average feature vector corresponding to the speaker category.

5. The method according to any one of claims 1 to 4, characterized in that: Before determining the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs, the method further includes: Determine whether the maximum value among the scores is greater than a preset threshold; If it is determined that the maximum value among the scores is greater than a preset threshold, the speaker category corresponding to the maximum value among the scores is determined as the speaker category to which the current speech belongs; If it is determined that the maximum value among the scores is not greater than the preset threshold, it is fed back that the current speech does not belong to any of the speaker categories.

6. The method according to any one of claims 1 to 4, characterized in that: After determining the speaker category corresponding to the maximum value among the scores as the speaker category to which the current speech belongs, the method further includes: Determine the speaker category to which the current speech belongs and the corresponding target real identity; The target device is controlled based on the control policy corresponding to the real identity of the target and the control instruction corresponding to the current voice.

7. A speech recognition device, characterized in that: include: A first acquisition unit, used to acquire the current voice collected by the target device; A first extraction unit, used to extract the speech features of the current speech; A scoring unit, configured to calculate a score of the current speech belonging to each of the speaker categories based on the speech features of the current speech and the average feature vectors corresponding to the predetermined speaker categories; wherein each of the speaker categories is a category obtained by clustering each of the historical speeches based on the speech features of the multiple historical speeches after dimensionality reduction; and the average feature vector corresponding to each of the speaker categories is calculated from the speech features of the historical speeches belonging to the speaker category; A first identity determination unit is used to determine the speaker category corresponding to the maximum value of each of the scores as the speaker category to which the current voice belongs; and control the target device based on the historical behavior habits of the speaker category to which the current voice belongs; A second acquisition unit, used to acquire a plurality of historical voices collected by a target device; A second extraction unit is used to extract the speech features of each of the historical speech to obtain a plurality of original speech features; A dimension reduction unit, used for combining the original speech features into a feature sequence, and reducing the dimension of the feature sequence using a t-SNE algorithm to obtain a reduced-dimensional speech feature; A clustering unit, used for clustering each of the reduced-dimensional speech features using a mixed Gaussian GMM model to obtain a plurality of speaker categories; The calculation unit is used to calculate the mean of the original speech features corresponding to the multiple historical speech in the speaker category for each speaker category, so as to obtain the average feature vector corresponding to the speaker category.

8. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the method for speech recognition as described in any one of claims 1 to 6.

9. A computer storage medium, characterized in that Used to store a computer program, which, when executed, is used to implement the method for speech recognition as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Voice data processing method and device and voice interaction equipment

    CN107978311A

  • Speaker clustering method and device, computer device and storage medium

    CN109065028A