Text corpus screening method, device, equipment and storage medium

By acquiring the recorded speech data of the target speaker, using a pre-trained model to identify and convert phoneme sequences, and filtering out personalized text data, the problem of the inability to customize general-purpose data is solved, and the recording effect and the accuracy of model training are improved.

CN114783424BActive Publication Date: 2025-11-18北京云迹科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210275587.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2025-11-18
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

In existing technologies, general-purpose corpora cannot be customized for specific speakers, resulting in poor recording quality and unsatisfactory model training and optimization.

Method used

By acquiring the recorded speech data of the target speaker, a pre-trained model is used to recognize the speech data and convert it into phoneme sequences. Evaluation sequences and training datasets are generated, and the speech data that meets the criteria is selected to form a personalized set of text corpora.

Benefits of technology

It improved the recording quality of the target speaker, enhancing the accuracy and effectiveness of model training and optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114783424B_ABST
    Figure CN114783424B_ABST
Patent Text Reader

Abstract

The present disclosure provides a text corpus screening method, device, equipment and storage medium. The method comprises: obtaining a basic text corpus and a recording corpus of a target object, using a speech recognition model to recognize the speech data to obtain a first phoneme sequence, and converting the speech text to obtain a second phoneme sequence; generating an evaluation sequence according to the first phoneme sequence and the second phoneme sequence, generating an evaluation training data set based on the evaluation sequence, and training an evaluation model using the evaluation training data set; selecting each corpus in the basic text corpus in turn, calculating the gain when the corpus is added to the target corpus set, and using the evaluation model to predict the phoneme sequence of each corpus, and scoring each corpus according to the gain and the prediction result of the evaluation model; and generating a target corpus set according to the scoring result and a screening condition. The present disclosure can generate personalized text corpus for the target object, improve the quality of the text corpus, and improve the optimization effect of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of speech recognition technology, and in particular to a method, apparatus, device and storage medium for text corpus screening. Background Technology

[0002] With the deepening development of digital and intelligent technologies across various fields, more and more intelligent devices are playing a role in our lives. Various intelligent voice devices, such as smart speakers, smartphones, and intelligent robots, already support voice dialogue. Automatic speech recognition (ASR) has been widely applied and has achieved high accuracy. However, the recognition results are not ideal for speakers with accents, thus often requiring personalized, customized speech recognition for specific speakers.

[0003] In existing technologies, pre-trained models are used for specific optimization based on data from the target speaker. This involves requiring a specific speaker to record a certain duration of speech based on provided text corpus data, and then training and optimizing the parameters of a pre-trained model. This method of model training and optimization requires the target speaker to record speech based on text; therefore, the text corpus upon which the speech recording depends is crucial for model training and optimization. Currently, the text corpus used for speech recording is a general-purpose corpus, which cannot be personalized for the target speaker. This results in poor recording quality from the target speaker, and when using text recordings obtained from general-purpose corpora for model training and optimization, the obtained model parameters are not accurate enough, leading to poor model training and optimization results. Summary of the Invention

[0004] In view of this, the present disclosure provides a text corpus screening method, apparatus, device and storage medium to solve the problem that the prior art cannot generate personalized text corpus for the target speaker, resulting in poor recording effect of the target speaker on the text corpus and reduced model training and optimization effect.

[0005] A first aspect of this disclosure provides a text corpus filtering method, comprising: acquiring a basic text corpus and recorded corpus of a target object, wherein the recorded corpus includes speech data and speech text corresponding to the speech data; recognizing the speech data using a preset speech recognition model to obtain a first phoneme sequence corresponding to the speech data, performing a phoneme conversion operation on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text; generating an evaluation sequence based on the first phoneme sequence and the second phoneme sequence, generating an evaluation training dataset based on the evaluation sequence, training an evaluation model using the evaluation training dataset to obtain a trained evaluation model; sequentially selecting each corpus in the basic text corpus, calculating the gain corresponding to each corpus when added to the target corpus set, predicting the phoneme sequence corresponding to each corpus using the trained evaluation model, scoring each corpus based on the gain and the prediction result of the evaluation model; and adding corpora that meet the screening conditions to the target corpus set according to the scoring result corresponding to each corpus and preset screening conditions to obtain a filtered target corpus set.

[0006] A second aspect of this disclosure provides a text corpus filtering apparatus, comprising: an acquisition module configured to acquire a basic text corpus and recorded corpus of a target object, wherein the recorded corpus includes speech data and speech text corresponding to the speech data; a recognition module configured to recognize the speech data using a preset speech recognition model to obtain a first phoneme sequence corresponding to the speech data, and to perform a phoneme conversion operation on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text; and a training module configured to generate an evaluation sequence based on the first phoneme sequence and the second phoneme sequence, and to generate a training module based on the evaluation sequence. The evaluation training dataset is used to train the evaluation model, resulting in a trained evaluation model. The prediction module is configured to sequentially select each corpus from the basic text corpus, calculate the gain corresponding to each corpus when added to the target corpus set, and use the trained evaluation model to predict the phoneme sequence corresponding to each corpus. Based on the gain and the prediction results of the evaluation model, each corpus is scored. The filtering module is configured to add corpora that meet the filtering conditions to the target corpus set based on the scores of each corpus and preset filtering conditions, thus obtaining the filtered target corpus set.

[0007] A third aspect of this disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method.

[0008] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0009] The above-described at least one technical solution adopted in the embodiments of this disclosure can achieve the following beneficial effects:

[0010] By acquiring a basic text corpus and recorded audio data of the target object, the recorded audio data contains speech data and corresponding speech text. A pre-defined speech recognition model is used to recognize the speech data, obtaining the first phoneme sequence corresponding to the speech data. Phoneme conversion is then performed on the speech text corresponding to the speech data, obtaining the second phoneme sequence corresponding to the speech text. An evaluation sequence is generated based on the first and second phoneme sequences. An evaluation training dataset is generated based on the evaluation sequence, and the evaluation model is trained using the evaluation training dataset to obtain the trained evaluation model. Each corpus in the basic text corpus is selected sequentially, and the gain corresponding to each corpus when added to the target corpus set is calculated. The trained evaluation model is then used to predict the phoneme sequence corresponding to each corpus. Based on the gain and the prediction results of the evaluation model, each corpus is scored. Based on the scores of each corpus and pre-defined filtering conditions, corpora that meet the filtering conditions are added to the target corpus set to obtain the filtered target corpus set. This disclosure can generate personalized text corpora for the target speaker, improve the recording effect of the target speaker on the text corpora, and improve the accuracy of model parameters when using text-recorded speech for model training and optimization, thereby improving the effect of model training and optimization. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating the text corpus filtering method provided in this embodiment of the disclosure;

[0013] Figure 2 This is a schematic diagram of the structure of the text corpus screening device provided in the embodiments of this disclosure;

[0014] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this disclosure. Detailed Implementation

[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will understand that this disclosure may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this disclosure with unnecessary detail.

[0016] As described in the background section, with the continuous development of artificial intelligence, Automatic Speech Recognition (ASR) has been widely applied and has achieved high accuracy. ASR is an artificial intelligence technology that enables machines to convert speech signals into corresponding text or commands through recognition and understanding. While ASR achieves high accuracy with speakers who speak standard Mandarin, its performance is less than ideal for certain specific targets (such as speakers with accents). Therefore, customized ASR is often required for specific speakers.

[0017] The commonly used approach is to utilize a general, existing pre-trained model, and then train and optimize the model specifically using the target speaker's recorded audio data. This involves requiring a specific speaker to record a certain duration of speech based on provided text corpus data, and then using the recorded audio to train and optimize the parameters of a pre-trained model (such as a deep learning model). In this process, the specific speaker needs to record audio based on a selected text corpus. Since this process is time-consuming and laborious for the target speaker, how to select concise and effective text corpus for audio recording, enabling the target speaker to complete the recording as quickly and effortlessly as possible, is one of the urgent problems to be solved in the field of speech recognition.

[0018] In existing technologies, a general corpus for speech recording is usually randomly selected from an existing text corpus. Speech recordings are then performed on different target speakers based on this general corpus. However, this method of using a general corpus for speech recording cannot be customized for the target speaker, resulting in poor recording quality of the target speaker using the general corpus. Furthermore, when using the text recordings obtained from the general corpus for model training and optimization, the obtained model parameters are not accurate enough, leading to a decrease in the effectiveness of model training and optimization.

[0019] In view of the problems in the prior art, this disclosure proposes a text corpus selection method. This disclosure obtains a portion of the daily recordings of the target speaker, uses a pre-trained model to recognize the speech data, converts the speech data into phoneme sequences, trains an evaluation model using the obtained speech annotation data, and uses the evaluation model and a selection function to score each corpus in the basic text corpus in turn. Based on the score of each corpus, corpus that meets the preset conditions is selected and added to the target corpus set, thereby obtaining a set containing a fixed number of text corpus, so that the target corpus set can be used to perform customized speech recordings of the target speaker in the future, thereby improving the effect of model training and optimization.

[0020] Figure 1 This is a flowchart illustrating the text corpus filtering method provided in this embodiment. Figure 1 The text corpus filtering method can be performed by the server. For example... Figure 1 As shown, this text corpus filtering method may specifically include:

[0021] S101, Obtain the basic text corpus and the audio corpus of the target object, wherein the audio corpus contains speech data and the speech text corresponding to the speech data;

[0022] S102, using a preset speech recognition model to recognize speech data, obtain the first phoneme sequence corresponding to the speech data, and perform a phoneme conversion operation on the speech text corresponding to the speech data to obtain the second phoneme sequence corresponding to the speech text;

[0023] S103, Generate an evaluation sequence based on the first phoneme sequence and the second phoneme sequence, generate an evaluation training dataset based on the evaluation sequence, train the evaluation model using the evaluation training dataset, and obtain the trained evaluation model.

[0024] S104. Select each corpus in the basic text corpus in sequence, calculate the gain corresponding to each corpus when it is added to the target corpus set, and use the trained evaluation model to predict the phoneme sequence corresponding to each corpus. Based on the gain and the prediction results of the evaluation model, score each corpus.

[0025] S105. Based on the scoring results corresponding to each corpus and the preset filtering conditions, add the corpus that meets the filtering conditions to the target corpus set to obtain the filtered target corpus set.

[0026] Specifically, the basic text corpus in this disclosure refers to a text corpus containing a large amount of data generated based on existing text data. This disclosure does not impose specific limitations on the content of the data in the basic text corpus; some commonly used sentences and phrases can be used as data in the basic text corpus. The target audience in this disclosure can refer to one or more specific target speakers. One or more specific target speakers typically have similar pronunciation habits and accents. This disclosure generates personalized text data for voice recording specifically for these specific target speakers.

[0027] Furthermore, the speech recognition model used in this embodiment can be an existing speech recognition model, such as the DeepSpeech model. This embodiment does not improve the speech recognition model itself; therefore, any commonly used speech recognition model can be used in this solution. A phoneme is the smallest unit of speech defined based on the natural properties of speech. From an acoustic perspective, a phoneme is the smallest unit of speech defined from the perspective of sound quality. A phoneme sequence can be considered as a sequence of phonemes that make up text. In speech recognition technology, it is usually necessary to convert the character sequence of text into the corresponding phoneme sequence. This conversion process is also known as front-end processing in TTS technology.

[0028] According to the technical solution provided in the embodiments of this disclosure, this disclosure obtains a basic text corpus and recorded audio data of the target object, wherein the recorded audio data includes speech data and corresponding speech text; a preset speech recognition model is used to recognize the speech data to obtain a first phoneme sequence corresponding to the speech data, and a phoneme conversion operation is performed on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text; an evaluation sequence is generated based on the first phoneme sequence and the second phoneme sequence, an evaluation training dataset is generated based on the evaluation sequence, and the evaluation model is trained using the evaluation training dataset to obtain a trained evaluation model; each corpus in the basic text corpus is selected sequentially, the gain corresponding to each corpus when added to the target corpus set is calculated, and the phoneme sequence corresponding to each corpus is predicted using the trained evaluation model; each corpus is scored based on the gain and the prediction result of the evaluation model; based on the score corresponding to each corpus and preset screening conditions, the corpus that meets the screening conditions is added to the target corpus set to obtain a screened target corpus set. This disclosure can generate personalized text corpora for the target speaker, improve the recording effect of the target speaker on the text corpora, and improve the accuracy of model parameters when using text-recorded speech for model training and optimization, thereby improving the effect of model training and optimization.

[0029] In some embodiments, obtaining a basic text corpus and the audio recording data of the target object includes: obtaining a pre-configured basic text corpus containing several corpora, each corpus containing text and the corresponding phoneme sequence; sending an audio recording request to the target object; responding to the target object's confirmation of the audio recording request; collecting an audio recording file from the target object's mobile terminal; and annotating the audio recording file to obtain the audio recording data.

[0030] Specifically, basic text corpus The corpus contains n quotations, and this corpus can be represented as { Each corpus pair consists of text and a corresponding phoneme sequence. For example, the i-th corpus can be represented as... Among them, phoneme sequence It can be composed of several pinyin syllables, and can be represented as: For example, a certain corpus pair could be (breakfast time, zao canshijian). The purpose of obtaining the basic text corpus is to utilize the technical solution provided in the embodiments of this disclosure to obtain the basic text corpus. Several data points are selected to form a target data set for use in training personalized speech recognition models.

[0031] Furthermore, in addition to acquiring the basic text corpus, it is also necessary to acquire the audio recordings of the target speaker. In this embodiment, the target speaker can be considered the target speaker, i.e., the object of personalized corpus customization. In practical applications, to gain a preliminary understanding of the target speaker's speech and prepare for the subsequent evaluation model, it is necessary to obtain recordings of some of the target speaker's daily speech. This can be achieved by collecting recording files from the user's phone, mobile phone, APP, smart speaker, etc., after obtaining user permission. The recording file format can be 16kHz, 16bit, wav, mono, etc. The corresponding text is then annotated into the recording files to obtain the audio corpus, which can be denoted as... Each audio corpus consists of audio data and audio text. For example, one audio corpus can represent... .

[0032] In some embodiments, the speech data is identified using a preset speech recognition model to obtain a first phoneme sequence corresponding to the speech data, including: acquiring a pre-trained speech recognition model, using the speech data in the recorded corpus as input to the speech recognition model, and using the speech recognition model to identify the speech data to obtain a first phoneme sequence corresponding to each speech data.

[0033] Specifically, before training a personalized speech recognition model for a specific target speaker, generally a basic pre-trained model (i.e., a speech recognition model) is required, and then combined with the small amount of speech annotation data generated for the target speaker above to complete the training of the speech recognition model. In practical applications, the pre-trained speech recognition model is called , and this model can adopt existing speech recognition models, such as the DeepSpeech model, etc.

[0034] Furthermore, the speech data in the recorded corpus is used as the input of the trained speech recognition model , and through the speech recognition model for recognition, the phoneme sequence corresponding to each speech data can be obtained (i.e., corresponding to the first phoneme sequence); for example, assuming a piece of speech can be recognized as "ni ya", then the phoneme sequence corresponding to this speech is "n iy a".

[0035] In some embodiments, a phoneme conversion operation is performed on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text, including: obtaining the speech text corresponding to each speech data in the recorded corpus, and using a text phoneme conversion tool to perform conversion on each speech text respectively to obtain the second phoneme sequence corresponding to each speech text.

[0036] Specifically, the speech text in the recorded corpus is used as the input of the text phoneme conversion tool, and the text phoneme conversion tool (such as py2ipa, etc.) is used to perform a conversion operation on the speech text to obtain the phoneme sequence marked with the source (i.e., corresponding to the second phoneme sequence); for example, assuming the speech text corresponding to the speech data is "ni hao", then the phoneme sequence obtained by using the text phoneme conversion tool to convert it is "n i h a o". The process of using the text phoneme conversion tool to convert the speech text into a phoneme sequence can be implemented in a known manner, and the present disclosure will not elaborate here.

[0037] In some embodiments, an evaluation sequence is generated according to the first phoneme sequence and the second phoneme sequence, and an evaluation training data set is generated based on the evaluation sequence, including: using the edit distance algorithm to calculate the edit distance between each first phoneme sequence and the second phoneme sequence, aligning the first phoneme sequence and the second phoneme sequence according to the edit distance, determining the recognition result corresponding to each phoneme in the second phoneme sequence according to the alignment result, generating an evaluation sequence according to the recognition result, and using the second phoneme sequence and the evaluation sequence to generate an evaluation training data set.

[0038] Specifically, when using the speech recognition model After recognizing the speech data to obtain the first phoneme sequence and converting the speech text into phonemes using a text phoneme conversion tool to obtain the second phoneme sequence, an evaluation training dataset needs to be generated based on the first and second phoneme sequences to train the evaluation model.

[0039] Furthermore, embodiments of this disclosure calculate the second phoneme sequence based on an edit distance algorithm. Converted to first phoneme sequence Edit distance is the minimum number of addition, deletion, and modification operations required to align the first and second phoneme sequences. Edit distance refers to the minimum number of editing operations required to transform one string into another. These editing operations include, but are not limited to, replacing one character with another, inserting a character, and deleting a character. Generally, the smaller the edit distance, the greater the similarity between the two strings.

[0040] In practical applications, in conjunction with the aforementioned embodiments, compared with the second phoneme sequence "nihao", the recognition of the first phoneme sequence "niiy a" in the above embodiments is obviously incorrect. At this time, it is necessary to replace the character y with the character h and add a character o to convert it into "nihao".

[0041] Furthermore, based on the alignment result determined by the above edit distance, the second phoneme sequence is judged. The evaluation sequence consists of 0s and 1s, indicating whether the phonemes in the sequence can be correctly identified. A correct identification is marked as 1, and a correct identification is marked as 0. For example, in the aforementioned embodiment, if the phonemes n, i, and a in nihao are correctly identified, while h is incorrectly identified and o is missed, then the evaluation sequence generated based on the identification results is 1, 1, 0, 1, 0, which corresponds to a five-dimensional vector value. Thus, each phoneme sequence can be obtained. A 01 evaluation sequence to determine whether each phoneme is correctly predicted. .

[0042] Furthermore, based on the above operations, a dataset can be obtained. This dataset consists of phoneme sequences and evaluation sequences. This dataset will be used as the evaluation training dataset to train the evaluation model, resulting in the final evaluation model. This evaluation model can evaluate any input phoneme sequence. Label a sequence and output a corresponding 0 or 1 rating sequence. It can also output the probability values ​​of 0 and 1 for any position j. For example... , represents a phoneme string When predicted, the probability that the phoneme at position j is incorrectly predicted (is 0). In practical applications, the evaluation model's role is to determine which phoneme is more likely to be mispredicted by a specific target speaker and to make a prediction output. This evaluation model can be trained using sequence labeling models (such as CRF, Bi-LSTM, etc.).

[0043] In some embodiments, each corpus in the basic text corpus is selected sequentially, and the gain corresponding to each corpus when added to the target corpus set is calculated, including: in the initial state the target corpus set is an empty set, selecting one corpus sequentially from the basic text corpus, determining the number of times each phoneme in the corpus appears in the target corpus set, and calculating the gain when the corpus is added to the target corpus set based on the number of appearances using a preset gain calculation formula.

[0044] Specifically, when training a personalized speech recognition model tailored to a target speaker, speech training data from the target speaker is required. It is desirable that this data be as comprehensive as possible to address the shortcomings of the pre-trained model (speech recognition model) and make the corpus more discriminative. Furthermore, due to limitations in collection and application costs, it is not possible to require the target speaker to record more speech data. Therefore, this embodiment of the disclosure defines an evaluation formula to score selected sentences, obtaining a compact and effective text corpus for model training and optimization.

[0045] Furthermore, from the basic text corpus A portion of the corpus is selected to form the target corpus set Yset. In the actual corpus selection process, assuming i corpora have already been selected for the target corpus Yset, the next step is to select from the basic text corpus... When selecting the (i+1)th corpus y, the corpus with the highest score should be chosen. The following two points need to be considered when selecting corpus y: First, starting from the trained evaluation model, find the corpus most easily misidentified by the pre-trained model; second, try to enrich the proportion of various phonemes, avoiding excessive selection of certain categories (such as phonemes with a very high number of errors), which would lead to an imbalance in the proportion of phonemes in the target corpus set Yset, resulting in the selected corpus failing to achieve the intended effect.

[0046] Furthermore, considering the above two points, before using the evaluation formula to score the selected sentences, a function is defined to represent the gain produced when corpus y is added to the target corpus set Yset. That is, the gain brought by a new corpus y to the original target corpus set Yset is judged, thereby controlling the balance of phonemes. The gain calculation function is expressed as follows:

[0047]

[0048] Among them, the function Represents a phoneme The number of occurrences of the data in the corpus Yset, f, corresponds to the function f. , where T is the threshold.

[0049] In some embodiments, the trained evaluation model is used to predict the phoneme sequence corresponding to each corpus, and each corpus is scored based on the gain and the prediction result of the evaluation model. This includes: using the phoneme sequence corresponding to the corpus selected from the basic text corpus as input to the evaluation model, using the evaluation model to predict the error probability of the phoneme corresponding to each position in the phoneme sequence; scoring the corpus based on the error probability of the phoneme corresponding to each position in the phoneme sequence and the gain of the corpus, and obtaining the scoring result of the corpus.

[0050] Specifically, after calculating the gain when adding corpus y to the target corpus set, the trained evaluation model is used to predict the phoneme sequence corresponding to corpus y, obtaining the error probability of each phoneme in the phoneme sequence. Finally, based on the gain calculation result and the output of the evaluation model, corpus y is scored. That is, the evaluation model and the gain calculation function are used to jointly score the corpus y from the basic text corpus. A fixed number of text samples are selected from the data. The evaluation formula provided in this embodiment is defined as follows:

[0051]

[0052] Where y represents the basic text corpus Extract a single corpus entry from the target corpus set Yeset to be added to. This represents the phoneme sequence obtained by converting the speech text of a single corpus y, where n represents... The number of phonemes in the text, P represents The set of phonemes in the language.

[0053] Furthermore, based on the above evaluation formula, by traversing the basic text corpus... For each piece of text in the dataset, the highest-scoring piece is calculated and added to the target corpus set Yset as the filtered corpus. The following section describes a specific implementation of the basic text corpus. This paper briefly explains the process of traversing and filtering the corpus in the basic text corpus. When traversing the corpus, the following steps can be used in a loop:

[0054] First, initialize the target corpus set Yset, setting it to an empty set; for the basic text corpus... Calculate the score for all corpora y in sequence; obtain the corpus y with the highest score (scoreMax), add it to the target corpus set Yset, and remove it from the base text corpus. Remove from the middle; when the size of the target corpus set Yset reaches the preset upper limit value of the number of corpora X or the value of scoreMax is lower than the set threshold, stop the traversal operation; otherwise, continue to score the remaining corpora until the target corpus set Yset that meets the filtering conditions is obtained.

[0055] According to the technical solution provided in the embodiments of this disclosure, this disclosure provides a personalized text corpus screening and processing method. Through a reasonable screening and scoring design, a compact and effective text corpus set can be obtained, which can then be used for model training and optimization. This disclosure obtains a portion of the daily recordings of the target speaker, uses a pre-trained model to recognize the speech data, and converts the speech data into phoneme sequences. An evaluation model is trained using the obtained speech annotation data. The evaluation model and a selection function are used to jointly score each corpus in the basic text corpus sequentially. Based on the score of each corpus, corpora that meet preset conditions are selected and added to the target corpus set, thereby obtaining a set containing a fixed number of text corpora. This allows for subsequent customized speech recording of the target speaker using the target corpus set, thereby improving the effectiveness of model training and optimization.

[0056] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.

[0057] Figure 2 This is a schematic diagram of the text corpus filtering device provided in an embodiment of this disclosure. Figure 2 As shown, the text corpus filtering device includes:

[0058] The acquisition module 201 is configured to acquire a basic text corpus and the audio corpus of the target object, wherein the audio corpus contains speech data and the speech text corresponding to the speech data.

[0059] The recognition module 202 is configured to recognize speech data using a preset speech recognition model to obtain a first phoneme sequence corresponding to the speech data, and to perform a phoneme conversion operation on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text.

[0060] Training module 203 is configured to generate an evaluation sequence based on the first phoneme sequence and the second phoneme sequence, generate an evaluation training dataset based on the evaluation sequence, and train the evaluation model using the evaluation training dataset to obtain the trained evaluation model.

[0061] The prediction module 204 is configured to sequentially select each corpus in the basic text corpus, calculate the gain corresponding to each corpus when it is added to the target corpus set, and use the trained evaluation model to predict the phoneme sequence corresponding to each corpus. Based on the gain and the prediction results of the evaluation model, each corpus is scored.

[0062] The filtering module 205 is configured to add corpora that meet the filtering conditions to the target corpus set based on the scoring results corresponding to each corpus and the preset filtering conditions, so as to obtain the filtered target corpus set.

[0063] In some embodiments, Figure 2 The acquisition module 201 acquires a pre-configured basic text corpus, which contains several corpora, each containing text and the corresponding phoneme sequence; sends a recording acquisition request to the target object; responds to the target object's confirmation operation of the recording acquisition request; collects recording files from the target object's mobile terminal; and performs annotation processing on the recording files to obtain the recording corpus.

[0064] In some embodiments, Figure 2 The recognition module 202 acquires the pre-trained speech recognition model, uses the speech data in the recorded corpus as the input of the speech recognition model, and uses the speech recognition model to recognize the speech data to obtain the first phoneme sequence corresponding to each speech data.

[0065] In some embodiments, Figure 2 The recognition module 202 obtains the speech text corresponding to each speech data in the recorded speech corpus, and uses a text phoneme conversion tool to convert each speech text separately to obtain the second phoneme sequence corresponding to each speech text.

[0066] In some embodiments, Figure 2The training module 203 uses the edit distance algorithm to calculate the edit distance between each first phoneme sequence and the second phoneme sequence, aligns the first phoneme sequence and the second phoneme sequence according to the edit distance, determines the recognition result corresponding to each phoneme in the second phoneme sequence according to the alignment result, generates an evaluation sequence according to the recognition result, and generates an evaluation training dataset using the second phoneme sequence and the evaluation sequence.

[0067] In some embodiments, Figure 2 The prediction module 204 initially selects a corpus from the basic text corpus, determines the frequency of each phoneme in the corpus in the target corpus, and calculates the gain when the corpus is added to the target corpus based on the frequency of occurrence using a preset gain calculation formula.

[0068] In some embodiments, Figure 2 The prediction module 204 selects the phoneme sequence corresponding to the corpus from the basic text corpus as the input of the evaluation model, and uses the evaluation model to predict the error probability of the phoneme corresponding to each position in the phoneme sequence; it scores the corpus according to the error probability of the phoneme corresponding to each position in the phoneme sequence and the gain of the corpus, and obtains the scoring result of the corpus.

[0069] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.

[0070] Figure 3 This is a schematic diagram of the structure of the electronic device 3 provided in an embodiment of this disclosure. For example... Figure 3 As shown, the electronic device 3 of this embodiment includes a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, it implements the steps in the various method embodiments described above. Alternatively, when the processor 301 executes the computer program 303, it implements the functions of each module / unit in the various device embodiments described above.

[0071] Exemplarily, computer program 303 may be divided into one or more modules / units, which are stored in memory 302 and executed by processor 301 to perform the present disclosure. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 303 in electronic device 3.

[0072] Electronic device 3 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 3 may include, but is not limited to, processor 301 and memory 302. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.

[0073] Processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0074] The memory 302 can be an internal storage unit of the electronic device 3, such as a hard disk or RAM. The memory 302 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 302 can include both internal and external storage units of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 can also be used to temporarily store data that has been output or will be output.

[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0076] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0077] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0078] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0079] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0080] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0081] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0082] The above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.

Claims

1. A method for screening text corpora, characterized in that, include: Obtain a basic text corpus and the audio corpus of the target object, wherein the audio corpus contains speech data and the speech text corresponding to the speech data; The speech data is recognized using a preset speech recognition model to obtain the first phoneme sequence corresponding to the speech data. Then, a phoneme conversion operation is performed on the speech text corresponding to the speech data to obtain the second phoneme sequence corresponding to the speech text. An evaluation sequence is generated based on the first phoneme sequence and the second phoneme sequence. An evaluation training dataset is generated based on the evaluation sequence. The evaluation model is trained using the evaluation training dataset to obtain the trained evaluation model. Each corpus in the basic text corpus is selected in sequence, the gain corresponding to each corpus when added to the target corpus set is calculated, and the phoneme sequence corresponding to each corpus is predicted using the trained evaluation model. Based on the gain and the prediction result of the evaluation model, each corpus is scored. Based on the scoring results corresponding to each corpus and the preset filtering conditions, the corpus that meets the filtering conditions is added to the target corpus set to obtain the filtered target corpus set. The step of using the trained evaluation model to predict the phoneme sequence corresponding to each corpus, and scoring each corpus based on the gain and the prediction result of the evaluation model, includes: The phoneme sequence corresponding to the corpus selected from the basic text corpus is used as the input of the evaluation model. The evaluation model is used to predict the error probability of the phoneme corresponding to each position in the phoneme sequence. The corpus is scored according to the error probability of the phoneme corresponding to each position in the phoneme sequence and the gain corresponding to the corpus, and the scoring result corresponding to the corpus is obtained. By defining a function to represent the gain produced when a corpus y is added to the target corpus set Yset, that is, to determine the gain brought by a new corpus y to the original target corpus set Yset, the balance of phonemes is controlled. The gain calculation function is expressed as follows: c α (Yset,y)=f(n α (Yset∪y))-f(n α (Yset)) Wherein, function n α (Yset) represents the number of occurrences of a phoneme α in the target corpus set Yset, and f corresponds to the function... Where T is the threshold.

2. The method according to claim 1, characterized in that, The acquisition of the basic text corpus and the recorded audio data of the target object includes: Obtain a pre-configured basic text corpus, which contains several corpora, each of which contains text and the phoneme sequence corresponding to the text; A recording acquisition request is sent to the target object. In response to the target object's confirmation of the recording acquisition request, a recording file is collected from the target object's mobile terminal, and the recording file is annotated to obtain the recording corpus.

3. The method according to claim 1, characterized in that, The step of recognizing the speech data using a preset speech recognition model to obtain the first phoneme sequence corresponding to the speech data includes: A pre-trained speech recognition model is obtained, and the speech data in the recorded corpus is used as the input of the speech recognition model. The speech recognition model is used to recognize the speech data to obtain the first phoneme sequence corresponding to each speech data.

4. The method according to claim 1, characterized in that, The step of performing a phoneme conversion operation on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text includes: Obtain the speech text corresponding to each speech data in the recorded speech corpus, and use a text phoneme conversion tool to convert each speech text to obtain the second phoneme sequence corresponding to each speech text.

5. The method according to claim 1, characterized in that, The step of generating an evaluation sequence based on the first phoneme sequence and the second phoneme sequence, and generating an evaluation training dataset based on the evaluation sequence, includes: The edit distance algorithm is used to calculate the edit distance between each first phoneme sequence and the second phoneme sequence. The first phoneme sequence and the second phoneme sequence are aligned according to the edit distance. The recognition result corresponding to each phoneme in the second phoneme sequence is determined according to the alignment result. The evaluation sequence is generated according to the recognition result. The evaluation training dataset is generated using the second phoneme sequence and the evaluation sequence.

6. The method according to claim 1, characterized in that, The step of sequentially selecting each corpus from the basic text corpus and calculating the gain corresponding to each corpus when added to the target corpus set includes: In the initial state, the target corpus set is an empty set. A corpus is selected sequentially from the basic text corpus, and the occurrence frequency of each phoneme in the corpus in the target corpus set is determined. Based on the occurrence frequency, the gain when the corpus is added to the target corpus set is calculated using a preset gain calculation formula.

7. A text corpus filtering device, characterized in that, include: The acquisition module is configured to acquire a basic text corpus and the audio corpus of the target object, wherein the audio corpus contains speech data and the speech text corresponding to the speech data; The recognition module is configured to recognize the speech data using a preset speech recognition model to obtain a first phoneme sequence corresponding to the speech data, and to perform a phoneme conversion operation on the speech text corresponding to the speech data to obtain a second phoneme sequence corresponding to the speech text. The training module is configured to generate an evaluation sequence based on the first phoneme sequence and the second phoneme sequence, generate an evaluation training dataset based on the evaluation sequence, and train the evaluation model using the evaluation training dataset to obtain the trained evaluation model. The prediction module is configured to sequentially select each corpus in the basic text corpus, calculate the gain corresponding to each corpus when added to the target corpus set, predict the phoneme sequence corresponding to each corpus using the trained evaluation model, and score each corpus based on the gain and the prediction result of the evaluation model. The filtering module is configured to add corpora that meet the filtering conditions to the target corpus set based on the scoring results corresponding to each corpus and the preset filtering conditions, so as to obtain the filtered target corpus set. The prediction module is used to take the phoneme sequence corresponding to the corpus selected from the basic text corpus as the input of the evaluation model, and use the evaluation model to predict the error probability of the phoneme corresponding to each position in the phoneme sequence; and score the corpus according to the error probability of the phoneme corresponding to each position in the phoneme sequence and the gain corresponding to the corpus to obtain the scoring result of the corpus. By defining a function to represent the gain produced when a corpus y is added to the target corpus set Yset, that is, to determine the gain brought by a new corpus y to the original target corpus set Yset, the balance of phonemes is controlled. The gain calculation function is expressed as follows: C α (Yset,y)=f(n α (Yset∪y))-f(n α (Yset)) Wherein, function n α (Yset) represents the number of occurrences of a phoneme α in the target corpus set Yset, and f corresponds to the function... Where T is the threshold.

8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Related word extracting method and system based on data market mining

    CN103226618A

  • Document classification method and device

    CN111949770A