WO2022141867A1 - 语音识别方法、装置、电子设备及可读存储介质 - Google Patents

语音识别方法、装置、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2022141867A1
WO2022141867A1 PCT/CN2021/084048 CN2021084048W WO2022141867A1 WO 2022141867 A1 WO2022141867 A1 WO 2022141867A1 CN 2021084048 W CN2021084048 W CN 2021084048W WO 2022141867 A1 WO2022141867 A1 WO 2022141867A1
Authority
WO
WIPO (PCT)
Prior art keywords
speech
voice
feature
feature extraction
model
Prior art date
Application number
PCT/CN2021/084048
Other languages
English (en)
French (fr)
Inventor
王健宗
瞿晓阳
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022141867A1 publication Critical patent/WO2022141867A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/16Speech classification or search using artificial neural networks
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/02Feature extraction for speech recognition; Selection of recognition unit
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems

Definitions

  • the present application relates to the field of speech processing, and in particular, to a speech recognition method, apparatus, electronic device, and readable storage medium.
  • speech recognition technology is a technology that allows machines to convert speech signals into corresponding text through the process of recognition and understanding. Through speech recognition technology, it is easier for machines to understand speech commands, which accelerates the process of human life intelligence. , therefore, speech recognition technology is getting more and more attention.
  • the inventor realizes that the current speech recognition technology needs to extract the Mel-frequency cepstral coefficient feature of speech, but the Mel-frequency cepstral coefficient feature is very sensitive to noise, and the noise will make the Mel-frequency cepstral coefficient feature decrease significantly, resulting in The accuracy of speech recognition is low.
  • a speech recognition method comprising:
  • the target speech feature set is recognized by the speech recognition model to obtain recognized text.
  • a voice recognition device comprising:
  • a feature extraction model building module used to obtain a first voice set, and use the first voice set to train a preset comparative predictive coding model to obtain a voice feature extraction model;
  • a speech recognition model building module is used to obtain a second speech set, and use the speech feature extraction model to perform feature extraction on the second speech set to obtain a speech feature set; use the speech feature set to perform a preset deep learning model Carry out training to obtain the speech recognition model;
  • a speech recognition module is used for extracting features of the speech to be recognized by using the speech feature extraction model when receiving the speech to be recognized, to obtain a target speech feature set; Recognize, get the recognized text.
  • An electronic device comprising:
  • the processor executes the computer program stored in the memory to realize the following steps:
  • the target speech feature set is recognized by the speech recognition model to obtain recognized text.
  • a computer-readable storage medium having at least one computer program stored in the computer-readable storage medium, the at least one computer program being executed by a processor in an electronic device to implement the following steps:
  • the target speech feature set is recognized by the speech recognition model to obtain recognized text.
  • the present application can improve the accuracy of speech recognition.
  • FIG. 1 is a schematic flowchart of a speech recognition method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of obtaining a voice feature set in a voice recognition method provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a module of a speech recognition device provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of the internal structure of an electronic device for implementing a speech recognition method provided by an embodiment of the present application
  • the embodiment of the present application provides a speech recognition method.
  • the execution subject of the speech recognition method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server, a terminal, and the like.
  • the speech recognition method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
  • the speech recognition method includes:
  • S1 obtain a first voice set, and utilize the first voice set to train a preset contrast prediction coding model to obtain a voice feature extraction model;
  • the first voice set includes a voice set of multiple languages, multiple dialects, and multiple background noises.
  • the preset comparative predictive coding model is iteratively trained by using the first voice set, until the comparative predictive coding model converges. , to obtain the speech feature extraction model.
  • the comparative predictive coding model is a CPC (contrastive predictive coding, comparative predictive coding) model, and since the comparative predictive coding is an unsupervised model, the training data must not be marked, and a large amount of training data can be obtained at a low cost, So that the model has stronger feature extraction ability.
  • the second voice set in the embodiment of the present application is a set of voices with corresponding text tags.
  • feature extraction is performed on the second voice set, and the voice features of each voice in the second voice set are extracted. , to obtain the speech vector set.
  • using the voice feature extraction model to perform voice feature extraction on the second voice set to obtain the voice vector set including:
  • the sample audio is resampled to obtain the digital voice.
  • the embodiment of the present application uses digital-to-analog conversion.
  • the sampler resamples the sample audio.
  • x(t) is the digital voice
  • t is the time
  • y(t) is the standard digital voice
  • is the preset adjustment value of the pre-emphasis operation, preferably, the value range of ⁇ is [0.9, 1.0].
  • the standard digital voices are divided into multiple voice paragraphs according to a preset time scale to obtain the voice.
  • a paragraph set using the speech feature extraction model to perform feature extraction on each of the speech paragraphs in the speech paragraph set to obtain the speech feature subset.
  • all the voice features are aggregated to obtain the voice feature set.
  • the deep learning model is a convolutional neural network model.
  • text marking is performed on each voice feature included in the voice feature set to obtain a training set, and the deep learning model is iteratively trained by using the training set to obtain the voice recognition model.
  • the iterative training of the deep learning model using the training set includes:
  • Step A according to the preset convolution pooling times, perform a convolution pooling operation on the training set to obtain a feature set;
  • Step B use a preset activation function to calculate the feature set to obtain a predicted value, perform vectorization processing on the text marked by each speech feature in the training set, and obtain a label value, according to the predicted value and the label. value, use the pre-built first loss function to calculate to obtain the first loss value;
  • onehot coding is used to convert the text marked by each speech feature in the training set into a vector to obtain the label value.
  • Step C Compare the size of the first loss value with the preset first loss threshold value, when the first loss value is greater than or equal to the first preset threshold value, return to the step A; when the first loss value is greater than or equal to the first preset threshold value.
  • the training is stopped to obtain the speech recognition model.
  • performing a convolution pooling operation on the training set to obtain a first feature set includes: performing a convolution operation on the training set to obtain a first convolution data set; The first feature set is obtained by performing a maximum pooling operation on a convolutional data set.
  • ⁇ ' represents the number of channels of the first convolution data set
  • represents the number of channels of the training set
  • k is the size of the preset convolution kernel
  • f is the stride of the preset convolution operation
  • p is the Preset data zero-padding matrix
  • the first activation function described in the preferred embodiment of the present application includes:
  • ⁇ t represents the predicted value
  • s represents the data in the feature set
  • the first loss function described in the preferred embodiment of the present application includes:
  • L ce represents the first loss value
  • N is the number of data in the training set
  • i is a positive integer
  • y i is the label value
  • p i is the predicted value
  • the to-be-recognized speech is divided into a plurality of target speech paragraphs according to the time scale, and each of the target speech paragraphs is marked with a serial number to obtain a target speech paragraph set, such as:
  • the time scale is 2 seconds, and the speech to be recognized is 6s in total.
  • the speech to be recognized is divided into target speech paragraphs A, B, and C.
  • the target speech paragraph A is 0-2s speech, so Described target speech paragraph B is the speech of 2-4s, and described target speech paragraph C is the speech of 4-6s, and described target speech paragraph A is marked with serial number 2, and described target speech paragraph B is marked with serial number 1, and the described target speech paragraph B is marked with serial number 1.
  • the target speech paragraph C is marked with serial number 3.
  • the embodiment of the present application uses the speech feature extraction model to perform speech feature extraction on each of the target speech paragraphs in the target speech paragraph set to obtain the target speech feature set.
  • the target voice feature set may be stored in a blockchain node.
  • the speech recognition model is used to recognize each target speech feature included in the target speech feature set to obtain a corresponding recognized character, and the recognized character is classified according to the corresponding target speech paragraph set.
  • the sequence numbers of the target speech paragraphs are sequentially combined to obtain the recognized text.
  • the target speech paragraph includes target speech paragraphs A, B, and C
  • the sequence number corresponding to the target speech paragraph A is 2
  • the sequence number corresponding to the target speech paragraph B is 1
  • the corresponding sequence number of the target speech paragraph C is 1.
  • the serial number is 3
  • the target speech features corresponding to the target speech paragraphs A, B, and C are respectively a, b, and c.
  • the speech recognition model is used to identify the target speech feature a to obtain the recognized character "Yes".
  • the speech recognition model recognizes the target speech feature b to obtain the recognized character "I”, uses the speech recognition model to recognize the target speech feature c to obtain the recognized character "Who”, and uses the speech recognition model to recognize the character "Who".
  • the sequence numbers of the corresponding target speech paragraphs in the target speech paragraph set are sequentially combined to obtain the recognized text as "Who am I”.
  • FIG. 3 it is a functional block diagram of the speech recognition device of the present application.
  • the speech recognition apparatus 100 described in this application may be installed in an electronic device.
  • the speech recognition device may include a feature extraction model building module 101, a speech recognition model building module 102, and a speech recognition module 103.
  • the modules in the present invention may also be called units, which refer to a A series of computer program segments executed by a device processor and capable of performing fixed functions and stored in the memory of an electronic device.
  • each module/unit is as follows:
  • the feature extraction model building module 101 is configured to obtain a first voice set, and use the first voice set to train a preset comparative predictive coding model to obtain a voice feature extraction model.
  • the first voice set includes a voice set of multiple languages, multiple dialects, and multiple background noises.
  • the feature extraction model building module 101 uses the first voice set to iteratively train the preset comparative predictive coding model, Until the comparative predictive coding model converges, the speech feature extraction model is obtained.
  • the comparative predictive coding model is a CPC (contrastive predictive coding, comparative predictive coding) model, and since the comparative predictive coding is an unsupervised model, the training data must not be marked, and a large amount of training data can be obtained at a low cost, So that the model has stronger feature extraction ability.
  • the speech recognition model building module 102 is used to obtain a second speech set, and use the speech feature extraction model to perform feature extraction on the second speech set to obtain a speech feature set;
  • the learning model is trained to obtain the speech recognition model.
  • the second voice set in the embodiment of the present application is a set of voices with corresponding text tags.
  • the speech recognition model building module 102 performs feature extraction on the second speech set, and extracts the second speech features.
  • the voice feature of each voice in the voice set is used to obtain the voice vector set.
  • the speech recognition model building module 102 uses the following means to perform sound feature extraction on the second speech set to obtain the speech vector set, including:
  • the sample audio is resampled to obtain the digital voice.
  • the embodiment of the present application uses digital-to-analog conversion.
  • the sampler resamples the sample audio.
  • x(t) is the digital voice
  • t is the time
  • y(t) is the standard digital voice
  • is the preset adjustment value of the pre-emphasis operation, preferably, the value range of ⁇ is [0.9, 1.0].
  • voice feature extraction model to perform feature extraction on the standard digital voice to obtain a voice feature subset
  • the standard digital voices are divided into multiple voice paragraphs according to a preset time scale to obtain the voice.
  • a paragraph set using the speech feature extraction model to perform feature extraction on each of the speech paragraphs in the speech paragraph set to obtain the speech feature subset.
  • all the voice features are aggregated to obtain the voice feature set.
  • the deep learning model is a convolutional neural network model.
  • text marking is performed on each speech feature included in the speech feature set to obtain a training set, and the deep learning model is iteratively trained by using the training set to obtain the speech recognition model.
  • the speech recognition model building module 102 uses the following means to iteratively train the deep learning model, including:
  • Step A according to the preset convolution pooling times, perform a convolution pooling operation on the training set to obtain a feature set;
  • Step B use a preset activation function to calculate the feature set to obtain a predicted value, perform vectorization processing on the text marked by each speech feature in the training set, and obtain a label value, according to the predicted value and the label. value, use the pre-built first loss function to calculate to obtain the first loss value;
  • onehot encoding is used to convert the text marked by each speech feature in the training set into a vector to obtain the label value.
  • Step C Compare the size of the first loss value with the preset first loss threshold value, when the first loss value is greater than or equal to the first preset threshold value, return to the step A; when the first loss value is greater than or equal to the first preset threshold value.
  • the training is stopped to obtain the speech recognition model.
  • performing a convolution pooling operation on the training set to obtain a first feature set includes: performing a convolution operation on the training set to obtain a first convolution data set; The first feature set is obtained by performing a maximum pooling operation on a convolutional data set.
  • ⁇ ' represents the number of channels of the first convolution data set
  • represents the number of channels of the training set
  • k is the size of the preset convolution kernel
  • f is the stride of the preset convolution operation
  • p is the Preset data zero-padding matrix
  • the first activation function described in the preferred embodiment of the present application includes:
  • ⁇ t represents the predicted value
  • s represents the data in the feature set
  • the first loss function described in the preferred embodiment of the present application includes:
  • L ce represents the first loss value
  • N is the number of data in the training set
  • i is a positive integer
  • y i is the label value
  • p i is the predicted value
  • the speech recognition module 103 is configured to perform feature extraction on the speech to be recognized by using the speech feature extraction model when receiving the speech to be recognized to obtain a target speech feature set; use the speech recognition model to perform feature extraction on the target speech feature.
  • the set is recognized to obtain the recognized text.
  • the speech recognition module 103 divides the to-be-recognized speech into a plurality of target speech paragraphs according to the time scale, and marks each target speech paragraph with a serial number to obtain the target speech paragraph
  • the time scale is 2 seconds
  • the voice to be recognized is 6s in total
  • the voice to be recognized is divided into target voice paragraphs A, B, and C according to the time scale
  • the target voice paragraph A is 0
  • the target voice paragraph B is the voice of 2-4s
  • the target voice paragraph C is the voice of 4-6s
  • the target voice paragraph A is marked with serial number 2
  • the target voice paragraph B is marked Serial number 1
  • the target speech paragraph C is marked with serial number 3
  • the speech feature extraction model is used to extract the speech features of each of the target speech paragraphs in the target speech paragraph set, to obtain the Describe the target speech feature set.
  • the target voice feature set may be stored in a blockchain node.
  • the speech recognition module 103 uses the speech recognition model to recognize each target speech feature included in the target speech feature set to obtain a corresponding recognized character, and the recognized character is determined according to the described
  • the sequence numbers of the corresponding target speech paragraphs in the target speech paragraph set are sequentially combined to obtain the recognized text.
  • the target speech paragraph includes target speech paragraphs A, B, and C
  • the sequence number corresponding to the target speech paragraph A is 2
  • the sequence number corresponding to the target speech paragraph B is 1
  • the corresponding sequence number of the target speech paragraph C is 1.
  • the serial number is 3
  • the target speech features corresponding to the target speech paragraphs A, B, and C are respectively a, b, and c.
  • the speech recognition model is used to identify the target speech feature a to obtain the recognized character "Yes”.
  • the speech recognition model recognizes the target speech feature b to obtain the recognized character "I”, uses the speech recognition model to recognize the target speech feature c to obtain the recognized character "Who”, and uses the speech recognition model to recognize the character "Who".
  • the sequence numbers of the corresponding target speech paragraphs in the target speech paragraph set are sequentially combined to obtain the recognized text as "Who am I”.
  • FIG. 4 it is a schematic structural diagram of an electronic device implementing the speech recognition method of the present application.
  • the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a speech recognition program 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 .
  • the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash memory card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software and various data installed in the electronic device 1, such as codes of speech recognition programs, etc., but also can be used to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
  • Central Processing Unit CPU
  • microprocessor digital processing chip
  • graphics processor and combination of various control chips, etc.
  • the processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing programs or modules (such as voice) stored in the memory 11. identification programs, etc.), and call data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect standard (perIPheral component interconnect, referred to as PCI) bus or an extended industry standard architecture (extended industry standard architecture, referred to as EISA) bus or the like.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 4 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 4 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the drawings. components, or a combination of certain components, or a different arrangement of components.
  • the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
  • the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the speech recognition program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs, and when running in the processor 10, it can realize:
  • the target speech feature set is recognized by the speech recognition model to obtain recognized text.
  • modules/units integrated in the electronic device 1 may be stored in a computer-readable storage medium.
  • the computer readable medium may be non-volatile or volatile.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) .
  • Embodiments of the present application may further provide a computer-readable storage medium, where the computer-readable storage medium may be volatile or non-volatile, and the readable storage medium stores a computer program, and the The computer program, when executed by the processor of the electronic device, can realize:
  • the target speech feature set is recognized by the speech recognition model to obtain recognized text.
  • the computer usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, and the like; using the created data, etc.
  • modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
  • the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种语音识别方法、语音识别装置(100)、电子设备(1)以及可读存储介质,涉及语音处理技术,方法包括:利用第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型(S1);利用语音特征提取模型对第二语音集进行特征提取,得到语音特征集(S2);利用语音特征集对预设的深度学习模型进行训练,得到语音识别模型(S3);当接收待识别语音时,利用语音特征提取模型对待识别语音进行特征提取,得到目标语音特征集(S4);利用语音识别模型对目标语音特征集进行识别,得到识别文本(S5)。还涉及一种区块链技术,目标语音特征集可以存储在区块链中。语音识别方法可以提高语音识别的准确性。

Description

语音识别方法、装置、电子设备及可读存储介质
本申请要求于2020年12月29日提交中国专利局、申请号为CN202011600083.X,发明名称为“语音识别方法、装置、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及语音处理领域,尤其涉及一种语音识别方法、装置、电子设备及可读存储介质。
背景技术
随着人工智能技术的发展,语音识别技术就是让机器通过识别和理解过程把语音信号转变为相应的文本的技术,通过语音识别技术使机器更容易理解语音命令,加快了人类生活智能化的进程,因此,语音识别技术越来越受到人们的重视。
发明人意识到目前的语音识别技术需要提取语音的梅尔频率倒谱系数特征,但是梅尔频率倒谱系数特征的对噪声非常敏感,噪声会使得梅尔频率倒谱系数特征下降比较显著,导致语音识别的准确性较低。
发明内容
一种语音识别方法,包括:
获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
一种语音识别装置,所述装置包括:
特征提取模型构建模块,用于获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
语音识别模型构建模块,用于获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
语音识别模块,用于当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
一种电子设备,所述电子设备包括:
存储器,存储至少一个计算机程序;及
处理器,执行所述存储器中存储的计算机程序以实现如下步骤:
获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个计算机程序,所述至少一个计算机程序被电子设备中的处理器执行以实现如下步骤:
获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
本申请可以提高语音识别的准确性。
附图说明
图1为本申请一实施例提供的语音识别方法的流程示意图;
图2为本申请一实施例提供的语音识别方法中得到语音特征集的流程示意图;
图3为本申请一实施例提供的语音识别装置的模块示意图;
图4为本申请一实施例提供的实现语音识别方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供一种语音识别方法。所述语音识别方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述语音识别方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示的本申请一实施例提供的语音识别方法的流程示意图,在本申请实施例中,所述语音识别方法包括:
S1、获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
本申请实施例中,所述第一语音集包含多语言、多方言、多背景噪音的语音集合。
进一步地,本申请实施例中,为了让所述对比预测编码模型具有语音特征提取能力,利用所述第一语音集对预设的对比预测编码模型进行迭代训练,直至所述对比预测编码模型收敛,得到所述语音特征提取模型。其中,所述对比预测编码模型为CPC(contrastive predictive coding,对比预测编码)模型,由于所述对比预测编码为无监督模型,不许要对训练数据进行标记,可以低成本的获取大量的训练数据,从而让模型具有更强的特征提取能力。
S2、获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
本申请实施例中所述第二语音集,为具有对应文本标记的语音的集合。
进一步地,本申请实施例中,为了确定不同文字对应的语音特征,使后续语音识别更加的准确,对所述第二语音集进行特征提取,提取所述第二语音集中每条语音的语音特征, 得到所述语音向量集。
详细地,本申请实施例中,参阅图2所示,利用所述语音特征提取模型对所述第二语音集进行声音特征提取,得到所述语音向量集,包括:
S11、对所述第二语音集中的每条语音进行重采样,得到对应的数字语音;
本申请实施例中,为了便于对所述第二语音集中的每条语音进行数据处理,对所述样本音频进行重采样,得到所述数字语音,较佳地,本申请实施例利用数模转换器对所述样本音频进行重采样。
S12、对所述数字语音进行预加重,得到标准数字语音;
详细地,本申请实施例利用如下公式进行所述预加重操作:
y(t)=x(t)-μx(t-1)
其中,x(t)为所述数字语音,t为时间,y(t)为所述标准数字语音,μ为所述预加重操作的预设调节值,较佳地,μ的取值范围为[0.9,1.0]。
S13、利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集;
详细地,由于不同的所述标准数字语音的时长可能不同,为了让语音的特征统一,便于后续的模型识别,按照预设的时间尺度将所述标准数字语音划分为多个语音段落,得到语音段落集,利用所述语音特征提取模型对所述语音段落集中的每个所述语音段落进行特征提取,得到所述语音特征子集。
S14、汇总所有的所述语音特征子集,得到所述语音特征集。
本申请实施例中将所有的所述语音特征进行汇总,得到所述语音特征集。
S3、利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
本申请实施例中,所述深度学习模型为卷积神经网络模型。
较佳地,本申请实施例对所述语音特征集中包含的每个语音特征进行文字标记,得到训练集,利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型。
详细地,所述利用所述训练集对所述深度学习模型进行迭代训练,包括:
步骤A:根据预设的卷积池化次数,对所述训练集进行卷积池化操作,得到特征集;
步骤B:利用预设的激活函数对所述特征集进行计算得到预测值,将所述训练集中每个语音特征标记的文字进行向量化处理,得到标签值,根据所述预测值及所述标签值,利用预构建的第一损失函数进行计算,得到第一损失值;
较佳地,本申请实施例中利用onehot编码将所述训练集中每个语音特征标记的文字转化为向量,得到所述标签值。
步骤C:对比所述第一损失值与预设的第一损失阈值的大小,当所述第一损失值大于或等于所述第一预设阈值时,返回所述步骤A;当所述第一损失值小于所述第一预设阈值时,停止训练,得到所述语音识别模型。
详细地,本申请实施例中所述对所述训练集进行卷积池化操作得到第一特征集,包括:对所述训练集进行卷积操作得到第一卷积数据集;对所述第一卷积数据集进行最大池化操作得到所述第一特征集。
进一步地,所述卷积操作为:
Figure PCTCN2021084048-appb-000001
其中,ω’表示所述第一卷积数据集的通道数,ω表示所述训练集的通道数,k为预设卷积核的大小,f为预设卷积操作的步幅,p为预设数据补零矩阵。
进一步地,本申请较佳实施例所述第一激活函数包括:
Figure PCTCN2021084048-appb-000002
其中,μ t表示所述预测值,s表示所述特征集中的数据。
详细地,本申请较佳实施例所述第一损失函数包括:
Figure PCTCN2021084048-appb-000003
其中,L ce表示所述第一损失值,N为所述训练集的数据数目,i为正整数,y i为所述标签值,p i为所述预测值。
S4、当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
本申请实施例中,按照所述时间尺度将所述待识别语音划分为多个目标语音段落,并对每个所述每个目标语音段落进行序号标记,得到目标语音段落集,如:所述时间尺度为2秒,所述待识别语音共有6s,按照所述时间尺度将所述待识别语音划分为目标语音段落A、B、C,所述目标语音段落A为0-2s的语音,所述目标语音段落B为2-4s的语音,所述目标语音段落C为4-6s的语音,将所述目标语音段落A标记序号2,将所述目标语音段落B标记序号1,将所述目标语音段落C标记序号3,进一步地,本申请实施例利用所述语音特征提取模型对所述目标语音段落集中的每个所述目标语音段落进行语音特征提取,得到所述目标语音特征集。
本申请的另一实施例中,为了保证数据的隐私性,所述目标语音特征集可以存储在区块链节点中。
S6、利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
详细地,本申请实施例中利用所述语音识别模型对所述目标语音特征集中包含的每个目标语音特征进行识别得到对应的识别字符,将所述识别字符按照所述目标语音段落集中对应的目标语音段落的序号进行顺序组合,得到所述识别文本。如:所述目标语音段落中包含目标语音段落A、B、C,所述目标语音段落A对应的序号为2,所述目标语音段落B对应的序号为1,所述目标语音段落C对应的序号为3,所述目标语音段落A、B、C对应的目标语音特征分别为a、b、c,利用所述语音识别模型对所述目标语音特征a进行识别得到识别字符“是”,利用所述语音识别模型对所述目标语音特征b进行识别得到识别字符“我”,利用所述语音识别模型对所述目标语音特征c进行识别得到识别字符“谁”,将所述识别字符按照所述目标语音段落集中对应的目标语音段落的序号进行顺序组合,得到所述识别文本为“我是谁”。
如图3所示,是本申请语音识别装置的功能模块图。
本申请所述语音识别装置100可以安装于电子设备中。根据实现的功能,所述语音识别装置可以包括特征提取模型构建模块101、语音识别模型构建模块102、语音识别模块103,本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述特征提取模型构建模块101用于获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型。
本申请实施例中,所述第一语音集包含多语言、多方言、多背景噪音的语音集合。
进一步地,本申请实施例中,为了让所述对比预测编码模型具有语音特征提取能力,所述特征提取模型构建模块101利用所述第一语音集对预设的对比预测编码模型进行迭代训练,直至所述对比预测编码模型收敛,得到所述语音特征提取模型。其中,所述对比预测编码模型为CPC(contrastive predictive coding,对比预测编码)模型,由于所述对比预测编码为无监督模型,不许要对训练数据进行标记,可以低成本的获取大量的训练数据,从而让模型具有更强的特征提取能力。
所述语音识别模型构建模块102用于获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型。
本申请实施例中所述第二语音集,为具有对应文本标记的语音的集合。
进一步地,本申请实施例中,为了确定不同文字对应的语音特征,使后续语音识别更加的准确,所述语音识别模型构建模块102对所述第二语音集进行特征提取,提取所述第二语音集中每条语音的语音特征,得到所述语音向量集。
详细地,本申请实施例中,所述语音识别模型构建模块102利用下述手段对所述第二语音集进行声音特征提取,得到所述语音向量集,包括:
对所述第二语音集中的每条语音进行重采样,得到对应的数字语音;
本申请实施例中,为了便于对所述第二语音集中的每条语音进行数据处理,对所述样本音频进行重采样,得到所述数字语音,较佳地,本申请实施例利用数模转换器对所述样本音频进行重采样。
对所述数字语音进行预加重,得到标准数字语音;
详细地,本申请实施例利用如下公式进行所述预加重操作:
y(t)=x(t)-μx(t-1)
其中,x(t)为所述数字语音,t为时间,y(t)为所述标准数字语音,μ为所述预加重操作的预设调节值,较佳地,μ的取值范围为[0.9,1.0]。
利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集;
详细地,由于不同的所述标准数字语音的时长可能不同,为了让语音的特征统一,便于后续的模型识别,按照预设的时间尺度将所述标准数字语音划分为多个语音段落,得到语音段落集,利用所述语音特征提取模型对所述语音段落集中的每个所述语音段落进行特征提取,得到所述语音特征子集。
汇总所有的所述语音特征子集,得到所述语音特征集。
本申请实施例中将所有的所述语音特征进行汇总,得到所述语音特征集。
本申请实施例中,所述深度学习模型为卷积神经网络模型。
较佳地,本申请实施例对所述语音特征集中包含的每个语音特征进行文字标记,得到训练集,利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型。
详细地,所述所述语音识别模型构建模块102利用下述手段对所述深度学习模型进行迭代训练,包括:
步骤A:根据预设的卷积池化次数,对所述训练集进行卷积池化操作,得到特征集;
步骤B:利用预设的激活函数对所述特征集进行计算得到预测值,将所述训练集中每个语音特征标记的文字进行向量化处理,得到标签值,根据所述预测值及所述标签值,利用预构建的第一损失函数进行计算,得到第一损失值;
较佳地,本申请实施例中利用onehot编码将所述训练集中每个语音特征标记的文字转化为向量,得到所述标签值。
步骤C:对比所述第一损失值与预设的第一损失阈值的大小,当所述第一损失值大于或等于所述第一预设阈值时,返回所述步骤A;当所述第一损失值小于所述第一预设阈值时,停止训练,得到所述语音识别模型。
详细地,本申请实施例中所述对所述训练集进行卷积池化操作得到第一特征集,包括:对所述训练集进行卷积操作得到第一卷积数据集;对所述第一卷积数据集进行最大池化操作得到所述第一特征集。
进一步地,所述卷积操作为:
Figure PCTCN2021084048-appb-000004
其中,ω’表示所述第一卷积数据集的通道数,ω表示所述训练集的通道数,k为预设卷积核的大小,f为预设卷积操作的步幅,p为预设数据补零矩阵。
进一步地,本申请较佳实施例所述第一激活函数包括:
Figure PCTCN2021084048-appb-000005
其中,μ t表示所述预测值,s表示所述特征集中的数据。
详细地,本申请较佳实施例所述第一损失函数包括:
Figure PCTCN2021084048-appb-000006
其中,L ce表示所述第一损失值,N为所述训练集的数据数目,i为正整数,y i为所述标签值,p i为所述预测值。
所述语音识别模块103用于当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
本申请实施例中,所述语音识别模块103按照所述时间尺度将所述待识别语音划分为多个目标语音段落,并对每个所述每个目标语音段落进行序号标记,得到目标语音段落集,如:所述时间尺度为2秒,所述待识别语音共有6s,按照所述时间尺度将所述待识别语音划分为目标语音段落A、B、C,所述目标语音段落A为0-2s的语音,所述目标语音段落B为2-4s的语音,所述目标语音段落C为4-6s的语音,将所述目标语音段落A标记序号2,将所述目标语音段落B标记序号1,将所述目标语音段落C标记序号3,进一步地,本申请实施例利用所述语音特征提取模型对所述目标语音段落集中的每个所述目标语音段落进行语音特征提取,得到所述目标语音特征集。
本申请的另一实施例中,为了保证数据的隐私性,所述目标语音特征集可以存储在区块链节点中。
详细地,本申请实施例中所述语音识别模块103利用所述语音识别模型对所述目标语音特征集中包含的每个目标语音特征进行识别得到对应的识别字符,将所述识别字符按照所述目标语音段落集中对应的目标语音段落的序号进行顺序组合,得到所述识别文本。如:所述目标语音段落中包含目标语音段落A、B、C,所述目标语音段落A对应的序号为2,所述目标语音段落B对应的序号为1,所述目标语音段落C对应的序号为3,所述目标语音段落A、B、C对应的目标语音特征分别为a、b、c,利用所述语音识别模型对所述目标语音特征a进行识别得到识别字符“是”,利用所述语音识别模型对所述目标语音特征b进行识别得到识别字符“我”,利用所述语音识别模型对所述目标语音特征c进行识别得到识别字符“谁”,将所述识别字符按照所述目标语音段落集中对应的目标语音段落的序号进行顺序组合,得到所述识别文本为“我是谁”。
如图4所示,是本申请实现语音识别方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如语音识别程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如语音识别程序的代码等,还可以用于暂 时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如语音识别程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(perIPheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图4仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图4示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的语音识别程序12是多个计算机程序的组合,在所述处理器10中运行时,可以实现:
获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
具体地,所述处理器10对上述计算机程序的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质 可以是非易失性的,也可以是易失性的。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
本申请实施例还可以提供一种计算机可读存储介质,所述计算机可读存储介质可以是易失性的,也可以是非易失性的,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:
获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种语音识别方法,其中,所述方法包括:
    获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
    获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
    利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
    当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
    利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
  2. 如权利要求1所述的语音识别方法,其中,所述利用所述语音特征提取模型对所述第二语音集进行声音特征提取得到语音特征集,包括:
    对所述第二语音集中的每条语音进行重采样,得到对应的数字语音;
    对所述数字语音进行预加重,得到对应的标准数字语音;
    利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集;
    汇总所有的所述语音特征子集,得到所述语音特征集。
  3. 如权利要求2所述的语音识别方法,其中,所述利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集,包括:
    按照预设的时间尺度将所述标准数字语音划分为多个语音段落,得到语音段落集;
    利用所述语音特征提取模型对所述语音段落集中的每个所述语音段落进行特征提取,得到所述语音特征子集。
  4. 如权利要求1所述的语音识别方法,其中,所述利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型,包括:
    对所述语音特征集中包含的每个语音特征进行文字标记,得到训练集;
    利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型。
  5. 如权利要求4所述的语音识别方法,其中,所述利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型,包括:
    特征提取步骤:根据预设的卷积池化次数,对所述训练集进行卷积池化操作,得到特征集;
    损失计算步骤:利用预设的激活函数对所述特征集进行计算得到预测值,将所述训练集中每个语音特征标记的文字进行向量化处理,得到标签值,根据所述预测值及所述标签值,利用预构建的第一损失函数进行计算,得到第一损失值;
    训练判断步骤:对比所述第一损失值与预设的第一损失阈值的大小,当所述第一损失值大于或等于所述第一预设阈值时,返回所述特征提取步骤;当所述第一损失值小于所述第一预设阈值时,停止训练,得到所述语音识别模型。
  6. 如权利要求1所述的语音识别方法,其中,所述利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集,包括:
    按照所述时间尺度将所述待识别语音划分为多个目标语音段落;
    对每个所述每个目标语音段落进行序号标记,得到目标语音段落集;
    利用所述语音特征提取模型对所述目标语音段落集中的每个所述目标语音段落进行语音特征提取,得到所述目标语音特征集。
  7. 如权利要求6所述的语音识别方法,其中,所述利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本,包括:
    利用所述语音识别模型对所述目标语音特征集中包含的每个目标语音特征进行识别 得到对应的识别字符;
    将所述识别字符按照所述目标语音段落集中对应的目标语音段落的序号进行顺序组合,得到所述识别文本。
  8. 一种语音识别装置,其中,包括:
    特征提取模型构建模块,用于获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
    语音识别模型构建模块,用于获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
    语音识别模块,用于当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
    获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
    获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
    利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
    当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
    利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
  10. 如权利要求9所述的电子设备,其中,所述利用所述语音特征提取模型对所述第二语音集进行声音特征提取得到语音特征集,包括:
    对所述第二语音集中的每条语音进行重采样,得到对应的数字语音;
    对所述数字语音进行预加重,得到对应的标准数字语音;
    利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集;
    汇总所有的所述语音特征子集,得到所述语音特征集。
  11. 如权利要求10所述的电子设备,其中,所述利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集,包括:
    按照预设的时间尺度将所述标准数字语音划分为多个语音段落,得到语音段落集;
    利用所述语音特征提取模型对所述语音段落集中的每个所述语音段落进行特征提取,得到所述语音特征子集。
  12. 如权利要求9所述的电子设备,其中,所述利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型,包括:
    对所述语音特征集中包含的每个语音特征进行文字标记,得到训练集;
    利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型。
  13. 如权利要求12所述的电子设备,其中,所述利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型,包括:
    特征提取步骤:根据预设的卷积池化次数,对所述训练集进行卷积池化操作,得到特征集;
    损失计算步骤:利用预设的激活函数对所述特征集进行计算得到预测值,将所述训练 集中每个语音特征标记的文字进行向量化处理,得到标签值,根据所述预测值及所述标签值,利用预构建的第一损失函数进行计算,得到第一损失值;
    训练判断步骤:对比所述第一损失值与预设的第一损失阈值的大小,当所述第一损失值大于或等于所述第一预设阈值时,返回所述特征提取步骤;当所述第一损失值小于所述第一预设阈值时,停止训练,得到所述语音识别模型。
  14. 如权利要求9所述的电子设备,其中,所述利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集,包括:
    按照所述时间尺度将所述待识别语音划分为多个目标语音段落;
    对每个所述每个目标语音段落进行序号标记,得到目标语音段落集;
    利用所述语音特征提取模型对所述目标语音段落集中的每个所述目标语音段落进行语音特征提取,得到所述目标语音特征集。
  15. 如权利要求14所述的电子设备,其中,所述利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本,包括:
    利用所述语音识别模型对所述目标语音特征集中包含的每个目标语音特征进行识别得到对应的识别字符;
    将所述识别字符按照所述目标语音段落集中对应的目标语音段落的序号进行顺序组合,得到所述识别文本。
  16. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
    获取第一语音集,利用所述第一语音集对预设的对比预测编码模型进行训练,得到语音特征提取模型;
    获取第二语音集,利用所述语音特征提取模型对所述第二语音集进行特征提取,得到语音特征集;
    利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型;
    当接收待识别语音时,利用所述语音特征提取模型对所述待识别语音进行特征提取,得到目标语音特征集;
    利用所述语音识别模型对所述目标语音特征集进行识别,得到识别文本。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述利用所述语音特征提取模型对所述第二语音集进行声音特征提取得到语音特征集,包括:
    对所述第二语音集中的每条语音进行重采样,得到对应的数字语音;
    对所述数字语音进行预加重,得到对应的标准数字语音;
    利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集;
    汇总所有的所述语音特征子集,得到所述语音特征集。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述利用所述语音特征提取模型对所述标准数字语音进行特征提取,得到语音特征子集,包括:
    按照预设的时间尺度将所述标准数字语音划分为多个语音段落,得到语音段落集;
    利用所述语音特征提取模型对所述语音段落集中的每个所述语音段落进行特征提取,得到所述语音特征子集。
  19. 如权利要求16所述的计算机可读存储介质,其中,所述利用所述语音特征集对预设的深度学习模型进行训练,得到所述语音识别模型,包括:
    对所述语音特征集中包含的每个语音特征进行文字标记,得到训练集;
    利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型。
  20. 如权利要求19所述的计算机可读存储介质,其中,所述利用所述训练集对所述深度学习模型进行迭代训练,得到所述语音识别模型,包括:
    特征提取步骤:根据预设的卷积池化次数,对所述训练集进行卷积池化操作,得到特 征集;
    损失计算步骤:利用预设的激活函数对所述特征集进行计算得到预测值,将所述训练集中每个语音特征标记的文字进行向量化处理,得到标签值,根据所述预测值及所述标签值,利用预构建的第一损失函数进行计算,得到第一损失值;
    训练判断步骤:对比所述第一损失值与预设的第一损失阈值的大小,当所述第一损失值大于或等于所述第一预设阈值时,返回所述特征提取步骤;当所述第一损失值小于所述第一预设阈值时,停止训练,得到所述语音识别模型。
PCT/CN2021/084048 2020-12-29 2021-03-30 语音识别方法、装置、电子设备及可读存储介质 WO2022141867A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011600083.XA CN112712797A (zh) 2020-12-29 2020-12-29 语音识别方法、装置、电子设备及可读存储介质
CN202011600083.X 2020-12-29

Publications (1)

Publication Number Publication Date
WO2022141867A1 true WO2022141867A1 (zh) 2022-07-07

Family

ID=75546761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084048 WO2022141867A1 (zh) 2020-12-29 2021-03-30 语音识别方法、装置、电子设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN112712797A (zh)
WO (1) WO2022141867A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113223502B (zh) * 2021-04-28 2024-01-30 平安科技(深圳)有限公司 语音识别系统优化方法、装置、设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170194002A1 (en) * 2016-01-05 2017-07-06 Electronics And Telecommunications Research Institute Voice recognition terminal, voice recognition server, and voice recognition method for performing personalized voice recognition
CN110277088A (zh) * 2019-05-29 2019-09-24 平安科技(深圳)有限公司 智能语音识别方法、装置及计算机可读存储介质
CN110797016A (zh) * 2019-02-26 2020-02-14 北京嘀嘀无限科技发展有限公司 一种语音识别方法、装置、电子设备及存储介质
CN111613212A (zh) * 2020-05-13 2020-09-01 携程旅游信息技术(上海)有限公司 语音识别方法、系统、电子设备和存储介质
CN111862945A (zh) * 2019-05-17 2020-10-30 北京嘀嘀无限科技发展有限公司 一种语音识别方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170194002A1 (en) * 2016-01-05 2017-07-06 Electronics And Telecommunications Research Institute Voice recognition terminal, voice recognition server, and voice recognition method for performing personalized voice recognition
CN110797016A (zh) * 2019-02-26 2020-02-14 北京嘀嘀无限科技发展有限公司 一种语音识别方法、装置、电子设备及存储介质
CN111862945A (zh) * 2019-05-17 2020-10-30 北京嘀嘀无限科技发展有限公司 一种语音识别方法、装置、电子设备及存储介质
CN110277088A (zh) * 2019-05-29 2019-09-24 平安科技(深圳)有限公司 智能语音识别方法、装置及计算机可读存储介质
CN111613212A (zh) * 2020-05-13 2020-09-01 携程旅游信息技术(上海)有限公司 语音识别方法、系统、电子设备和存储介质

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AARON VAN DEN OORD; YAZHE LI; ORIOL VINYALS: "Representation Learning with Contrastive Predictive Coding", ARXIV.ORG, 10 July 2018 (2018-07-10), pages 1 - 13, XP081015780 *
CHENG-I LAI: "Contrastive Predictive Coding Based Feature for Automatic Speaker Verification", ARXIV.ORG, 2 April 2019 (2019-04-02), pages 1 - 74, XP081164042 *

Also Published As

Publication number Publication date
CN112712797A (zh) 2021-04-27

Similar Documents

Publication Publication Date Title
WO2022134759A1 (zh) 关键词生成方法、装置、电子设备及计算机存储介质
WO2022116420A1 (zh) 语音事件检测方法、装置、电子设备及计算机存储介质
WO2022142593A1 (zh) 文本分类方法、装置、电子设备及可读存储介质
WO2021232594A1 (zh) 语音情绪识别方法、装置、电子设备及存储介质
WO2021151345A1 (zh) 识别模型的参数获取方法、装置、电子设备及存储介质
WO2022121171A1 (zh) 相似文本匹配方法、装置、电子设备及计算机存储介质
WO2022105179A1 (zh) 生物特征图像识别方法、装置、电子设备及可读存储介质
WO2022160449A1 (zh) 文本分类方法、装置、电子设备及存储介质
WO2022121176A1 (zh) 语音合成方法、装置、电子设备及可读存储介质
WO2022121157A1 (zh) 语音合成方法、装置、电子设备及存储介质
WO2022222300A1 (zh) 开放关系抽取方法、装置、电子设备及存储介质
CN113205814B (zh) 语音数据标注方法、装置、电子设备及存储介质
CN112988963B (zh) 基于多流程节点的用户意图预测方法、装置、设备及介质
WO2022194062A1 (zh) 疾病标签检测方法、装置、电子设备及存储介质
CN113704429A (zh) 基于半监督学习的意图识别方法、装置、设备及介质
WO2022121158A1 (zh) 语音合成方法、装置、电子设备及存储介质
WO2022178933A1 (zh) 基于上下文的语音情感检测方法、装置、设备及存储介质
WO2021189903A1 (zh) 基于音频的用户状态识别方法、装置、电子设备及存储介质
CN113064994A (zh) 会议质量评估方法、装置、设备及存储介质
CN113344125B (zh) 长文本匹配识别方法、装置、电子设备及存储介质
WO2022141867A1 (zh) 语音识别方法、装置、电子设备及可读存储介质
WO2021208700A1 (zh) 语音数据选择方法、装置、电子设备及存储介质
CN113254814A (zh) 网络课程视频打标签方法、装置、电子设备及介质
WO2023178979A1 (zh) 问题标注方法、装置、电子设备及存储介质
CN116720525A (zh) 基于问诊数据的疾病辅助分析方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21912637

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912637

Country of ref document: EP

Kind code of ref document: A1