Speech recognition text processing method and apparatus, device, storage medium, and program product
View Patent ↗A speech recognition text processing method includes acquiring an original text obtained by speech recognition, and performing at least one of punctuation addition processing and numerical normalization processing on the original text to obtain an intermediate result. The method further includes performing word removal processing on the original text through an attention interaction layer based on the intermediate result to obtain a processed text of the original text.
1 . A speech recognition text processing method comprising:
acquiring a target corpus text;
determining, in the target corpus text, one or more insertion positions for inserting one or more extra words that are semantically redundant to the target corpus text;
obtaining a training corpus text that includes the one or more extra words inserted into the target corpus text at the one or more insertion positions;
obtaining a set of labels corresponding to the training corpus text, the set of labels including at least one or more word removal labels corresponding to the inserted one or more extra words;
training an initial text processing model based on the training corpus text and the set of labels to obtain a text processing model;
acquiring an original text obtained by speech recognition;
performing punctuation addition processing that is configured to add punctuation to the original text and numerical normalization processing that is configured to convert number words into numerals in the original text to determine a punctuation addition processing result and a numerical normalization processing result;
fusing the punctuation addition processing result and the numerical normalization processing result to obtain fused data;
performing, via the text processing model, word removal feature extraction on the original text based on an added punctuation of the punctuation addition processing and the numerals of the numerical normalization processing to determine a word removal feature, the word removal feature extraction being configured to identify at least one spoken word determined to be semantically redundant; and
performing word removal processing on the original text through an attention interaction layer based on the word removal feature and the fused data to determine a processed text of the original text.
2 . The method according to claim 1 , wherein the performing the numerical normalization processing to convert number words into numerals in the original text comprises:
converting a speech numerical format in the original text into written numerical format.
3 . The method according to claim 1 , wherein the performing the word removal processing on the original text comprises:
performing attention interaction on the fused data and the word removal feature to determine an interaction feature; and
generating the processed text of the original text based on the interaction feature and the word removal feature.
4 . The method according to claim 1 , further comprising:
filtering punctuations in the target corpus text to obtain a first intermediate corpus text; and
sequentially labeling the first intermediate corpus text based on a punctuation type and a punctuation position of each punctuation in the target corpus text and based on a preset punctuation label dictionary to obtain punctuation labels to be included in the set of labels.
5 . The method according to claim 1 , further comprising:
converting a number in a numeric form in the target corpus text into a number word form to obtain a second intermediate corpus text; and
sequentially labeling the second intermediate corpus text based on a position of the number in the numeric form in the target corpus text and based on a preset number normalization label dictionary to obtain numerical normalization labels to be included in the set of labels.
6 . The method according to claim 1 , further comprising:
predicting, for each of the one or more insertion positions, the respective one of the one or more extra words based on a text located before the respective insertion position in the target corpus text.
7 . The method according to claim 6 , wherein
the determining, in the target corpus text, the one or more insertion positions includes:
inputting the target corpus text into an extra word position determination model to obtain the one or more insertion positions, and
the predicting the respective one of the one or more extra words includes:
inputting the text located before the respective insertion position in the target corpus text into a preset extra word generation model to obtain the extra word.
8 . A speech recognition text processing apparatus, comprising:
processing circuitry configured to:
acquire a target corpus text;
determine, in the target corpus text, one or more insertion positions for inserting one or more extra words that are semantically redundant to the target corpus text;
obtain a training corpus text that includes the one or more extra words inserted into the target corpus text at the one or more insertion positions;
obtain a set of labels corresponding to the training corpus text, the set of labels including at least one or more word removal labels corresponding to the inserted one or more extra words;
train an initial text processing model based on the training corpus text and the set of labels to obtain a text processing model;
acquire an original text obtained by speech recognition;
perform punctuation addition processing that is configured to add punctuation to the original text and numerical normalization processing that is configured to convert number words into numerals in the original text to determine a punctuation addition processing result and a numerical normalization processing result;
fuse the punctuation addition processing result and the numerical normalization processing result to obtain fused data;
perform, via the text processing model, word removal feature extraction on the original text based on an added punctuation of the punctuation addition processing and the numerals of the numerical normalization processing to determine a word removal feature, the word removal feature extraction being configured to identify at least one spoken word determined to be semantically redundant; and
perform word removal processing on the intermediate result of the original text through an attention interaction layer based on the word removal feature and the fused data to determine a processed text of the original text.
9 . The apparatus according to claim 8 , wherein the processing circuitry is further configured to:
convert a speech numerical format in the original text into written numerical format.
10 . The apparatus according to claim 8 , wherein the processing circuitry is further configured to:
perform attention interaction on the fused data and the word removal feature to determine an interaction feature; and
generate the processed text of the original text based on the interaction feature and the word removal feature.
11 . The apparatus according to claim 8 , wherein the processing circuitry is further configured to:
filter punctuations in the target corpus text to obtain a first intermediate corpus text; and
sequentially label the first intermediate corpus text based on a punctuation type and a punctuation position of each punctuation in the target corpus text and based on a preset punctuation label dictionary to obtain punctuation labels to be included in the set of labels.
12 . The apparatus according to claim 8 , wherein the processing circuitry is further configured to:
convert a number in a numeric form in the target corpus text into a number word form to obtain a second intermediate corpus text; and
sequentially label the second intermediate corpus text based on a position of the number in the numeric form in the target corpus text and based on a preset number normalization label dictionary to obtain numerical normalization labels to be included in the set of labels.
13 . The apparatus according to claim 8 , wherein the processing circuitry is further configured to:
predict, for each of the one or more insertion positions, the respective one of the one or more extra words based on a text located before the respective insertion position in the target corpus text.
14 . A non-transitory computer-readable storage medium storing computer-readable instructions thereon, which, when executed by processing circuitry, cause the processing circuitry to perform a speech recognition text processing method comprising:
acquiring a target corpus text;
determining, in the target corpus text, one or more insertion positions for inserting one or more extra words that are semantically redundant to the target corpus text;
obtaining a training corpus text that includes the one or more extra words inserted into the target corpus text at the one or more insertion positions;
obtaining a set of labels corresponding to the training corpus text, the set of labels including at least one or more word removal labels corresponding to the inserted one or more extra words;
training an initial text processing model based on the training corpus text and the set of labels to obtain a text processing model;
acquiring an original text obtained by speech recognition;
performing punctuation addition processing that is configured to add punctuation to the original text and numerical normalization processing that is configured to convert number words into numerals in the original text to determine a punctuation addition processing result and a numerical normalization processing result;
fusing the punctuation addition processing result and the numerical normalization processing result to obtain fused data;
performing, via the text processing model, word removal feature extraction on the original text based on an added punctuation of the punctuation addition processing and the numerals of the numerical normalization processing to determine a word removal feature, the word removal feature extraction being configured to identify at least one spoken word determined to be semantically redundant; and
performing word removal processing on the intermediate result of the original text through an attention interaction layer based on the word removal feature and the fused data to determine a processed text of the original text.
15 . The non-transitory computer-readable storage medium according to claim 14 , wherein the method further includes:
filtering punctuations in the target corpus text to obtain a first intermediate corpus text; and
sequentially labeling the first intermediate corpus text based on a punctuation type and a punctuation position of each punctuation in the target corpus text and based on a preset punctuation label dictionary to obtain punctuation labels to be included in the set of labels.
16 . The non-transitory computer-readable storage medium according to claim 14 , wherein the method further includes:
converting a number in a numeric form in the target corpus text into a number word form to obtain a second intermediate corpus text; and
sequentially labeling the second intermediate corpus text based on a position of the number in the numeric form in the target corpus text and based on a preset number normalization label dictionary to obtain numerical normalization labels to be included in the set of labels.
17 . The non-transitory computer-readable storage medium according to claim 14 , wherein the method further includes:
predicting, for each of the one or more insertion positions, the respective one of the one or more extra words based on a text located before the respective insertion position in the target corpus text.
18 . The non-transitory computer-readable storage medium according to claim 17 , wherein
the determining, in the target corpus text, the one or more insertion positions includes:
inputting the target corpus text into an extra word position determination model to obtain the one or more insertion positions, and
the predicting each of the one or more extra words includes:
inputting the text located before the respective insertion position in the target corpus text into a preset extra word generation model to obtain the corresponding extra word.