Speech recognition method, apparatus, device and readable storage medium
Abstract
The present application discloses a speech recognition method, apparatus, device and readable storage medium, and relates to the technical field of artificial intelligence. A specific implementation includes: an electronic device recognizes a speech signal to obtain a first text; if a first pinyin sequence corresponding to the first text exists in the database, the electronic device uses a correct text corresponding to the first pinyin sequence as the speech recognition result; otherwise, the electronic device performs a fuzzy matching on the first pinyin sequence to obtain multiple second pinyin sequences and second texts corresponding to the second pinyin sequences, and selects the speech recognition result from the multiple second texts.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A speech recognition method, comprising:
obtaining a first text by recognizing an acquired speech signal;
performing a database search by using a first pinyin sequence corresponding to the first text;
performing a fuzzy search according to the first pinyin sequence in response to the first pinyin sequence not being found in the database, wherein the fuzzy search is used to look up a second pinyin sequence having at least one pinyin in the first pinyin sequence and a second text corresponding to the second pinyin sequence from the database; and
selecting at least one second text obtained by the fuzzy search as a speech recognition result of the speech signal,
wherein the selecting at least one second text obtained by the fuzzy search as a speech recognition result of the speech signal comprises:
determining a similarity between the second pinyin sequence corresponding to each second text of the at least one second text and the first pinyin sequence to obtain at least one similarity; and
determining the speech recognition result of the speech signal from the at least one second text according to a maximum similarity among the at least one similarity
wherein the determining the speech recognition result of the speech signal from the at least one second text according to a maximum similarity among the at least one similarity comprises:
determining that the second text corresponding to the maximum similarity is the speech recognition result of the speech signal, in a case that the maximum similarity is greater than or equal to a preset threshold; or,
determining that the first text is the speech recognition result of the speech signal, in a case that the maximum similarity is less than the preset threshold.
2. The method according to claim 1 , after the determining that the second text corresponding to the maximum similarity is the speech recognition result of the speech signal, in a case that the maximum similarity is greater than or equal to a preset threshold, further comprising:
adding the first text to a generalization table of the second text corresponding to the maximum similarity, wherein the generalization table is used to store a generalized text of the second text corresponding to the maximum similarity, and the generalized text has a same intent as the second text.
3. The method according to claim 2 , further comprising:
sending a first data stream to a server, wherein the first data stream carries a corresponding relationship among the second text corresponding to the maximum similarity, the first text and the first pinyin sequence.
4. The method according to claim 1 , further comprising:
recognizing a second data stream input by a user, wherein the second data stream is used to indicate a correspondence relationship between the second text and the second pinyin sequence, and a generalized text of the second text; and
sending the second data stream to a server.
5. The method according to claim 1 , after the performing a database search by using a first pinyin sequence corresponding to the first text, further comprising:
determining that the speech recognition result of the speech signal is a third text corresponding to the first pinyin sequence, in a case that the first pinyin sequence is found in the database.
6. The method according to claim 1 , before the performing a fuzzy search according to the first pinyin sequence, in response to the first pinyin sequence not being found in the database, further comprising:
determining that the first text does not exist in the database.
7. A speech recognition apparatus, comprising:
at least one processor; and
a memory, communicatively connected with the at least one processor; wherein
the memory stores instructions executable by the at least one processor, and the at least one processor when executing the instructions, is configured to:
obtain a first text by recognizing an acquired speech signal;
perform a database search by using a first pinyin sequence corresponding to the first text;
perform a fuzzy search according to the first pinyin sequence in response to the first pinyin sequence not being found in the database, wherein the fuzzy search is used to look up a second pinyin sequence having at least one pinyin in the first pinyin sequence and a second text corresponding to the second pinyin sequence from the database;
select at least one second text obtained by the fuzzy search as a speech recognition result of the speech signal,
wherein the at least one processor is configured to determine a similarity between the second pinyin sequence corresponding to each second text of the at least one second text and the first pinyin sequence to obtain at least one similarity, and determine, according to a maximum similarity among the at least one similarity, the speech recognition result of the speech signal from the at least one second text
wherein when determining the speech recognition result of the speech signal from the at least one second text according to the maximum similarity among the at least one similarity, the at least one processor is configured to: determine that the speech recognition result of the speech signal is the second text corresponding to the maximum similarity in a case that the maximum similarity is greater than or equal to a preset threshold; or, determine that the first text is the speech recognition result of the speech signal in a case that the maximum similarity is lower than the preset threshold.
8. The apparatus according to claim 7 , wherein the at least one processor is further configured to add the first text to a generalization table of the second text corresponding to the maximum similarity, after it is determined that the second text corresponding to the maximum similarity is the speech recognition result of the speech signal, in a case that the maximum similarity is greater than or equal to the preset threshold, wherein the generalization table is used to store a generalized text of the second text corresponding to the maximum similarity, and the generalized text has a same intent as the second text.
9. The apparatus according to claim 8 , wherein the at least one processor is further configured to send a first data stream to a server, wherein the first data stream carries a corresponding relationship among the second text corresponding to the maximum similarity, the first text and the first pinyin sequence.
10. The apparatus according to claim 7 , wherein the at least one processor is further configured to
recognize a second data stream input by a user, wherein the second data stream is used to indicate a correspondence relationship between the second text and the second pinyin sequence, and a generalized text of the second text; and
send the second data stream to a server.
11. The apparatus according to claim 7 , wherein the at least one processor is further configured to determine that the speech recognition result of the speech signal is a third text corresponding to the first pinyin sequence, in a case that the first pinyin sequence is found in the database.
12. The apparatus according to claims 7 , wherein the at least one processor is further configured to determine that the first text does not exist in the database, before the at least one processor performs a fuzzy search according to the first pinyin sequence in response to the first pinyin sequence not being found in the database.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method according to claim 1 .
14. A speech recognition method, comprising:
recognizing a speech signal to obtain a first text;
performing a fuzzy matching according to a first pinyin sequence corresponding to the first text to obtain multiple second pinyin sequences and second texts corresponding to the second pinyin sequences from a database, wherein each of the second pinyin sequence has at least one pinyin in the first pinyin sequence; and
determining a speech recognition result of the speech signal from the multiple second texts,
wherein the determining a speech recognition result of the speech signal from the multiple second texts comprises:
determining a similarity between the second pinyin sequence corresponding to each second text of the multiple second texts and the first pinyin sequence to obtain multiple similarities; and
determining the speech recognition result of the speech signal from the multiple second texts according to a maximum similarity among the multiple similarities;
wherein the determining the speech recognition result of the speech signal from the multiple second texts according to a maximum similarity among the multiple similarities comprises:
determining that the second text corresponding to the maximum similarity is the speech recognition result of the speech signal, in a case that the maximum similarity is greater than or equal to a preset threshold; or,
determining that the first text is the speech recognition result of the speech signal, in a case that the maximum similarity is less than the preset threshold.Join the waitlist — get patent alerts
Track US11798548B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.