IP Library › Granted Patent US 12,033,616
Granted Patent B2
US 12,033,616 · App. 17/571,805 · Granted Jul 9, 2024

Method for training speech recognition model, device and storage medium

Inventors: Junyao Shao (Beijing, CN); Xiaoyin Fu (Beijing, CN); Qiguang Zang (Beijing, CN); Zhijie Chen (Beijing, CN); Mingxin Liang (Beijing, CN); Huanxin Zheng (Beijing, CN); Sheng Qian (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
G10L15/063G10L15/16G10L15/183G10L15/28
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,033,616
App. No.
17/571,805
Granted
Jul 9, 2024
Kind
B2
Abstract

A method for training a speech recognition model, a device and a storage medium, which relate to the field of computer technologies, and particularly to the fields of speech recognition technologies, deep learning technologies, or the like, are disclosed. The method for training a speech recognition model includes: obtaining a fusion probability of each of at least one candidate text corresponding to a speech based on an acoustic decoding model and a language model; selecting a preset number of one or more candidate texts based on the fusion probability of each of the at least one candidate text, and determining a predicted text based on the preset number of one or more candidate texts; and obtaining a loss function based on the predicted text and a standard text corresponding to the speech, and training the speech recognition model based on the loss function.

Claims (60)

1. A method for training a speech recognition model, the speech recognition model comprising an acoustic decoding model and a language model, the method comprising:

obtaining a fusion probability of each of at least one candidate text corresponding to a speech based on the acoustic decoding model and the language model;

selecting a preset number of one or more candidate texts based on the fusion probability of each of the at least one candidate text, and determining a predicted text based on the preset number of one or more candidate texts; and

obtaining a loss function based on the predicted text and a standard text corresponding to the speech, and training the speech recognition model based on the loss function,

wherein the obtaining the loss function based on the predicted text and the standard text corresponding to the speech comprises:

obtaining an accumulated number of errors of the predicted text based on the predicted text and the standard text corresponding to the speech, the accumulated error number being obtained based on a historical error number and a current error number; and

obtaining the loss function based on the accumulated error number of the predicted text.

2. The method according to claim 1 , wherein the obtaining the fusion probability of each of the at least one candidate text corresponding to the speech based on the acoustic decoding model and the language model comprises:

processing an output text at a previous moment and acoustic related information at a current moment using the acoustic decoding model to obtain a first probability corresponding to the at least one candidate text corresponding to the speech;

processing the output text at the previous moment using the language model to obtain a second probability corresponding to the candidate text; and

obtaining the fusion probability of the candidate text based on the first probability and the second probability.

3. The method according to claim 2 , wherein the obtaining the fusion probability of the candidate text based on the first probability and the second probability comprises:

for the candidate text, performing weighted summation of the first probability and the second probability to obtain a weighted summation value, and determining the weighted summation value as the fusion probability of the corresponding candidate text.

4. The method according to claim 1 , wherein the determining the predicted text based on the preset number of the one or more candidate texts comprises:

if the preset number of the one or more candidate texts comprise the standard text, determining the preset number of the one or more candidate texts as the predicted text; if the preset number of the one or more candidate texts do not comprise the standard text, replacing one candidate text of the preset number of the one or more candidate texts with the standard text to obtain one or more texts after the replacing, and determining the one or more texts after the replacing as the predicted text.

5. The method according to claim 1 , wherein the speech recognition model further comprises an encoder and an attention model, the acoustic related information is features after an attention processing operation, and the method further comprises:

extracting acoustic features of the speech;

encoding the acoustic features using the encoder to obtain encoded features; and

performing the attention processing operation on the encoded features using the attention model to obtain the features after the attention processing operation.

6. An electronic device, comprising:

at least one processor; and

a memory connected with the at least one processor communicatively;

wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to carry out a method for training a speech recognition model, which comprises:

obtaining a fusion probability of each of at least one candidate text corresponding to a speech based on an acoustic decoding model and a language model;

selecting a preset number of one or more candidate texts based on the fusion probability of each of the at least one candidate text, and determining a predicted text based on the preset number of one or more candidate texts; and

obtaining a loss function based on the predicted text and a standard text corresponding to the speech, and training the speech recognition model based on the loss function,

wherein the obtaining the loss function based on the predicted text and the standard text corresponding to the speech comprises:

obtaining an accumulated number of errors of the predicted text based on the predicted text and the standard text corresponding to the speech, the accumulated error number being obtained based on a historical error number and a current error number; and

obtaining the loss function based on the accumulated error number of the predicted text.

7. The electronic device according to claim 6 , wherein the obtaining the fusion probability of each of the at least one candidate text corresponding to the speech based on the acoustic decoding model and the language model comprises:

processing an output text at a previous moment and acoustic related information at a current moment using the acoustic decoding model to obtain a first probability corresponding to the at least one candidate text corresponding to the speech;

processing the output text at the previous moment using the language model to obtain a second probability corresponding to the candidate text; and

obtaining the fusion probability of the candidate text based on the first probability and the second probability.

8. The electronic device according to claim 7 , wherein the obtaining the fusion probability of the candidate text based on the first probability and the second probability comprises:

for the candidate text, performing weighted summation of the first probability and the second probability to obtain a weighted summation value, and determining the weighted summation value as the fusion probability of the corresponding candidate text.

9. The electronic device according to claim 6 , wherein the determining the predicted text based on the preset number of the one or more candidate texts comprises:

if the preset number of the one or more candidate texts comprise the standard text, determining the preset number of the one or more candidate texts as the predicted text; if the preset number of the one or more candidate texts do not comprise the standard text, replacing one candidate text of the preset number of the one or more candidate texts with the standard text to obtain one or more texts after the replacing, and determining the one or more texts after the replacing as the predicted text.

10. The electronic device according to claim 6 , wherein the speech recognition model further comprises an encoder and an attention model, the acoustic related information is features after an attention processing operation, and the method further comprises:

extracting acoustic features of the speech;

encoding the acoustic features using the encoder to obtain encoded features; and

performing the attention processing operation on the encoded features using the attention model to obtain the features after the attention processing operation.

11. A non-transitory computer readable storage medium comprising computer instructions, which, when executed by a computer, cause the computer to carry out a method for training a speech recognition model, which comprises:

obtaining a fusion probability of each of at least one candidate text corresponding to a speech based on an acoustic decoding model and a language model;

selecting a preset number of one or more candidate texts based on the fusion probability of each of the at least one candidate text, and determining a predicted text based on the preset number of one or more candidate texts; and

obtaining a loss function based on the predicted text and a standard text corresponding to the speech, and training the speech recognition model based on the loss function,

wherein the obtaining the loss function based on the predicted text and the standard text corresponding to the speech comprises:

obtaining an accumulated number of errors of the predicted text based on the predicted text and the standard text corresponding to the speech, the accumulated error number being obtained based on a historical error number and a current error number; and

obtaining the loss function based on the accumulated error number of the predicted text.

12. The non-transitory computer readable storage medium according to claim 11 , wherein the obtaining the fusion probability of each of the at least one candidate text corresponding to the speech based on the acoustic decoding model and the language model comprises:

processing an output text at a previous moment and acoustic related information at a current moment using the acoustic decoding model to obtain a first probability corresponding to the at least one candidate text corresponding to the speech;

processing the output text at the previous moment using the language model to obtain a second probability corresponding to the candidate text; and

obtaining the fusion probability of the candidate text based on the first probability and the second probability.

13. The non-transitory computer readable storage medium according to claim 12 , wherein the obtaining the fusion probability of the candidate text based on the first probability and the second probability comprises:

for the candidate text, performing weighted summation of the first probability and the second probability to obtain a weighted summation value, and determining the weighted summation value as the fusion probability of the corresponding candidate text.

14. The non-transitory computer readable storage medium according to claim 11 , wherein the determining the predicted text based on the preset number of the one or more candidate texts comprises:

if the preset number of the one or more candidate texts comprise the standard text, determining the preset number of the one or more candidate texts as the predicted text; if the preset number of the one or more candidate texts do not comprise the standard text, replacing one candidate text of the preset number of the one or more candidate texts with the standard text to obtain one or more texts after the replacing, and determining the one or more texts after the replacing as the predicted text.

15. The non-transitory computer readable storage medium according to claim 11 , wherein the speech recognition model further comprises an encoder and an attention model, the acoustic related information is features after an attention processing operation, and the method further comprises:

extracting acoustic features of the speech;

encoding the acoustic features using the encoder to obtain encoded features; and

performing the attention processing operation on the encoded features using the attention model to obtain the features after the attention processing operation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2022
From: SHAO, JUNYAO; FU, XIAOYIN; ZANG, QIGUANG; CHEN, ZHIJIE; LIANG, MINGXIN; ZHENG, HUANXIN; QIAN, SHENG
To: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Reel/Frame 058595/0786 →
Priority Claims (1)
CN 202110308608.0 · Mar 23, 2021 · national
Continuity (1)
Related Publication 20220310064A1 · Sep 29, 2022