A speech recognition method

By using multiple rescoring language models in voice interaction scenarios, and dividing them into multiple sub-models for rescoring based on the voice interaction scenario and context, the problem of weak targeting of language models in existing technologies is solved, and efficient speech recognition is achieved.

CN116403573BActive Publication Date: 2025-11-04HUBEI QIGUANG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310064142.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-11
Publication Date
2025-11-04
Estimated Expiration
2043-01-11

AI Technical Summary

Technical Problem

Existing language models are not very targeted in recognizing new speech content, and the computational load is large, resulting in insufficient efficiency and recognition accuracy.

Method used

Multiple rescoring language models are adopted, which are divided into multiple sub-models according to the voice interaction scenario and context. The second language model of the target intent domain is used for rescoring, which reduces the amount of computation and improves the recognition accuracy.

Benefits of technology

While ensuring the accuracy of speech recognition, the recognition efficiency has been improved and the amount of computation has been reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116403573B_ABST
    Figure CN116403573B_ABST
Patent Text Reader

Abstract

The application provides a speech recognition method, which comprises: obtaining feature data of audio to be recognized; inputting the feature data into an acoustic model to obtain a time sequence label matrix corresponding to the feature data; decoding the time sequence label matrix through a first language model to obtain a plurality of decoding paths and corresponding probability scores thereof, and determining the decoding paths with the top N probability scores as N first decoding results, wherein N is a positive integer; determining a corresponding target intent field based on the N first decoding results, a previous round of speech interaction field and a current scene field; determining a corresponding second language model based on the target intent field, re-computing probability values of the decoding paths with the top N probability scores through the second language model, and generating second decoding results; and determining a speech recognition result of the audio to be recognized based on the second decoding results. The application improves the recognition efficiency while ensuring the speech recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of speech recognition, in particular to a speech recognition method. BACKGROUND

[0002] In the existing speech interaction scene, such as the car speech interaction scene, the navigation and music are two widely used vertical domains. Since the number of points of interest of the navigation and the song names and singer names of the music multimedia is quite large, a language model needs to be used to recognize the user voice, and then provide the corresponding voice service for the user.

[0003] However, when the existing language model performs speech recognition, the same language model is still used to decode and process different new voice contents (such as new place names and new music names) in the scene, which leads to that the recognition of the language model is not strong in pertinence, the calculation amount is large, and the efficiency and the recognition accuracy still need to be further improved. SUMMARY

[0004] In view of the problems in the prior art, the present application provides a speech recognition method.

[0005] In a first aspect, an embodiment of the present application provides a speech recognition method, comprising:

[0006] obtaining feature data of to-be-recognized audio;

[0007] inputting the feature data into an acoustic model to obtain a time sequence label matrix corresponding to the feature data;

[0008] decoding the time sequence label matrix through a first language model to obtain a plurality of decoding paths and corresponding probability scores of the decoding paths, and determining the decoding paths with the top N probability scores as N first decoding results, wherein N is a positive integer;

[0009] determining a corresponding target intent domain based on the N first decoding results, a previous round of voice interaction domain and a current scene domain;

[0010] determining a corresponding second language model based on the target intent domain, and recalculating the probability values of the decoding paths with the top N probability scores through the second language model to generate second decoding results;

[0011] determining a speech recognition result of the to-be-recognized audio based on the second decoding results.

[0012] In some embodiments, the first language model is a unigram language model or a bigram language model, the second language model is a bigram language model or a multi-gram language model, and the order of the second language model is greater than that of the first language model.

[0013] In some embodiments, the acoustic model is trained by sample feature data labeled with character tags, wherein the sample feature data is filter bank features;

[0014] The inputting of the feature data into the acoustic model to obtain the time sequence tag matrix corresponding to the feature data comprises:

[0015] The inputting of the feature data of the audio to be recognized into the acoustic model obtains the character and character probability corresponding to the feature data of each frame;

[0016] Based on the time sequence relationship of each frame of audio of the audio to be recognized, the time sequence tag matrix corresponding to the feature data is constructed based on the character and the character probability.

[0017] In some embodiments, the algorithm in the first language model is any one of a greedy algorithm, a beam search algorithm, a prefix beam search algorithm, and a weighted prefix beam search algorithm.

[0018] In some embodiments, the determination of the corresponding target intent domain based on the N first decoding results, the last round of voice interaction domain, and the current scene domain comprises:

[0019] Based on the acquisition approach of the audio to be recognized, the current scene domain and the last round of voice interaction scene domain are acquired;

[0020] Based on the N first decoding results, N candidate intent domains are acquired, which comprises inputting the N first decoding results into the trained intent recognition model to obtain the N candidate intent domains corresponding to the audio to be recognized and the probability score of each candidate intent domain;

[0021] According to the relationship among the current scene domain, the last round of voice interaction scene domain, and the N candidate intent domains, the target intent domain is determined.

[0022] In some embodiments, the determination of the target intent domain according to the relationship among the current scene domain, the last round of voice interaction scene domain, and the N candidate intent domains comprises:

[0023] According to the probability score of the N first decoding results, the N candidate intent domains are sequentially compared with the current scene domain and the last round of voice interaction scene domain to determine the target intent domain, specifically comprising:

[0024] The first of the N candidate intent domains that is the same as the domain type of the previous round of voice interaction scene domain and the current scene domain, or the first that is the same as the domain type of the current scene domain, or the first that is the same as the domain type of the previous round of voice interaction scene domain, is determined as the target intent domain.

[0025] In some embodiments, the target intent domain is navigation, the second language model corresponding to the target intent domain is determined based on the target intent domain, the probability values of the top N decoding paths of the probability scores are recalculated through the second language model, a second decoding result is generated, and the speech recognition result of the audio to be recognized is determined based on the second decoding result, and the method further includes:

[0026] Determining that the speech and the context contain one or more cities;

[0027] Rescoring on the language model of the one or more cities to obtain a high score as a rescoring result.

[0028] In some embodiments, the determining the speech recognition result of the audio to be recognized based on the second decoding result further includes:

[0029] Setting a first weight value for the first decoding result and a second weight value for the second decoding result;

[0030] Determining the speech recognition result of the audio to be recognized based on the first decoding result, the first weight value, the second decoding result, and the second weight value.

[0031] In a second aspect, the embodiments of the present application further provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the speech recognition method of any one of the first aspect when executing the program.

[0032] In a third aspect, the embodiments of the present application further provide a non-transitory computer readable storage medium having a computer program stored thereon, and the computer program is executable by a processor to implement the speech recognition method of any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0034] Figure 1A hardware structure diagram of a terminal device mobile phone is provided for an embodiment of the present application.

[0035] Figure 2 A software structure block diagram of a terminal device mobile phone is provided for an embodiment of the present application.

[0036] Figure 3 A flowchart of a voice recognition method is provided for an embodiment of the present application.

[0037] Figure 4 An extraction process diagram of audio feature data is provided for an embodiment of the present application.

[0038] Figure 5 A structure diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work, fall within the scope of protection of the present application.

[0040] In the current vehicle-mounted voice interaction and mobile terminal (such as a mobile phone) interaction scenarios, navigation applications and music applications are relatively widespread vertical domains. Since the number of points of interest of navigation, song names and singer names of music multimedia is relatively large, and new locations and new songs emerge in an endless stream, it is necessary to frequently update the language model in the voice recognition process to improve the efficiency and accuracy of the language model in the decoding process. However, the existing language model has the following problems: the influence of model size on calculation efficiency and accuracy, that is, a language model with a large structure size has a high accuracy for voice recognition, but has a large calculation amount and occupies a large memory space; and a language model with a small structure size has a small calculation amount, but the accuracy is relatively low. Even if the language model is segmented and secondary decoding is performed, there is still a contradiction between model size, calculation amount and accuracy.

[0041] In the current vehicle-mounted voice interaction and mobile terminal (such as a mobile phone) voice interaction scenarios, most voice interaction scenarios have context-related information, that is, most of the user interactions are in a known sub-scenario. For example, in a user navigation interaction, the user generally selects a destination, plans a route, and inquires about surrounding information. Or, in a user train ticket booking, the user needs to go through several rounds of voice interaction to inquire about the departure place, destination, departure time, and train type, and at this time, the corresponding interface is also displayed to the user, so that the current business scenario in which the user is located can be determined. Therefore, the embodiment of the present application provides a voice recognition method, in which the re-scoring language model (i.e., the second language model) in the secondary decoding process is divided into multiple sub-models according to the vertical domain (such as the navigation domain, the weather domain, the music domain, and the license plate domain). The re-scoring language model needed by the current vertical domain is determined according to the semantic context. Compared with the prior art in which only one re-scoring language model is used, multiple re-scoring language models are used, and each re-scoring language model only needs to recognize the voice in its own vertical domain, thereby improving the recognition efficiency and reducing the computational amount on the premise of ensuring the voice recognition accuracy. It should be noted that the re-scoring language model (i.e., the second language model) in the embodiment of the present application is not limited to the sub-models divided according to the vertical domain. In some embodiments, in a specific application domain, the re-scoring language model (i.e., the second language model) can also be sub-models subdivided according to some characteristics of the application domain. For example, in a navigation scenario, the re-scoring language model can be sub-models established according to cities. If the voice and the context contain city names (city A and / or city B), the re-scoring language model can be a city-based language model (city A and / or city B). Therefore, in a navigation scenario, if the voice and the context contain one or more cities, an embodiment of the present application can re-score on the language model of the one or more cities, and the result with the highest score is taken as the re-scoring result.

[0042] The voice recognition method provided by the embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and the like. The voice recognition method can also be applied to databases, servers, and service response systems based on terminal artificial intelligence. The embodiment of the present application does not limit the specific type of the terminal device.

[0043] For example, the terminal device can be a station (STATION, STA) in a WLAN, can be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device having wireless communication function, a computing device or other processing device connected to a wireless modem, a computer, a laptop, a handheld communication device, a handheld computing device, and / or other equipment for communicating over a wireless system and next generation communication system, such as a mobile terminal in a 5G network, a mobile terminal in a future evolved public land mobile network (PLMN), or a mobile terminal in a future evolved non-terrestrial network (NTN), etc.

[0044] By way of example and not limitation, when the terminal device is a wearable device, the wearable device can also be a general term of devices that apply wearable technology to intelligently design daily wear and develop wearable devices, such as gloves, watches, etc. configured with a near field communication module. The wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories, performs payment, authentication, etc. through the attached and pre-bound electronic card. The wearable device is not only a hardware device, but also realizes powerful functions through software support and data interaction, cloud interaction. The general wearable smart device includes a full function, large size, and can realize complete or partial functions without relying on a smart phone, such as a smart watch or smart glasses, etc., and only focuses on a certain application function and needs to cooperate with other devices such as a smart phone, such as various smart watches with a display screen, smart bracelets, etc.

[0045] In the embodiment, the terminal device described above can be a mobile phone 100 with a hardware structure as shown in Figure 1 As shown in Figure 1 The mobile phone 100 can specifically include a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a short-distance wireless communication module 170, a processor 180, and a power supply 190, etc. Those skilled in the art can understand that the structure of the mobile phone 100 shown in Figure 1 The structure of the mobile phone 100 shown in the embodiment does not constitute a limitation on the terminal device, and the terminal device can include more or fewer components than shown, or combine certain components, or different component arrangements.

[0046] The following will be described in detail Figure 1 The specific components of the mobile phone are introduced as follows:

[0047] The RF circuit 110 can be used for receiving and sending signals in the process of information or communication, in particular, receiving the downlink information of the base station and processing it by the processor 180; in addition, sending the uplink data to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 110 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, and the wireless communication can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), new radio (NR), GNSS, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), BeiDou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), satellite based augmentation systems (SBAS), etc.

[0048] The memory 120 can be used to store software programs and modules, and the processor 180 can execute various function applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120. The memory 120 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), and the like. In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Specifically, the memory 120 can store an application program.

[0049] The input unit 130 can be used to receive inputted digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone 100. Specifically, the input unit 130 can include a touch panel 131 and other input devices 132. The touch panel 131, also called a touch screen, can collect a user's touch operation (such as the user's operation on or near the touch panel 131 using a finger, a stylus, or any suitable object or accessory) and drive the corresponding connection device according to the pre-set program. Optionally, the touch panel 131 can include two parts of a touch detection device and a touch controller. The touch detection device detects the touch position of the user and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch coordinates, and sends it to the processor 180, and can also receive the command from the processor 180 and execute it. In addition, the touch panel 131 can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. In addition to the touch panel 131, the input unit 130 can also include other input devices 132. Specifically, the other input devices 132 can include one or more of a physical keyboard, a function key (such as a volume control key, an on-off key, etc.), a trackball, a mouse, a joystick, and the like.

[0050] The display unit 140 can be used to display information input by a user or provided to the user as well as various menus of the mobile phone. The display unit 140 can include a display panel 141, which can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, a touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation thereon or nearby, it transmits to the processor 180 to determine the type of touch event, and then the processor 180 provides corresponding visual output on the display panel 141 according to the type of touch event. Although in the above description, the touch panel 131 and the display panel 141 are implemented as two independent components to realize the input and output functions of the mobile phone, in some embodiments, the touch panel 131 and the display panel 141 can be integrated to realize the input and output functions of the mobile phone. Figure 1

[0051] The mobile phone 100 can further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 141 and / or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and when at rest, it can detect the magnitude and direction of gravity, which can be used for applications such as identifying the posture of the mobile phone (such as switching between landscape and portrait, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like. As for other sensors that the mobile phone can also be configured, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, they will not be described here. Optionally, the mobile phone can obtain the measurement values of various sensors through a learning algorithm when the user performs a card swiping action, so as to determine in advance whether the user needs to perform a card swiping operation before the mobile phone approaches the card swiping device, and collect the current scene information to determine the scene type, thereby further improving the selection efficiency of the electronic card.

[0052] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone. The audio circuit 160 can convert received audio data into an electrical signal and transmit it to the speaker 161, which converts the electrical signal into a sound signal for output. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data. The audio data is then output to the processor 180 for processing, and then transmitted to another mobile phone via the RF circuit 110, or output to the memory 120 for further processing.​

[0053] Wi-Fi, Bluetooth and Near Field Communication (NFC) are short-range wireless communication technologies. The short-range wireless module 170 can help the user to send and receive emails, browse web pages, and access streaming media, and provides the user with wireless broadband Internet access. The short-range wireless module 170 can include a Wi-Fi chip, a Bluetooth chip, and an NFC chip. The Wi-Fi chip can enable the mobile phone 100 to connect to other terminal devices through Wi-Fi Direct, and can also enable the mobile phone 100 to work in an AP mode (Access Point mode) that can provide wireless access services and allow other wireless devices to access, or work in an STA mode (Station mode) that can be connected to an AP that does not accept wireless device access, thereby establishing point-to-point communication between the mobile phone 100 and other Wi-Fi devices.

[0054] The processor 180 is the control center of the mobile phone, which connects all parts of the mobile phone through various interfaces and lines, executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 120 and calling data stored in the memory 120, and thus monitors the mobile phone as a whole. Optionally, the processor 180 can include one or more processing units; optionally, the processor 180 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 180.

[0055] The mobile phone 100 further includes a power supply 190 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 180 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0056] The mobile phone 100 can further include a camera. Optionally, the camera can be front-mounted or rear-mounted, and the embodiments of the present application do not limit the position of the camera on the mobile phone.

[0057] The software system of the mobile phone 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily illustrate the software structure of the mobile phone 100.

[0058] Figure 2This is a software structure block diagram of a mobile phone 100 according to an embodiment of this application. The Android system is divided into four layers: the application layer, the application framework layer (FWK), the system layer, and the hardware abstraction layer. The layers communicate with each other through software interfaces.

[0059] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0060] The application layer can include a series of application packages.

[0061] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0062] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes a set of predefined functions.

[0063] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0064] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0065] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0066] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0067] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0068] The resource manager provides applications access to various resources, such as localized strings, icons, pictures, layout files, video files, and so on.

[0069] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational type messages that can automatically disappear after a brief stay without user interaction. For example, the notification manager is used to inform of download completion, message reminders, and so on. The notification manager can also be a notification that appears in the form of a graphic or scrolling text in the status bar at the top of the system, such as a notification of an application running in the background, or a notification that appears in the form of a dialog window on the screen. For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, an indicator light flashes, and so on.

[0070] The Android runtime includes the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0071] The core libraries include two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.

[0072] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection and so on.

[0073] The system library can include multiple functional modules. For example: the surface manager, the media library, the three-dimensional graphics processing library (for example: OpenGL ES), the 2D graphics engine (for example: SGL), and so on.

[0074] The surface manager is used to manage the display subsystem, and provides the fusion of 2D and 3D layers for multiple applications.

[0075] The media library supports multiple commonly used audio, video format playback and recording, and static image files and so on. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and so on.

[0076] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and so on.

[0077] The 2D graphics engine is a drawing engine for 2D drawing.

[0078] The kernel layer is a layer between hardware and software. The kernel layer at least includes display drivers, camera drivers, audio drivers, and sensor drivers. In some embodiments, the kernel layer also includes a PCIE driver.

[0079] In the embodiments of the present application, the voice recognition method provided by the present application is described by taking the vehicle terminal as an execution subject. It should be noted that the above execution subject does not constitute a limitation on the present application.

[0080] Figure 3 The flowchart of the voice recognition method provided by an embodiment of the present application is shown in FIG. 1. The embodiment of the present application provides a voice recognition method, and the method flow steps are only used as a possible implementation manner of the present application, and include the following steps. Figure 3

[0081] Step 301: Obtain feature data of audio to be recognized.

[0082] In the embodiments of the present application, the audio to be recognized of the user can be obtained through the vehicle voice system. It should be noted that in different scenarios, the user starts the corresponding application program (Application, APP for short) according to the application demand, such as the navigation program and the music playing program, and then obtains the corresponding audio to be recognized through these application programs. For example, after the user starts the navigation program, the user asks for the route of the navigation destination, so that the vehicle voice system obtains the inquiry sentence, and then generates the corresponding answer sentence to perform voice interaction with the user. In the present application, the audio to be recognized can be pulse code modulation (PCM) audio or WAV data, and the audio sampling rate is generally 16000hz, the bit width is 16bit, and the single channel.

[0083] Further, in an embodiment, the feature extraction is performed on the audio to be recognized, and the FBANK voice feature data is calculated from the audio to be recognized in the present embodiment, which is used as the input of the subsequent voice recognition acoustic model. The FBANK voice feature data is obtained by summing the amplitude square of the power spectrum of the mel filter and then taking the logarithm, which is one step less than the mel frequency cepstral coefficients (MFCC) discrete cosine transform, which can improve the feature extraction efficiency.

[0084] Step 302: Input the feature data into an acoustic model to obtain a time sequence label matrix corresponding to the feature data.

[0085] ​In the embodiment of the present application, the FBANK features obtained in the above embodiment are input into the acoustic model, the mapping of the FBANK features to characters is realized through the acoustic model, so as to obtain the characters corresponding to each frame of FBANK features output by the acoustic model and the probability of the characters corresponding to each frame of FBANK features, so as to construct a time sequence label matrix. For example, 16 frames of FBANK feature data, and 5000 characters output by the acoustic model, the acoustic model output matrix is [16, 5000]. It should be noted that in the embodiment of the present application, the acoustic model is obtained by training a neural network (for example, based on a Transformer network) based on the sample FBANK features labeled with character labels.

[0086] In step 303, the time sequence label matrix is decoded through the first language model to obtain a plurality of decoding paths and corresponding probability scores, and the decoding paths with top N probability scores are determined as N first decoding results, where N is a positive integer.

[0087] In the embodiment of the present application, the time sequence label matrix obtained in the above embodiment is input into the first language model, and the first language model is decoded to obtain n decoding path results N-best list, that is, n optimal decoding path word graphs are obtained. The final decoding path word graph is determined after re-scoring by the subsequent corresponding second language model.

[0088] In some embodiments, the first language model is a unigram language model or a bigram language model, the second language model is a bigram language model or a multi-gram language model, and the order of the second language model is greater than that of the first language model.

[0089] In the embodiments of the present application, the accuracy and the structure size of the language model are mainly determined by the Grammar model, wherein the Grammar model is generated from a plurality of sentences and has the dependency relationship between words. In the speech recognition system in the actual scene, the language model HCLG (wherein H represents the mapping of the acoustic model to the state; C represents the context correlation, the mapping of the state to the triphone; L represents the lexicon dictionary mapping; and G represents the grammar model, the dependency mapping between the continuous words in a sentence) includes a first language model and a plurality of second language models. The structure size of the Grammar model in the first language model is relatively small, the calculation amount is small, although the speech recognition accuracy is not high, but the decoding process can be completed relatively quickly, for example, ngram-1 (also known as 1-gram or unigram language model); the language model G2 model used in the second language model re-scoring process is a complete large language model, for example, ngram-2 (also known as 2-gram or bigram language model) or ngram-3 (also known as 3-gram or multi-gram language model), and the speech recognition accuracy is high. It should be noted that the ngram-1 model calculates the probability score of each word without considering the relationship before and after; the ngram-2 model considers the probability score of the previous word; and the ngram-3 model considers the probability score of the previous two words. Please refer to Table 1:

[0090] Table 1

[0091] ngram-1 ngram-2 ngram-3 Model size space Small Medium Large Model computation Small Medium Large Recognition accuracy Low Medium High

[0092] Further, in the embodiments of the present application, when the unigram language model is used to decode the time sequence label matrix, the second language model can be a bigram language model or a trigram language model; and when the first language model uses a bigram model, the second language model is a trigram language model or a language model with a higher order, that is, it is necessary to ensure that the order of the second language model is greater than that of the first language model. Among them, the decoding method can use greedy search, beam search and prefix beam search.

[0093] Step 304, determining the corresponding target intent field based on the N first decoding results, the last round of voice interaction field and the current scene field;

[0094] Step 305, determining the corresponding second language model based on the target intent field, and re-computing the probability value of the decoding path with the top N probability scores through the second language model to generate a second decoding result;

[0095] Step 306, determining the speech recognition result of the audio to be recognized based on the second decoding result.

[0096] In the embodiment of the present application, the multiple decoding path results obtained in the above embodiment are subjected to intent recognition through a trained intent recognition model, so as to obtain all relevant intent domains corresponding to the audio to be recognized, including intent type, word slot and state information. Then, the current scene domain of the audio to be recognized (i.e. the scene domain at the time when the audio is generated, for example, obtained through a navigation APP or a music APP) and the context scene domain (determined based on the interaction process between the user and the speech recognition system in the last round, for example, in the last round of interaction, the user inquires about the weather, and the scene domain in the last round is the weather query domain) are combined, so as to accurately determine the target intent domain corresponding to the audio to be recognized, so as to determine the subsequent re-scoring model according to the target intent domain.

[0097] Further, after the target intent domain is determined, a second language model corresponding to the target intent domain can be selected. In the embodiment of the present application, the second language model is pre-trained according to different intent domains in the early stage, for example, a second language model for the navigation domain, a second language model for the music domain, etc., and each second language model is constructed through a multi-lingual model, an ngram-2 model or an ngram-3 model. Since different second language models only need to be trained for sample data of respective domains in the training process, the huge re-scoring language model in the previous secondary decoding process is divided into multiple language models for sub-businesses, and different re-scoring language models are selected according to the result of context semantic understanding, so that the model only needs to re-score the decoding path result of the current intent domain after being trained, thereby reducing the amount of calculation while ensuring the language recognition accuracy.

[0098] The embodiment of the present application provides a speech recognition method, which divides the re-scoring language model in the secondary decoding process into multiple second language models according to different intent domains, so as to determine the target re-scoring language model through semantic context, so that each re-scoring language model only needs to recognize the speech in the vertical domain of itself, thereby improving the recognition efficiency while ensuring the speech recognition accuracy.

[0099] It should be noted that each embodiment of the present application can be freely combined, the order can be changed or each embodiment can be executed independently, and does not need to rely on or depend on a fixed execution order.

[0100] In some embodiments, the feature data of the audio to be recognized is obtained, including:

[0101] The audio to be recognized is preprocessed to obtain preprocessed audio to be recognized, wherein the preprocessing includes signal enhancement processing, framing processing and windowing processing.

[0102] performing Fourier transform on the preprocessed audio to be recognized to obtain spectral information;

[0103] extracting the spectral information according to a preset dimension through a Mel filter to obtain feature data of the audio to be recognized.

[0104] Figure 4 An audio feature data extraction process diagram is provided for an embodiment of the present application, which can be referred to as shown in Figure 4 In the embodiment of the present application, the audio file (i.e., the audio to be recognized) is pre-emphasized through step 401, thereby enhancing the high-frequency signal; then, the enhanced audio signal is framed and windowed through steps 402 and 403, wherein the framing process separates the audio signal according to 10 ms per frame to prevent information loss between 2 frames, 25 ms of signal is used to calculate the feature each time, that is, 10 ms is moved each time, and 25 ms of signal is actually used; then, the time domain signal is converted into the frequency domain signal (i.e., the spectrum) through Fourier transform through step 404; further, the power spectrum is taken through step 405, the amplitude square is taken through step 406, the Mel filter bank mapping is taken through step 407, and the logarithm is taken through step 408, so that after obtaining the spectrogram in the frequency domain at a certain time, the frequency is mapped to the Mel frequency scale through the Mel filter bank, and finally the FBANK feature is obtained by taking the logarithm, that is, the feature data of the audio to be recognized is obtained. It should be noted that in the embodiment, the Mel filter bank generally takes 80, that is, 80 outputs correspond to each frame of audio. In actual speech recognition, multiple frames of audio can be used together as an identification input, and through streaming recognition, the decoding process does not have to wait until the entire recording is completed, so that speech recognition is continuously performed during user speech.

[0105] In some embodiments, the acoustic model is obtained by training a neural network using sample feature data labeled with character tags, wherein the sample feature data is filter bank features;

[0106] The feature data is input into the acoustic model to obtain a time sequence label matrix corresponding to the feature data, including:

[0107] The feature data of the audio to be recognized is input into the acoustic model to obtain a character and a character probability corresponding to each frame of feature data;

[0108] Based on the time sequence relationship of each frame of audio of the audio to be recognized, the character and the character probability are used to construct a time sequence label matrix corresponding to the feature data.

[0109] In the embodiments of the present application, the acoustic model is constructed by a neural network, for example, based on a Transformer network, and is trained by sample speech feature data labeled with character tags, so as to obtain a trained acoustic model. In an embodiment of the present application, end-to-end speech recognition is adopted, and the acoustic modeling unit is based on sample FBANK features, and the output label is the corresponding character. In another embodiment, the acoustic model can also be obtained based on phoneme modeling, such as Kaldi, the acoustic modeling unit is MFCC features (the cepstrum parameters extracted in the Mel scale frequency domain, which is a feature widely used in automatic speech and speaker recognition), and the output label is the state of the Gaussian mixture model.

[0110] In some embodiments, the algorithm in the first language model is any one of a greedy algorithm, a beam search algorithm, a prefix beam search algorithm, and a weighted prefix beam search algorithm.

[0111] In the embodiments of the present application, different decoding methods can be applied to the first language model according to actual needs, and Table 2 shows the details:

[0112] Table 2

[0113]

[0114] In the embodiments of the present application, the third Vitbi static decoding method with a weighted finite state transducer (WFST) is adopted to decode in the first language model and the second language model respectively, to realize two decoding processes, that is, to divide the language model into a small model HCLG small and a large model G big , find N optimal decoding paths on the small model HCLG small , and select a target decoding path on the corresponding large model G big (that is, re-score by the second language model of the current intent domain).

[0115] Further, in the embodiments of the present application, the language model can be decoded by various algorithms, and preferably, in an embodiment, the prefix beam search algorithm with a weighted finite state transducer (WFST prefix beam search) is adopted to realize the decoding process.

[0116] Optionally, in the embodiments of the present application, when the greedy algorithm is adopted for decoding, the character with the maximum probability is retained at each step, although the algorithm is simple, but the accuracy is reduced. In an embodiment, the probabilities corresponding to different frames in Table 3 can be referred to:

[0117] Table 3

[0118] T1 T2 T3 blank 0.5 0.4 0.6 A 0.2 0.3 0.3 B 0.3 0.3 0.1

[0119] In Table 3, T1, T2 and T3 respectively correspond to the probabilities of character labels of 3 different frames, wherein the labels are blank label, A label and B label respectively. When all the blank labels are selected at the three time points, the 3 frames are all blank, and the probability of the entire decoding path, i.e., the product of all label probabilities, is 0.5*0.4*0.6=0.12.

[0120] If the A label is selected, there are three combination paths of “A--”, “--A” and “-A-”, wherein “-” represents the blank label. At this time, the probability of the A label is the sum of the probabilities of the three paths, i.e., 0.09+0.048+0.06=0.198, which is greater than the probability of all blank labels 0.12. Similarly, the probability of the B label is calculated, and finally it is determined that the probability of the A label is the largest, that is, the greedy search decoding result is A.

[0121] In another embodiment, when the beam search algorithm is used, the maximum probability at each time point is selected, but the purpose of the Connectionist Temporal Classification (CTC) decoding based on the neural network is to select the route with the maximum probability, and the two are not always consistent. The beam search algorithm is just to deal with this inconsistency, and each time N optimal routes are maintained, instead of using the character with the maximum probability at the current time point. Here, N is a hyperparameter. The decoding calculation amount is larger when the beam search algorithm is used, but the result is more accurate.

[0122] In one embodiment, when the prefix beam search algorithm is used, N branches with the maximum probability are retained at each step by prefix beam search, and if it is found that the time nodes that have been processed before have the same route, they are merged, which is equivalent to increasing the diversity. Compared with the beam search algorithm decoding, the prefix beam search algorithm has higher decoding accuracy.

[0123] Preferably, in an embodiment of the present application, the prefix beam search algorithm with a weighted finite state transducer is used for decoding. In the decoding process, in addition to satisfying the characteristics of the prefix beam search algorithm in the above embodiment, the weight is also considered each time the jump is made. This weight is generated when the language model is created. For example, the probability of the continuous three characters “I”, “want” and “eat” forming a sentence is greater than the probability of “want”, “eat” and “I”. This is because the probability of the word “eat” following “I” and “want” is greater, that is, the jump weight is greater, and the decoding path is better.

[0124] In some embodiments, the determining the corresponding target intent domain based on the N first decoding results, the last round of voice interaction domain and the current scene domain comprises:

[0125] Based on the acquisition approach of the to-be-recognized audio, the current scene domain and the last round of voice interaction scene domain are acquired;

[0126] Based on the N first decoding results, N candidate intent domains are acquired, which comprises inputting the N first decoding results into a trained intent recognition model to obtain N candidate intent domains corresponding to the to-be-recognized audio and probability scores of each candidate intent domain;

[0127] According to the relationship among the current scene domain, the last round of voice interaction scene domain and the N candidate intent domains, the target intent domain is determined.

[0128] In the embodiments of the present application, based on the multiple decoding path results acquired by the first language model, a trained intent training model can be used to obtain multiple corresponding intent recognition results. In the training process, the trained intent recognition model can more accurately recognize the intent corresponding to the decoding path, based on the sample decoding path graph marked with intent domain labels, and by adding related sample context information and scene domain information in the last round of voice interaction process in the training set. In an embodiment, the intent recognition model performs intent recognition on multiple decoding path results to obtain multiple corresponding intent domains, such as the intent domain "train ticket" (ticket purchase intent), navigation intent and weather query intent, etc.

[0129] Further, according to the acquisition approach of the to-be-recognized audio, for example, the to-be-recognized audio is acquired through a navigation APP in a vehicle-mounted voice system, it can be determined that the current scene domain is a navigation scene domain; or the to-be-recognized audio is acquired through a weather query APP of a mobile terminal, it can be determined that the current scene domain is a weather query scene domain. In addition, based on different acquisition approaches, the last round of voice interaction scene domain before the current to-be-recognized audio is acquired is acquired according to the context information of the user in the voice interaction process, for example, the user said the weather in the last round, and the last round of voice interaction scene domain is a weather query scene domain.

[0130] Further, since the multiple decoding path results decoded by the first language model may all correspond to the intent domain currently required by the user, the intent corresponding to the decoding path result with the highest score probability cannot be directly used as the target intent domain, and the target intent domain needs to be determined from the multiple candidate intent domains in combination with the current scene domain and the last round of voice interaction scene domain, so as to acquire the second language model that can better meet the current voice interaction scene.

[0131] In some embodiments, the determining the target intent domain according to the relationship among the current scene domain, the last round of voice interaction scene domain and the N candidate intent domains comprises:

[0132] According to the probability score of the N first decoding results, the N candidate intent domains are sequentially matched with the current scene domain and the last round of voice interaction scene domain to determine the target intent domain, and the determining specifically comprises:

[0133] The first of the N candidate intent domains which is the same as the last round of voice interaction scene domain and the current scene domain in the domain type, or the first of the N candidate intent domains which is the same as the current scene domain in the domain type, or the first of the N candidate intent domains which is the same as the last round of voice interaction scene domain in the domain type is determined as the target intent domain.

[0134] In an embodiment of the present application, different language models corresponding to different intent domains are first set in advance, which can be referred to Table 4:

[0135] Table 4

[0136]

[0137] According to the semantics corresponding to the decoding path result output by the first language model and the context-related scene domain, a corresponding language model is selected from the above-mentioned multiple second language models, thereby obtaining a G big language model (i.e. target language model). Specifically, in an embodiment, the candidate intent domains are sequentially sorted according to the probability score from high to low, and in the case that the current scene domain and the last round of voice interaction scene domain are consistent, if the candidate intent domain with the highest probability score is also consistent with the current scene domain and the last round of voice interaction scene domain, i.e. the candidate intent domain, the current scene domain and the last round of voice interaction scene domain are all the same scene domain, then the candidate intent domain with the highest probability score can be taken as the target intent domain, and a corresponding G big language model is selected from the multiple second language models; when the candidate intent domain with the highest probability score is not consistent with the current scene domain and the last round of voice interaction scene domain, the candidate intent domain with the second highest probability score is matched with the current scene domain and the last round of voice interaction scene domain, and if they are still not the same, the next candidate intent domain is selected according to the sorting until the target intent domain is determined when the three intent domains are consistent. It should be noted that a preset selection threshold can be set, and when the number of selected candidate intent domains exceeds the preset selection threshold, it is judged that the intent domain of the audio to be recognized cannot be determined at this time, which can be caused by unclear user voice and needs to be asked again.

[0138] In an embodiment, in the case that the current scene field and the last round of voice interaction scene field are inconsistent, only the candidate intent field matching one of the scene fields is required to be determined as the target intent field, for example, the last round of voice interaction scene field is weather query, the current scene field is navigation, and the candidate intent field with the highest probability score is also navigation. It is determined that the user's last round of interaction scene about weather query has ended, and the audio to be recognized issued by the user is about the navigation field.

[0139] In the embodiment of the present application, after the target voice model is determined, the n decoding paths output by the first language model are re-decoded, and the scores of the n decoding paths are recalculated. The re-scoring decoding can also be implemented by using the prefix beam search algorithm with a weighted finite state transducer. Then, the n path scores of the two times of decoding are evaluated to determine the target decoding path word graph. In an embodiment, the second decoding score is usually more accurate than the first decoding score, so the second decoding result can be directly used, that is, the decoding path with the highest second decoding score is taken as the target decoding path, and the corresponding speech recognition result is output.

[0140] Preferably, in another embodiment, the determining the speech recognition result of the audio to be recognized based on the second decoding result further includes:

[0141] setting a first weight value for the first decoding result and a second weight value for the second decoding result;

[0142] determining the speech recognition result of the audio to be recognized based on the first decoding result, the first weight value, the second decoding result and the second weight value.

[0143] In the embodiment of the present application, the score of the first decoding can also be multiplied by a weight w1, and the score of the second decoding is added to the weight w2, and the final result is compared to determine the final decoding path, so that the speech recognition result is more accurate, wherein w2> w1, for example, w2= 0.7 and w1= 0.3.

[0144] In some embodiments, the target intent field is navigation, the determining the corresponding second language model based on the target intent field, the recalculating the probability value of the decoding path with the top N probability scores through the second language model, the generating the second decoding result, and the determining the speech recognition result of the audio to be recognized based on the second decoding result further include:

[0145] determining that the speech and the context contain one or more cities;

[0146] The re-scoring is performed on the language model of the one or more cities, and the one with a high score is taken as the re-scoring result. The existing navigation interest points have regional limitations, and most of the place names are in specific cities or regions. Therefore, the second decoding re-scoring language model of different places (cities) is divided according to the location information, and the related sample data in the location information is combined for training in the model training process, for example, the information such as dialects, landscapes and landmark buildings in different places (cities) is combined, so that the second language model selects the target language model corresponding to different places according to the current geographic coordinates, to improve the experience of the user voice interaction process.

[0147] In the embodiment of the present application, the second language model is further divided by the location information. When there are multiple address statements in the voice interaction process, for example, the navigation starting point and destination, or the train ticket query is the name of the train station in two cities, in such a voice interaction scenario, the decoding path result output by the first voice model is re-scored by the second language model corresponding to the two cities, and finally the one with a high probability score is taken as the re-scoring result, so as to more accurately recognize the user voice.

[0148] The voice recognition system provided by the present application is described below, and the voice recognition system described below can be correspondingly referred to the voice recognition method described above.

[0149] The system provided by the embodiment of the present application is used to execute the above-mentioned method embodiments, and the specific process and detailed content are referred to the above-mentioned embodiments, which will not be described here.

[0150] Figure 5 The structural schematic diagram of the electronic device provided by an embodiment of the present application is shown in Figure 5As shown, the electronic device can include a processor 501, a communications interface 502, a memory 503, and a communications bus 504, wherein the processor 501, the communications interface 502, and the memory 503 complete mutual communication through the communications bus 504. The processor 501 can invoke a logical instruction in the memory 503 to execute a speech recognition method, which includes: obtaining feature data of to-be-recognized audio; inputting the feature data into an acoustic model to obtain a time sequence label matrix corresponding to the feature data; decoding the time sequence label matrix through a first language model to obtain a plurality of decoding paths and corresponding probability scores thereof, determining the decoding paths with top N probability scores as N first decoding results, wherein N is a positive integer; determining a corresponding target intent field based on the N first decoding results, a last round of speech interaction field, and a current scene field; determining a corresponding second language model based on the target intent field, recalculating probability values of the decoding paths with top N probability scores through the second language model, and generating second decoding results; and determining a speech recognition result of the to-be-recognized audio based on the second decoding results.

[0151] In addition, the logical instructions in the memory 503 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0152] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer-readable storage medium, and the computer program comprises program instructions, when the program instructions are executed by a computer, the computer can execute the voice recognition method provided by the above-mentioned methods, and the method comprises the following steps: obtaining feature data of to-be-recognized audio; inputting the feature data into an acoustic model to obtain a time sequence label matrix corresponding to the feature data; decoding the time sequence label matrix through a first language model to obtain a plurality of decoding paths and corresponding probability scores thereof, and determining the decoding paths with top N probability scores as N first decoding results, wherein N is a positive integer; determining a corresponding target intent field based on the N first decoding results, a previous round of voice interaction field and a current scene field; determining a corresponding second language model based on the target intent field, recalculating probability values of the decoding paths with top N probability scores through the second language model, and generating second decoding results; and determining a voice recognition result of the to-be-recognized audio based on the second decoding results.

[0153] In another aspect, the present application also provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the voice recognition method provided by the above-mentioned embodiments, and the method comprises the following steps: obtaining feature data of to-be-recognized audio; inputting the feature data into an acoustic model to obtain a time sequence label matrix corresponding to the feature data; decoding the time sequence label matrix through a first language model to obtain a plurality of decoding paths and corresponding probability scores thereof, and determining the decoding paths with top N probability scores as N first decoding results, wherein N is a positive integer; determining a corresponding target intent field based on the N first decoding results, a previous round of voice interaction field and a current scene field; determining a corresponding second language model based on the target intent field, recalculating probability values of the decoding paths with top N probability scores through the second language model, and generating second decoding results; and determining a voice recognition result of the to-be-recognized audio based on the second decoding results.

[0154] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme. Those skilled in the art can understand and implement without creative labor.

[0155] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and necessary general hardware platforms through the description of the above embodiments, and of course, the implementation can also be through hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments or some parts of the embodiments.

[0156] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some technical features thereof; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A speech recognition method, characterized in that, include: Obtain feature data of the audio to be identified; The feature data is input into the acoustic model to obtain the temporal label matrix corresponding to the feature data; The temporal tag matrix is ​​decoded using a first language model to obtain multiple decoding paths and their corresponding probability scores. The top N decoding paths with the highest probability scores are determined as N first decoding results, where N is a positive integer. Based on the N first decoding results, the corresponding target intent domain is determined with the domain of the previous round of voice interaction and / or the current scenario domain; Based on the target intent domain, a corresponding second language model is determined. Using the second language model, the probability values ​​of the top N decoding paths with the probability scores are recalculated to generate a second decoding result. The speech recognition result of the audio to be recognized is determined based on the second decoding result.

2. The speech recognition method according to claim 1, characterized in that, The first language model is a unary language model or a binary language model, the second language model is a binary language model or a multilingual language model, and the order of the second language model is greater than that of the first language model.

3. The speech recognition method according to claim 1, characterized in that, The acoustic model is obtained by training a neural network with sample feature data labeled with character tags, wherein the sample feature data is filter bank features; The step of inputting the feature data into the acoustic model to obtain the temporal label matrix corresponding to the feature data includes: The feature data of the audio to be identified is input into the acoustic model to obtain the character and character probability corresponding to the feature data of each frame; Based on the temporal relationship of each frame of the audio to be identified, a temporal label matrix corresponding to the feature data is constructed using the characters and their probabilities.

4. The speech recognition method according to claim 1, characterized in that, The algorithm in the first language model is any one of the following: greedy algorithm, bundle search algorithm, prefix bundle search algorithm, and weighted prefix bundle search algorithm.

5. The speech recognition method according to claim 1 or 2, characterized in that, The step of determining the corresponding target intent domain based on the N first decoding results, the previous round of voice interaction domain, and the current scene domain includes: Based on the acquisition method of the audio to be recognized, the current scene domain and the previous round of voice interaction scene domain are obtained; Based on the N first decoding results, N candidate intent domains are obtained, including inputting the N first decoding results into a trained intent recognition model to obtain the N candidate intent domains corresponding to the audio to be recognized, and the probability score of each candidate intent domain; The target intent domain is determined based on the relationship between the current scene domain, the previous voice interaction scene domain, and the N candidate intent domains.

6. The speech recognition method according to claim 5, characterized in that, Determining the target intent domain based on the relationship between the current scene domain, the previous round of voice interaction scene domain, and the N candidate intent domains includes: Based on the probability scores of the N first decoding results, the N candidate intent domains are sequentially compared with the current scene domain and the previous round of voice interaction scene domain to determine the target intent domain, specifically including: The first domain among the N candidate intent domains that has the same domain type as the previous round of voice interaction scenario domain and the current scenario domain, or the first domain that has the same domain type as the current scenario domain, or the first domain that has the same domain type as the previous round of voice interaction scenario domain, is determined as the target intent domain.

7. The speech recognition method according to claim 6, characterized in that, The target intent domain is navigation. The step of determining a corresponding second language model based on the target intent domain, recalculating the probability values ​​of the top N decoding paths based on the second language model, generating a second decoding result, and determining the speech recognition result of the audio to be recognized based on the second decoding result further includes: Determine if the speech and context contain one or more cities; Re-scoring is performed on the language models of one or more cities, and the higher score is taken as the re-scoring result.

8. The speech recognition method according to claim 1, characterized in that, The step of determining the speech recognition result of the audio to be recognized based on the second decoding result further includes: A first weight value is set for the first decoding result, and a second weight value is set for the second decoding result; Based on the first decoding result, the first weight value, the second decoding result, and the second weight value, the speech recognition result of the audio to be recognized is determined.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the speech recognition method as described in any one of claims 1 to 8.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the speech recognition method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Voice recognition method and device and electronic equipment

    CN111816165A

  • Voice recognition method and system based on incremental word graph re-scoring

    CN111916058A