Speech recognition method, device, equipment and medium based on semantic scene

By combining timbre features and semantic recognition models in speech recognition, detecting and replacing abnormal characters, the problem of comprehension deviation caused by language differences in speech recognition is solved, and the recognition efficiency and accuracy are improved.

CN114038453BActive Publication Date: 2024-11-12SHENZHEN RAISOUND TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202111424102.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-11-12
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Due to semantic comprehension deviations caused by language differences in the speech recognition process, the prior art cannot quickly and accurately locate and replace erroneous characters, which affects the recognition efficiency.

Method used

Using a speech recognition method based on semantic scenes, by obtaining the audio features of the speech to be recognized, using the speech recognition model for speech recognition, and combining the tone characteristics and semantic recognition model to detect abnormal characters, determine whether they comply with the preset semantic scene, so as to quickly perform replace.

Benefits of technology

It improves the timeliness and recognition efficiency of speech recognition, ensures the accuracy of recognition results, and quickly replaces abnormal characters, improving overall recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114038453B_ABST
    Figure CN114038453B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of speech processing, and provides a speech recognition method, device, electronic device and storage medium based on semantic scenes, wherein the method comprises: obtaining a speech to be recognized, parsing the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features; performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result; detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre features; judging whether the abnormal characters conform to a preset semantic scene; if the abnormal characters conform to the preset semantic scene, using the speech recognition result as the final recognition result of the speech to be recognized; if the abnormal characters do not conform to the preset semantic scene, selecting a replacement character for the abnormal characters from a preset character table to update the speech recognition result, and obtaining the final recognition result of the speech to be recognized. The present invention can improve the recognition efficiency of speech recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech processing, and in particular to a speech recognition method, device, electronic device and computer-readable storage medium based on semantic scenes. Background Art

[0002] During the speech recognition process, due to differences in languages ​​(such as dialects), there will be differences in semantic understanding when converting speech into text, which will cause certain understanding deviations for users. At present, error correction characters are usually used to replace erroneous characters to solve the character conversion errors in speech recognition. However, since a large number of text characters are involved in the speech recognition process, this technical means cannot quickly and accurately locate the sequence position of the erroneous characters, resulting in a certain delay in replacing erroneous characters, which will affect the recognition efficiency of speech recognition. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a speech recognition method, device, electronic device and computer-readable storage medium based on semantic scenarios, which can improve the recognition efficiency of speech recognition.

[0004] In a first aspect, the present invention provides a speech recognition method based on a semantic scene, comprising:

[0005] Acquire a speech to be recognized, and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features;

[0006] Performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result;

[0007] Detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre characteristics;

[0008] Determining whether the abnormal character conforms to a preset semantic scenario;

[0009] If the abnormal character conforms to the preset semantic scenario, the speech recognition result is used as the final recognition result of the speech to be recognized;

[0010] If the abnormal character does not conform to the preset semantic scenario, a replacement character for the abnormal character is selected from a preset character table to update the speech recognition result to obtain a final recognition result of the speech to be recognized.

[0011] It can be seen that the embodiment of the present invention can quickly locate abnormal characters in speech recognition results by combining timbre features with a semantic recognition model to detect abnormal characters in speech recognition results, improve the timeliness of speech recognition, and improve the recognition efficiency of speech recognition. It can also determine whether the detected abnormal characters meet the requirements in combination with a preset semantic scene, thereby ensuring the recognition accuracy of the speech recognition results and quickly replacing abnormal characters in the speech recognition results, further improving the recognition efficiency of speech recognition. Therefore, a speech recognition method based on semantic scenes proposed in an embodiment of the present invention can improve the recognition efficiency of speech recognition.

[0012] In a possible implementation manner of the first aspect, the parsing the audio features of the to-be-recognized speech includes:

[0013] Preprocessing the speech to be recognized, and performing short-time Fourier transform on the preprocessed speech to be recognized to obtain a spectrogram of the speech to be recognized;

[0014] Performing Mel-spectrogram filtering on the spectrogram, and performing cepstrum analysis on the spectrogram after Mel-spectrogram filtering to obtain a Mel-spectrogram of the speech to be recognized;

[0015] The acoustic features and timbre features in the mel-spectrogram are identified to obtain the audio features of the speech to be recognized.

[0016] In a possible implementation manner of the first aspect, performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result includes:

[0017] Calculating the phoneme sequence probability of the acoustic feature using the acoustic model in the speech recognition model;

[0018] Calculate the text sequence of the acoustic features using the language network of the speech recognition model according to the phoneme sequence probability;

[0019] A speech recognition result of the speech to be recognized is generated according to the text sequence.

[0020] In a possible implementation of the first aspect, detecting abnormal characters in the speech recognition result by using a semantic recognition model according to the timbre feature includes:

[0021] Locating an abnormal audio region in the speech recognition result according to the timbre feature;

[0022] Inputting the abnormal audio region into the semantic recognition model to detect semantic information of the abnormal audio region through an attention mechanism in the semantic recognition model;

[0023] According to the semantic information, the abnormal characters in the abnormal audio region are identified using a classification network in the semantic recognition model.

[0024] In a possible implementation of the first aspect, locating the abnormal character region in the speech recognition result according to the timbre feature includes:

[0025] Identifying the audio sequence of the speech recognition result, and identifying the timbre sequence of the speech recognition result according to the timbre feature;

[0026] When the audio sequence is inconsistent with the timbre sequence, an abnormal audio region in the speech recognition result is located.

[0027] In a possible implementation manner of the first aspect, detecting the semantic information of the abnormal audio area by using an attention mechanism in the semantic recognition model includes:

[0028] Using the encoding layer in the attention mechanism to encode the position vector of each character in the abnormal audio area to obtain an encoded character;

[0029] Using the encoder in the attention mechanism to extract features of the coded characters to obtain feature coded characters;

[0030] Using the decoder in the attention mechanism to sequentially decode the feature-encoded characters to obtain character sequence information;

[0031] According to the character sequence information, the forward network in the attention mechanism is used to output the semantic information of the abnormal audio region.

[0032] In a possible implementation manner of the first aspect, determining whether the abnormal character conforms to a preset semantic scenario includes:

[0033] Acquire an abnormal position of the abnormal character, and identify semantic information of the abnormal character according to the abnormal position;

[0034] Matching the semantic information with the preset semantic scene;

[0035] If the semantic information fails to match the preset semantic scenario, the abnormal character does not conform to the preset semantic scenario;

[0036] If the semantic information successfully matches the preset semantic scenario, the abnormal character conforms to the preset semantic scenario.

[0037] In a second aspect, the present invention provides a speech recognition device based on a semantic scene, the device comprising:

[0038] An audio feature analysis module, used to obtain the speech to be recognized and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features;

[0039] A speech recognition module, used to perform speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result;

[0040] An abnormal character recognition module, used to detect abnormal characters in the speech recognition result using a semantic recognition model according to the timbre characteristics;

[0041] A semantic scene judgment module, used to judge whether the abnormal character conforms to a preset semantic scene;

[0042] A recognition result generating module, used for taking the speech recognition result as the final recognition result of the speech to be recognized when the abnormal character meets the preset semantic scenario;

[0043] The recognition result generation module is further used to select a replacement character for the abnormal character from a preset character table when the abnormal character does not conform to the preset semantic scenario, so as to update the speech recognition result and obtain a final recognition result of the speech to be recognized.

[0044] In a third aspect, the present invention provides an electronic device, comprising:

[0045] at least one processor; and a memory communicatively coupled to the at least one processor;

[0046] The memory stores a computer program executable by the at least one processor, so that the at least one processor can execute the semantic scene-based speech recognition method as described in any one of the first aspects above.

[0047] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the computer program implements the semantic scene-based speech recognition method as described in any one of the above-mentioned first aspects.

[0048] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0051] Figure 1 A detailed flowchart of a speech recognition method based on a semantic scene provided by an embodiment of the present invention;

[0052] Figure 2 An embodiment of the present invention Figure 1 A flowchart of one of the steps in a semantic scene-based speech recognition method is provided;

[0053] Figure 3 A module schematic diagram of a speech recognition device based on a semantic scene provided by an embodiment of the present invention;

[0054] Figure 4 A schematic diagram of the internal structure of an electronic device for implementing a speech recognition method based on a semantic scenario provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0056] The embodiment of the present invention provides a speech recognition method based on semantic scenes. The execution subject of the speech recognition method based on semantic scenes includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present invention. In other words, the speech recognition method based on semantic scenes can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0057] See also Figure 1 The flowchart shown describes a semantic scene-based speech recognition method provided by an embodiment of the present invention. Figure 1 The semantic scene-based speech recognition methods described in include:

[0058] S1. Acquire a speech to be recognized, and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features.

[0059] In an embodiment of the present invention, the voice to be recognized refers to audio data that needs to be converted into text, which is generated based on different business scenarios. For example, in a conference scenario, the voice to be recognized includes: host voice, reporting voice, and defense voice, etc. In a medical scenario, the voice to be recognized includes: medical expert voice, patient voice, etc. In a chat scenario, the voice to be recognized includes: conversational voice, call voice, etc. It should be noted that in an optional embodiment of the present invention, the voice to be recognized is collected by an audio acquisition device, such as a voice recorder, a voiceprint collector, and an audio collector.

[0060] It should be understood that due to the complexity of business scenarios, there will be a lot of useless audio data in the acquired speech to be recognized, such as noise, silent segments, background sound segments, etc. Therefore, the embodiment of the present invention analyzes the audio features of the speech to be recognized to filter out some useless audio data in the speech to be recognized, thereby improving the speed of subsequent speech recognition. In the embodiment of the present invention, the audio features include acoustic features and timbre features. The acoustic features refer to physical quantities that represent the acoustic characteristics of speech, and are also a general term for the acoustic performance of various sound elements, such as the duration, fundamental frequency, and average voice power that represent the rhythmic characteristics of speech, which are used to characterize the semantic information of the speech to be recognized. The timbre features refer to physical quantities that represent the sound characteristics of the speech to be recognized, such as pitch, length, and range, which are used to characterize the emotional information of the speech to be recognized.

[0061] As an embodiment of the present invention, the analysis of the audio features of the speech to be recognized includes: preprocessing the speech to be recognized, and performing short-time Fourier transform on the preprocessed speech to be recognized to obtain a spectrogram of the speech to be recognized, performing Mel-spectrogram filtering on the spectrogram, and performing cepstrum analysis on the spectrogram after Mel-spectrogram filtering to obtain a Mel-spectrogram of the speech to be recognized, identifying acoustic features and timbre features in the Mel-spectrogram to obtain audio features of the speech to be recognized.

[0062] Furthermore, in an optional embodiment of the present invention, the preprocessing of the speech to be recognized includes: framing the original speech and performing audio pre-enhancement to obtain enhanced speech, and windowing the enhanced speech to achieve preprocessing of the speech to be recognized.

[0063] Furthermore, in an optional embodiment of the present invention, the following formula is used to perform a short-time Fourier transform on the pre-processed speech to be recognized:

[0064]

[0065] Among them, F(ω) represents the spectrogram of the speech to be recognized, f(t) represents the preprocessed speech to be recognized, and e represents an irrational number.

[0066] Further, in an optional embodiment of the present invention, the Mel spectrum filtering of the spectrogram is performed by a Mel filter bank, and the cepstrum analysis is realized by taking the logarithm of the spectrogram after Mel spectrum filtering.

[0067] S2. Use a speech recognition model to perform speech recognition on the acoustic features to obtain a speech recognition result.

[0068] In the embodiment of the present invention, the speech recognition model includes an acoustic network and a language network. The acoustic network is used to recognize the phoneme sequence in the acoustic features, and the language network is used to recognize the sequence of characters in the acoustic features according to the phoneme sequence recognized by the acoustic network. As an embodiment of the present invention, the using the speech recognition model to perform speech recognition on the acoustic features to obtain a speech recognition result includes: calculating the phoneme sequence probability of the acoustic features by using the acoustic model in the speech recognition model, and according to the phoneme sequence probability, calculating the character sequence of the acoustic features by using the language network of the speech recognition model, and generating a speech recognition result of the speech to be recognized according to the character sequence.

[0069] Among them, the phoneme sequence probability refers to the syllable probability of generating a character. For example, if the character is "学" (xué), its syllables include: "x", "u", and "e". Then, by calculating the phoneme sequence probability of the acoustic features, the syllables that can generate the character "信" (xìn) subsequently can be determined, so as to obtain the character sequence of the acoustic features. Optionally, in the embodiment of the present invention, the acoustic network is constructed by a hidden Markov algorithm.

[0070] Further, the character sequence refers to the information relationship of generating characters from the phoneme sequence and is used to generate an audio recognition result of the acoustic features. Optionally, in the embodiment of the present invention, the language network is constructed by an N-Gram language algorithm.

[0071] S3. According to the timbre feature, use a semantic recognition model to detect abnormal characters in the speech recognition result.

[0072] It should be understood that the speech recognition result is obtained by detection through the speech recognition model, and in actual business scenarios, since each person's pronunciation timbre is different, the speech recognition model may have recognition errors during the speech recognition process. Therefore, the present invention uses a semantic recognition model to detect abnormal characters in the speech recognition result based on the timbre characteristics, and can quickly locate the abnormal characters in the speech recognition result, thereby improving the timeliness of speech recognition.

[0073] As an embodiment of the present invention, see Figure 2 As shown, the detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre feature includes:

[0074] S201, locating an abnormal audio area in the speech recognition result according to the timbre feature;

[0075] S202, inputting the abnormal audio region into the semantic recognition model to detect semantic information of the abnormal audio region through an attention mechanism in the semantic recognition model;

[0076] S203. According to the semantic information, use a classification network in the semantic recognition model to identify abnormal characters in the abnormal audio region.

[0077] Among them, the abnormal character area refers to the area where the audio sequence of the speech recognition result is different from the timbre feature. Optionally, locating the abnormal character area in the speech recognition result based on the timbre feature includes: identifying the audio sequence of the speech recognition result, and identifying the timbre sequence of the speech recognition result based on the timbre feature, and locating the abnormal audio area in the speech recognition result when the audio sequence is inconsistent with the timbre sequence.

[0078] Furthermore, in an embodiment of the present invention, the semantic recognition model includes an attention mechanism and a classification network, the attention mechanism includes a transform mechanism, which is used to identify the contextual semantic information of each character in the abnormal audio area, and the classification network includes a convolutional neural network, which is used to identify the character category of each character in the abnormal audio area, wherein the character category includes abnormal and normal.

[0079] Furthermore, in an optional embodiment of the present invention, the detecting the semantic information of the abnormal audio area by the attention mechanism in the semantic recognition model includes: utilizing the encoding layer in the attention mechanism to encode the position vector of each character in the abnormal audio area to obtain the encoded character, utilizing the encoder in the attention mechanism to perform feature extraction on the encoded character to obtain feature encoded characters, utilizing the decoder in the attention mechanism to perform sequence decoding on the feature encoded characters to obtain character sequence information, and outputting the semantic information of the abnormal audio area based on the character sequence information by utilizing the forward network in the attention mechanism.

[0080] Furthermore, in an optional embodiment of the present invention, the classification network in the semantic recognition model is used to identify abnormal characters in the abnormal audio area based on the semantic information, including: based on the semantic information, using the convolution layer in the classification network to perform convolution processing on the characters in the abnormal audio area, and using the pooling layer in the classification network to perform dimensionality reduction processing on the convolution-processed characters to obtain reduced-dimensional characters, using the fully connected layer in the classification network to calculate the character category of the reduced-dimensional characters, and according to the character category, using the output layer in the classification network to output the abnormal characters in the abnormal audio area.

[0081] S4: Determine whether the abnormal character conforms to a preset semantic scenario.

[0082] In an embodiment of the present invention, the preset semantic scene is set based on the business scene of the speech to be recognized. For example, if the business scene of the speech to be recognized is a chat scene, the preset semantic scene may be a dialogue semantic scene; if the business scene of the speech to be recognized is a conference scene, the preset semantic scene may be a conference dialogue scene.

[0083] As an embodiment of the present invention, the determination of whether the abnormal character conforms to a preset semantic scene includes: obtaining an abnormal position of the abnormal character, identifying semantic information of the abnormal character according to the abnormal position, matching the semantic information with the preset semantic scene, if the match fails, the abnormal character does not conform to the preset semantic scene, if the match succeeds, the abnormal character conforms to the preset semantic scene. The semantic information can be used to identify the abnormal character in combination with its context characters.

[0084] S5. If the abnormal character conforms to the preset semantic scenario, the speech recognition result is used as the recognition result of the speech to be recognized.

[0085] It should be understood that when the abnormal character conforms to the preset semantic scenario, it means that the speech recognition result conforms to the preset semantic scenario, that is, the speech recognition result meets the user's needs. Therefore, the embodiment of the present invention uses the speech recognition result as the recognition result of the speech to be recognized.

[0086] S6. If the abnormal character does not conform to the preset semantic scenario, a replacement character for the abnormal character is selected from a preset character table, and the speech recognition result is updated according to the replacement character to obtain a recognition result of the speech to be recognized.

[0087] It should be understood that when the abnormal character does not conform to the preset semantic scenario, it means that the speech recognition result does not conform to the preset semantic scenario, that is, the speech recognition result does not meet the user's needs. Therefore, the embodiment of the present invention uses a preset scoring mechanism to select replacement characters for the abnormal characters from the vocabulary to update the speech recognition result, ensure the accuracy of speech recognition, and update the speech recognition result based on the replacement characters to obtain the recognition result of the speech to be recognized.

[0088] The character table refers to a data table constructed by downloading characters that conform to the semantic scenario from a professional website, and the replacement characters for the abnormal characters are selected based on the semantic scenario.

[0089] It can be seen that the embodiment of the present invention can quickly locate abnormal characters in speech recognition results by combining timbre features with a semantic recognition model to detect abnormal characters in speech recognition results, improve the timeliness of speech recognition, and improve the recognition efficiency of speech recognition. It can also determine whether the detected abnormal characters meet the requirements in combination with a preset semantic scene, thereby ensuring the recognition accuracy of the speech recognition results and quickly replacing abnormal characters in the speech recognition results, further improving the recognition efficiency of speech recognition. Therefore, a speech recognition method based on semantic scenes proposed in an embodiment of the present invention can improve the recognition efficiency of speech recognition.

[0090] like Figure 3 The figure shows a functional module diagram of the speech recognition device based on semantic scenes of the present invention.

[0091] The speech recognition device 300 based on semantic scenes of the present invention can be installed in an electronic device. According to the functions to be implemented, the speech recognition device based on semantic scenes can include an audio feature analysis module 301, a speech recognition module 302, an abnormal character recognition module 303, a semantic scene judgment module 304, and a recognition result generation module 305. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0092] In the embodiment of the present invention, the functions of each module / unit are as follows:

[0093] The audio feature analysis module 301 is used to obtain the speech to be recognized and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features;

[0094] The speech recognition module 302 is used to perform speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result;

[0095] The abnormal character recognition module 303 is used to detect abnormal characters in the speech recognition result using a semantic recognition model according to the timbre feature;

[0096] The semantic scene determination module 304 is used to determine whether the abnormal character conforms to a preset semantic scene;

[0097] The recognition result generating module 305 is used to use the speech recognition result as the final recognition result of the speech to be recognized when the abnormal character meets the preset semantic scenario;

[0098] The recognition result generation module 305 is further used to select a replacement character for the abnormal character from a preset character table when the abnormal character does not conform to the preset semantic scenario, so as to update the speech recognition result and obtain a final recognition result of the speech to be recognized.

[0099] In detail, the modules in the semantic scene-based speech recognition device 300 in the embodiment of the present invention are used in the same manner as described above. Figure 1 and Figure 2 The same technical means as the semantic scene-based speech recognition method described in , and can produce the same technical effects, are not described here. Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a speech recognition method based on a semantic scene according to the present invention.

[0100] The electronic device 4 may include a processor 40 , a memory 41 and a bus, and may also include a computer program stored in the memory 41 and executable on the processor 40 , such as a semantic scene-based speech recognition program 42 .

[0101] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 41 may be an internal storage unit of the electronic device 4 in some embodiments, such as a mobile hard disk of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 4. Further, the memory 41 may also include both an internal storage unit of the electronic device 4 and an external storage device. The memory 41 may not only be used to store application software and various types of data installed in the electronic device 4, such as the code of the speech recognition program 42 based on the semantic scene, but also be used to temporarily store data that has been output or is to be output.

[0102] The processor 40 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 40 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 41 (for example, executing a speech recognition program 42 based on semantic scenarios, etc.), and calls data stored in the memory 41 to execute various functions of the electronic device 4 and process data.

[0103] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 41 and at least one processor 40, etc.

[0104] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4The structure shown does not constitute a limitation on the electronic device 4, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0105] For example, although not shown, the electronic device 4 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 40 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 4 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0106] Furthermore, the electronic device 4 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the electronic device 4 and other electronic devices.

[0107] Optionally, the electronic device 4 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 4 and to display a visual user interface.

[0108] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.

[0109] The semantic scene-based speech recognition program 43 stored in the memory 41 of the electronic device 4 is a combination of multiple computer programs. When running in the processor 40, it can achieve:

[0110] Acquire a speech to be recognized, and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features;

[0111] Performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result;

[0112] Detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre characteristics;

[0113] Determining whether the abnormal character conforms to a preset semantic scenario;

[0114] If the abnormal character conforms to the preset semantic scenario, the speech recognition result is used as the final recognition result of the speech to be recognized;

[0115] If the abnormal character does not conform to the preset semantic scenario, a replacement character for the abnormal character is selected from a preset character table to update the speech recognition result to obtain a final recognition result of the speech to be recognized.

[0116] Specifically, the specific implementation method of the processor 40 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0117] Furthermore, if the module / unit integrated in the electronic device 4 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0118] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0119] Acquire a speech to be recognized, and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features;

[0120] Performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result;

[0121] Detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre characteristics;

[0122] Determining whether the abnormal character conforms to a preset semantic scenario;

[0123] If the abnormal character conforms to the preset semantic scenario, the speech recognition result is used as the final recognition result of the speech to be recognized;

[0124] If the abnormal character does not conform to the preset semantic scenario, a replacement character for the abnormal character is selected from a preset character table to update the speech recognition result to obtain a final recognition result of the speech to be recognized.

[0125] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0126] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0128] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0129] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0130] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0131] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A speech recognition method based on semantic scenes, characterized in that: The method comprises: Acquiring a speech to be recognized and analyzing audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features; Performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result; Detecting abnormal characters in the speech recognition result using a semantic recognition model based on the timbre characteristics; Determining whether the abnormal character conforms to a preset semantic scenario; If the abnormal character conforms to the preset semantic scenario, the speech recognition result is used as the final recognition result of the speech to be recognized; If the abnormal character does not conform to the preset semantic scenario, a replacement character for the abnormal character is selected from a preset character table to update the speech recognition result to obtain a final recognition result of the speech to be recognized; The detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre feature includes: Locating abnormal audio regions in the speech recognition results based on the timbre features; Inputting the abnormal audio region into the semantic recognition model to detect semantic information of the abnormal audio region through an attention mechanism in the semantic recognition model; identifying abnormal characters in the abnormal audio region using a classification network in the semantic recognition model according to the semantic information; Detecting the semantic information of the abnormal audio region by using the attention mechanism in the semantic recognition model includes: Using the encoding layer in the attention mechanism to encode the position vector of each character in the abnormal audio area to obtain an encoded character; Using the encoder in the attention mechanism to extract features of the encoded characters to obtain feature encoded characters; Using the decoder in the attention mechanism to sequentially decode the feature-encoded characters to obtain character sequence information; According to the character sequence information, the forward network in the attention mechanism is used to output the semantic information of the abnormal audio region.

2. The method for speech recognition based on semantic scenes according to claim 1, wherein: The analyzing the audio features of the speech to be recognized includes: Preprocessing the speech to be recognized, and performing short-time Fourier transform on the preprocessed speech to be recognized to obtain a spectrogram of the speech to be recognized; Performing Mel-spectrogram filtering on the spectrogram, and performing cepstrum analysis on the spectrogram after Mel-spectrogram filtering to obtain a Mel-spectrogram of the speech to be recognized; Identify the acoustic features and timbre features in the mel-spectrogram to obtain the audio features of the speech to be recognized.

3. The method for speech recognition based on semantic scenes according to claim 1, wherein: The method of performing speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result includes: Calculating the phoneme sequence probability of the acoustic feature using the acoustic model in the speech recognition model; Calculating the text sequence of the acoustic features using the language network of the speech recognition model according to the phoneme sequence probability; A speech recognition result of the speech to be recognized is generated according to the text sequence.

4. The method for speech recognition based on semantic scenes according to claim 1, wherein: The locating the abnormal character region in the speech recognition result according to the timbre feature includes: Identifying the audio sequence of the speech recognition result, and identifying the timbre sequence of the speech recognition result based on the timbre feature; When the audio sequence is inconsistent with the timbre sequence, an abnormal audio region in the speech recognition result is located.

5. The method for speech recognition based on semantic scenes according to claim 1, wherein: The determining whether the abnormal character conforms to a preset semantic scenario includes: Obtaining an abnormal position of the abnormal character, and identifying semantic information of the abnormal character according to the abnormal position; Matching the semantic information with the preset semantic scene; If the semantic information fails to match the preset semantic scenario, the abnormal character does not conform to the preset semantic scenario; If the semantic information successfully matches the preset semantic scenario, the abnormal character conforms to the preset semantic scenario.

6. A speech recognition device based on semantic scenes, characterized in that: The device comprises: An audio feature analysis module, configured to obtain a speech to be recognized and analyze the audio features of the speech to be recognized, wherein the audio features include acoustic features and timbre features; A speech recognition module, configured to perform speech recognition on the acoustic features using a speech recognition model to obtain a speech recognition result; An abnormal character recognition module, configured to detect abnormal characters in the speech recognition result using a semantic recognition model based on the timbre characteristics; A semantic scene judgment module is used to judge whether the abnormal character conforms to a preset semantic scene; A recognition result generating module, configured to use the speech recognition result as the final recognition result of the speech to be recognized when the abnormal character conforms to the preset semantic scenario; The recognition result generating module is further configured to select a replacement character for the abnormal character from a preset character table when the abnormal character does not conform to the preset semantic scenario, so as to update the speech recognition result and obtain a final recognition result of the speech to be recognized; The detecting abnormal characters in the speech recognition result using a semantic recognition model according to the timbre feature includes: Locating abnormal audio regions in the speech recognition results based on the timbre features; Inputting the abnormal audio region into the semantic recognition model to detect semantic information of the abnormal audio region through an attention mechanism in the semantic recognition model; identifying abnormal characters in the abnormal audio region using a classification network in the semantic recognition model according to the semantic information; Detecting the semantic information of the abnormal audio region by using the attention mechanism in the semantic recognition model includes: Using the encoding layer in the attention mechanism to encode the position vector of each character in the abnormal audio area to obtain an encoded character; Using the encoder in the attention mechanism to extract features of the encoded characters to obtain feature encoded characters; Using the decoder in the attention mechanism to sequentially decode the feature-encoded characters to obtain character sequence information; According to the character sequence information, the forward network in the attention mechanism is used to output the semantic information of the abnormal audio region.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the semantic scene-based speech recognition method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the semantic scene-based speech recognition method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and equipment for inputting texts in target application according to voice input information

    CN103699530A

  • Object recognition using multi-modal matching scheme

    CN104246796A

  • Voice detection method and device, and equipment

    CN107886951A

  • Voice call quality detection method, server and storage medium

    CN110197672A

  • Document modification method and device based on voice recognition and computer equipment

    CN111128160A