# US 2021/0279418 A1 · Method and apparatus for recognizing speech

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0279418 A1
- Document ID: US20210279418A1
- Status: Published application
- Kind: A1
- Application number: 17/017,510
- Filed: 2020-09-10
- Published: 2021-09-09
- Earliest claimed: 2020-03-04
- Assignees: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Yumei ZHANG; Gui HE; Jin HU
- Web page: https://patentgrep.com/patent/US20210279418A1

## CPC

- G06F 40/30: Semantic analysis
- G10L 25/87: Detection of discrete points within a voice signal
- G06F 40/205: Parsing
- G10L 15/1822: {Parsing for meaning understanding}
- G10L 15/22: Procedures used during a speech recognition process, e.g. man-machine dialogue
- G10L 2015/223: {Execution procedure of a spoken command}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING

## Abstract

Embodiments of the present disclosure provide a method and apparatus for recognizing speech. An embodiment of the method includes: in response to detecting a speech frame, converting the speech frame into a current text in real time; in response to there being no previously saved historical text, inputting the current text into a semantic parsing model to obtain a parsing result; in response to the parsing result including a valid intention slot, ending a speech endpoint detection to complete the recognition; and outputting an instruction corresponding to the valid intention slot.

## Claims

### Claim 1

A method for recognizing speech, the method comprising:
in response to detecting a speech frame, converting the speech frame into a current text in real time;
in response to there being no previously saved historical text, inputting the current text into a semantic parsing model to obtain a parsing result;
in response to the parsing result including a valid intention slot, ending a speech endpoint detection to complete the recognition; and
outputting an instruction corresponding to the valid intention slot.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to the parsing result not including the valid intention slot, saving the current text as a historical text and continuing to detect a new speech frame, delaying a time of the speech endpoint detection.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to there being a previously saved historical text, inputting the current text and the historical text into the semantic parsing model to obtain a new parsing result;
in response to the new parsing result not including a valid intention slot, merging the current text into the historical text for saving, continuing to detect a new speech frame, and delaying the time of the speech endpoint detection; and
in response to the new parsing result including a valid intention slot, ending the speech endpoint detection to complete the recognition, clearing the historical text, and outputting an instruction corresponding to the valid intention slot.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the inputting the current text and the historical text into the semantic parsing model comprises:
splicing the current text and the historical text; and
in response to the splicing being successful, inputting the spliced current text and the historical text into the semantic parsing model to obtain the new parsing result.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the inputting the current text and the historical text into the semantic parsing model comprises:
in response to the splicing failing, resetting the historical text to be the current text, and inputting only the current text into the semantic parsing model.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to the parsing result including a valid intention slot and being a fixed result, using the parsing result as a cache instruction, and storing a correspondence relationship table between the cache instruction and the current text;
in response to acquiring a text to be parsed, matching the text to be parsed with the correspondence relationship table; and
in response to the matching being successful, directly returning the cache instruction corresponding to the text to be parsed without using the semantic parsing model.

### Claim 7

An apparatus for recognizing speech, comprising:
at least one processor; and
a memory storing instructions, the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
converting a speech frame into a current text in real time in response to detecting the speech frame;
inputting the current text into a semantic parsing model to obtain a parsing result, in response to there being no previously saved historical text;
ending a speech endpoint detection to complete the recognition, in response to the parsing result including a valid intention slot; and
outputting an instruction corresponding to the valid intention slot.

### Claim 8 (depends on 7)

The apparatus according to claim 7, wherein the operations further comprise:
in response to the parsing result not including the valid intention slot, saving the current text as a historical text and continuing to detect a new speech frame, delaying a time of the speech endpoint detection.

### Claim 9 (depends on 7)

The apparatus according to claim 7, wherein the operations further includes:
in response to there being a previously saved historical text, inputting the current text and the historical text into the semantic parsing model to obtain a new parsing result;
in response to the new parsing result not including a valid intention slot, merging the current text into the historical text for saving, continuing to detect a new speech frame, and delaying the time of the speech endpoint detection; and
in response to the new parsing result including a valid intention slot, ending the speech endpoint detection to complete the recognition, clearing the historical text, and outputting an instruction corresponding to the valid intention slot.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the inputting the current text and the historical text into the semantic parsing model comprises:
splicing the current text and the historical text; and
in response to the splicing being successful, inputting the spliced current text and the historical text into the semantic parsing model to obtain the new parsing result.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the inputting the current text and the historical text into the semantic parsing model comprises:
in response to the splicing failing, resetting the historical text to be the current text, and inputting only the current text into the semantic parsing model.

### Claim 12 (depends on 7)

The apparatus according to claim 7, wherein the operations further comprise:
in response to the parsing result including a valid intention slot and being a fixed result, using the parsing result as a cache instruction, and storing a correspondence relationship table between the cache instruction and the current text;
in response to acquiring a text to be parsed, matching the text to be parsed with the correspondence relationship table; and
in response to the matching being successful, directly returning the cache instruction corresponding to the text to be parsed without using the semantic parsing model.

### Claim 13

A non-transitory computer readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, causes the processor to perform operations, the operations comprising:
in response to detecting a speech frame, converting the speech frame into a current text in real time;
in response to there being no previously saved historical text, inputting the current text into a semantic parsing model to obtain a parsing result;
in response to the parsing result including a valid intention slot, ending a speech endpoint detection to complete the recognition; and
outputting an instruction corresponding to the valid intention slot.

### Claim 14 (depends on 13)

The medium according to claim 13, wherein the operations further comprise:
in response to the parsing result not including the valid intention slot, saving the current text as a historical text and continuing to detect a new speech frame, delaying a time of the speech endpoint detection.

### Claim 15 (depends on 13)

The medium according to claim 13, wherein the operations further comprise:
in response to there being a previously saved historical text, inputting the current text and the historical text into the semantic parsing model to obtain a new parsing result;
in response to the new parsing result not including a valid intention slot, merging the current text into the historical text for saving, continuing to detect a new speech frame, and delaying the time of the speech endpoint detection; and
in response to the new parsing result including a valid intention slot, ending the speech endpoint detection to complete the recognition, clearing the historical text, and outputting an instruction corresponding to the valid intention slot.

### Claim 16 (depends on 15)

The medium according to claim 15, wherein the inputting the current text and the historical text into the semantic parsing model comprises:
splicing the current text and the historical text; and
in response to the splicing being successful, inputting the spliced current text and the historical text into the semantic parsing model to obtain the new parsing result.

### Claim 17 (depends on 16)

The medium according to claim 16, wherein the inputting the current text and the historical text into the semantic parsing model comprises:
in response to the splicing failing, resetting the historical text to be the current text, and inputting only the current text into the semantic parsing model.

### Claim 18 (depends on 13)

The medium according to claim 13, wherein the operations further comprise:
in response to the parsing result including a valid intention slot and being a fixed result, using the parsing result as a cache instruction, and storing a correspondence relationship table between the cache instruction and the current text;
in response to acquiring a text to be parsed, matching the text to be parsed with the correspondence relationship table; and
in response to the matching being successful, directly returning the cache instruction corresponding to the text to be parsed without using the semantic parsing model.
