Speech recognition method, device, electronic device and readable storage medium

By processing MP3 compressed audio data through the target audio format automatic detection model and spectrum compensation model, the problem of decreased speech recognition rate is solved and efficient speech recognition is achieved in multiple audio formats.

CN114495942BActive Publication Date: 2025-09-05BEIJING SINOVOICE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210108497.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-28
Publication Date
2025-09-05
Estimated Expiration
2042-01-28

AI Technical Summary

Technical Problem

In the prior art, when MP3-compressed audio data is directly used for speech recognition using a general model, the overall recognition rate of speech recognition decreases.

Method used

By pre-generating the target audio format automatic detection model and spectrum compensation model, the audio data in the target audio format is detected and processed, and after spectrum compensation, the general model is used for speech recognition.

Benefits of technology

It improves the overall recognition rate of speech recognition and provides an accurate and reliable speech recognition method, especially effectively improving the recognition effect in scenarios with multiple audio formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114495942B_ABST
    Figure CN114495942B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device, electronic device, and readable storage medium for speech recognition, and relates to the field of speech recognition technology. The method comprises: detecting the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model; when the target audio format is detected among the audio formats of the plurality of audio data, processing the audio data having the target audio format according to a pre-generated spectrum compensation model to obtain audio data to be processed; and performing speech recognition on the audio data to be processed using a universal model. Applied to scenarios requiring speech recognition, the present invention improves the overall recognition rate of speech recognition in these scenarios by performing spectrum compensation on audio data having the target audio format.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech recognition technology, and in particular to a speech recognition method, device, electronic device, and readable storage medium. Background Art

[0002] Automatic Speech Recognition (ASR) is a technology that studies how to convert human speech into text. It can be applied to services such as voice dialing, voice navigation, indoor equipment control, voice document retrieval, and simple dictation data entry.

[0003] However, during the speech recognition process, audio data compressed by MP3 will be encountered. Since MP3 compresses the spectrum too much, if the MP3-compressed audio data is directly recognized using a general model, the overall recognition rate of speech recognition will decrease. Summary of the Invention

[0004] To overcome the problems existing in the related art, the present application provides a speech recognition method, device, electronic device and readable storage medium.

[0005] According to a first aspect of an embodiment of the present application, a method for speech recognition is provided, the method comprising:

[0006] Detecting the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model;

[0007] When the target audio format is detected among the audio formats of the plurality of audio data, processing the audio data having the target audio format according to a pre-generated spectrum compensation model to obtain audio data to be processed;

[0008] Perform speech recognition on the audio data to be processed using a general model.

[0009] Optionally, before the step of detecting the audio formats of the plurality of audio data according to the pre-generated target audio format automatic detection model, the method further includes:

[0010] Pre-generate the target audio format automatic detection model;

[0011] Generate spectrum compensation models in advance.

[0012] Optionally, the pre-generating a target audio format automatic detection model includes:

[0013] Acquire a first training sample, wherein the first training sample includes a frequency spectrum of audio data whose audio format is not the target audio format and a frequency spectrum of audio data whose audio format is the target audio format;

[0014] The frequency spectrum of the audio data whose audio format is not the target audio format and the frequency spectrum of the audio data whose audio format is the target audio format are taken as input, the frequency spectrum of the audio data whose audio format is the target audio format are taken as output target, the preset first initial model is trained, and the trained model is determined as the target audio format automatic detection model.

[0015] Optionally, the pre-generating a spectrum compensation model includes:

[0016] Acquire a second training sample, wherein the second training sample includes a spectrum of simulated uncompressed audio data and a spectrum of audio data in the target audio format;

[0017] The spectrum of the audio data in the target audio format is used as input, the spectrum of the simulated uncompressed audio data is used as the output target, the preset second initial model is trained, and the trained model is determined as the spectrum compensation model.

[0018] Optionally, the processing the audio data in the target audio format according to the pre-generated spectrum compensation model to obtain the audio data to be processed includes:

[0019] The frequency spectrum of the audio data in the target audio format is input into the pre-generated frequency spectrum compensation model, and the audio data to be processed is obtained according to the output of the frequency spectrum compensation model.

[0020] According to a second aspect of an embodiment of the present application, a speech recognition device is provided, the device comprising:

[0021] A detection module, configured to detect the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model;

[0022] a spectrum compensation module for processing the audio data having the target audio format according to a pre-generated spectrum compensation model to obtain audio data to be processed when the target audio format is detected among the audio formats of the plurality of audio data;

[0023] The speech recognition module is used to perform speech recognition on the audio data to be processed using a general model.

[0024] Optionally, the device further comprises:

[0025] A target audio format automatic detection model training module is used to pre-generate a target audio format automatic detection model;

[0026] The spectrum compensation model training module is used to pre-generate a spectrum compensation model.

[0027] Optionally, the target audio format automatic detection model training module includes:

[0028] A first training sample acquiring unit, configured to acquire a first training sample, wherein the first training sample includes a spectrum of audio data in an audio format other than the target audio format and a spectrum of audio data in the target audio format;

[0029] The target audio format automatic detection model training unit is used to take the frequency spectrum of the audio data whose audio format is not the target audio format and the frequency spectrum of the audio data whose audio format is the target audio format as input, take the frequency spectrum of the audio data whose audio format is the target audio format as the output target, train a preset first initial model, and determine the trained model as the target audio format automatic detection model.

[0030] Optionally, the spectrum compensation model training module includes:

[0031] A second training sample acquiring unit, configured to acquire a second training sample, wherein the second training sample includes a spectrum of simulated uncompressed audio data and a spectrum of audio data in the target audio format;

[0032] The spectrum compensation model training unit is used to take the spectrum of the audio data in the target audio format as input, the spectrum of the simulated uncompressed audio data as the output target, train the preset second initial model, and determine the trained model as the spectrum compensation model.

[0033] Optionally, the spectrum compensation module further includes:

[0034] The audio data unit to be processed is obtained, which is used to input the spectrum of the audio data in the target audio format into the pre-generated spectrum compensation model, and obtain the audio data to be processed according to the output of the spectrum compensation model.

[0035] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:

[0036] processor;

[0037] a memory for storing instructions executable by the processor;

[0038] The processor is configured to execute the instructions to implement the speech recognition method.

[0039] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which enables the electronic device to perform the voice recognition method when instructions in the computer-readable storage medium are executed by a processor of an electronic device.

[0040] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0041] The present application detects the audio formats of several audio data according to a pre-generated target audio format automatic detection model; when the target audio format is detected in the audio formats of several audio data, the audio data with the target audio format is processed according to a pre-generated spectrum compensation model to obtain audio data to be processed; and speech recognition is performed on the audio data to be processed using a general model. Through the technical solution provided by the embodiment of the present application, spectrum compensation is performed on audio data with the target audio format to obtain audio data to be processed, and speech recognition is performed on the audio data to be processed using a general model; audio data with an audio format not in the target audio format is directly subjected to speech recognition using a general model, thereby improving the overall recognition rate of speech recognition in the scenario of performing speech recognition on audio data of multiple audio formats, and further, providing an accurate and reliable speech recognition method.

[0042] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] 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.

[0044] Figure 1 is a flow chart showing a speech recognition method according to an exemplary embodiment;

[0045] Figure 2 is a flow chart of another speech recognition method according to an exemplary embodiment;

[0046] Figure 3 yes Figure 2 The flowchart of step 201 in the flowchart of another speech recognition method according to an exemplary embodiment is shown;

[0047] Figure 4 yes Figure 2The flowchart of step 202 in the flowchart of another speech recognition method according to an exemplary embodiment is shown;

[0048] Figure 5 yes Figure 1 The flowchart of step 102 in the flowchart of a speech recognition method according to an exemplary embodiment is shown;

[0049] Figure 6 is a block diagram of a speech recognition device according to an exemplary embodiment;

[0050] Figure 7 is a block diagram of another apparatus for speech recognition according to an exemplary embodiment;

[0051] Figure 8 yes Figure 7 The device block diagram of the target audio format automatic detection model training module 701 in another device block diagram of speech recognition according to an exemplary embodiment is shown;

[0052] Figure 9 yes Figure 7 A device block diagram of a spectrum compensation model training module 702 in another device block diagram of speech recognition according to an exemplary embodiment is shown;

[0053] Figure 10 yes Figure 6 The device block diagram of the spectrum compensation module 602 in the device block diagram of speech recognition according to an exemplary embodiment is shown;

[0054] Figure 11 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0055] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0056] It should be noted that in the embodiments of the present application, the target audio format may preferably be MP3. MP3 is an audio compression algorithm. Specifically, MP3 uses a coding algorithm called sensory coding technology to reduce sound distortion: during encoding, the audio file is first spectrally analyzed, then the noise level is filtered out using a filter, and then the remaining bits are scattered and arranged through quantization. Finally, MP3 format audio data with a high compression ratio is formed, and the compressed MP3 format audio data can achieve a sound effect that is relatively close to the original sound source when played back. In this sense, this is a lossy compression, but its greatest advantage is that it trades minimal sound distortion for a high compression ratio.

[0057] However, in some cloud service scenarios, customers upload audio data for transcription, where the audio data is in the WAV format. MP3-compressed audio data is in MP3 format. However, since some audio data is encoded (i.e., compressed) and then decoded, using a general model directly for recognition of this WAV-formatted audio data can result in a decrease in overall speech recognition rates.

[0058] Therefore, this application addresses the problem of automatically identifying the audio format of input audio data in multiple audio formats, where the audio data is in WAV format but has been compressed into MP3, and simultaneously performs spectrum compensation on the MP3-compressed audio data, thereby improving the overall recognition rate of speech recognition. This application can be applied to speech recognition and conference scenarios based on speech recognition, as well as commercial services that require speech recognition, speech quality inspection, and other speech recognition needs.

[0059] Figure 1 FIG. 1 is a flow chart of a speech recognition method according to an exemplary embodiment. Figure 1 As shown, the following steps are included.

[0060] Step 101 : Detect the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model.

[0061] It should be noted that in the embodiment of the present application, the audio format of the audio data to be recognized is first detected using a pre-generated target audio format automatic detection model to detect whether the audio data is MP3 compressed audio data. If the audio data to be recognized is detected to be MP3 compressed audio data, the spectrum of the MP3 compressed audio data is compensated according to the pre-generated spectrum compensation model, and then speech recognition is performed using the general model.

[0062] Furthermore, in the embodiments of the present application, Figure 2 is a flow chart of another speech recognition method according to an exemplary embodiment. Figure 2 As shown, the following steps may be included before step 101.

[0063] Step 201: pre-generate a target audio format automatic detection model.

[0064] Furthermore, in the embodiments of the present application, Figure 3 yes Figure 2 The flowchart of step 201 in the flowchart of another speech recognition method according to an exemplary embodiment is shown as follows. Figure 3 As shown, step 201 may further include the following steps.

[0065] Step 301: Acquire a first training sample, wherein the first training sample includes a frequency spectrum of audio data in an audio format other than the target audio format and a frequency spectrum of audio data in the target audio format.

[0066] Step 302: Taking the frequency spectrum of the audio data whose audio format is not the target audio format and the frequency spectrum of the audio data whose audio format is the target audio format as input, taking the frequency spectrum of the audio data whose audio format is the target audio format as output target, training a preset first initial model, and determining the trained model as the target audio format automatic detection model.

[0067] It should be noted that, in an embodiment of the present application, a preset first initial model can be trained based on the first training sample, and the trained model is the target audio format automatic detection model. Specifically, the audio data in the target audio format is audio data compressed by MP3, and the audio data in the non-target audio format is audio data that has not been compressed by MP3. The spectrum of the non-MP3 compressed audio data and the spectrum of the MP3 compressed audio data contained in the acquired first training sample are used as the input of the first initial model, and the spectrum of the audio data in MP3 format is used as the output target of the first initial model. The preset first initial model is trained, and the trained model is determined as the MP3 format automatic detection model.

[0068] Furthermore, in the embodiments of the present application, Figure 2 is a flow chart of another speech recognition method according to an exemplary embodiment. Figure 2 As shown, the following steps may be included before step 101.

[0069] Step 202: pre-generate a spectrum compensation model.

[0070] Furthermore, in the embodiments of the present application, Figure 4 yes Figure 2 The flowchart of step 202 in the flowchart of another speech recognition method according to an exemplary embodiment is shown in FIG. Figure 4 As shown, step 202 may further include the following steps.

[0071] Step 401: Acquire a second training sample, wherein the second training sample includes a spectrum of simulated uncompressed audio data and a spectrum of audio data in the target audio format.

[0072] Step 402: Taking the spectrum of the audio data in the target audio format as input and the spectrum of the simulated uncompressed audio data as output target, a preset second initial model is trained, and the trained model is determined as a spectrum compensation model.

[0073] It should be noted that in an embodiment of the present application, a preset second initial model can be trained based on the second training sample, and the trained model is the spectrum compensation model. Specifically, the spectrum of the audio data in MP3 format contained in the acquired second training sample is used as the input of the second initial model, and the spectrum of the simulated uncompressed audio data is used as the output target of the second initial model. The preset second initial model is trained, and the trained model is determined to be the spectrum compensation model.

[0074] Step 102: When the target audio format is detected among the audio formats of the plurality of audio data, the audio data having the target audio format is processed according to a pre-generated spectrum compensation model to obtain audio data to be processed.

[0075] Furthermore, in the embodiments of the present application, Figure 5 yes Figure 1 The flowchart of step 102 in the flowchart of a speech recognition method according to an exemplary embodiment is shown as follows. Figure 5 As shown, step 102 may further include the following steps.

[0076] Step 501: Input the spectrum of the audio data in the target audio format into the pre-generated spectrum compensation model, and obtain the audio data to be processed according to the output of the spectrum compensation model.

[0077] Step 103: Perform speech recognition on the audio data to be processed using a general model.

[0078] It should be noted that in an embodiment of the present application, when the target audio format automatic detection model is used to identify that the audio format of the audio data is MP3 format, the spectrum of the audio data in MP3 format is input into the spectrum compensation model to complete the spectrum compensation processing of the audio data compressed by MP3, and the audio data to be processed obtained after the spectrum compensation processing is then used using the general model for speech recognition.

[0079] The present application detects the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model; when the target audio format is detected in the audio format of the plurality of audio data, the audio data with the target audio format is processed according to a pre-generated spectrum compensation model to obtain audio data to be processed; and speech recognition is performed on the audio data to be processed using a general model. Through the technical solution provided by the embodiment of the present application, spectrum compensation is performed on the audio data with the target audio format to obtain audio data to be processed, and speech recognition is performed on the audio data to be processed using a general model; and speech recognition is performed directly on audio data with a non-target audio format using the general model, thereby improving the overall recognition rate of speech recognition in the scenario of speech recognition of audio data with multiple audio formats, and further providing an accurate and reliable speech recognition method. The present application detects the audio format of a plurality of audio data by using a target audio format automatic detection model, wherein the audio data is audio data with the audio format of wav but has been compressed by MP3, and can automatically identify whether the audio format of the audio data is the target audio format, thereby improving the detection efficiency of the audio format. The present application performs spectrum compensation on audio data in a target audio format by utilizing a spectrum compensation model, thereby improving the efficiency of spectrum compensation for audio data in a target audio format.

[0080] Figure 6 is a block diagram of a speech recognition device according to an exemplary embodiment, referring to Figure 6 The device includes a detection module 601, a spectrum compensation module 602, and a speech recognition module 603.

[0081] The detection module 601 is configured to detect the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model.

[0082] The spectrum compensation module 602 is used to process the audio data with the target audio format according to a pre-generated spectrum compensation model when the target audio format is detected in the audio formats of the plurality of audio data to obtain audio data to be processed.

[0083] The speech recognition module 603 is configured to perform speech recognition on the audio data to be processed using a general model.

[0084] Optionally, Figure 7 FIG. 1 is a block diagram of another apparatus for speech recognition according to an exemplary embodiment. Figure 7 The device includes a target audio format automatic detection model training module 701 and a spectrum compensation model training module 702.

[0085] The target audio format automatic detection model training module 701 is used to pre-generate a target audio format automatic detection model.

[0086] The spectrum compensation model training module 702 is used to pre-generate a spectrum compensation model.

[0087] Optionally, Figure 8 yes Figure 7 The device block diagram of the target audio format automatic detection model training module 701 in another device block diagram of speech recognition according to an exemplary embodiment is shown. Figure 8 The device includes a first training sample acquisition unit 801 and a target audio format automatic detection model training unit 802.

[0088] The first training sample acquiring unit 801 is configured to acquire a first training sample, wherein the first training sample includes a spectrum of audio data in an audio format other than the target audio format and a spectrum of audio data in the target audio format.

[0089] The target audio format automatic detection model training unit 802 is used to take the frequency spectrum of the audio data whose audio format is not the target audio format and the frequency spectrum of the audio data whose audio format is the target audio format as input, take the frequency spectrum of the audio data whose audio format is the target audio format as the output target, train a preset first initial model, and determine the trained model as the target audio format automatic detection model.

[0090] Optionally, Figure 9 yes Figure 7 FIG. 7 is a block diagram of another apparatus for speech recognition according to an exemplary embodiment. Figure 9 The device includes a second training sample acquisition unit 901 and a spectrum compensation model training unit 902.

[0091] The second training sample acquiring unit 901 is configured to acquire a second training sample, wherein the second training sample includes a spectrum of simulated uncompressed audio data and a spectrum of audio data whose audio format is the target audio format.

[0092] The spectrum compensation model training unit 902 is used to take the spectrum of the audio data in the target audio format as input, the spectrum of the simulated uncompressed audio data as the output target, train the preset second initial model, and determine the trained model as the spectrum compensation model.

[0093] Optionally, Figure 10 yes Figure 6 FIG. 6 is a block diagram of a spectrum compensation module 602 in a speech recognition device block diagram according to an exemplary embodiment. Figure 10 , the device includes obtaining an audio data unit to be processed 1001.

[0094] The unit 1001 for obtaining audio data to be processed is used to input the spectrum of the audio data in the target audio format into the pre-generated spectrum compensation model, and obtain the audio data to be processed according to the output of the spectrum compensation model.

[0095] The present application detects the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model; when the target audio format is detected in the audio format of the plurality of audio data, the audio data with the target audio format is processed according to a pre-generated spectrum compensation model to obtain audio data to be processed; and speech recognition is performed on the audio data to be processed using a general model. Through the technical solution provided by the embodiment of the present application, spectrum compensation is performed on the audio data with the target audio format to obtain audio data to be processed, and speech recognition is performed on the audio data to be processed using a general model; and speech recognition is performed directly on audio data with a non-target audio format using the general model, thereby improving the overall recognition rate of speech recognition in the scenario of speech recognition of audio data with multiple audio formats, and further providing an accurate and reliable speech recognition method. The present application detects the audio format of a plurality of audio data by using a target audio format automatic detection model, wherein the audio data is audio data with the audio format of wav but has been compressed by MP3, and can automatically identify whether the audio format of the audio data is the target audio format, thereby improving the detection efficiency of the audio format. The present application performs spectrum compensation on audio data in a target audio format by utilizing a spectrum compensation model, thereby improving the efficiency of spectrum compensation for audio data in a target audio format.

[0096] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0097] Figure 11 1 is a block diagram of an electronic device 1100 according to an exemplary embodiment. For example, the electronic device 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0098] Reference Figure 11 The electronic device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output interface 1112 , a sensor component 1114 , and a communication component 1116 .

[0099] The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1102 may include one or more modules to facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.

[0100] The memory 1104 is configured to store various types of data to support the operation of the device 1100. Examples of such data include instructions for any application or method operating on the device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0101] The power supply component 1106 provides power to the various components of the electronic device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1100.

[0102] The multimedia component 1108 includes a screen that provides an output interface between the electronic device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0103] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 1100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.

[0104] The input / output interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0105] The sensor assembly 1114 includes one or more sensors for providing various aspects of the status assessment of the electronic device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the electronic device 1100, the relative positioning of components, such as the display and keypad of the electronic device 1100. The sensor assembly 1114 can also detect changes in the position of the electronic device 1100 or a component of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, the orientation or acceleration / deceleration of the electronic device 1100, and changes in the temperature of the electronic device 1100. The sensor assembly 1114 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1114 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0106] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0107] In an exemplary embodiment, the electronic device 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.

[0108] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by the processor 1120 of the electronic device 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0109] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0110] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for speech recognition, characterized in that: The method comprises: Pre-generate the target audio format automatic detection model; Detecting the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model; When the target audio format is detected among the audio formats of the plurality of audio data, processing the audio data having the target audio format according to a pre-generated spectrum compensation model to obtain audio data to be processed; Performing speech recognition on the audio data to be processed using a general model; The step of pre-generating a target audio format automatic detection model includes: Acquire a first training sample, wherein the first training sample includes a frequency spectrum of audio data whose audio format is not the target audio format and a frequency spectrum of audio data whose audio format is the target audio format; The frequency spectrum of the audio data whose audio format is not the target audio format and the frequency spectrum of the audio data whose audio format is the target audio format are taken as input, the frequency spectrum of the audio data whose audio format is the target audio format are taken as output target, the preset first initial model is trained, and the trained model is determined as the target audio format automatic detection model.

2. The method according to claim 1, characterized in that Before the step of detecting the audio formats of the plurality of audio data according to the pre-generated target audio format automatic detection model, the method further includes: Generate spectrum compensation models in advance.

3. The method according to claim 2, characterized in that The pre-generated spectrum compensation model includes: Acquire a second training sample, wherein the second training sample includes a spectrum of simulated uncompressed audio data and a spectrum of audio data in the target audio format; The spectrum of the audio data in the target audio format is used as input, the spectrum of the simulated uncompressed audio data is used as the output target, the preset second initial model is trained, and the trained model is determined as the spectrum compensation model.

4. The method according to claim 1, wherein The processing of the audio data in the target audio format according to the pre-generated spectrum compensation model to obtain the audio data to be processed includes: The frequency spectrum of the audio data in the target audio format is input into the pre-generated frequency spectrum compensation model, and the audio data to be processed is obtained according to the output of the frequency spectrum compensation model.

5. A speech recognition device, characterized in that: The device comprises: A target audio format automatic detection model training module is used to pre-generate a target audio format automatic detection model; A detection module, configured to detect the audio format of a plurality of audio data according to a pre-generated target audio format automatic detection model; a spectrum compensation module for processing the audio data having the target audio format according to a pre-generated spectrum compensation model to obtain audio data to be processed when the target audio format is detected among the audio formats of the plurality of audio data; A speech recognition module, configured to perform speech recognition on the audio data to be processed using a general model; The target audio format automatic detection model training module includes: A first training sample acquiring unit, configured to acquire a first training sample, wherein the first training sample includes a spectrum of audio data in an audio format other than the target audio format and a spectrum of audio data in the target audio format; The target audio format automatic detection model training unit is used to take the frequency spectrum of the audio data whose audio format is not the target audio format and the frequency spectrum of the audio data whose audio format is the target audio format as input, take the frequency spectrum of the audio data whose audio format is the target audio format as the output target, train a preset first initial model, and determine the trained model as the target audio format automatic detection model.

6. The device according to claim 5, characterized in that The device further comprises: The spectrum compensation model training module is used to pre-generate a spectrum compensation model.

7. The device according to claim 6, characterized in that The spectrum compensation model training module includes: A second training sample acquiring unit, configured to acquire a second training sample, wherein the second training sample includes a spectrum of simulated uncompressed audio data and a spectrum of audio data in the target audio format; The spectrum compensation model training unit is used to take the spectrum of the audio data in the target audio format as input, the spectrum of the simulated uncompressed audio data as the output target, train the preset second initial model, and determine the trained model as the spectrum compensation model.

8. The device according to claim 5, characterized in that The spectrum compensation module further includes: The audio data unit to be processed is obtained, which is used to input the spectrum of the audio data in the target audio format into the pre-generated spectrum compensation model, and obtain the audio data to be processed according to the output of the spectrum compensation model.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the instructions to implement the speech recognition method according to any one of claims 1 to 4. 10 . A computer-readable storage medium, which enables the mobile terminal to perform the speech recognition method according to claim 1 , when instructions in the storage medium are executed by a processor of a mobile terminal.

Citation Information

Patent Citations

  • Automatic recognition method and device for audio data code rate

    CN108010533A

  • Compressed audio recognition method and device, and storage medium

    CN113555034A

  • Sound enhancement system of portable device for multimedia audio and method thereof

    KR100663379B1