IP Library Granted Patent US 12,094,469
Granted Patent B2
US 12,094,469 · App. 17/603,690 · Granted Sep 17, 2024

Voice recognition method and device

Inventors: Li Fu (Beijing, CN); Xiaoxiao Li (Beijing, CN)
Assignee: JINGDONG TECHNOLOGY HOLDING CO., LTD.
G10L15/26G06F17/14G10L15/063G10L25/30
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,094,469
App. No.
17/603,690
Granted
Sep 17, 2024
Kind
B2
Abstract

A method for recognizing speech comprises: respectively setting initial values of a Chinese character coefficient and a Pinyin coefficient, generating a Chinese character mapping function according to the initial value of the Chinese character coefficient, and generating a Pinyin mapping function according to the initial value of the Pinyin coefficient (S 101 ); training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results (S 102 ); and recognizing, according to the target mapping function, speech to be recognized, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized (S 103 ). The method reduces the cost of speech recognition while ensuring the accuracy of speech recognition.

Claims (55)

1. A method for recognizing speech, comprising:

by one or more processors, respectively setting initial values of a Chinese character coefficient and a Pinyin coefficient, generating a Chinese character mapping function according to the initial value of the Chinese character coefficient, and generating a Pinyin mapping function according to the initial value of the Pinyin coefficient;

by the one or more processors, training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results; and

by the one or more processors, recognizing, according to the target mapping function, speech to be recognized, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized,

wherein the training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results comprise:

acquiring a Chinese character loss value and a Pinyin loss value of each training sample according to the Chinese character mapping function, the Pinyin mapping function and the plurality of preset training samples;

calculating the Chinese character loss value and the Pinyin loss value of each training sample as parameters of the joint loss function, so as to obtain a joint loss value of each training sample; and

using a back-propagation algorithm for calculation according to the joint loss value of each training sample, to obtain target values of the Chinese character coefficient and the Pinyin coefficient, and generating a target mapping function according to the target values.

2. The method according to claim 1 , wherein the training sample includes a frequency spectrum of sample speech, Chinese characters matching the sample speech, and Pinyins matching the sample speech; and

the acquiring a Chinese character loss value and a Pinyin loss value of each training sample according to the Chinese character mapping function, the Pinyin mapping function and the plurality of preset training samples comprises:

respectively calculating, for each preset training sample, the frequency spectrum in the training sample as parameters of the Chinese character mapping function and the Pinyin mapping function, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the training sample;

taking a difference between the Chinese character recognition result of the training sample and the Chinese characters in the training sample as a Chinese character loss value of the training sample; and

taking a difference between the Pinyin recognition result of the training sample and the Pinyins in the training sample as a Pinyin loss value of the training sample.

3. The method according to claim 1 , wherein the calculating the Chinese character loss value and the Pinyin loss value of each training sample as parameters of the joint loss function, so as to obtain a joint loss value of each training sample, comprises:

taking, for each training sample, a product of a preset Chinese character weight and the Chinese character loss value of the training sample as a first value;

taking a product of a preset Pinyin weight and the Pinyin loss value of the training sample as a second value, wherein a sum of the Chinese character weight and the Pinyin weight is 1;

taking a sum of a second norm of the initial value of the Chinese character coefficient and a second norm of the initial value of the Pinyin coefficient as a third value, and taking a product of the third value and a preset regular term coefficient as a fourth value; and

taking a sum of the first value, the second value and the fourth value as a joint loss value of the training sample.

4. The method according to claim 1 , wherein the recognizing, according to the target mapping function, speech to be recognized, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized, comprises:

performing a short-time Fourier transform on a time domain of the speech to be recognized, so as to obtain a frequency spectrum of the speech to be recognized; and

calculating the frequency spectrum of the speech to be recognized as a parameter of the target mapping function, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized.

5. An electronic device, comprising:

one or more processors; and

a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method comprising steps of:

respectively setting initial values of a Chinese character coefficient and a Pinyin coefficient, generating a Chinese character mapping function according to the initial value of the Chinese character coefficient, and generating a Pinyin mapping function according to the initial value of the Pinyin coefficient;

training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results; and

recognizing, according to the target mapping function, speech to be recognized, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized,

wherein the training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results comprise:

acquiring a Chinese character loss value and a Pinyin loss value of each training sample according to the Chinese character mapping function, the Pinyin mapping function and the plurality of preset training samples;

calculating the Chinese character loss value and the Pinyin loss value of each training sample as parameters of the joint loss function, so as to obtain a joint loss value of each training sample; and

using a back-propagation algorithm for calculation according to the joint loss value of each training sample, to obtain target values of the Chinese character coefficient and the Pinyin coefficient, and generating a target mapping function according to the target values.

6. The electronic device according to claim 5 , wherein

the training sample includes a frequency spectrum of sample speech, Chinese characters matching the sample speech, and Pinyins matching the sample speech, and

the acquiring a Chinese character loss value and a Pinyin loss value of each training sample according to the Chinese character mapping function, the Pinyin mapping function and the plurality of preset training samples comprises:

respectively calculating, for each preset training sample, the frequency spectrum in the training sample as parameters of the Chinese character mapping function and the Pinyin mapping function, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the training sample;

taking a difference between the Chinese character recognition result of the training sample and the Chinese characters in the training sample as a Chinese character loss value of the training sample; and

taking a difference between the Pinyin recognition result of the training sample and the Pinyins in the training sample as a Pinyin loss value of the training sample.

7. The electronic device according to claim 5 , wherein

the calculating the Chinese character loss value and the Pinyin loss value of each training sample as parameters of the joint loss function, so as to obtain a joint loss value of each training sample, comprises:

taking, for each training sample, a product of a preset Chinese character weight and the Chinese character loss value of the training sample as a first value;

taking a product of a preset Pinyin weight and the Pinyin loss value of the training sample as a second value, wherein a sum of the Chinese character weight and the Pinyin weight is 1;

taking a sum of a second norm of the initial value of the Chinese character coefficient and a second norm of the initial value of the Pinyin coefficient as a third value, and taking a product of the third value and a preset regular term coefficient as a fourth value; and

taking a sum of the first value, the second value and the fourth value as a joint loss value of the training sample.

8. The electronic device according to claim 5 , wherein

the recognizing, according to the target mapping function, speech to be recognized, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized, comprises:

performing a short-time Fourier transform on a time domain of the speech to be recognized, so as to obtain a frequency spectrum of the speech to be recognized; and

calculating the frequency spectrum of the speech to be recognized as a parameter of the target mapping function, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized.

9. A non-transitory computer-readable medium with a computer program stored thereon, which, when executed by a processor, implements a method for recognizing speech, comprising:

by one or more processors, respectively setting initial values of a Chinese character coefficient and a Pinyin coefficient, generating a Chinese character mapping function according to the initial value of the Chinese character coefficient, and generating a Pinyin mapping function according to the initial value of the Pinyin coefficient;

by the one or more processors, training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results; and

by the one or more processors, recognizing, according to the target mapping function, speech to be recognized, so as to obtain a Chinese character recognition result and a Pinyin recognition result of the speech to be recognized,

wherein the training the Chinese character mapping function and the Pinyin mapping function using a plurality of preset training samples, calculating training results as parameters of a joint loss function, and generating a target mapping function according to calculation results comprise:

acquiring a Chinese character loss value and a Pinyin loss value of each training sample according to the Chinese character mapping function, the Pinyin mapping function and the plurality of preset training samples;

calculating the Chinese character loss value and the Pinyin loss value of each training sample as parameters of the joint loss function, so as to obtain a joint loss value of each training sample; and

using a back-propagation algorithm for calculation according to the joint loss value of each training sample, to obtain target values of the Chinese character coefficient and the Pinyin coefficient, and generating a target mapping function according to the target values.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 17, 2022
From: JINGDONG DIGITS TECHNOLOGY HOLDING CO., LTD.
To: JINGDONG TECHNOLOGY HOLDING CO., LTD.
Reel/Frame 059040/0318 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 14, 2021
From: FU, LI; LI, XIAOXIAO
To: JINGDONG DIGITS TECHNOLOGY HOLDING CO., LTD.
Reel/Frame 057793/0335 →
Priority Claims (1)
CN 201910354527.7 · Apr 29, 2019 · national
Continuity (1)
Related Publication 20220238098A1 · Jul 28, 2022