Voiceprint recognition method, storage medium and electronic device
Patent Information
- Application Number
- CN202211205662.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-09-29
AI Technical Summary
[0003]但是,随着用户对智能设备控制过程的便捷度要求进一步提高,用户也越来越希望通过无感知的方式,得到智能家居提供的服务,传统的注册式声纹在实际操作中需要人为主动地使用特定的注册设备录入注册人的音频数据,注册设备识别并完成对声纹的注册之后,才可以使用声纹对智能设备进行后续的控制,声纹的注册过程便捷度较低
Smart Images

Figure CN115691507B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, in particular to a voiceprint recognition method, a storage medium and an electronic device. BACKGROUND
[0002] At present, in the intelligent voice dialogue system, the recognition and application of voiceprint are more and more widely, and the traditional voiceprint is usually a registered voiceprint. Before using the voiceprint, a user needs to actively register a voiceprint through a certain device, such as a mobile phone, a computer, and the like. Subsequently, when the device collects a voice instruction, the voice instruction can be compared with the registered voiceprint in terms of audio features, so as to determine whether the voice instruction belongs to the registered voiceprint.
[0003] However, as the user's requirement for the convenience of the intelligent device control process is further improved, the user also increasingly hopes to obtain the service provided by the smart home in a non-aware manner. The traditional registered voiceprint needs to be actively used by a person to input the audio data of a registered person in a specific registration device in actual operation. After the registration device identifies and completes the registration of the voiceprint, the voiceprint can be used to control the intelligent device subsequently. The registration process of the voiceprint is relatively low in convenience.
[0004] There is no effective solution to the problem of low convenience of voiceprint registration in the related art. SUMMARY
[0005] Embodiments of the present application provide a voiceprint recognition method, a storage medium and an electronic device to at least solve the problem of low convenience of voiceprint registration in the related art.
[0006] According to an embodiment of the present application, a voiceprint recognition method is provided, including:
[0007] performing feature conversion on initial voice features extracted from a voice file collected from a target scene, to obtain target voice features, wherein the voice file is used to record the voice of all speakers in the target scene, the initial voice features are used to represent the voice attributes of the all speakers, the target voice features are used to represent target key attributes in the voice attributes of the all speakers, and the feature dimension of the target voice features is smaller than that of the initial voice features;
[0008] performing feature separation on the target voice features, to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker in the all speakers;
[0009] clustering the plurality of feature segments into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent a to-be-registered user who has appeared in the target scene, and the reference voiceprint is used to perform voiceprint registration on the to-be-registered user when the to-be-registered user appears in the target scene again.
[0010] Optionally, the feature separation on the target voice feature to obtain the plurality of feature segments comprises:
[0011] encoding a candidate voice feature in the target voice feature, which has a context correlation degree greater than a target correlation degree threshold, to obtain target encoding data, wherein the target encoding data is used to represent an overall feature of the target voice feature;
[0012] predicting a reference speaker feature corresponding to the target voice feature according to the target encoding data, wherein the reference speaker information is used to indicate information of a reference speaker present in the voice file;
[0013] performing feature separation on the target voice feature according to the reference speaker feature to obtain the plurality of feature segments.
[0014] Optionally, the encoding of the candidate voice feature in the target voice feature, which has a context correlation degree greater than a target correlation degree threshold, to obtain target encoding data comprises:
[0015] extracting short-term memory data and long-term memory data corresponding to the target voice feature, wherein the short-term memory data is used to indicate recent memory between a plurality of target sub-voice features included in the target voice feature, and the long-term memory data is used to indicate long-term memory between the plurality of target sub-voice features;
[0016] extracting, from the target voice feature, the data having the context correlation degree greater than the target correlation degree threshold according to the short-term memory data and the long-term memory data to obtain the candidate voice feature;
[0017] encoding the candidate voice feature to obtain the target encoding data.
[0018] Optionally, the predicting of the reference speaker feature corresponding to the target voice feature according to the target encoding data comprises:
[0019] decoding the target encoding data to obtain a plurality of attractor vectors corresponding to the candidate voice feature;
[0020] calculating a target probability value corresponding to each attractor vector, wherein the target probability value is used to indicate a probability that each attractor vector exists for a speaker;
[0021] The vector matrix constructed using the attractor vector whose target probability value is greater than or equal to a reference threshold value is determined as the reference speaker feature.
[0022] Optionally, the feature separation of the target voice feature according to the reference speaker feature to obtain the plurality of feature segments comprises:
[0023] extracting short-term memory data corresponding to a plurality of target sub-voice features included in the target voice feature, wherein the short-term memory data is used to indicate recent memory between the plurality of target sub-voice features;
[0024] matching a speaker label corresponding to each of the target sub-voice features according to a product of the short-term memory data and the vector matrix;
[0025] performing feature separation of the target voice feature according to the speaker label to obtain a plurality of feature segments.
[0026] Optionally, the feature conversion of the initial voice feature extracted from the voice file collected from the target scene to obtain the target voice feature comprises:
[0027] extracting the initial voice feature from T-frame audio data segmented from the voice file, wherein each frame of the audio data belongs to a single speaker, a signal-to-noise ratio parameter of the voice file is greater than a target signal-to-noise ratio threshold, and a voice word number of the voice file is greater than a target number;
[0028] performing matrix operation on each voice feature included in the initial voice feature to obtain an amplified voice feature, wherein the feature dimension of the amplified voice feature is greater than or equal to a target dimension;
[0029] inputting the amplified voice feature into a dimension reduction model to obtain the target voice feature output by the dimension reduction model, wherein the dimension reduction model is used to extract key attributes in voice features while reducing the dimensions of the voice features.
[0030] Optionally, after the clustering of the plurality of feature segments into a plurality of reference voiceprints, the method further comprises:
[0031] in the case where voice data is collected again from the target scene, matching the voice data with one or more of the reference voiceprints;
[0032] in the case where the voice data matches a target voiceprint in the one or more reference voiceprints, determining a user corresponding to the voice data as the to-be-registered user for voiceprint registration;
[0033] In a case where the voice data does not match any of the one or more reference voiceprints, the voice data is stored in the voice file.
[0034] Optionally, the feature conversion on the initial voice features extracted from the voice file collected from the target scene to obtain the target voice features further includes:
[0035] The feature dimension of the initial voice features is amplified to obtain amplified voice features;
[0036] The reference feature dimension is determined according to the amplified voice features, wherein the reference feature dimension is used to retain key attributes in the amplified voice features;
[0037] The amplified voice features are reduced in dimension to the reference feature dimension to obtain the target voice features.
[0038] According to another embodiment of the present application, a voiceprint recognition device is further provided, comprising:
[0039] The feature conversion is performed on the initial voice features extracted from the voice file collected from the target scene to obtain target voice features, wherein the voice file is used to record voices spoken by all speakers appearing in the target scene, the initial voice features are used to represent voice attributes of the all speakers, the target voice features are used to represent target key attributes in the voice attributes of the all speakers, and a feature dimension of the target voice features is smaller than a feature dimension of the initial voice features;
[0040] The feature separation is performed on the target voice features to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker in the all speakers;
[0041] The plurality of feature segments are clustered into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent one registered user appearing in the target scene, and the reference voiceprint is used to perform voiceprint registration on the registered user in a case where the registered user appears again in the target scene.
[0042] According to still another aspect of the present application, a computer readable storage medium is further provided, and the computer readable storage medium stores a computer program, wherein the computer program is set to execute the voiceprint recognition method when running.
[0043] According to a further aspect of the embodiments of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the voiceprint recognition method described above through the computer program.
[0044] In the embodiments of the present application, the initial speech features extracted from the speech file collected from the target scene are subjected to feature conversion to obtain target speech features, wherein the speech file is used to record the speeches of all speakers appearing in the target scene, the initial speech features are used to represent the speech attributes of all speakers, the target speech features are used to represent target key attributes in the speech attributes of all speakers, and the feature dimension of the target speech features is smaller than that of the initial speech features; the target speech features are subjected to feature separation to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker in all speakers; and the plurality of feature segments are clustered into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent one registered user appearing in the target scene, and the reference voiceprint is used to register the registered user in the case that the registered user appears in the target scene again, that is, the initial speech features extracted from the speech file collected from the target scene are subjected to feature conversion to obtain target speech features, since the speech file records the speeches of all speakers appearing in the target scene, the initial speech features can represent the speech attributes of all speakers, and the feature dimension of the target speech features obtained after the feature conversion of the initial speech features is smaller than that of the initial speech features, that is, the target speech features can represent target key attributes in the speech attributes of all speakers, then the target speech features can be subjected to feature separation to obtain a plurality of feature segments, each feature segment corresponds to one speaker in all speakers, and finally the plurality of feature segments are clustered into a plurality of reference voiceprints, each reference voiceprint can represent one registered user appearing in the target scene, and the reference voiceprint can be used to register the registered user in the case that the registered user appears in the target scene again, that is, the process of voiceprint registration does not require the registered user to actively input the voiceprint, the target scene can automatically cluster a plurality of reference voiceprints, and the registered user is registered according to the plurality of reference voiceprints. By using the above technical solution, the problem of low convenience of voiceprint registration in the related art is solved, and the technical effect of improving the convenience of voiceprint registration is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate the embodiments of the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, for those skilled in the field, other drawings can also be obtained based on these drawings without any creative effort.
[0047] Figure 1 is a hardware environment schematic diagram of a voiceprint recognition method according to an embodiment of the present application;
[0048] Figure 2 is a flowchart of a voiceprint recognition method according to an embodiment of the present application;
[0049] Figure 3 is a schematic diagram of voiceprint recognition according to an embodiment of the present application;
[0050] Figure 4 is a schematic diagram of a voiceprint recognition process according to an embodiment of the present application;
[0051] Figure 5 is a structural block diagram of a voiceprint recognition device according to an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the person skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should be within the scope of protection of the present application.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily mean a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0054] According to an aspect of the embodiments of the present application, a voiceprint recognition method is provided. The voiceprint recognition method is widely applied to smart home, smart home, smart home device ecology, intelligence house ecology and other whole-house intelligent digital control application scenarios. Optionally, in the embodiments, Figure 1 is a hardware environment schematic diagram of a voiceprint recognition method according to an embodiment of the present application. The voiceprint recognition method can be applied to a hardware environment composed of a terminal device 102 and a server 104 as shown in Figure 1 . As shown in Figure 1 , the server 104 is connected with the terminal device 102 through a network, which can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, which is used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, which is used to provide data operation services for the server 104.
[0055] The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, smart refrigerator, smart oven, smart oven, smart washing machine, smart water heater, smart washing device, smart dishwasher, smart projection device, smart television, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.
[0056] In the embodiments, a voiceprint recognition method is provided, which is applied to the above-mentioned device terminal, Figure 2 is a flowchart of a voiceprint recognition method according to an embodiment of the present application, which includes the following steps as shown in Figure 2 .
[0057] In step S202, initial speech features extracted from a speech file collected from a target scene are converted to obtain target speech features, wherein the speech file is used to record speeches of all speakers in the target scene, the initial speech features are used to represent speech attributes of the all speakers, and the target speech features are used to represent target key attributes in the speech attributes of the all speakers, and a feature dimension of the target speech features is smaller than a feature dimension of the initial speech features.
[0058] In step S204, the target speech features are separated to obtain a plurality of feature segments, wherein each of the plurality of feature segments corresponds to one of the all speakers.
[0059] In step S206, the plurality of feature segments are clustered into a plurality of reference voiceprints, wherein each of the plurality of reference voiceprints is used to represent one of the registered users in the target scene, and the reference voiceprint is used to register the registered user in the target scene again.
[0060] Through the above steps, first, the initial speech features extracted from the speech file collected from the target scene are converted to obtain the target speech features. Since the speech file records speeches of all speakers in the target scene, the initial speech features can represent speech attributes of the all speakers. After the initial speech features are converted, a feature dimension of the target speech features is smaller than a feature dimension of the initial speech features, that is, the target speech features can represent target key attributes in the speech attributes of the all speakers. Then, the target speech features are separated to obtain a plurality of feature segments, each of which corresponds to one of the all speakers. Finally, the plurality of feature segments are clustered into a plurality of reference voiceprints, each of which can represent one of the registered users in the target scene. In the future, when the registered user appears in the target scene again, the reference voiceprint can be used to register the registered user. That is, the process of voiceprint registration does not require the registered user to actively record a voiceprint. The target scene can automatically cluster a plurality of reference voiceprints to register the registered user according to the plurality of reference voiceprints. Through the above technical solution, the problem of low convenience of voiceprint registration in related technologies is solved, and the technical effect of improving the convenience of voiceprint registration is achieved.
[0061] In the technical solution provided in step S202, the target scene can include, but is not limited to, a family scene, an office scene, a teaching scene, and the like. There can be multiple speakers in the target scene. It should be noted that the voiceprint recognition method provided in the present application can recognize and register the voiceprints of the multiple speakers in the target scene without awareness of the multiple speakers.
[0062] Optionally, in the present embodiment, the voice file can include, but is not limited to, voice data of multiple speakers in the target scene, dialogue data, and device control instruction data, and the like.
[0063] In one example embodiment, the initial voice features extracted from the voice file collected from the target scene can be converted into target voice features in the following manner: the initial voice features are extracted from T-frame audio data segmented from the voice file, wherein each frame of the audio data belongs to a single speaker, the signal-to-noise ratio parameter of the voice file is greater than a target signal-to-noise ratio threshold, and the number of voice words of the voice file is greater than a target number; each voice feature included in the initial voice features is subjected to matrix operation to obtain amplified voice features, wherein the feature dimension of the amplified voice features is greater than or equal to a target dimension; and the amplified voice features are input into a dimension reduction model to obtain the target voice features output by the dimension reduction model, wherein the dimension reduction model is used to extract key attributes in voice features while reducing the dimension of the voice features.
[0064] Optionally, in the present embodiment, the initial voice features can be converted into target voice features by, but not limited to, amplifying the dimension to obtain amplified voice features, and then inputting the amplified voice features into a dimension reduction model to obtain the target voice features. Figure 3 is a schematic diagram of voiceprint recognition according to an embodiment of the present application, as shown in Figure 3 , initial voice features Audio feature(X1, X2,..., X T ) are input into SA-EEND (End-to-End Neural speaker Diarization with Self-Attention, Self-Attentive-based end-to-end model) to obtain amplified voice features output by SA-EEND, the amplified voice features are input into a dimension reduction model UMAP (Uniform Manifold Approximation and Projection, uniform manifold approximation and projection for dimension reduction), and target voice features Embeddings(e1, e2,..., e T ) output by UMAP are obtained.
[0065] Optionally, in the embodiment, the core idea of UMAP for dimensionality reduction of data can be but is not limited to the following: firstly, UMAP can use the Nearest-Neighbor-Descent algorithm to find the nearest neighbor, assuming that there is a uniform distribution of data flow pattern, and the target flow pattern is locally connected; this indicates that the space between data is stretched or contracted according to the sparse or dense position; each point is connected to at least one other point or can set a lower limit to the number of connections; for each sample in the data set, calculate the local fuzzy simplex set; splice all local fuzzy simplex sets and optimize the graph layout; embed the high-bit topological representation into a d-dimensional space, limit the minimum distance between each two adjacent points to avoid many points overlapping with each other in low-dimensional embedding.
[0066] Optionally, in the embodiment, the manner in which the signal-to-noise ratio parameter of the voice file is greater than the target signal-to-noise ratio threshold and the number of voice words of the voice file is greater than the target number can be but is not limited to the following: taking a home scene as an example, when a user uses a smart home system, the user can control smart devices through voice interaction, and the voice during the interaction can be temporarily retained as an audio file in the cloud; the cloud selects through the number of recognition results and the evaluation of the signal-to-noise ratio; the audio file is deleted through the cloud when the signal-to-noise ratio is negative (corresponding to the target signal-to-noise ratio threshold) and the number of recognized words is less than 4 words; when the number of voice files exceeds 6 sentences (corresponding to the target number), the audio file stored in the cloud is determined as the voice file.
[0067] In one example embodiment, the initial voice feature extracted from the voice file collected from the target scene can be but is not limited to being converted into a target voice feature in the following manner: the feature dimension of the initial voice feature is amplified to obtain an amplified voice feature; a reference feature dimension is determined according to the amplified voice feature, wherein the reference feature dimension is used to retain key attributes in the amplified voice feature; and the amplified voice feature is reduced in dimension to the reference feature dimension to obtain the target voice feature.
[0068] Optionally, in the embodiment, the feature dimension of the initial voice feature is first amplified to obtain an amplified voice feature, and when the amplified voice feature is reduced in dimension, a reference feature dimension can be determined according to the amplified voice feature, which can be but is not limited to adjusting the size of the reference feature dimension according to the feature dimension of the amplified voice feature, to ensure that the reference feature dimension can retain key attributes in the amplified voice feature.
[0069] In the technical solution provided in step S204, the target voice feature is used to represent a target key attribute in the voice attributes of all speakers. Since each of the all speakers has its own feature, the target voice feature is separated to obtain a plurality of feature segments, and each of the feature segments can correspond to one of the all speakers.
[0070] In an example embodiment, the target voice feature can be separated to obtain a plurality of feature segments by, but not limited to, the following manner: encoding a candidate voice feature in the target voice feature with a context correlation greater than a target correlation threshold to obtain target encoding data, wherein the target encoding data is used to represent the overall feature of the target voice feature; predicting a reference speaker feature corresponding to the target voice feature according to the target encoding data, wherein the reference speaker information is used to indicate the information of the reference speaker existing in the voice file; and separating the target voice feature according to the reference speaker feature to obtain the plurality of feature segments.
[0071] Optionally, in the present embodiment, the process of encoding the candidate voice feature in the target voice feature with a context correlation greater than a target correlation threshold to obtain target encoding data can be, but is not limited to, as shown in Figure 3 The target voice feature Embeddings (e1, e2,..., e T ) is input into an LSTM encoder (Long short-term memory encoder, long short-term memory network encoding layer). The LSTM encoder can encode the candidate voice feature in the target voice feature with a context correlation greater than a target correlation threshold to obtain target encoding data (h0 and c0) output by the LSTM encoder.
[0072] In an example embodiment, the candidate voice feature in the target voice feature with a context correlation greater than a target correlation threshold can be encoded to obtain target encoding data by, but not limited to, the following manner: extracting short-term memory data and long-term memory data corresponding to the target voice feature, wherein the short-term memory data is used to indicate the recent memory between a plurality of target sub-voice features included in the target voice feature, and the long-term memory data is used to indicate the long-term memory between the plurality of target sub-voice features; extracting the data with the context correlation greater than the target correlation threshold from the target voice feature according to the short-term memory data and the long-term memory data to obtain the candidate voice feature; and encoding the candidate voice feature to obtain the target encoding data.
[0073] Optionally, in the present embodiment, asFigure 3 As shown, the LSTM encoder can extract the target speech feature Embeddings (e1, e2,..., e T ) corresponding short-term memory data hidden state and long-term memory data cell state, through the transmission of the above hidden state and cell state, important information can be retained, unimportant information can be eliminated, and then the data with a context correlation greater than a target correlation threshold can be extracted from the target speech feature to obtain the target encoding data (h0 and c0).
[0074] In an example embodiment, the target speech feature corresponding reference speaker feature can be predicted according to the target encoding data in the following manner, but not limited thereto: decoding the target encoding data to obtain a plurality of attractor vectors corresponding to the candidate speech feature; calculating a target probability value corresponding to each attractor vector, wherein the target probability value is used to indicate the probability of the existence of a speaker for each attractor vector; and determining the vector matrix constructed using the attractor vectors with the target probability value greater than or equal to a reference threshold as the reference speaker feature.
[0075] Optionally, in the present embodiment, as shown, Figure 3 The target encoding data (h0 and c0) is transmitted to the LSTM decoder (Long short-term memory decoder, long short-term memory network decoding layer), and since the LSTM decoder has no initial input, a zero vector Zero vectors (0, 0,..., 0, 0) is added below the LSTM decoder as an initial input, and the attractor vectors Attractors (a1, a2,..., a s , a s+1 ) output by the LSTM decoder are obtained, the target probability values Attractor existence probabilies (p1, p2,..., p s , p s+1 ) corresponding to each attractor vector are calculated, wherein the target probability values greater than or equal to a reference threshold can be labeled Labels 1, and the target probability values less than the reference threshold can be labeled Labels 0, and then the vector matrix constructed using the attractor vectors (a1, a2,..., a s ) with the target probability values greater than or equal to the reference threshold.
[0076] In an example embodiment, the target speech feature can be separated into the plurality of feature segments according to the reference speaker feature, but not limited to, by extracting short-term memory data corresponding to a plurality of target sub-speech features included in the target speech feature, wherein the short-term memory data is used to indicate recent memory between the plurality of target sub-speech features; matching a speaker label corresponding to each of the target sub-speech features according to a product of the short-term memory data and the vector matrix; and separating the target speech feature into the plurality of feature segments according to the speaker label.
[0077] Optionally, in the embodiment, as shown in Figure 3 the target speech feature Embeddings (e1, e2,..., e T ) is input into the LSTM encoder to obtain short-term memory data hidden stat embedding output from the LSTM encoder, the short-term memory data is sequentially multiplied by the vector matrix, and then a classification result Diarization result is obtained after sigmoid (activation function). The result is combined with the speaker label Labels (y1, y2,..., y T ) to obtain a loss function of binary cross entropy loss (binary cross entropy loss) and PIT loss, and the plurality of feature segments are obtained.
[0078] In the technical solution provided in the above step S206, the plurality of feature segments are clustered into a plurality of reference voiceprints, for example, segment 1 (e1, e2), segment 2 (e3, e4) and segment 3 (e5, e6) can be clustered into reference voiceprint 1, reference voiceprint 2 and reference voiceprint 3, respectively.
[0079] In an example embodiment, after the plurality of feature segments are clustered into the plurality of reference voiceprints, the voiceprint can be registered, but not limited to, in the following manner: in the case that speech data is collected again from the target scene, the speech data is matched with one or more of the reference voiceprints; in the case that the speech data matches the target voiceprint in the one or more reference voiceprints, a user corresponding to the speech data is determined as the user to be registered for voiceprint registration; and in the case that the speech data does not match any of the one or more reference voiceprints, the speech data is stored in the voice file.
[0080] Optionally, in the embodiment, taking the reference voice 1, the reference voice 2 and the reference voice 3 as an example of one or more reference voices, when the voice data A is collected again in the target scene, if the voice data A matches the reference voice 2 in the reference voice 1, the reference voice 2 and the reference voice 3, the user corresponding to the voice data A is determined as the voiceprint registration user for voiceprint registration.
[0081] In order to better understand the voiceprint recognition method, the flow of the voiceprint recognition method will be described in combination with the optional embodiments below, but not used to limit the technical solutions of the embodiments of the present application.
[0082] In the embodiment, a voiceprint recognition method is provided, Figure 4 is a schematic diagram of a voiceprint recognition process according to an embodiment of the present application, as Figure 4 shown, mainly includes the following steps:
[0083] Step S401: Taking a home scene as an example, first, when a user uses a smart home system, the user can control a smart device through voice interaction, and the voice during the interaction can be temporarily retained as an audio file in the cloud;
[0084] Step S402: For each interaction of the user, the cloud performs screening through the number of recognition results and the evaluation of the signal-to-noise ratio; if the signal-to-noise ratio is negative (corresponding to the target signal-to-noise ratio threshold) and the number of recognized words is less than 4, the audio file will be deleted by the cloud;
[0085] Step S403: When the number of voice files exceeds 6 sentences (corresponding to the target number), the audio files stored in the cloud are determined as the voice files, and the speaker separation and clustering algorithm interface is called respectively to determine whether the clustering is successful;
[0086] Step S404: The implementation of speaker separation mainly includes: first, each audio is generated by the speaker separation algorithm to generate the Embedding result of each audio;
[0087] Step S405: The implementation of the clustering algorithm mainly includes: 6 sentences are simultaneously inserted into the clustering algorithm, and the UMAP dimension reduction algorithm is used to reduce the dimension to 3 dimensions;
[0088] Step S406: The 6 three-dimensional data after dimension reduction are clustered using the hierarchical clustering algorithm;
[0089] Step S407: When a user speaks, the audio is scored by Plda (Probabilistic Linear Discriminant Analysis) after feature extraction and dimension reduction with the 3D data that has been clustered above; by setting the Plda scoring threshold, if it is higher than the threshold, it is the speaker, otherwise it is not;
[0090] Step S408: When it is considered to be the user, the whole process of voiceprint recognition is completed by replying to the user with "Hello, ***";
[0091] Step S409: When it is not considered to be the user, the audio can be accumulated again, i.e., steps S403 to S406 are repeated.
[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present application.
[0093] Figure 5 is a structural block diagram of a voiceprint recognition device according to an embodiment of the present application; as shown in Figure 5 , comprising:
[0094] The extraction module 502 is configured to perform feature conversion on initial speech features extracted from a speech file collected from a target scene, to obtain target speech features, wherein the speech file is used to record speeches spoken by all speakers appearing in the target scene, the initial speech features are used to represent speech attributes of the all speakers, and the target speech features are used to represent target key attributes in the speech attributes of the all speakers, and the feature dimension of the target speech features is smaller than the feature dimension of the initial speech features.
[0095] The separation module 504 is configured to perform feature separation on the target speech features, to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker in the all speakers.
[0096] The clustering module 506 is configured to cluster the plurality of feature segments into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent a to-be-registered user who has appeared in the target scene, and the reference voiceprint is used to perform voiceprint registration on the to-be-registered user when the to-be-registered user appears in the target scene again.
[0097] According to the above embodiment, the initial speech features extracted from the speech file collected from the target scene are first converted into target speech features. Since the speech file records the speech of all speakers who appear in the target scene, the initial speech features can represent the speech attributes of all speakers. After the initial speech features are converted, the feature dimension of the target speech features is smaller than that of the initial speech features, that is, the target speech features can represent the target key attributes of the speech attributes of all speakers. Then, the target speech features are separated into a plurality of feature segments, each of which corresponds to a speaker among all speakers. Finally, the plurality of feature segments are clustered into a plurality of reference voiceprints, each of which can represent a to-be-registered user who has appeared in the target scene. In the subsequent process, when the to-be-registered user appears in the target scene again, the reference voiceprint can be used to perform voiceprint registration on the to-be-registered user. That is, the process of voiceprint registration does not need to wait for the to-be-registered user to actively record the voiceprint. The target scene can automatically cluster a plurality of reference voiceprints to perform voiceprint registration on the to-be-registered user according to the plurality of reference voiceprints. By using the above technical solution, the problem of low convenience of voiceprint registration in the related art is solved, and the technical effect of improving the convenience of voiceprint registration is achieved.
[0098] In an example embodiment, the separating module comprises:
[0099] The encoding unit is configured to encode the candidate speech feature in the target speech feature whose context correlation degree is greater than a target correlation degree threshold to obtain target encoding data, wherein the target encoding data is used to represent the overall feature of the target speech feature.
[0100] The prediction unit is configured to predict the reference speaker feature corresponding to the target speech feature according to the target encoding data, wherein the reference speaker information is used to indicate the information of the reference speaker existing in the speech file.
[0101] The separating unit is configured to separate the target speech feature according to the reference speaker feature to obtain the plurality of feature segments.
[0102] In an example embodiment, the encoding unit is further configured to:
[0103] extract short-term memory data corresponding to the target speech feature, wherein the short-term memory data is used to indicate recent memory between a plurality of target sub-speech features included in the target speech feature;
[0104] extract data with the context correlation greater than the target correlation threshold from the target speech feature according to the short-term memory data and the long-term memory data, to obtain the candidate speech feature;
[0105] encode the candidate speech feature to obtain the target encoding data.
[0106] In an example embodiment, the prediction unit is further configured to:
[0107] decode the target encoding data to obtain a plurality of attractor vectors corresponding to the candidate speech feature;
[0108] calculate a target probability value corresponding to each attractor vector, wherein the target probability value is used to indicate a probability that each attractor vector exists for one speaker;
[0109] determine a vector matrix constructed using the attractor vectors with the target probability value greater than or equal to a reference threshold as the reference speaker feature.
[0110] In an example embodiment, the separation unit is further configured to:
[0111] extract short-term memory data corresponding to a plurality of target sub-speech features included in the target speech feature, wherein the short-term memory data is used to indicate recent memory between the plurality of target sub-speech features;
[0112] match a speaker label corresponding to each target sub-speech feature according to a product of the short-term memory data and the vector matrix;
[0113] perform feature separation on the target speech feature according to the speaker label to obtain a plurality of feature segments.
[0114] In an example embodiment, the extraction module comprises:
[0115] an extraction unit configured to extract the initial speech feature from T-frame audio data segmented from the speech file, wherein each frame of the audio data belongs to a single speaker, a signal-to-noise ratio parameter of the speech file is greater than a target signal-to-noise ratio threshold, and a speech word count of the speech file is greater than a target quantity;
[0116] The operation unit is configured to perform matrix operation on each speech feature included in the initial speech feature to obtain an amplified speech feature, wherein the feature dimension of the amplified speech feature is greater than or equal to a target dimension.
[0117] The input unit is configured to input the amplified speech feature into a dimension reduction model to obtain the target speech feature output by the dimension reduction model, wherein the dimension reduction model is configured to extract key attributes in the speech feature while reducing the dimension of the speech feature.
[0118] In an example embodiment, the apparatus further comprises:
[0119] The matching module is configured to, after clustering the plurality of feature segments into a plurality of reference voiceprints, match the speech data with one or more of the reference voiceprints in the case that speech data is collected again from the target scene;
[0120] The determination module is configured to, in the case that the speech data matches a target voiceprint in the one or more reference voiceprints, determine a user corresponding to the speech data as the user to be registered for voiceprint registration;
[0121] The storage module is configured to, in the case that the speech data does not match any of the one or more reference voiceprints, store the speech data into the speech file.
[0122] In an example embodiment, the extraction module further comprises:
[0123] The amplification unit is configured to amplify the feature dimension of the initial speech feature to obtain an amplified speech feature;
[0124] The determination unit is configured to determine a reference feature dimension according to the amplified speech feature, wherein the reference feature dimension is configured to retain key attributes in the amplified speech feature;
[0125] The dimension reduction unit is configured to reduce the dimension of the amplified speech feature to the reference feature dimension to obtain the target speech feature.
[0126] Embodiments of the present application also provide a storage medium comprising a stored program, wherein the above-mentioned program performs any of the above-mentioned methods when running.
[0127] Optionally, in the present embodiment, the above-mentioned storage medium can be configured to store program code for performing the following steps:
[0128] S1, performing feature conversion on initial speech features extracted from a speech file collected from a target scene, to obtain target speech features, wherein the speech file is used to record speeches spoken by all speakers appearing in the target scene, the initial speech features are used to represent speech attributes of the all speakers, the target speech features are used to represent target key attributes among the speech attributes of the all speakers, and a feature dimension of the target speech features is smaller than a feature dimension of the initial speech features;
[0129] S2, performing feature separation on the target speech features, to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker in the all speakers;
[0130] S3, clustering the plurality of feature segments into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent one registered user appearing in the target scene, and the reference voiceprint is used to perform voiceprint registration on the registered user when the registered user appears in the target scene again.
[0131] Embodiments of the present application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.
[0132] Optionally, the electronic device can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0133] Optionally, in the embodiment, the processor can be configured to execute the following steps through the computer program:
[0134] S1, performing feature conversion on initial speech features extracted from a speech file collected from a target scene, to obtain target speech features, wherein the speech file is used to record speeches spoken by all speakers appearing in the target scene, the initial speech features are used to represent speech attributes of the all speakers, the target speech features are used to represent target key attributes among the speech attributes of the all speakers, and a feature dimension of the target speech features is smaller than a feature dimension of the initial speech features;
[0135] S2, performing feature separation on the target speech features, to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker in the all speakers;
[0136] S3, cluster the plurality of feature segments into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent a to-be-registered user who has appeared in the target scene, and the reference voiceprint is used to perform voiceprint registration on the to-be-registered user in the case that the to-be-registered user appears in the target scene again.
[0137] Optionally, in the embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various storage program codes.
[0138] Optionally, specific examples in the embodiment can refer to examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here.
[0139] Obviously, those skilled in the art should understand that each module or each step of the present application described above can be realized by a general computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and can be realized by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in an order different from here, or they can be manufactured into each integrated circuit module respectively, or multiple modules or steps among them can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0140] The above only describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A voiceprint recognition method, characterized in that, The method comprises: performing feature conversion on initial speech features extracted from a speech file collected from a target scene, to obtain target speech features, wherein the speech file is used to record the speech of all speakers appearing in the target scene, the initial speech features are used to represent the speech attributes of the all speakers, and the target speech features are used to represent target key attributes among the speech attributes of the all speakers, and the feature dimension of the target speech features is smaller than the feature dimension of the initial speech features; performing feature separation on the target speech features to obtain a plurality of feature segments, wherein each feature segment in the plurality of feature segments corresponds to one speaker among the all speakers; clustering the plurality of feature segments into a plurality of reference voiceprints, wherein each reference voiceprint in the plurality of reference voiceprints is used to represent one registered user appearing in the target scene, and the reference voiceprint is used to perform voiceprint registration on the registered user when the registered user appears in the target scene again; wherein the feature separation of the target speech features to obtain a plurality of feature segments comprises: encoding candidate speech features in the target speech features with a context correlation degree greater than a target correlation threshold to obtain target encoding data, wherein the target encoding data is used to represent the overall features of the target speech features; predicting reference speaker features corresponding to the target speech features according to the target encoding data, wherein the reference speaker features are used to indicate the information of reference speakers existing in the speech file; and performing feature separation on the target speech features according to the reference speaker features to obtain the plurality of feature segments; wherein the encoding of the candidate speech features in the target speech features with a context correlation degree greater than a target correlation threshold to obtain target encoding data comprises: extracting short-term memory data and long-term memory data corresponding to the target speech features, wherein the short-term memory data is used to indicate the recent memory between a plurality of target sub-speech features included in the target speech features, and the long-term memory data is used to indicate the long-term memory between the plurality of target sub-speech features; extracting data with a context correlation degree greater than the target correlation threshold from the target speech features according to the short-term memory data and the long-term memory data to obtain the candidate speech features; and encoding the candidate speech features to obtain the target encoding data.
2. The method of claim 1, wherein, The prediction of the reference speaker features corresponding to the target speech features according to the target encoding data comprises: decoding the target encoding data to obtain a plurality of attractor vectors corresponding to the candidate speech features; calculating a target probability value corresponding to each attractor vector, wherein the target probability value is used to indicate the probability of the existence of one speaker for each attractor vector; determining a vector matrix constructed using the attractor vectors with a target probability value greater than or equal to a reference threshold as the reference speaker features.
3. The method of claim 2, wherein, The feature separation of the target speech feature according to the reference speaker feature includes: extracting short-term memory data corresponding to a plurality of target sub-speech features included in the target speech feature, wherein the short-term memory data is used to indicate recent memory between the plurality of target sub-speech features; matching a speaker label corresponding to each target sub-speech feature according to a product of the short-term memory data and the vector matrix; feature separation of the target speech feature according to the speaker label to obtain a plurality of feature fragments.
4. The method of claim 1, wherein, The feature conversion of the initial speech feature extracted from the speech file collected from the target scene to obtain the target speech feature includes: extracting the initial speech feature from the T-frame audio data segmented from the speech file, wherein each frame of the audio data belongs to a single speaker, the signal-to-noise ratio parameter of the speech file is greater than a target signal-to-noise ratio threshold, and the number of speech words of the speech file is greater than a target number; performing matrix operation on each speech feature included in the initial speech feature to obtain an amplified speech feature, wherein the feature dimension of the amplified speech feature is greater than or equal to a target dimension; inputting the amplified speech feature into a dimension reduction model to obtain the target speech feature output by the dimension reduction model, wherein the dimension reduction model is used to extract key attributes in the speech feature while reducing the dimension of the speech feature.
5. The method of claim 1, wherein, After the clustering of the plurality of feature fragments into a plurality of reference voiceprints, the method further includes: in the case of collecting speech data from the target scene again, matching the speech data with one or more reference voiceprints; in the case that the speech data matches a target voiceprint in the one or more reference voiceprints, determining a user corresponding to the speech data as the user to be registered for voiceprint registration; in the case that the speech data does not match any of the one or more reference voiceprints, storing the speech data to the speech file.
6. The method of claim 1, wherein, The feature conversion of the initial speech feature extracted from the speech file collected from the target scene to obtain the target speech feature further includes: amplifying the feature dimension of the initial speech feature to obtain an amplified speech feature; determining a reference feature dimension according to the amplified speech feature, wherein the reference feature dimension is used to retain key attributes in the amplified speech feature; dimension reduction of the amplified speech feature to the reference feature dimension to obtain the target speech feature.
7. A computer readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program executes the method of any one of claims 1 to 6 when running. 8.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Voiceprint registration method, voiceprint registration device and electronic equipment
CN114203186A
Voice recognition method and electronic device using the same
US20220036902A1