WO2018014537A1 - 语音识别方法和装置 - Google Patents
语音识别方法和装置 Download PDFInfo
- Publication number
- WO2018014537A1 WO2018014537A1 PCT/CN2017/072641 CN2017072641W WO2018014537A1 WO 2018014537 A1 WO2018014537 A1 WO 2018014537A1 CN 2017072641 W CN2017072641 W CN 2017072641W WO 2018014537 A1 WO2018014537 A1 WO 2018014537A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- acoustic model
- acoustic
- output value
- parameters
- input
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/02—Feature extraction for speech recognition; Selection of recognition unit
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/08—Speech classification or search
- G10L15/16—Speech classification or search using artificial neural networks
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/06—Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/08—Speech classification or search
- G10L15/14—Speech classification or search using statistical models, e.g. Hidden Markov Models [HMMs]
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/06—Creation of reference templates; Training of speech recognition systems, e.g. adaptation to the characteristics of the speaker's voice
- G10L15/063—Training
Definitions
- the present application relates to the field of voice processing technologies, and in particular, to a voice recognition method and apparatus.
- Speech recognition is used to recognize speech as text.
- Speech recognition can be divided into networked speech recognition and embedded speech recognition.
- Networked speech recognition means that the user uploads the speech signal to the server through the network, and the server performs speech recognition and returns the recognition result to the user.
- Embedded speech recognition refers to the user's speech recognition through a speech recognizer embedded in the smart terminal.
- a key part of speech recognition is the acoustic model, and the acoustic models currently generated are relatively large. Cause This does not directly apply the acoustic model used by the server directly to the smart terminal, and a solution for embedded speech recognition needs to be given.
- the present application aims to solve at least one of the technical problems in the related art to some extent.
- an object of the present application is to propose a speech recognition method that can be applied to embedded speech recognition.
- Another object of the present application is to propose a speech recognition apparatus.
- the speech recognition method of the first aspect of the present application includes: performing acoustic feature extraction on the input speech to obtain an acoustic feature; and acquiring an acoustic model, wherein the parameter of the acoustic model is a binarization parameter Performing speech recognition based on the acoustic features and the acoustic model.
- the speech recognition method proposed by the embodiment of the first aspect of the present invention can significantly reduce the size of the acoustic model and reduce the required storage space by adopting an acoustic model whose parameters are binarized parameters, thereby being applicable to embedded speech recognition.
- the speech recognition apparatus of the second aspect of the present application includes: a feature extraction module, configured to perform acoustic feature extraction on the input speech to obtain an acoustic feature; and an acquisition module, configured to acquire an acoustic model, where The parameter of the acoustic model is a binarization parameter; an identification module for performing speech recognition based on the acoustic feature and the acoustic model.
- the speech recognition apparatus proposed by the embodiment of the second aspect of the present application adopts a parameter that is a binarization parameter.
- the acoustic model can significantly reduce the size of the acoustic model and reduce the required storage space, which can be applied to embedded speech recognition.
- the embodiment of the present application further provides an apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform: according to any one of the first aspect embodiments of the present application The method described.
- the embodiment of the present application further provides a non-transitory computer readable storage medium, when the instructions in the storage medium are executed by a processor, enabling the processor to perform: as in any one of the first aspect embodiments of the present application The method described.
- the embodiment of the present application also provides a computer program product that, when executed by a processor, enables the processor to perform the method of any of the first aspect of the present application.
- FIG. 1 is a schematic flow chart of a voice recognition method according to an embodiment of the present application.
- FIG. 2 is a schematic flow chart of a voice recognition method according to another embodiment of the present application.
- FIG. 3 is a schematic diagram of an activation function of binarization in the embodiment of the present application.
- FIG. 4 is a schematic diagram of a binarization network in the embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a voice recognition apparatus according to an embodiment of the present application.
- FIG. 6 is a schematic structural diagram of a voice recognition apparatus according to an embodiment of the present application.
- the storage space, computing power and resources of the intelligent terminal are relatively poor, so the acoustic model adopted by the server cannot be directly applied to the embedded speech recognition.
- DNN Deep Neural Networks
- HMM hidden Markov model
- the parameters of the type are changed, and are changed from floating point number representation to binarized. Further, as the acoustic features pass through the DNN, the output is also converted to binarization.
- each embodiment of the present application is not limited to being able to solve all the technical problems perfectly, and solve at least one technical problem at least to some extent.
- the smart terminal involved in the present application may include a smart phone, a tablet computer, and a smart wearable device.
- Various terminals capable of applying voice recognition technology such as equipment, vehicle terminals, intelligent robots, and smart home appliances.
- FIG. 1 is a schematic flow chart of a voice recognition method according to an embodiment of the present application.
- the method in this embodiment includes:
- S11 Perform acoustic feature extraction on the input voice to obtain an acoustic feature.
- the acoustic feature extraction process may be performed using an existing or future acoustic feature extraction process.
- Acoustic characteristics include, for example, Mel Frequency Cepstrum Coefficient (MFCC) and the like.
- S12 Acquire an acoustic model, wherein the parameters of the acoustic model are binarization parameters.
- the acoustic model can be generated during the training phase, and in the recognition phase, the acoustic model that has been trained to be generated is directly acquired.
- the parameters of a typical acoustic model are floating point numbers, so each parameter typically takes 16 or 32 bits.
- the parameters of the acoustic model are binarization parameters, and the binarization parameters mean that each parameter is any one of the two determined values. For example, if two values have been determined with +1 and -1, then each parameter is +1 or -1.
- each parameter can be represented by one bit. Compared to the case where each parameter occupies 16 or 32 bits, the size of the acoustic model can be significantly reduced, thereby reducing the required storage space.
- S13 Perform speech recognition according to the acoustic feature and the acoustic model.
- the acoustic model can indicate the relationship between the speech and the acoustic state probability. Therefore, after the acoustic features are obtained, the acoustic state probability can be obtained according to the acoustic model. It can be understood that other processes may be included in the speech recognition, for example, after obtaining the concept of the acoustic state, it may be converted into text according to a language model, a pronunciation dictionary, etc., thereby completing the final speech recognition. This application mainly describes the related content of the acoustic model, and the remaining processes of the speech recognition can be implemented by existing or future technologies.
- the size of the acoustic model can be significantly reduced, and the required storage space can be reduced, thereby being applicable to embedded speech recognition.
- FIG. 2 is a schematic flow chart of a voice recognition method according to another embodiment of the present application.
- the method of this embodiment includes:
- S21 The training generates an acoustic model, wherein the parameters of the acoustic model are binarization parameters, and the calculation error is included in the training process, and the precision of the error is floating point precision.
- a large number of speech samples can be collected during the training phase, acoustic features are extracted for each speech sample, and then trained based on these acoustic features to generate an acoustic model.
- the acoustic model can be generated by the training of the DNN+HMM hybrid modeling method.
- the parameters of the acoustic model adopt binarization parameters.
- error back propagation (backpropagation) algorithm can be used in the above calculation error.
- Error backpropagation roughly includes: output error (some form) -> hidden layer (layer by layer) -> input layer. Its main purpose is to obtain the layers by distributing the error back to all the elements in each layer.
- the error signal of the unit, and thus the weight of each unit (the process is a process of weight adjustment).
- the parameters of the acoustic model used are binarization parameters, but the accuracy of the error uses floating point precision.
- the rest of the values are in floating point numbers.
- the above S21 can be completed during the training phase, and the resulting acoustic model can be used for subsequent speech recognition.
- S22 Perform acoustic feature extraction on the input voice to obtain an acoustic feature.
- This step can refer to the related content of the previous embodiment, and will not be described in detail herein.
- the acoustic features can also be binarized so that the input of the first hidden layer connected to the input layer is also a binarized value.
- a linear transformation may be performed before the output value is binarized.
- the formula for linear transformation can be as shown in equation (1).
- X is the original value of the output value
- Y is the output value after the linear transformation
- a and b are two fixed parameters, which can be preset.
- the binarization activation function can be used for processing.
- the binarization activation function is shown in Figure 3. Based on the activation function shown in Figure 3, if the original value of a data is greater than 0, the binarized value is +1. If the original value of a data is greater than 0, the binarized The value is -1.
- the above-mentioned binarized value is +1 or -1.
- other numbers can be used, such as 1 or 0.
- the binarization network as shown in FIG. 4 may be included in the speech recognition.
- the multiplication operation can be replaced by XOR, and the addition operation is replaced by the number of each binarization value.
- a and b are used to represent the values of two operations, and a and b are both binarized values, as shown in the table.
- the multiplication of a and b (a*b) can be replaced by XOR.
- one value can be encoded as 0 and the other code as 1, such as +1 as 0.
- the accumulation operation can be completed by calculating the number of set bits and unset bits. The set bit and the unset bit respectively represent one of the binarized values, such as one being +1 and one being -1.
- the above process can be implemented by special hardware, or general hardware such as CPU and GPU.
- the size of the acoustic model can be reduced, and the required storage space can be reduced.
- the performance of the acoustic model can be guaranteed to ensure the performance of speech recognition.
- the computational complexity can be reduced, the computational power and resource requirements can be reduced, and the computing power of hardware such as DSP and FPGA can be fully utilized.
- This embodiment can also be applied to conventional hardware such as a CPU and a GPU because of reduced computational complexity.
- FIG. 5 is a schematic structural diagram of a voice recognition apparatus according to an embodiment of the present application.
- the apparatus of this embodiment may be located in an embedded speech recognizer or may also be used in a server.
- the apparatus 50 of this embodiment includes a feature extraction module 51, an acquisition module 52, and an identification module 53.
- a feature extraction module 51 configured to perform acoustic feature extraction on the input voice to obtain an acoustic feature
- An obtaining module 52 configured to acquire an acoustic model, wherein the parameter of the acoustic model is a binarization parameter
- the identification module 53 is configured to perform speech recognition according to the acoustic feature and the acoustic model.
- the apparatus 50 of this embodiment further includes:
- the training module 54 is configured to train and generate the acoustic model, wherein the error is calculated by using an error back-propagation method during the training, and the accuracy of the error is floating point precision.
- the identification module 53 is specifically configured to:
- the acoustic model includes a DNN
- the acoustic feature is used as an input layer of the DNN
- an acoustic model parameter and an input value are used to calculate an output value
- the output value of the next hidden layer is binarized as the input value of the next hidden layer.
- the identification module 53 is further configured to:
- the output value is linearly transformed to binarize the transformed output value.
- the identification module 53 is configured to perform an operation on the parameters of the acoustic model and the input values to obtain an output value, including:
- the bit value is operated according to the parameters of the acoustic model and the input value to obtain an output value.
- the size of the acoustic model can be significantly reduced, and the required storage space can be reduced, thereby being applicable to embedded speech recognition.
- the embodiment of the present application further provides an apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform: performing acoustic feature extraction on the input voice to obtain an acoustic feature Acquiring an acoustic model, wherein the parameters of the acoustic model are binarization parameters; speech recognition is performed based on the acoustic features and the acoustic model.
- the embodiment of the present application further provides a non-transitory computer readable storage medium, when the instructions in the storage medium are executed by the processor, enable the processor to perform: performing acoustic feature extraction on the input voice to obtain acoustic features. Acquiring an acoustic model, wherein the parameters of the acoustic model are binarization parameters; speech recognition is performed based on the acoustic features and the acoustic model.
- the embodiment of the present application further provides a computer program product, when the instructions in the computer program product are executed by the processor, enabling the processor to perform: performing acoustic feature extraction on the input voice to obtain an acoustic feature; acquiring an acoustic model Wherein the parameter of the acoustic model is a binarization parameter; speech recognition is performed based on the acoustic feature and the acoustic model.
- portions of the application can be implemented in hardware, software, firmware, or a combination thereof.
- multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
- a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
- each functional unit in each embodiment of the present application may be integrated into one processing module. It is also possible that each unit physically exists alone, or two or more units may be integrated in one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Probability & Statistics with Applications (AREA)
- Telephonic Communication Services (AREA)
Abstract
一种语音识别方法和装置,其中该语音识别方法包括:对输入的语音进行声学特征提取,得到声学特征(S11);获取声学模型,其中,声学模型的参数是二值化参数(S12);根据声学特征和声学模型进行语音识别(S13)。该方法能够适用于嵌入式语音识别。
Description
相关申请的交叉引用
本申请要求北京百度在线网络技术(北京)有限公司于2016年7月22日提交的、发明名称为“语音识别方法和装置”的、中国专利申请号“201610586698.9”的优先权。
本申请涉及语音处理技术领域,尤其涉及一种语音识别方法和装置。
随着智能手机、平板电脑等移动设备的不断普及,语音作为一种自然的人机交互手段,在人们的日常生活工作中发挥着越来重要的作用。语音识别用于将语音识别为文本。
语音识别可以分为联网语音识别和嵌入式语音识别,联网语音识别是指用户通过网络将语音信号上传给服务器,由服务器进行语音识别,并将识别结果返回给用户。嵌入式语音识别是指用户通过嵌入在智能终端内的语音识别器进行语音识别。
语音识别的一个关键部分是声学模型,目前生成的声学模型都比较大。因
此无法直接将服务器使用的声学模型直接应用于智能终端,需要给出适用于嵌入式语音识别的解决方案。
发明内容
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。
为此,本申请的一个目的在于提出一种语音识别方法,该方法可以适用于嵌入式语音识别。
本申请的另一个目的在于提出一种语音识别装置。
为达到上述目的,本申请第一方面实施例提出的语音识别方法,包括:对输入的语音进行声学特征提取,得到声学特征;获取声学模型,其中,所述声学模型的参数是二值化参数;根据所述声学特征和所述声学模型进行语音识别。
本申请第一方面实施例提出的语音识别方法,通过采用参数是二值化参数的声学模型,可以显著减小声学模型的大小,降低所需存储空间,从而可以适用于嵌入式语音识别。
为达到上述目的,本申请第二方面实施例提出的语音识别装置,包括:特征提取模块,用于对输入的语音进行声学特征提取,得到声学特征;获取模块,用于获取声学模型,其中,所述声学模型的参数是二值化参数;识别模块,用于根据所述声学特征和所述声学模型进行语音识别。
本申请第二方面实施例提出的语音识别装置,通过采用参数是二值化参数
的声学模型,可以显著减小声学模型的大小,降低所需存储空间,从而可以适用于嵌入式语音识别。
本申请实施例还提出了一种设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行:如本申请第一方面实施例任一项所述的方法。
本申请实施例还提出了一种非临时性计算机可读存储介质,当所述存储介质中的指令由处理器执行时,使得处理器能够执行:如本申请第一方面实施例任一项所述的方法。
本申请实施例还提出了一种计算机程序产品,当所述计算机程序产品中的指令被处理器执行时,使得处理器能够执行:如本申请第一方面实施例任一项所述的方法。
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1是本申请一个实施例提出的语音识别方法的流程示意图;
图2是本申请另一个实施例提出的语音识别方法的流程示意图;
图3是本申请实施例中二值化的激活函数的示意图;
图4是本申请实施例中二值化网络的示意图;
图5是本申请一个实施例提出的语音识别装置的结构示意图;
图6是本申请一个实施例提出的语音识别装置的结构示意图。
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的模块或具有相同或类似功能的模块。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。相反,本申请的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。
本申请将以嵌入式语音识别进行说明。但是,可以理解的是,本实施例的方法不限于嵌入式语音识别,也可以应用于联网语音识别,即服务器也可以采用如下的方案。
相对于服务器,智能终端的存储空间、计算能力和资源都是比较差的,因此不能直接将服务器采用的声学模型直接应用于嵌入式语音识别中。
为了适用于嵌入式语音识别,需要减小声学模型的大小。
目前通常采用深度神经网络(Deep Neural Networks,DNN)和隐马尔科夫模型(hidden Markov model,HMM)混合建模生成声学模型。
为了有效减少声学模型的大小,本申请将基于如下的主要思路:对声学模
型的参数进行改变,由浮点数表示方式改变为用二值化表示。进一步的,在声学特征经过DNN时,输出也转换为二值化。
需要说明的是,虽然上述对主要思路进行了说明,但是,具体的技术方案不限于上述的主要思路,还可以与其他特征相互结合,这些不同技术特征之间的结合依然属于本申请的保护范围。
需要说明的是,虽然上述给出了主要解决的技术问题,但是,本申请并不限于仅能解决上述技术问题,应用本申请给出的技术方案还可以解决的其他技术问题依然属于本申请的保护范围。
需要说明的是,本申请的每个实施例不限于能够全部完美解决所有的技术问题,而在至少在一定程度上解决至少一个技术问题。
需要说明的是,虽然上述给出了本申请的主要思路,以及后续实施例会对一些特别点进行说明。但是,本申请的创新点并不限于上述的主要思路及特别点所涉及的内容,并不排除本申请中一些并未特殊说明的内容依然可能会包含本申请的创新点。
可以理解的是,虽然上述进行了一些说明,但依然不排除其他可能方案,因此,与后续本申请给出的实施例相同、相似、等同等情况的技术方案依然属于本申请的保护范围。
下面将结合具体实施例对本申请的技术方案进行说明。
本申请中涉及的智能终端可以包括智能手机、平板电脑、智能可穿戴式设
备、车载终端、智能机器人、智能家电等各种能够应用语音识别技术的终端。
图1是本申请一个实施例提出的语音识别方法的流程示意图。
如图1所示,本实施例的方法包括:
S11:对输入的语音进行声学特征提取,得到声学特征。
其中,可以采用已有或将来出现的声学特征提取流程进行声学特征的提取。声学特征例如包括:梅尔频率倒谱系数(Mel Frequency CepstrumCoefficient,MFCC)等。
S12:获取声学模型,其中,所述声学模型的参数是二值化参数。
其中,可以在训练阶段生成声学模型,而在识别阶段,直接获取已训练生成的声学模型。
通常的声学模型的参数是浮点数,因此,每个参数通常会占用16位或32位(bit)。
本实施例中,声学模型的参数是二值化参数,二值化参数是指每个参数是已确定的两个值中的任一个。比如,已确定的两个值用+1和-1表示,则每个参数是+1或-1。
由于声学模型的参数是二值化参数,因此,每个参数可以用一位(bit)表示。相对于每个参数占用16或32位的情况,可以显著降低声学模型的大小,从而降低所需的存储空间。
S13:根据所述声学特征和所述声学模型进行语音识别。
其中,声学模型可以表明语音与声学状态概率之间的关系,因此,在得到声学特征后,依据声学模型可以得到声学状态概率。可以理解的是,在语音识别时还可以包括其他流程,比如,在得到声学状态概念后还可以根据语言模型、发音词典等,转换为文本,从而完成最终的语音识别。本申请主要对声学模型的相关内容进行说明,语音识别的其余流程可以采用已有或将来出现的技术实现。
本实施例中,通过采用参数是二值化参数的声学模型,可以显著减小声学模型的大小,降低所需存储空间,从而可以适用于嵌入式语音识别。
下面将给出一个相对解决较全面问题的技术方案,但是,本申请不限于本实施例的方案,还可以将解决不同技术问题的技术特征单独组成技术方案,或者,将不同技术特征进行其他方式的任意多个的组合以得到新的技术方案。
图2是本申请另一个实施例提出的语音识别方法的流程示意图。
参见图2,本实施例的方法包括:
S21:训练生成声学模型,其中,所述声学模型的参数是二值化参数,以及,在训练过程中包括计算误差,且误差的精度为浮点精度。
在训练阶段可以收集大量的语音样本,对每个语音样本提取声学特征,之后再根据这些声学特征进行训练,生成声学模型。
在训练声学模型时,可以采用多种方式,本实施例可以以DNN+HMM混合建模方式的训练生成声学模型。
与普通的DNN和HMM混合建模不同的是,本实施例中,声学模型的参数采用二值化参数。
上述计算误差时可以采用误差反向传播(反传)算法。误差反向传播大致包括:输出误差(某种形式)->隐层(逐层)->输入层其主要目的是通过将输出误差反传,将误差分摊给各层所有单元,从而获得各层单元的误差信号,进而修正各单元的权值(其过程,是一个权值调整的过程)。
进一步的,为了保证精度,在计算误差时,采用的声学模型的参数是二值化参数,但误差的精度采用浮点精度。例如,在计算误差时除了声学模型的参数,其余数值都采用浮点数。
上述的S21可以在训练阶段完成,得到的声学模型可以用于之后的语音识别。
在语音识别阶段可以执行如下步骤:
S22:对输入的语音进行声学特征提取,得到声学特征。
该步骤可以参见上一实施例的相关内容,在此不再详细说明。
S23:将声学特征作为DNN的输入层,在DNN的每个隐层,采用声学模型的参数与输入值进行运算得到输出值,其中,对存在下一个隐层的输出值进行二值化,以作为下一个隐层的输入值。
其中,为了使得整体都是二值化的数值运算,不仅可以将声学模型的参数作采用二值化数值,其余涉及的参数也可以采用二值化数值。
上述流程中,还可以对声学特征进行二值化,以便与输入层连接的第一个隐层的输入也是二值化的数值。
进一步的,为了保证声学模型的稳定性,在对输出值进行二值化之前,还可以先进行线性变换。线性变换的公式可以如公式(1)所示。
Y=a*X+b
其中,X表示输出值的原始值,Y是线性变换后的输出值,a和b是两个固定参数,可预设。
进一步的,在对数据进行二值化时,可以采用二值化激活函数进行处理。例如,二值化激活函数如图3所示。基于图3所示的激活函数,如果一个数据的原始数值为大于0的值,则二值化后的值是+1,如果一个数据的原始数值为大于0的值,则二值化后的值是-1。
上述以二值化后的值为+1或-1为例,可以理解的是,也可以用其他的数字表示,如为1或0。
因此,经过上述的二值化参数、线性变换和二值化激活函数,在语音识别时可以包括如图4所示的二值化网络。
进一步的,在数值之间运算时,由于是二值化数值之间的运算,因此可以采用位操作替换普通的矩阵操作。
具体的,可以用异或替换乘法运算,用每个二值化数值的个数替换加法运算。
例如,用a和b表示两个运算的数值,且a和b都是二值化数值,则如表
1所示,a和b相乘(a*b)可以用异或(XOR)替换,在异或运算时可以将一个值编码为0,另一个编码为1,比如将+1编码为0,将-1编码为1。另外,累加操作则可以通过计算set位和unset位的个数来完成。其中,set位和unset位分别表示二值化数值中的一个,比如一个是+1,一个是-1。
表1
| a | b | a*b |
| +1 | +1 | +1 |
| +1 | -1 | -1 |
| -1 | +1 | -1 |
| -1 | -1 | +1 |
上述流程中可以采用特殊硬件实现,也可以采用通用的硬件,如CPU、GPU等。
本实施例中,通过将声学模型的参数选为二值化参数,可以降低声学模型的大小,降低所需的存储空间。通过在训练阶段将误差选为浮点数精度,可以保证声学模型的性能,从而保证语音识别的性能。通过在整体运算过程中采用二值化数值,以及在运算中用位操作替换矩阵运算,可以降低运算量,降低对计算能力和资源的需求,可以充分利用DSP、FPGA等硬件的计算能力。本实施例由于降低了运算复杂度,因此也可以应用于传统硬件,如CPU和GPU。
图5是本申请一个实施例提出的语音识别装置的结构示意图。
本实施例的装置可以位于嵌入式语音识别器中或者也可以用于服务器中。
如图5所示,本实施例的装置50包括:特征提取模块51、获取模块52和识别模块53。
特征提取模块51,用于对输入的语音进行声学特征提取,得到声学特征;
获取模块52,用于获取声学模型,其中,所述声学模型的参数是二值化参数;
识别模块53,用于根据所述声学特征和所述声学模型进行语音识别。
一些实施例中,参见图6,本实施例的装置50还包括:
训练模块54,用于训练生成所述声学模型,其中,在训练过程中包括利用误差反传方法计算误差,且误差的精度为浮点精度。
一些实施例中,所述识别模块53具体用于:
在所述声学模型包括DNN时,将所述声学特征作为所述DNN的输入层,且,在所述DNN的每个隐层,采用声学模型的参数与输入值进行运算得到输出值,以及,对存在下一个隐层的输出值进行二值化,以作为下一个隐层的输入值。
一些实施例中,所述识别模块53还用于:
对输出值进行线性变换,以对变换后的输出值进行二值化。
一些实施例中,所述识别模块53用于采用声学模型的参数与输入值进行运算得到输出值,包括:
根据声学模型的参数与输入值进行位操作,得到输出值。
可以理解的是,本实施例的装置与上述方法实施例对应,具体内容可以参见方法实施例的相关描述,在此不再详细说明。
本实施例中,通过采用参数是二值化参数的声学模型,可以显著减小声学模型的大小,降低所需存储空间,从而可以适用于嵌入式语音识别。
可以理解的是,上述各实施例中相同或相似部分可以相互参考,在一些实施例中未详细说明的内容可以参见其他实施例中相同或相似的内容。
本申请实施例还提出了一种设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行:对输入的语音进行声学特征提取,得到声学特征;获取声学模型,其中,所述声学模型的参数是二值化参数;根据所述声学特征和所述声学模型进行语音识别。
本申请实施例还提出了一种非临时性计算机可读存储介质,当所述存储介质中的指令由处理器执行时,使得处理器能够执行:对输入的语音进行声学特征提取,得到声学特征;获取声学模型,其中,所述声学模型的参数是二值化参数;根据所述声学特征和所述声学模型进行语音识别。
本申请实施例还提出了一种计算机程序产品,当所述计算机程序产品中的指令被处理器执行时,使得处理器能够执行:对输入的语音进行声学特征提取,得到声学特征;获取声学模型,其中,所述声学模型的参数是二值化参数;根据所述声学特征和所述声学模型进行语音识别。
需要说明的是,在本申请的描述中,术语“第一”、“第二”等仅用于描述目
的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是指至少两个。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,
也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。
Claims (13)
- 一种语音识别方法,其特征在于,包括:对输入的语音进行声学特征提取,得到声学特征;获取声学模型,其中,所述声学模型的参数是二值化参数;根据所述声学特征和所述声学模型进行语音识别。
- 根据权利要求1所述的方法,其特征在于,还包括:训练生成所述声学模型,其中,在训练过程中包括利用误差反传方法计算误差,且误差的精度为浮点精度。
- 根据权利要求1-2任一项所述的方法,其特征在于,所述根据所述声学特征和所述声学模型进行语音识别,包括:在所述声学模型包括DNN时,将所述声学特征作为所述DNN的输入层,且,在所述DNN的每个隐层,采用声学模型的参数与输入值进行运算得到输出值,以及,对存在下一个隐层的输出值进行二值化,以作为下一个隐层的输入值。
- 根据权利要求3所述的方法,其特征在于,还包括:对输出值进行线性变换,以对变换后的输出值进行二值化。
- 根据权利要求3-4任一项所述的方法,其特征在于,所述采用声学模型的参数与输入值进行运算得到输出值,包括:根据声学模型的参数与输入值进行位操作,得到输出值。
- 一种语音识别装置,其特征在于,包括:特征提取模块,用于对输入的语音进行声学特征提取,得到声学特征;获取模块,用于获取声学模型,其中,所述声学模型的参数是二值化参数;识别模块,用于根据所述声学特征和所述声学模型进行语音识别。
- 根据权利要求6所述的装置,其特征在于,还包括:训练模块,用于训练生成所述声学模型,其中,在训练过程中包括利用误差反传方法计算误差,且误差的精度为浮点精度。
- 根据权利要求6-7任一项所述的装置,其特征在于,所述识别模块具体用于:在所述声学模型包括DNN时,将所述声学特征作为所述DNN的输入层,且,在所述DNN的每个隐层,采用声学模型的参数与输入值进行运算得到输出值,以及,对存在下一个隐层的输出值进行二值化,以作为下一个隐层的输入值。
- 根据权利要求8所述的装置,其特征在于,所述识别模块还用于:对输出值进行线性变换,以对变换后的输出值进行二值化。
- 根据权利要求8-9任一项所述的装置,其特征在于,所述识别模块用于采用声学模型的参数与输入值进行运算得到输出值,包括:根据声学模型的参数与输入值进行位操作,得到输出值。
- 一种设备,其特征在于,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行:如权利要求1-5任一项所述的方法。
- 一种非临时性计算机可读存储介质,其特征在于,当所述存储介质中的指令由处理器执行时,使得处理器能够执行:如权利要求1-5任一项所述的方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品中的指令被处理器执行时,使得处理器能够执行:如权利要求1-5任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/319,335 US10997966B2 (en) | 2016-07-22 | 2017-01-25 | Voice recognition method, device and computer storage medium |
| JP2019501963A JP6778811B2 (ja) | 2016-07-22 | 2017-01-25 | 音声認識方法及び装置 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610586698.9A CN106228976B (zh) | 2016-07-22 | 2016-07-22 | 语音识别方法和装置 |
| CN201610586698.9 | 2016-07-22 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018014537A1 true WO2018014537A1 (zh) | 2018-01-25 |
Family
ID=57532426
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/072641 Ceased WO2018014537A1 (zh) | 2016-07-22 | 2017-01-25 | 语音识别方法和装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US10997966B2 (zh) |
| JP (1) | JP6778811B2 (zh) |
| CN (1) | CN106228976B (zh) |
| WO (1) | WO2018014537A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106228976B (zh) * | 2016-07-22 | 2019-05-31 | 百度在线网络技术(北京)有限公司 | 语音识别方法和装置 |
| CN108510976B (zh) * | 2017-02-24 | 2021-03-19 | 芋头科技(杭州)有限公司 | 一种多语言混合语音识别方法 |
| CN109409308A (zh) * | 2018-11-05 | 2019-03-01 | 中国科学院声学研究所 | 一种基于鸟类鸣声的鸟类物种识别的方法 |
| CN116884398B (zh) * | 2023-09-06 | 2024-01-12 | 深圳市友杰智新科技有限公司 | 语音识别方法、装置、设备和介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1042790A (zh) * | 1988-11-16 | 1990-06-06 | 中国科学院声学研究所 | 认人与不认人实时语音识别的方法和装置 |
| JP2007513376A (ja) * | 2003-12-04 | 2007-05-24 | キングズ カレッジ ロンドン | 音声処理装置及び方法 |
| CN102013253A (zh) * | 2009-09-07 | 2011-04-13 | 株式会社东芝 | 基于语音单元语速的差异的语音识别方法及语音识别系统 |
| CN104123934A (zh) * | 2014-07-23 | 2014-10-29 | 泰亿格电子(上海)有限公司 | 一种构音识别方法及其系统 |
| CN105161092A (zh) * | 2015-09-17 | 2015-12-16 | 百度在线网络技术(北京)有限公司 | 一种语音识别方法和装置 |
| CN106228976A (zh) * | 2016-07-22 | 2016-12-14 | 百度在线网络技术(北京)有限公司 | 语音识别方法和装置 |
Family Cites Families (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2531227B2 (ja) * | 1988-02-09 | 1996-09-04 | 日本電気株式会社 | 音声認識装置 |
| US5839103A (en) * | 1995-06-07 | 1998-11-17 | Rutgers, The State University Of New Jersey | Speaker verification system using decision fusion logic |
| WO2007148493A1 (ja) * | 2006-06-23 | 2007-12-27 | Panasonic Corporation | 感情認識装置 |
| EP2272062B1 (en) * | 2008-03-26 | 2012-10-17 | Nokia Corporation | An audio signal classifier |
| US8972253B2 (en) * | 2010-09-15 | 2015-03-03 | Microsoft Technology Licensing, Llc | Deep belief network for large vocabulary continuous speech recognition |
| CN102201236B (zh) * | 2011-04-06 | 2012-12-19 | 中国人民解放军理工大学 | 一种高斯混合模型和量子神经网络联合的说话人识别方法 |
| JP5732994B2 (ja) * | 2011-04-19 | 2015-06-10 | ソニー株式会社 | 楽曲検索装置および方法、プログラム、並びに記録媒体 |
| CN102499815B (zh) * | 2011-10-28 | 2013-07-24 | 东北大学 | 一种辅助聋人感知环境声音的方法 |
| US9672811B2 (en) * | 2012-11-29 | 2017-06-06 | Sony Interactive Entertainment Inc. | Combining auditory attention cues with phoneme posterior scores for phone/vowel/syllable boundary detection |
| CN102982809B (zh) * | 2012-12-11 | 2014-12-10 | 中国科学技术大学 | 一种说话人声音转换方法 |
| US9099083B2 (en) * | 2013-03-13 | 2015-08-04 | Microsoft Technology Licensing, Llc | Kernel deep convex networks and end-to-end learning |
| JP5777178B2 (ja) | 2013-11-27 | 2015-09-09 | 国立研究開発法人情報通信研究機構 | 統計的音響モデルの適応方法、統計的音響モデルの適応に適した音響モデルの学習方法、ディープ・ニューラル・ネットワークを構築するためのパラメータを記憶した記憶媒体、及び統計的音響モデルの適応を行なうためのコンピュータプログラム |
| US9373324B2 (en) * | 2013-12-06 | 2016-06-21 | International Business Machines Corporation | Applying speaker adaption techniques to correlated features |
| US9400955B2 (en) * | 2013-12-13 | 2016-07-26 | Amazon Technologies, Inc. | Reducing dynamic range of low-rank decomposition matrices |
| US10229356B1 (en) * | 2014-12-23 | 2019-03-12 | Amazon Technologies, Inc. | Error tolerant neural network model compression |
| KR102295161B1 (ko) * | 2016-06-01 | 2021-08-27 | 메사추세츠 인스티튜트 오브 테크놀로지 | 저전력 자동 음성 인식 장치 |
| US10170110B2 (en) * | 2016-11-17 | 2019-01-01 | Robert Bosch Gmbh | System and method for ranking of hybrid speech recognition results with neural networks |
| US20180350351A1 (en) * | 2017-05-31 | 2018-12-06 | Intel Corporation | Feature extraction using neural network accelerator |
| CN118737132A (zh) * | 2018-07-13 | 2024-10-01 | 谷歌有限责任公司 | 端到端流关键词检出 |
| US10380997B1 (en) * | 2018-07-27 | 2019-08-13 | Deepgram, Inc. | Deep learning internal state index-based search and classification |
-
2016
- 2016-07-22 CN CN201610586698.9A patent/CN106228976B/zh active Active
-
2017
- 2017-01-25 US US16/319,335 patent/US10997966B2/en not_active Expired - Fee Related
- 2017-01-25 JP JP2019501963A patent/JP6778811B2/ja not_active Expired - Fee Related
- 2017-01-25 WO PCT/CN2017/072641 patent/WO2018014537A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1042790A (zh) * | 1988-11-16 | 1990-06-06 | 中国科学院声学研究所 | 认人与不认人实时语音识别的方法和装置 |
| JP2007513376A (ja) * | 2003-12-04 | 2007-05-24 | キングズ カレッジ ロンドン | 音声処理装置及び方法 |
| CN102013253A (zh) * | 2009-09-07 | 2011-04-13 | 株式会社东芝 | 基于语音单元语速的差异的语音识别方法及语音识别系统 |
| CN104123934A (zh) * | 2014-07-23 | 2014-10-29 | 泰亿格电子(上海)有限公司 | 一种构音识别方法及其系统 |
| CN105161092A (zh) * | 2015-09-17 | 2015-12-16 | 百度在线网络技术(北京)有限公司 | 一种语音识别方法和装置 |
| CN106228976A (zh) * | 2016-07-22 | 2016-12-14 | 百度在线网络技术(北京)有限公司 | 语音识别方法和装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019525233A (ja) | 2019-09-05 |
| US10997966B2 (en) | 2021-05-04 |
| CN106228976A (zh) | 2016-12-14 |
| US20190287514A1 (en) | 2019-09-19 |
| JP6778811B2 (ja) | 2020-11-04 |
| CN106228976B (zh) | 2019-05-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110415687B (zh) | 语音处理方法、装置、介质、电子设备 | |
| WO2022121180A1 (zh) | 模型的训练方法、装置、语音转换方法、设备及存储介质 | |
| EP2700071B1 (en) | Speech recognition using multiple language models | |
| US9299347B1 (en) | Speech recognition using associative mapping | |
| WO2021093449A1 (zh) | 基于人工智能的唤醒词检测方法、装置、设备及介质 | |
| WO2020253060A1 (zh) | 语音识别方法、模型的训练方法、装置、设备及存储介质 | |
| CN110795913A (zh) | 一种文本编码方法、装置、存储介质及终端 | |
| CN106098059A (zh) | 可定制语音唤醒方法及系统 | |
| WO2018133761A1 (zh) | 一种人机对话的方法和装置 | |
| CN110310623A (zh) | 样本生成方法、模型训练方法、装置、介质及电子设备 | |
| CN113674746B (zh) | 人机交互方法、装置、设备以及存储介质 | |
| US20210073628A1 (en) | Deep neural network training method and apparatus, and computer device | |
| CN110795939A (zh) | 文本处理方法、装置 | |
| CN113689868B (zh) | 一种语音转换模型的训练方法、装置、电子设备及介质 | |
| CN112037772A (zh) | 基于多模态的响应义务检测方法、系统及装置 | |
| TW202022855A (zh) | 語音處理方法及裝置 | |
| CN106910494B (zh) | 一种音频识别方法和装置 | |
| CN111326146A (zh) | 语音唤醒模板的获取方法、装置、电子设备及计算机可读存储介质 | |
| WO2024008215A2 (zh) | 语音情绪识别方法及装置 | |
| US10997966B2 (en) | Voice recognition method, device and computer storage medium | |
| CN114038450A (zh) | 方言识别方法、装置、设备及存储介质 | |
| CN111401069A (zh) | 会话文本的意图识别方法、意图识别装置及终端 | |
| JP2021081713A (ja) | 音声信号を処理するための方法、装置、機器、および媒体 | |
| CN113689867B (zh) | 一种语音转换模型的训练方法、装置、电子设备及介质 | |
| CN111833852B (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: 17830186 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2019501963 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17830186 Country of ref document: EP Kind code of ref document: A1 |