Model matching method, device, electronic device and readable storage medium
Through voiceprint feature matching and normalization processing, the target speech synthesis model is directly selected from the model library, which solves the problem of time-consuming training of personalized speech synthesis models in the existing technology and realizes fast and convenient personalized speech synthesis.
Patent Information
- Application Number
- CN202210642792.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-06-08
AI Technical Summary
In the prior art, synthesizing user personalized voice requires time-consuming training of different personalized voice synthesis models, which makes obtaining user-specific models time-consuming and labor-intensive.
By obtaining the target user's voiceprint features and matching information with the anchor voiceprint library, combining multiple scene voiceprint features with the speech synthesis model in the model library, and using normalization processing to determine the target speech synthesis model, the separate training step for each user is omitted.
It enables quick and convenient selection of matching target speech synthesis models from the model library, reducing user waiting time.
Smart Images

Figure CN115064149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a model matching method, device, electronic device and readable storage medium. Background Art
[0002] Speech synthesis technology, also known as text-to-speech (TTS), refers to computer-generated speech generated from text. Personalized TTS, on the other hand, generates speech while retaining the specific timbre of human speech. Because personalized TTS can mimic human timbre and enhance listener familiarity, it is more popular with users than generic TTS.
[0003] In existing technologies, synthesizing a user's personalized speech requires pre-training a personalized text-to-speech (TTS) model for that user. This, on the one hand, requires time-consuming preparation of training data and training of the personalized TTS model. Furthermore, different personalized TTS models must be trained for different users. Therefore, in existing technologies, obtaining a user-specific personalized TTS model is time-consuming and labor-intensive. Summary of the Invention
[0004] The purpose of the present invention is to provide a model matching method, device, electronic device and readable storage medium to improve the problems existing in the prior art.
[0005] The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a model matching method, comprising:
[0007] Obtaining a target voiceprint feature corresponding to a target audio of a target user; the target audio corresponds to a fixed text, and the fixed text corresponds to a business scenario;
[0008] Obtaining first matching information corresponding to the target voiceprint feature and the anchor voiceprint library;
[0009] Acquire multiple scene voiceprint features corresponding to the fixed text; wherein the model library contains multiple speech synthesis models, and each scene voiceprint feature corresponds to one of the speech synthesis models;
[0010] Obtaining second matching information corresponding to each of the scene voiceprint features respectively;
[0011] Obtaining a matching score between the target voiceprint feature and each of the scene voiceprint features respectively;
[0012] Using the first matching information and the second matching information, normalizing each matching score to obtain a normalized score corresponding to each scene voiceprint feature;
[0013] According to all the normalized scores, a target speech synthesis model matching the target voiceprint feature is determined from the model library.
[0014] In an optional embodiment, the method further comprises:
[0015] Obtain a template audio text set corresponding to a template audio set; the template audio set contains multiple template audios, and the template audio text set contains multiple template audio texts; any one of the template audios has a corresponding template audio text;
[0016] Inputting the template audio text set into each of the speech synthesis models respectively to obtain a speech synthesis audio set corresponding to each of the template audio text sets; the speech synthesis audio set includes multiple speech synthesis audios; and one speech synthesis audio corresponding to each training audio text corresponds to one of the speech synthesis models;
[0017] Using the voiceprint model, feature extraction is performed on the speech synthesis audio set and the template audio set to obtain a voiceprint feature set to form the anchor voiceprint library; wherein the anchor voiceprint library contains the voiceprint features of each speech synthesis audio and the voiceprint features of each template audio.
[0018] In an optional embodiment, the anchor voiceprint library includes multiple voiceprint features, the first matching information includes a first mean and a first standard deviation, and the step of obtaining the first matching information corresponding to the target voiceprint feature and the anchor voiceprint library includes:
[0019] Matching the target voiceprint feature with each voiceprint feature in the anchor voiceprint library respectively to obtain a plurality of first matching scores corresponding to the target voiceprint feature; each first matching score corresponds to one of the voiceprint features in the anchor voiceprint library;
[0020] K first matching scores are selected from a plurality of the first matching scores, and the first mean and the first standard deviation are calculated based on the K first matching scores.
[0021] In an optional embodiment, the step of obtaining multiple scene voiceprint features corresponding to the fixed text includes:
[0022] Inputting the fixed text into each of the speech synthesis models respectively to obtain a plurality of target speech synthesis audios;
[0023] The voiceprint model is used to extract features of each target speech synthesis audio to obtain multiple scene voiceprint features.
[0024] In an optional embodiment, the anchor voiceprint library includes multiple voiceprint features, the second matching information includes the second mean and the second standard deviation of each of the scene voiceprint features, and the step of respectively obtaining the second matching information corresponding to each of the scene voiceprint features includes:
[0025] Matching each of the scene voiceprint features with each voiceprint feature in the anchor voiceprint library one by one to obtain a plurality of second matching scores corresponding to each of the scene voiceprint features;
[0026] For each of the scene voiceprint features, K second matching scores are selected from the multiple second matching scores corresponding to each of the scene voiceprint features, and a second mean and a second standard deviation of the scene voiceprint feature are calculated based on the K second matching scores.
[0027] In a second aspect, the present invention provides a model matching device, comprising a first acquisition module, a second acquisition module and a processing module;
[0028] The first acquisition module is configured to:
[0029] Obtaining a target voiceprint feature corresponding to a target audio of a target user; the target audio corresponds to a fixed text, and the fixed text corresponds to a business scenario;
[0030] Obtaining first matching information corresponding to the target voiceprint feature and the anchor voiceprint library;
[0031] The second acquisition module is used to:
[0032] Acquire multiple scene voiceprint features corresponding to the fixed text; wherein the model library contains multiple speech synthesis models, and each scene voiceprint feature corresponds to one of the speech synthesis models;
[0033] Obtaining second matching information corresponding to each of the scene voiceprint features respectively;
[0034] Obtaining a matching score between the target voiceprint feature and each of the scene voiceprint features respectively;
[0035] The processing module is used to:
[0036] Using the first matching information and the second matching information, normalizing each matching score to obtain a normalized score corresponding to each scene voiceprint feature;
[0037] According to all the normalized scores, a target speech synthesis model matching the target voiceprint feature is determined from the model library.
[0038] In an optional implementation manner, the first acquisition module is further configured to:
[0039] Obtain a template audio text set corresponding to a template audio set; the template audio set contains multiple template audios, and the template audio text set contains multiple template audio texts; any one of the template audios has a corresponding template audio text;
[0040] Inputting the template audio text set into each of the speech synthesis models respectively to obtain a speech synthesis audio set corresponding to each of the template audio text sets; the speech synthesis audio set includes multiple speech synthesis audios; and one speech synthesis audio corresponding to each training audio text corresponds to one of the speech synthesis models;
[0041] Using the voiceprint model, feature extraction is performed on the speech synthesis audio set and the template audio set to obtain a voiceprint feature set to form the anchor voiceprint library; wherein the anchor voiceprint library contains the voiceprint features of each speech synthesis audio and the voiceprint features of each template audio.
[0042] In an optional implementation manner, the first acquisition module is specifically configured to:
[0043] Inputting the fixed text into each of the speech synthesis models respectively to obtain a plurality of target speech synthesis audios;
[0044] The voiceprint model is used to extract features of each target speech synthesis audio to obtain multiple scene voiceprint features.
[0045] In a third aspect, the present invention provides an electronic device comprising: a memory and a processor, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to implement a method as described in any one of the aforementioned embodiments.
[0046] In a fourth aspect, the present invention provides a readable storage medium, wherein the readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method described in any one of the aforementioned embodiments.
[0047] Compared with the prior art, the embodiments of the present invention provide a model matching method, apparatus, electronic device, and readable storage medium. First, first matching information corresponding to the target voiceprint feature of the target user and fixed text, as well as multiple scene voiceprint features, are obtained. Second matching information corresponding to each scene voiceprint feature is then obtained, as well as a matching score between the target voiceprint feature and each scene voiceprint feature. Each matching score is then normalized using the first matching information and the second matching information to obtain a normalized score corresponding to each scene voiceprint feature. Finally, based on all normalized scores, a target speech synthesis model that matches the target voiceprint feature is determined from a model library. This allows for the selection of a matching target speech synthesis model from a model library based on the target user's voiceprint feature, saving time and convenience. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 This is one of the flow charts of a model matching method provided in an embodiment of the present invention.
[0050] Figure 2 The second flowchart of a model matching method provided by an embodiment of the present invention.
[0051] Figure 3 The third flowchart of a model matching method provided by an embodiment of the present invention.
[0052] Figure 4 The fourth flowchart of a model matching method provided in an embodiment of the present invention.
[0053] Figure 5 A schematic diagram of a process for constructing an anchor voiceprint library provided by an embodiment of the present invention.
[0054] Figure 6 A schematic structural diagram of a model matching device provided by an embodiment of the present invention.
[0055] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0058] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0059] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.
[0060] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0061] Speech synthesis technology, also known as text-to-speech (TTS), refers to the process of generating computer speech from text. With the advancement of deep learning, general TTS tasks have made significant progress, enabling the generation of highly realistic speech. Personalized TTS, on the other hand, generates speech while retaining the specific timbre characteristics of human speech. Because personalized TTS can mimic human timbre and enhance listener familiarity, it is more popular with users than general TTS.
[0062] In existing technologies, synthesizing a user's personalized speech requires pre-training a personalized text-to-speech (TTS) model for that user. This, on the one hand, requires time-consuming preparation of training data and training of the personalized TTS model. Furthermore, different personalized TTS models must be trained for different users. Therefore, in existing technologies, obtaining a user-specific personalized TTS model is time-consuming and labor-intensive.
[0063] In view of this, embodiments of the present invention provide a model matching method that can determine a target speech synthesis model that matches the target user's target voiceprint features from a model library based on an anchor voiceprint library. This method is quick and convenient, and avoids user waiting time. The following embodiments and accompanying drawings provide a detailed explanation.
[0064] Please refer to Figure 1 , Figure 1 This is a flow chart of a model matching method provided by an embodiment of the present invention. The execution subject of the method can be an electronic device. The method includes the following steps:
[0065] S101: Obtain target voiceprint features corresponding to target audio of a target user.
[0066] In this embodiment, the target audio corresponds to a fixed text, and the fixed text corresponds to a business scenario.
[0067] Optionally, a target audio of the target user may be obtained first, where the target audio is the audio of the target user reading a fixed text. Then, a voiceprint model may be used to extract features from the target audio to obtain target voiceprint features.
[0068] S102: Obtain first matching information corresponding to the target voiceprint feature and the anchor voiceprint library.
[0069] It can be understood that the first matching information can represent the mean and standard deviation of the matching value scores between the target voiceprint feature and each voiceprint feature in the anchor voiceprint library.
[0070] S103: Acquire multiple scene voiceprint features corresponding to the fixed text.
[0071] In this embodiment, the model library may include multiple speech synthesis models, and each scene voiceprint feature corresponds to a speech synthesis model.
[0072] S104, respectively obtaining second matching information corresponding to each scene voiceprint feature;
[0073] In this embodiment, each scene voiceprint feature may correspond to a second matching information, which may represent the mean and variance of the matching value scores between the corresponding scene voiceprint feature and each voiceprint feature in the anchor voiceprint library.
[0074] S105: Obtain the matching scores between the target voiceprint feature and each scene voiceprint feature respectively.
[0075] In this embodiment, the matching score may represent the similarity between the target voiceprint feature and a scene voiceprint feature.
[0076] S106: Using the first matching information and the second matching information, normalize each matching score to obtain a normalized score corresponding to each scene voiceprint feature.
[0077] In this embodiment, the normalized score corresponding to each scene voiceprint feature can represent the timbre similarity between the audio synthesized by the speech synthesis model corresponding to the scene voiceprint feature and the target user's speaking voice. It can be understood that since the matching score evaluates the similarity between the target voiceprint feature of the target audio (real human voice) and the scene voiceprint feature (belonging to the synthesized audio), there will be natural differences and inaccuracies. Therefore, it is necessary to normalize the matching score to reduce the inaccuracy and inconsistency of the similarity evaluation process and improve the accuracy of the normalized score.
[0078] S107. Determine a target speech synthesis model that matches the target voiceprint features from a model library based on all normalized scores.
[0079] It is understood that a larger normalized score indicates a higher timbre similarity between the audio synthesized by the corresponding speech synthesis model and the target user's voice. The target speech synthesis model may be the speech synthesis model corresponding to the largest normalized score.
[0080] An embodiment of the present invention provides a model matching method. First, first matching information corresponding to a target user's target voiceprint feature and fixed text, as well as multiple scenario voiceprint features, is obtained. Second matching information corresponding to each scenario voiceprint feature is then obtained, along with a matching score between the target voiceprint feature and each scenario voiceprint feature. Each matching score is then normalized using the first and second matching information to obtain a normalized score corresponding to each scenario voiceprint feature. Finally, based on all normalized scores, a target speech synthesis model matching the target voiceprint feature is determined from a model library. This method allows for the direct selection of a matching target speech synthesis model from a model library based on the target user's voiceprint feature, saving time and convenience.
[0081] In an optional embodiment, the first matching information and the second matching information are obtained based on the anchor voiceprint library. The model matching method may further include the steps of:
[0082] S100: Construct an anchor voiceprint library based on the template audio collection and the model library.
[0083] It is understood that the template audio set contains multiple template audios, each of which can be a real human voice. The model library contains several trained speech synthesis models.
[0084] Optionally, the anchor voiceprint library contains multiple voiceprint features, some of which are voiceprint features of the template audio and others are voiceprint features of the speech synthesis audio. The sub-steps of step S100 may include:
[0085] S1001. Obtain a template audio text set corresponding to the template audio set.
[0086] In this embodiment, the template audio set may include multiple template audios, and speech recognition may be performed on all template audios to obtain a template audio text set. Accordingly, the template audio text set may include multiple template audio texts. Any template audio has a corresponding template audio text.
[0087] S1002: Input the template audio text set into each speech synthesis model respectively to obtain the speech synthesis audio set corresponding to each template audio text set.
[0088] In this embodiment, the speech synthesis audio set includes multiple speech synthesis audios. The number of speech synthesis audios corresponding to each template audio text matches the number of speech synthesis models in the model library. In other words, one speech synthesis audio corresponding to each training audio text corresponds to one speech synthesis model.
[0089] S1003: Using the voiceprint model, extract features from the speech synthesis audio set and the template audio set to obtain a voiceprint feature set to form an anchor voiceprint library.
[0090] In this embodiment, the speech synthesis audio set and the template audio set can be input into the voiceprint model respectively for feature extraction to obtain an anchor voiceprint library. The anchor voiceprint library can contain the voiceprint features of each speech synthesis audio and each template audio.
[0091] It can be understood that the anchor voiceprint library contains not only the voiceprint features of the speech synthesis audio, but also the voiceprint features of the template audio, which can make the first matching information and the second matching information more accurate.
[0092] In an optional embodiment, the anchor voiceprint library contains multiple voiceprint features, and the first matching information is obtained by matching the target voiceprint feature with each voiceprint feature in the anchor voiceprint library. The first matching information may include a first mean and a first standard deviation. Figure 1 Based on Figure 2 , the sub-steps of step S102 may include:
[0093] S1021. Match the target voiceprint feature with each voiceprint feature in the anchor voiceprint library respectively to obtain multiple first matching scores corresponding to the target voiceprint feature.
[0094] S1022: Select K first matching scores from the multiple first matching scores, and calculate a first mean and a first standard deviation based on the K first matching scores.
[0095] In this embodiment, each first matching score corresponds to a voiceprint feature in the anchor voiceprint library. The first matching score may represent the similarity between the target voiceprint feature and the voiceprint feature in the anchor voiceprint library.
[0096] It is understood that the K first matching scores may be the first K first matching scores after all first matching scores are sorted in descending order. The value of K is a preset empirical value, for example, K may be 1000, 1500, etc. This example is merely an example and is not intended to be limiting.
[0097] In an optional embodiment, the scene voiceprint feature is extracted from the target speech synthesis audio obtained by the fixed text input speech synthesis model. Figure 1 Based on Figure 3 , the sub-steps of step S103 may include:
[0098] S1031. Input the fixed text into each speech synthesis model respectively to obtain multiple target speech synthesis audios.
[0099] S1032: Using the voiceprint model, extract features from each target speech synthesis audio to obtain multiple scene voiceprint features.
[0100] In this embodiment, the fixed text may correspond to one business scenario, and different business scenarios may correspond to different fixed texts. The number of target speech synthesis audios is the same as the number of speech synthesis models in the model library.
[0101] In an optional embodiment, the second matching information is obtained by matching each scene voiceprint feature with each voiceprint feature in the anchor voiceprint library one by one. The second matching information may include the second mean and second standard deviation of each scene voiceprint feature. Figure 1 Based on Figure 4 , the sub-steps of step S104 may include:
[0102] S1041. Match each scene voiceprint feature with each voiceprint feature in the anchor voiceprint library one by one to obtain multiple second matching scores corresponding to each scene voiceprint feature.
[0103] S1042. For each scene voiceprint feature, select K second matching scores from multiple second matching scores corresponding to each scene voiceprint feature, and calculate the second mean and second standard deviation of the scene voiceprint feature based on the K second matching scores.
[0104] In this embodiment, for each scene voiceprint feature, the scene voiceprint feature can be matched with each voiceprint feature in the anchor voiceprint library to obtain multiple second matching scores corresponding to the scene voiceprint feature. The second matching scores can represent the similarity between the scene voiceprint feature and the voiceprint features in the anchor voiceprint library.
[0105] For each scene voiceprint feature, K second matching scores may be selected from multiple second matching scores corresponding to the scene voiceprint feature, and the second mean and second standard deviation of the scene voiceprint feature may be calculated based on the selected K second matching scores.
[0106] It is understood that the value of K in step S1042 is the same as the value of K in step S1022. The K second matching scores may be the first K of all second matching scores sorted in descending order.
[0107] Optionally, the target voiceprint features, scene voiceprint features, and voiceprint features in the anchor voiceprint library may be in the form of vectors. The methods for calculating the first matching score, the second matching score, and the matching degree score may be the same.
[0108] In one optional example, the first match score, the second match score, or the matching score can be obtained by calculating cosine similarity, that is, the similarity between two voiceprint features is measured by cosine similarity. In another optional example, the first match score, the second match score, or the matching score can be obtained using the PLDA (Probabilistic Linear Discriminant Analysis) algorithm.
[0109] Taking the calculation of cosine similarity as an example, the following is the calculation formula of cosine similarity:
[0110]
[0111] Where A represents a vector, B represents another vector, and cosθ represents the cosine distance between the two vectors.
[0112] When calculating the first matching score, A may represent the target voiceprint feature, B may represent a voiceprint feature in the anchor voiceprint library, and cosθ may represent the similarity between the target voiceprint feature and a voiceprint feature in the anchor voiceprint library.
[0113] When calculating the second matching score, A may represent a scene voiceprint feature, B may represent a voiceprint feature in the anchor voiceprint library, and cosθ may represent the similarity between the scene voiceprint feature and a voiceprint feature in the anchor voiceprint library.
[0114] When calculating the matching score, A may represent the target voiceprint feature, B may represent a scene voiceprint feature, and cosθ may represent the similarity between the target voiceprint feature and a scene voiceprint feature.
[0115] To facilitate understanding of the model matching method provided by the embodiment of the present invention, the above steps are described below with reference to specific examples.
[0116] Please combine Figure 5 , Figure 5 The embodiment of the present invention provides a schematic diagram of the process of building an anchor voiceprint library. Assume that the model library contains m speech synthesis models ( Figure 5 The following is the process of building the anchor voiceprint library:
[0117] Taking the template audio set including a template audio x as an example, first, in the template audio text set obtained by speech recognition in step S1001, the template audio text corresponding to the template audio x is X.
[0118] Secondly, input the template audio text X into each speech synthesis model respectively, and the resulting speech synthesis audio is x1, x2...x m .
[0119] Then, the voiceprint model is used to compare the template audio and all speech synthesis audio (x, x1, x2...x m ) to extract features and obtain the voiceprint feature set e, e1, e2...e m .
[0120] Thus, the voiceprint features contained in the anchor voiceprint library include e, e1, e2...e m Thus, there are m+1 voiceprint features. It should be noted that the anchor voiceprint library can be pre-built and stored in the database, and can be directly called when used.
[0121] Assuming that the fixed text is Y, the process of obtaining the second matching information is described below:
[0122] First, we need to obtain multiple scene voiceprint features corresponding to the fixed text: input the fixed text Y into each speech synthesis model respectively, and obtain m target speech synthesis audios y1, y2...y m Then, the voiceprint model is used to extract features of each target speech synthesis audio, and m scene voiceprint features i1, i2...i m .
[0123] Taking the second matching information of scene voiceprint feature i1 as an example, the process for obtaining the second matching information of scene voiceprint feature i1 is as follows: the cosine similarity between scene voiceprint feature i1 and each voiceprint feature in the anchor voiceprint library can be calculated to obtain m+1 second matching scores corresponding to scene voiceprint feature i1. K second matching scores are then selected from the m+1 second matching scores, and their corresponding second means mean1 and second standard deviations std1 are calculated. The second mean mean1 and second standard deviation std1 are the second matching information of scene voiceprint feature i1.
[0124] Repeat the above process for each scene voiceprint feature, and you can get m scene voiceprint features i1, i2...i m The corresponding second mean values mean1, mean2...mean m Second standard deviation std1, std2...std m .
[0125] It should be noted that the multiple scene voiceprint features corresponding to the fixed text can be pre-processed and stored in the database, and can be directly called when used. Similarly, the second matching information of each scene voiceprint feature can be pre-processed and stored in the database, and can be directly called when used.
[0126] When the target user requires a personalized speech synthesis model, the following describes the process of determining a target speech synthesis star that matches the target user from the model library:
[0127] First, in step S101, the target user actively reads a fixed text Y, and the target audio of the target user is obtained as y. Then, the voiceprint model is used to extract features of the target audio y to obtain the target voiceprint feature i.
[0128] The process of obtaining the first matching information is similar to the process of obtaining the second matching information described above, and is briefly described here: In step S102, the cosine similarity between the target voiceprint feature i and each voiceprint feature in the anchor voiceprint library is first calculated to obtain m+1 first matching scores corresponding to the target voiceprint feature i. Then, K first matching scores are selected from the m+1 first matching scores, and their corresponding first means and first standard deviations are calculated.
[0129] It can be understood that the first mean and the first standard deviation std are the first matching information of the target voiceprint feature i.
[0130] Then, in step S103, m scene voiceprint features i1, i2...i corresponding to the fixed text Y can be obtained from the database. mAlternatively, real-time processing can be performed based on the fixed text Y and the model library to obtain the m scene voiceprint features i1, i2...i corresponding to the fixed text Y. m Similarly, in step S104, the second matching information corresponding to each scene voiceprint feature can be obtained from the database. Alternatively, the m scene voiceprint features i1, i2...i in the previous step S103 can also be used. m The anchor voiceprint library calculates and obtains the second matching information corresponding to the voiceprint features of each scene in real time.
[0131] In step S105, the matching scores s1, s2, ..., s between the target voiceprint feature i and each scene voiceprint feature are obtained respectively. m Taking the matching score between the target voiceprint feature i and the scene voiceprint feature i1 as an example: the cosine similarity between the target voiceprint feature i and the scene voiceprint feature i1 can be calculated, and the obtained cosine similarity is used as the matching score between the target voiceprint feature i and the scene voiceprint feature i1.
[0132] In step S106, the first matching information (mean and std) and the second matching information (mean1, mean2...mean m and std1, std2...std m ), normalize each matching score to obtain the normalized score corresponding to each scene voiceprint feature. m Taking normalization as an example, the following is the matching score s m The formula for normalization is:
[0133] s normm =0.5*((s m -mean) / std+(s m -mean m ) / std m )
[0134] Among them, s m The target voiceprint feature i and the scene voiceprint feature i m The matching score is, mean is the first mean corresponding to the target voiceprint feature i, and std is the first standard deviation corresponding to the target voiceprint feature i. m is the scene voiceprint feature i m The corresponding second mean, std m is the scene voiceprint feature i m The corresponding second standard deviation. s normm is the scene voiceprint feature i m The corresponding normalized score.
[0135] In this way, we can get m scene voiceprint features i1, i2...i m The corresponding m normalized score In possible cases, if each normalized score is lower than the preset threshold, it means that there is no speech synthesis model matching the target user in the model library, and the model library needs to be updated urgently.
[0136] Finally, in step S107, all normalized scores can be sorted in descending order. The scene voiceprint feature corresponding to the first normalized score has the highest match with the target voiceprint feature. Accordingly, the speech synthesis model corresponding to the first normalized score can be used as the target speech synthesis model.
[0137] It should be noted that in the above examples, the value of m representing quantity is an integer greater than 0. The execution order of each step in the above method embodiment is not limited to that shown in the drawings, and the execution order of each step shall be based on actual application conditions.
[0138] In order to execute the corresponding steps in the above method embodiment and various possible implementations, an implementation method of a model matching device is respectively given below.
[0139] See Figure 6 , Figure 6 FIG2 is a schematic diagram showing the structure of a model matching device provided by an embodiment of the present invention. The device includes a first acquisition module 210 , a second acquisition module 220 and a processing module 230 .
[0140] The first acquisition module 210 is configured to:
[0141] Obtain the target voiceprint features corresponding to the target audio of the target user;
[0142] Obtaining first matching information corresponding to the target voiceprint feature and the anchor voiceprint library;
[0143] The target audio corresponds to a fixed text, and the fixed text corresponds to a business scenario.
[0144] The second acquisition module 220 is configured to:
[0145] Obtain multiple scene voiceprint features corresponding to fixed text;
[0146] Obtaining second matching information corresponding to each scene voiceprint feature respectively;
[0147] Obtain the matching scores between the target voiceprint features and the voiceprint features of each scenario respectively.
[0148] The model library contains multiple speech synthesis models, and each scene voiceprint feature corresponds to a speech synthesis model.
[0149] The processing module 230 is configured to:
[0150] Using the first matching information and the second matching information, normalize each matching score to obtain a normalized score corresponding to each scene voiceprint feature;
[0151] According to all normalized scores, the target speech synthesis model that matches the target voiceprint features is determined from the model library.
[0152] In an optional embodiment, the first acquisition module 210 can also be used to construct an anchor voiceprint library based on the template audio set and the model library. Specifically, the first acquisition module 210 can be used to:
[0153] Get the template audio text collection corresponding to the template audio collection;
[0154] It is understood that the template audio set may include multiple template audios, and the template audio text set may include multiple template audio texts. Any template audio may have a corresponding template audio text.
[0155] Input the template audio text set into each speech synthesis model respectively to obtain the speech synthesis audio set corresponding to each template audio text set;
[0156] The speech synthesis audio set includes multiple speech synthesis audios.
[0157] Each training audio text corresponds to a speech synthesis audio and a speech synthesis model;
[0158] The voiceprint model is used to extract features from the speech synthesis audio set and the template audio set to obtain a voiceprint feature set to form an anchor voiceprint library.
[0159] The anchor voiceprint library contains the voiceprint features of each speech synthesis audio and the voiceprint features of each template audio.
[0160] In an optional implementation manner, the second acquisition module 220 may be specifically configured to:
[0161] Input fixed text into each speech synthesis model to obtain multiple target speech synthesis audios;
[0162] Using the voiceprint model, feature extraction is performed on each target speech synthesis audio to obtain multiple scene voiceprint features.
[0163] It can be understood that the above-mentioned first acquisition module 210 can be used to execute the above-mentioned steps S100, S101, S102 and their respective sub-steps, the above-mentioned second acquisition module 220 can be used to execute the above-mentioned S103, S104, S105 and their respective sub-steps, and the above-mentioned processing module 230 can be used to execute the above-mentioned steps S106, S107 and their respective sub-steps.
[0164] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the model matching device described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0165] See Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 300 includes a processor 310 , a memory 320 , and a bus 330 , wherein the processor 310 is connected to the memory 320 via the bus 330 .
[0166] The electronic device 300 may be, but is not limited to, a smart phone, a computer, a personal computer, a smart tablet, a notebook, etc.
[0167] The memory 320 may be used to store software programs, for example, Figure 6The model matching device shown. Memory 320 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory (Flash), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. Processor 310 may be an integrated circuit chip with signal processing capabilities. The processor 310 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0168] The memory 320 stores machine-readable instructions that are executable by the processor 310. When the processor 310 executes the machine-readable instructions, the model matching method disclosed in the above embodiment is implemented.
[0169] I understand. Figure 7 The structure shown is for illustration only. The electronic device 300 may also include Figure 7 More or fewer components than shown, or with Figure 7 Different configurations shown. Figure 7 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0170] Embodiments of the present invention further provide a readable storage medium storing a computer program that, when executed by a processor, implements the model matching method disclosed in the above embodiments. The readable storage medium may be, but is not limited to, a USB flash drive, a mobile hard drive, ROM, RAM, PROM, EPROM, EEPROM, a FLASH disk, or an optical disk, among other media capable of storing program code.
[0171] In summary, the embodiments of the present invention provide a model matching method, device, electronic device and readable storage medium. First, the target voiceprint feature of the target user and the first matching information corresponding to the fixed text and multiple scene voiceprint features are obtained; then the second matching information corresponding to each scene voiceprint feature is obtained respectively, and the matching degree score between the target voiceprint feature and each scene voiceprint feature is obtained respectively. Then, each matching degree score is normalized using the first matching information and the second matching information to obtain the normalized score corresponding to each scene voiceprint feature. Finally, based on all the normalized scores, the target speech synthesis model that matches the target voiceprint feature is determined from the model library. In this way, the matching target speech synthesis model is selected from the model library according to the voiceprint feature of the target user, which is time-saving and convenient. In addition, each matching degree score is normalized to reduce the inaccuracy and inconsistency of the similarity evaluation process between voiceprint features and improve the accuracy of the normalized score.
[0172] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A model matching method, characterized in that: include: Obtain the target voiceprint features corresponding to the target audio of the target user; The target audio corresponds to a fixed text; Obtaining first matching information corresponding to the target voiceprint feature and the anchor voiceprint library; Inputting the fixed text into each speech synthesis model in the model library respectively to obtain multiple target speech synthesis audios; wherein the model library contains multiple speech synthesis models; Using a voiceprint model, feature extraction is performed on each target speech synthesis audio to obtain multiple scene voiceprint features; Obtaining second matching information corresponding to each of the scene voiceprint features respectively; Obtaining a matching score between the target voiceprint feature and each of the scene voiceprint features respectively; Using the first matching information and the second matching information, normalizing each matching score to obtain a normalized score corresponding to each scene voiceprint feature; Determining a target speech synthesis model that matches the target voiceprint feature from the model library based on all the normalized scores; The anchor voiceprint library is constructed in the following way: Obtain a template audio text set corresponding to a template audio set; the template audio set contains multiple template audios, and the template audio text set contains multiple template audio texts; any one of the template audios has a corresponding template audio text; Inputting the template audio text set into each of the speech synthesis models respectively to obtain a speech synthesis audio set corresponding to each of the template audio text sets; the speech synthesis audio set includes multiple speech synthesis audios; and one speech synthesis audio corresponding to each training audio text corresponds to one of the speech synthesis models; Using the voiceprint model, feature extraction is performed on the speech synthesis audio set and the template audio set to obtain a voiceprint feature set to form the anchor voiceprint library; wherein the anchor voiceprint library contains the voiceprint features of each speech synthesis audio and the voiceprint features of each template audio.
2. The method according to claim 1, wherein The anchor voiceprint library contains multiple voiceprint features, the first matching information includes a first mean and a first standard deviation, and the step of obtaining the first matching information corresponding to the target voiceprint feature and the anchor voiceprint library includes: Matching the target voiceprint feature with each voiceprint feature in the anchor voiceprint library respectively to obtain a plurality of first matching scores corresponding to the target voiceprint feature; each first matching score corresponds to one of the voiceprint features in the anchor voiceprint library; K first matching scores are selected from a plurality of the first matching scores, and the first mean and the first standard deviation are calculated based on the K first matching scores.
3. The method according to claim 1, wherein The anchor point voiceprint library includes multiple voiceprint features, the second matching information includes a second mean and a second standard deviation of each of the scene voiceprint features, and the step of respectively obtaining the second matching information corresponding to each of the scene voiceprint features includes: Matching each of the scene voiceprint features with each voiceprint feature in the anchor voiceprint library one by one to obtain a plurality of second matching scores corresponding to each of the scene voiceprint features; For each of the scene voiceprint features, K second matching scores are selected from the multiple second matching scores corresponding to each of the scene voiceprint features, and a second mean and a second standard deviation of the scene voiceprint feature are calculated based on the K second matching scores.
4. A model matching device, characterized in that: It includes a first acquisition module, a second acquisition module and a processing module; The first acquisition module is configured to: Obtaining a target voiceprint feature corresponding to a target audio of a target user; the target audio corresponds to a fixed text; Obtaining first matching information corresponding to the target voiceprint feature and the anchor voiceprint library; The second acquisition module is used to: Inputting the fixed text into each speech synthesis model in the model library respectively to obtain multiple target speech synthesis audios; wherein the model library contains multiple speech synthesis models; Using a voiceprint model, feature extraction is performed on each target speech synthesis audio to obtain multiple scene voiceprint features; Obtaining second matching information corresponding to each of the scene voiceprint features respectively; Obtaining a matching score between the target voiceprint feature and each of the scene voiceprint features respectively; The processing module is configured to: use the first matching information and the second matching information to normalize each matching score to obtain a normalized score corresponding to each scene voiceprint feature; and determine a target speech synthesis model that matches the target voiceprint feature from the model library based on all the normalized scores; Wherein, the first acquisition module is further used for: Obtain a template audio text set corresponding to a template audio set; the template audio set contains multiple template audios, and the template audio text set contains multiple template audio texts; any one of the template audios has a corresponding template audio text; Inputting the template audio text set into each of the speech synthesis models respectively to obtain a speech synthesis audio set corresponding to each of the template audio text sets; the speech synthesis audio set includes multiple speech synthesis audios; and one speech synthesis audio corresponding to each training audio text corresponds to one of the speech synthesis models; Using the voiceprint model, feature extraction is performed on the speech synthesis audio set and the template audio set to obtain a voiceprint feature set to form the anchor voiceprint library; wherein the anchor voiceprint library contains the voiceprint features of each speech synthesis audio and the voiceprint features of each template audio.
5. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to implement the method according to any one of claims 1 to 3.
6. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Voice cloning method and device based on single-speaker voice synthesis data set
CN111048064A
Audio training data processing method and device, equipment and storage medium
CN112614478A