VOICE IDENTIFICATION METHOD AND APPARATUS

Abstract
Embodiments of the present invention provide a voice identification method, which includes: obtaining voice data; obtaining a confidence value according to the voice data; obtaining a noise scenario according to the voice data; obtaining a confidence threshold corresponding to the noise scenario; and if the confidence value is greater than or equal to the confidence threshold, processing the voice data. An apparatus is also provided. The method and apparatus that flexibly adjust the confidence threshold according to the noise scenario greatly improve a voice identification rate under a noise environment.
Description
CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese Patent Application No. 201310027559.9, filed on Jan. 24, 2013, which is hereby incorporated by reference in its entirety.


TECHNICAL FIELD

Embodiments of the present invention relate to the field of voice processing technologies, and in particular, to a voice identification method and apparatus.


BACKGROUND

A user generally performs voice identification by using voice assistant software on a terminal device such as a mobile phone. A process of performing voice identification by using software such as a voice assistant is that the user starts the voice assistant software to obtain voice data; the voice data is sent to a noise reduction module for noise reduction processing; the voice data after the noise reduction processing is sent to a voice identification engine; the voice identification engine returns an identification result to the voice assistant; and in order to reduce mis-determination, the voice assistant determines correctness of the identification result according to a confidence threshold, and then displays the identification result.


Currently, a use effect of software such as a voice assistant is generally better in a quiet environment such as an office. However, the use effect is poor in a noise environment (for example, an on-board environment). In the industry, a voice identification rate is generally improved by using a software noise reduction method, but an improvement effect is not distinct and sometimes the identification rate is even lowered.


SUMMARY

The technical solutions provide a voice identification method and apparatus, which are used to improve a voice identification rate and at the same time improve user experience.


In a first aspect, a voice identification method is provided and includes: obtaining voice data; obtaining a confidence value according to the voice data; obtaining a noise scenario according to the voice data; obtaining a confidence threshold corresponding to the noise scenario; and if the confidence value is greater than or equal to the confidence threshold, processing the voice data.


With reference to the first aspect, in a first possible implementation manner of the first aspect, the noise scenario specifically includes: a noise type and a noise magnitude.


With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the noise scenario includes the noise type, and the obtaining a noise scenario according to the voice data specifically includes: obtaining, according to the voice data, a frequency cepstrum coefficient of a noise in the voice data; and obtaining, according to the frequency cepstrum coefficient of the noise and a pre-established noise type model, the noise type of the voice data.


With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, a method for establishing a noise type model specifically includes: obtaining noise data; obtaining a frequency cepstrum coefficient of the noise data according to the noise data; and processing the frequency cepstrum coefficient according to an EM algorithm, and establishing the noise type model.


With reference to the third possible implementation manner of the first aspect or the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the noise type model is a Gaussian mixture model.


With reference to the first possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the noise scenario includes a noise magnitude, and the obtaining a noise scenario according to the voice data specifically includes: obtaining, according to the voice data, a feature parameter of the voice data; performing voice activity detection according to the feature parameter; and obtaining the noise magnitude according to a result of the voice activity detection.


With reference to the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect or the third possible implementation manner of the first aspect or the fourth possible implementation manner of the first aspect or the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the noise magnitude specifically includes: a signal-to-noise ratio; and a noise energy level.


With reference to the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect or the third possible implementation manner of the first aspect or the fourth possible implementation manner of the first aspect or the fifth possible implementation manner of the first aspect or the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, the obtaining a confidence threshold corresponding to the noise scenario specifically includes: obtaining, according to correspondence between pre-stored empirical data of a confidence threshold and the noise scenario, the confidence threshold corresponding to the noise scenario.


With reference to the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect or the third possible implementation manner of the first aspect or the fourth possible implementation manner of the first aspect or the fifth possible implementation manner of the first aspect or the sixth possible implementation manner of the first aspect or the seventh possible implementation manner of the first aspect, in an eighth possible implementation manner of the first aspect, a user is prompted if the confidence value is smaller than the confidence threshold.


In a second aspect, a voice identification apparatus is provided and includes: an obtaining unit, configured to obtain voice data; a confidence value unit, configured to receive the voice data obtained by the obtaining unit, and obtain a confidence value according to the voice data; a noise scenario unit, configured to receive the voice data obtained by the obtaining unit, and obtain a noise scenario according to the voice data; a confidence threshold unit, configured to receive the noise scenario of the noise scenario unit, and obtain a confidence threshold corresponding to the noise scenario; and a processing unit, configured to receive the confidence value obtained by the confidence value unit and the confidence threshold obtained by the confidence threshold unit, and if the confidence value is greater than or equal to the confidence threshold, process the voice data.


With reference to the second aspect, in a first possible implementation manner of the second aspect, the apparatus further includes: a model establishing unit, configured to obtain noise data, obtain a frequency cepstrum coefficient of the noise data according to the noise data, process the frequency cepstrum coefficient according to an EM algorithm, and establish a noise type model.


With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the noise scenario unit specifically includes: a noise type unit, configured to obtain, according to the voice data of the obtaining unit, a frequency cepstrum coefficient of a noise in the voice data, and obtain, according to the frequency cepstrum coefficient of the noise and the noise type model of the model establishing unit, a noise type of the voice data.


With reference to the second aspect or the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the noise scenario unit further includes: a noise magnitude unit, configured to obtain, according to the voice data of the obtaining unit, a feature parameter of the voice data, perform voice activity detection according to the feature parameter, and obtain a noise magnitude according to a result of the voice activity detection.


With reference to the second aspect or the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect or the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the apparatus further includes: a storage unit, configured to store empirical data of a confidence threshold.


With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the confidence threshold unit is specifically configured to obtain, according to correspondence between the empirical data of the confidence threshold pre-stored by the storage unit and the noise scenario, the confidence threshold corresponding to the noise scenario.


In a third aspect, a mobile terminal is provided and includes a processor and a microphone, where the microphone is configured to obtain voice data; and the processor is configured to obtain a confidence value and a noise scenario according to the voice data, obtain, according to the noise scenario, a confidence threshold corresponding to the noise scenario, and if the confidence value is greater than or equal to the confidence threshold, process the voice data.


With reference to the third aspect, in a first possible implementation manner of the second aspect, the mobile terminal further includes: a memory, configured to store empirical data of a confidence threshold.


With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the processor is specifically configured to obtain the confidence value and the noise scenario according to the voice data; obtain, according to correspondence between the empirical data of the confidence threshold pre-stored by the memory and the noise scenario, the confidence threshold corresponding to the noise scenario; and if the confidence value is greater than or equal to the confidence threshold, process the voice data.


The technical solutions of the present invention provide a voice identification method and apparatus. In the method and apparatus, the noise scenario is obtained, and the confidence threshold is obtained according to the pre-stored empirical data of the confidence threshold and the noise scenario. The method and apparatus that flexibly adjust the confidence threshold according to the noise scenario greatly improve a voice identification rate under a noise environment.





BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings according to these accompanying drawings without creative efforts.



FIG. 1 is a flowchart of a voice identification method according to Embodiment 1 of the present invention;



FIG. 2 is a flowchart of another implementation manner of a voice identification method according to Embodiment 1 of the present invention;



FIG. 3 is a flowchart of another implementation manner of a voice identification method according to Embodiment 2 of the present invention;



FIG. 4 is a flowchart of another implementation manner of a voice identification method according to Embodiment 3 of the present invention;



FIG. 5 is a schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention;



FIG. 6 is another possible schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention;



FIG. 7 is another possible schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention;



FIG. 8 is another possible schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention;



FIG. 9 is a schematic structural diagram of a mobile terminal according to Embodiment 5 of the present invention;



FIG. 10 is another possible schematic structural diagram of a mobile terminal according to Embodiment 5 of the present invention; and



FIG. 11 is a schematic structural diagram of a mobile phone according to an embodiment of the present invention.





DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the embodiments of the present invention.


Terms used in embodiments of the present invention are merely intended to describe specific embodiments, but not to limit the present invention. “A” and “the” in a singular form used in the embodiments of the present invention and the claims also aim to include a plural form, except that the context clearly represents other meanings It should also be understood that the term “and/or” used in the specification refers to any or all possible combinations of one or more associated listed items. It should be further understood that the term “include” adopted in the specification specifies existence of features, integers, steps, operations, elements and/or components, but does not exclude existence or addition of other features, integers, steps, operations, components, elements, and their combinations.


In the embodiments of the present invention, the apparatus includes but is not limited to a device, such as a mobile phone, a personal digital assistant (Personal Digital Assistant, PDA), a tablet computer, a portable device (for example, a portable computer), an on-board device, and an ATM machine (Automatic Teller Machine, automatic teller machine), to which it is not limited in the embodiments of the present invention.


Embodiment 1


FIG. 1 is a flowchart of a voice identification method according to Embodiment 1 of the present invention.


As shown in FIG. 1, Embodiment 1 of the present invention provides a voice identification method, which may specifically include:


S100: Obtain voice data.


A user starts voice identification software, such as a voice assistant, on an apparatus to obtain, through a microphone, voice data that is input by the user. It should be understood that the voice data may also not be input by the user, may also be input by a machine, and may include any data including information.


S101: Obtain a confidence value according to the voice data.


Confidence refers to a degree of belief on authenticity of a specific thesis by a specific individual, and in the embodiment of the present invention, is the degree of belief on authenticity of an identification result of the voice data by the apparatus and so on. That is, the confidence value is a numerical value used to indicate a credibility degree of a voice identification result. For example, the voice data input by the user is “Give Zhang San calling, during a voice data identification process, a returned confidence value includes: a sentence confidence N1 (overall confidence of “Give Zhang San calling”), a preposed command word confidence N2 (“give” is a preposed command word, that is, the confidence value of “give” is N2), a person name confidence N3 (“Zhang San” is a name, that is, the confidence value of “Zhang San” is N3), and a postposed command word confidence N4 (“calling” is a postposed command word, that is, the confidence of “calling” is N4). Usually, the sentence confidence N1 is obtained by integrating N2, N3, and N4. In a certain experiment, it is obtained, by testing, that the confidence value of the voice data “Give Zhang San a call” input by the user is N1=62, N2=50, N3=48, and N4=80, respectively.


It should be understood that step S102 may be before step S103, step S102 may be after step S103, or step S102 and step S103 may be executed at the same time, to which it is not limited in the embodiment of the present invention.


S102: Obtain a noise scenario according to the voice data.


According to the voice data input by the user, the noise scenario is obtained. The noise scenario is a noise state when the user inputs the voice data. That is, it may be understood as whether the user inputs the voice data in a noise environment on a road, in a noise environment in an office, or in an on-board noise environment, and whether noise in a corresponding environment where the user is located is large or small.


It should be understood that step S102 may be before step S101, step S102 may also be after step S101, or step S102 and step S101 may be executed at the same time, to which it is not limited in the embodiment of the present invention.


S103: Obtain a confidence threshold corresponding to the noise scenario.


The confidence threshold is used as an index for evaluating whether the confidence value may be accepted, if the confidence value is greater than the confidence threshold, it is considered that an identification result is correct, and if the confidence value is smaller than the confidence threshold, it is considered that the identification result is incorrect and the result cannot be believed. After the noise scenario of the voice data is obtained, the confidence threshold corresponding to the noise scenario may be obtained according to the noise scenario.


S104: Process the voice data if the confidence value is greater than or equal to the confidence threshold.


If the confidence value is greater than or equal to the confidence threshold, it is considered that the identification result of the voice data is correct, that is, to process corresponding voice data. For example, if the confidence value N3 obtained in step S101 is 48 and the confidence threshold obtained in step S103 is 40, then the confidence value is greater than the confidence threshold and the identification result of the voice data is correct. Further, an example is given for description, when the voice data is voice data including a command word, such as “Give Zhang San a call”, “Send Zhang San a short message”, and “Open an application program”, the voice identification belongs to command word identification, and then the apparatus executes a corresponding command and an operation such as making a call, sending a short message, and opening an application program, If the voice data identification belongs to text dictation, an identification result text is displayed. That is, if the confidence value is greater than or equal to the confidence threshold, the voice data is processed.


The technical solution of the present invention provides a voice identification method. In the method, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The method that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Optionally



FIG. 2 is a flowchart of another implementation manner of a voice identification method according to Embodiment 1 of the present invention.


As shown in FIG. 2, the method further includes:


S1041: Prompt the user if the confidence value is smaller than the confidence threshold.


If the confidence value is smaller than the confidence threshold, it is considered that the identification result of the voice data is incorrect, and the user is prompted. For example, if the confidence value N3 obtained in step S101 is 48 and the confidence threshold obtained in step S103 is 50, then the confidence value is smaller than the confidence threshold and the identification result of the voice data is incorrect. Further, an example is given for description, when the voice data is “Give Zhang San a call”, the apparatus determines that the identification result of the voice data is incorrect, and the system prompts the user to speak again and/or notifies the user of a fault. That is, if the confidence value is smaller than the confidence threshold, the user is prompted to re-input or correct the fault.


The technical solution of the present invention provides a voice identification method. In the method, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The method that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Embodiment 2


FIG. 3 is a flowchart of another implementation manner of a voice identification method according to Embodiment 2 of the present invention.


Embodiment 2 of the present invention is described on a basis of Embodiment 1 of the present invention. As shown in FIG. 3, in step S102 of Embodiment 1, the noise scenario specifically includes: a noise type; and a noise magnitude.


The noise type refers to a noise environment where a user is located when inputting voice data. That is, it may be understood as whether the user is in a noise environment on a road, in a noise environment in an office, or in an on-board noise environment.


The noise magnitude represents a magnitude of noise in the noise environment where the user is located when inputting the voice data. Optionally, the noise magnitude includes: a signal-to-noise ratio and a noise energy level. The signal-to-noise ratio is a ratio of voice data power to noise data power, and is usually represented by decibels. Generally, a higher signal-to-noise ratio indicates a smaller noise data power, otherwise, vice versa. The noise energy level is used to reflect a magnitude of energy of noise data in the voice data of the user. The signal-to-noise ratio and the noise energy level are combined to indicate the noise magnitude.


The noise scenario includes the noise type, in step S102 of Embodiment 1, the obtaining a noise scenario according to the voice data specifically includes:


S1021: Obtain, according to the voice data, a frequency cepstrum coefficient of a noise in the voice data.


According to the voice data input by the user, a voice data frame and a noise data frame are determined through voice activity detection (Voice activity detection, VAD), and after the noise data frame is obtained, a frequency cepstrum coefficient of the noise data frame is obtained. Mel (mel) is a unit of subjective pitch, and Hz (hertz) is a unit of objective pitch. A Mel frequency is proposed based on an auditory feature of a human ear, and has non-linear correspondence with an Hz frequency. A frequency cepstrum coefficient (Mel Frequency Cepstrum Coefficient, MFCC) is a cepstrum coefficient on the Mel frequency, has good identification performance, and is widely applied to a field such as voice identification, voiceprint recognition, and language identification.


S1022: Obtain, according to the frequency cepstrum coefficient of the noise and a pre-established noise type model, the noise type of the voice data.


The frequency cepstrum coefficient is respectively substituted into each pre-established noise type model for calculation, and if a calculation result value of a certain noise type model is a maximum, it is considered that the user is located in an environment of the noise type when inputting the voice data, that is, the noise type of the voice data is obtained.


The pre-established noise type model in step S1022 is a Gaussian mixture model.


Gaussian density function estimation is a parameterized model, which includes two types; namely, a single Gaussian model (Single GaussianModel, SGM) and a Gaussian mixture model (Gaussian mixture model, GMM). A Gaussian model is a valid clustering model, which may consider, according to different Gaussian probability density function parameters, each established Gaussian model as a type. When a sample x is input, a value is calculated by using the Gaussian probability density function, and then it is determined, through a threshold, whether the sample belongs to an established Gaussian model. The GMM has multiple models, of which dividing is finer, is applicable to dividing of a complex object, and is widely applied to establishment of a complex object model. For example, in voice identification, the GMM is used for classification and model establishment of different noise types.


In the embodiment of the present invention, a process of establishing the GMM of a certain noise type may be: inputting multiple groups of noise data of a same type, repeatedly training the GMM model according to the noise data, and finally obtaining the GMM of the noise type.


The Gaussian mixture model may be expressed by the following formula:






p(x)=Σi=1NαiN(x;μii), where Σi=1Nαi=1


The Gaussian model N(x;μ,Σ) may be expressed by the following formula:







N


(


x
;
μ

,


)


=


1


2





π











exp


[


-

1
2





(

x
-
μ

)

T






-
1




(

x
-
μ

)



]







where, N is a degree of mixing of the GMM model, that is, being combined by N Gaussian models, αi is a weight of an ith Gaussian model, μ is an average value, and Σ is a covariance matrix. In theory, any shape in space may use a GMM model for model establishing. Because an output of the Gaussian model is a decimal between 0 and 1, for ease of calculation, generally, a natural logarithm (ln) is obtained from a result, so as to become a floating-point number smaller than 0.


A method for establishing the pre-established noise type model in step S1022 includes:


obtaining noise data. Obtain multiple groups of same-type noise, for example, noise data such as on-board noise, street noise, and office noise, which are used to establish the GMM of the type of noise data, that is, a noise type model of the type of noise data. It should be understood that in the present invention, another type of noise data may also be obtained, and a corresponding noise type model is established for each type of noise data, to which it is not limited in the embodiment of the present invention;


obtaining, according to the noise data, the frequency cepstrum coefficient of the noise data. Extract the frequency cepstrum coefficient of the noise from the noise data. Mel (mel) is a unit of subjective pitch, and Hz (hertz) is a unit of objective pitch. A Mel frequency is proposed based on an auditory feature of a human ear, and has non-linear correspondence with an Hz frequency. A frequency cepstrum coefficient (Mel Frequency Cepstrum Coefficient, MFCC) is a cepstrum coefficient on the Mel frequency, has good identification performance, and is widely applied to a field such as voice identification, voiceprint recognition, and language identification; and


processing the frequency cepstrum coefficient according to an EM algorithm, and establishing a noise type model. In statistics, the EM algorithm (Expectation-maximization algorithm, expectation-maximization algorithm) is used to search for a maximum likelihood estimation of a parameter in a probability model depending on an unobservable latent variable. In statistical calculation, the expectation-maximization (EM) algorithm searches for the maximum likelihood estimation or a maximum posteriori estimation of the parameter, where the GMM depends on the unobservable latent variable (Latent Variable).


In the EM algorithm, calculation is performed alternately in two steps. A first step is to calculate expectation (E). Estimate an expectation value of an unknown parameter, and give a current parameter estimation. A second step is to perform maximization (M). Re-estimate a distribution parameter, so as to maximize likelihood of data, and give an expected estimation of an unknown variable. As a whole, a procedure of the EM algorithm is as follows: 1. Initialize the distribution parameter; 2. Repeat until convergence. Simply speaking, the EM algorithm is that, assuming that two parameters, A and B, are known by estimation, and the two are both unknown in a starting state, if information of A is known, information of B may be obtained, and reversely, if information of B is known, information of A may be obtained. It may be considered to first endow A with a certain initial value, so as to obtain an estimated value of B, and then from a current value of B, re-estimate a value of A. The process continues until convergence. The EM algorithm performs the maximum likelihood estimation on the parameter from an incomplete data set, and is a quite simple and practical learning algorithm. By alternately using the two steps of E and M, the EM algorithm gradually modifies the parameter of the model, so that a likelihood probability of the parameter and a training sample is gradually increased, and finally ends at a maximum point. Intuitively understanding, the EM algorithm may also be considered as a successive approximation algorithm: The parameter of the model is not known in advance, a set of parameters may be randomly selected or a certain initial parameter may be roughly given in advance, a most possible state corresponding to a group of parameters is determined, a probability of a possible result of each training sample is calculated, and a parameter is corrected through a sample in a current state to re-estimate the parameter, and a state of the model is re-determined under the new parameter. In this way, through a plurality of iteration, circulation is performed until a certain convergence condition is satisfied, so as to make the parameter of the model gradually approximate to a real parameter.


The obtained frequency cepstrum coefficient is substituted into the EM algorithm for training, and through a training process, parameters such as N, αi, μ, and Σ in the Gaussian mixture model are obtained, and according to the parameters and p(x)=Σi=1NαiN(x;μii), where Σi=1Nαi=1, the Gaussian mixture model is established, that is, the noise type model corresponding to the noise type is established. Meanwhile, x is a frequency cepstrum coefficient.


For example, in step S102 in Embodiment 1, the obtaining a noise scenario according to the voice data is specifically as follows:


Obtain the frequency cepstrum coefficient of the noise frame of the voice data according to the voice data, where the frequency cepstrum coefficient is x in the Gaussian mixture model p(x)=Σi=1NαiN(x;μii). It is assumed that there are two noise type models, one is a noise type model of on-board noise obtained through on-board noise training, and the other is a noise type model of non-on-board noise obtained through non-on-board type noise (which may include office noise, street noise, supermarket noise, and so on) training Assume that the voice data input by the user has 10 noise frames, respectively substitute the frequency cepstrum coefficient of each noise frame, that is, x, into two noise type models p(x)=Σi=1NαiN(x;μii) (where parameters such as N, αi, μ, and Σ are known) to obtain a calculation result, obtain a logarithm from the calculation result, and then perform cumulative average. A final result is shown as table 1:




















TABLE 1
















Cumulative


Number of noise frames
1
2
3
4
5
6
7
8
8
10
average







Noise type model of
−46.8
−46.6
−45.3
−43.8
−47.8
−50.7
−46.5
−47.7
−46.7
−45.7
−46.8


non-on-board noise


Noise type model of
−43.0
−41.9
−41.3
−39.7
−42.1
−47.7
−41.5
−39.6
−43.6
−38.7
−41.9


on-board noise









The final result displays that the calculation result value of the noise type model of the on-board noise is greater than the calculation result value of the noise type model of the non-on-board noise (that is, −41.9>−46.8), so that the noise type of current voice data is on-board noise.


The technical solution of the present invention provides a method for improving a voice identification rate under a noise environment. In the method, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The method that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Optionally


As shown in FIG. 3, the noise scenario includes a noise magnitude, in step S102 of Embodiment 1, the obtaining a noise scenario according to the voice data specifically includes:


S1023: Obtain, according to the voice data, a feature parameter of the voice data.


The feature parameter of the voice data is extracted according to the voice data, where the feature parameter includes: sub-band energy, a fundamental tone, and a cyclic factor.


For the sub-band energy, according to different useful components in different bands of the voice data, a band of 0-8K is divided into N sub-bands, and energy of each frame of voice of each sub-band is respectively calculated. A formula for calculating the sub-band energy is:






ener
=


1
L






i
=
0


L
-
1




(



x


[
i
]





2

)







where, L is a frame length, and a frame of voice data is x[0]x[1] to x[L−1].


The fundamental tone and the periodic factor reflect a periodical component in the voice. In the voice, the periodic component is very poor in a mute segment and a voiceless segment, and the periodicity is very good in a voiced segment. Based on this point, voice frame detection may be performed.


S1024: Perform voice activity detection according to the feature parameter.


According to the voice data input by the user, the voice data frame and the noise data frame are determined through the voice activity detection (Voice activity detection, VAD), and the fundamental tone, the periodic factor, and the sub-band energy are combined, so as to perform determination on a voice frame and a mute frame.


In VAD determination, the voice frame and the noise frame is determined mainly based on the following two elements:


1) the energy of the voice frame is higher than the energy of the noise frame; and


2) a frame with a stronger periodicity is generally the voice frame.


S1025: Obtain the noise magnitude according to a result of the voice activity detection.


According to a VAD determination result, respectively calculate an average energy of the voice frame and the noise frame to obtain a voice energy level (speechLev) and a noise energy level (noiseLev), and then obtain, by calculating, a signal-to-noise ratio (SNR). The formula is:






noiseLev
=

10
*
log





10


(

1
+


1
Ln






i
=
1

Ln



ener


[

N
i

]





)








speechLev
=

10
*
log





10


(

1
+


1
Ls






j
=
1

Ls



ener


[

S
j

]





)








SNR
=

speechLev
-
noiseLev





where, Ln and Ls respectively represent the total number of noise frames and the total number of voice frames, ener[Ni] represents the energy of the ith noise frame, and ener[Sj] represents the energy of the jth voice frame.


The technical solution of the present invention provides a method for improving a voice identification rate under a noise environment. In the method, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The method that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Embodiment 3


FIG. 4 is a flowchart of another implementation manner of a voice identification method according to Embodiment 3 of the present invention.


This embodiment is described on a basis of Embodiment 1, as shown in FIG. 4, the method of step S103 of Embodiment 1 specifically includes:


S1031: Obtain, according to correspondence between pre-stored empirical data of a confidence threshold and a noise scenario, a confidence threshold corresponding to the noise scenario.


After the noise scenario of voice data is obtained, the confidence threshold corresponding to the noise scenario is obtained according to the correspondence between the pre-stored empirical data of the confidence threshold and the noise scenario. That is, the confidence threshold is obtained according to a noise type in the noise scenario, a noise magnitude, and correspondence of the empirical data of the confidence threshold obtained through great amount of emulation measurement. The noise type indicates a type of environment where a user is located when voice identification is performed, and the noise magnitude indicates the noise magnitude of the type of environment where the user is located. A principle for obtaining the confidence threshold is that: In combination with the noise type, when noise is larger, a lower confidence threshold is selected; and in combination with the noise type, when the noise is smaller, a larger confidence threshold is set. The specific empirical data of the confidence threshold is obtained by statistics collecting in emulation measurement.


For example


the noise type is an on-board environment. When the noise is larger (that is, a noise level is smaller than −30 dB, and a signal-to-noise ratio is smaller than 10 dB), it is obtained by statistics collecting in emulation measurement that, in the noise scenario, the empirical data of the confidence threshold is 35-50. Therefore, in the noise scenario, the obtained confidence threshold is a certain value between 35 and 50.


The noise type is the on-board environment, when the noise is smaller (the noise level is greater than −30 dB and smaller than −40 dB, and the signal-to-noise ratio is greater than 10 dB and smaller than 20 dB), it is obtained by statistics collecting in emulation measurement that, in the noise scenario, the empirical data of the confidence threshold is 40-55. Therefore, in the noise scenario, the obtained confidence threshold is a certain value between 40 and 55.


The noise type is an office environment, when the noise is smaller (the noise level is smaller than −40 dB, and the signal-to-noise ratio is greater than 20 dB), it is obtained by statistics collecting in emulation measurement that, in the noise scenario, the empirical data of the confidence threshold is 45-60. Therefore, in the noise scenario, the obtained confidence threshold is a certain value between 45 and 60.


The technical solution of the present invention provides a method for improving a voice identification rate under a noise environment. In the method, the noise scenario is obtained, and the confidence threshold is obtained according to the pre-stored empirical data of the confidence threshold and the noise scenario. The method that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Embodiment 4


FIG. 5 is a schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention.


As shown in FIG. 5, the apparatus includes:


an obtaining unit 300, configured to obtain voice data;


a confidence value unit 301, configured to receive the voice data obtained by the obtaining unit 300, and obtain a confidence value according to the voice data;


a noise scenario unit 302, configured to receive the voice data obtained by the obtaining unit 300, and obtain a noise scenario according to the voice data;


a confidence threshold unit 303, configured to receive the noise scenario of the noise scenario unit 302, and obtain a confidence threshold corresponding to the noise scenario; and


a processing unit 304, configured to receive the confidence value obtained by the confidence value unit 301 and the confidence threshold obtained by the confidence threshold unit 303, and if the confidence value is greater than or equal to the confidence threshold, process the voice data.


The obtaining unit 300 obtains the voice data; the confidence value unit 301 receives the voice data obtained by the obtaining unit 300, and obtains the confidence value according to the voice data; the noise scenario unit 302 receives the voice data obtained by the obtaining unit 300, and obtains the noise scenario according to the voice data, where the noise scenario includes a noise type, a signal-to-noise ratio, and a noise energy level; the confidence threshold unit 303 receives the noise scenario of the noise scenario unit 302, and obtains the confidence threshold corresponding to the noise scenario; and the processing unit 304 receives the confidence value obtained by the confidence value unit 301 and the confidence threshold obtained by the confidence threshold unit 303, and if the confidence value is greater than or equal to the confidence threshold, processes the voice data.


The obtaining unit 300, the confidence value unit 301, the noise scenario unit 302, the confidence threshold unit 303, and the processing unit 304 may be configured to execute the method described in steps S100, S101, S102, S103, and S104 in Embodiment 1. For specific description, reference is made to the description of the method in Embodiment 1, which is not repeatedly described herein.


The technical solution of the present invention provides a voice identification apparatus. In the apparatus, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The apparatus that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Optionally



FIG. 6 is another possible schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention.


As shown in FIG. 6, the apparatus further includes:


a model establishing unit 305, configured to obtain noise data, obtain a frequency cepstrum coefficient of the noise data according to the noise data, process the frequency cepstrum coefficient according to an EM algorithm, and establish a noise type model.


The model establishing unit 305 may be configured to execute the method for pre-establishing the noise type model in step S1022 of Embodiment 2. For specific description, reference is made to the description of the method in Embodiment 2, which is not repeatedly described herein.


The technical solution of the present invention provides a voice identification apparatus. In the apparatus, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The apparatus that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Optionally


FIG. 7 is another possible schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention.


As shown in FIG. 7, the noise scenario unit specifically includes:


a noise type unit 3021, configured to obtain, according to the voice data of the obtaining unit, a frequency cepstrum coefficient of a noise in the voice data, and obtain, according to the frequency cepstrum coefficient of the noise and the noise type model of the model establishing unit, a noise type of the voice data, where, the noise type unit 3021 may be configured to execute the method described in steps S1021 and S1022 of Embodiment 2. For specific description, reference is made to the description of the method in Embodiment 2, which is not repeatedly described herein; and a noise magnitude unit 3022, configured to obtain, according to the voice data of the obtaining unit, a feature parameter of the voice data, perform voice activity detection according to the feature parameter, and obtain a noise magnitude according to a result of the voice activity detection,


where, the noise magnitude unit 3022 may be configured to execute the method described in steps S1023, S1024, and S1025 of Embodiment 2. For specific description, reference is made to the description of the method in Embodiment 2, which is not repeatedly described herein.


The technical solution of the present invention provides a voice identification apparatus. In the apparatus, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The apparatus that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Optionally


FIG. 8 is another possible schematic structural diagram of a voice identification apparatus according to Embodiment 4 of the present invention.


As shown in FIG. 8, the apparatus further includes:


a storage unit 306, configured to store empirical data of a confidence threshold.


The confidence threshold unit 303 is specifically configured to obtain, according to correspondence between the empirical data of the confidence threshold pre-stored by the storage unit 306 and the noise scenario, the confidence threshold corresponding to the noise scenario.


The confidence threshold unit 303 may be configured to execute the method described in step S1031 of Embodiment 3. For specific description, reference is made to the description of the method in Embodiment 3, which is not repeatedly described herein.


The technical solution of the present invention provides a voice identification apparatus. In the apparatus, the noise scenario is obtained, and the confidence threshold is obtained according to the pre-stored empirical data of the confidence threshold and the noise scenario. The apparatus that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Embodiment 5


FIG. 9 is a schematic structural diagram of a mobile terminal according to Embodiment 5 of the present invention.


As shown in FIG. 9, the mobile terminal includes a processor and a microphone, where the microphone 501 is configured to obtain voice data; and the processor 502 is configured to obtain a confidence value and a noise scenario according to the voice data, obtain, according to the noise scenario, a confidence threshold corresponding to the noise scenario, and if the confidence value is greater than or equal to the confidence threshold, process the voice data.


The microphone 501 and the processor 502 may be configured to execute the method described in steps S100, S101, S102, S103, and S104 of Embodiment 1. For specific description, reference is made to the description of the method in Embodiment 1, which is not repeatedly described herein.


The technical solution of the present invention provides a mobile terminal. In the mobile terminal, the noise scenario is obtained, and the confidence threshold is obtained according to pre-stored empirical data of a confidence threshold and the noise scenario. The mobile terminal that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Optionally

As shown in FIG. 10, the mobile terminal further includes: a memory 503, configured to store empirical data of a confidence threshold.


The processor is specifically configured to obtain the confidence value and the noise scenario according to the voice data; obtain, according to correspondence between the empirical data of the confidence threshold pre-stored by the memory and the noise scenario, the confidence threshold corresponding to the noise scenario; and if the confidence value is greater than or equal to the confidence threshold, process the voice data.


The foregoing structure may be configured to execute the method in Embodiment 1, Embodiment 2, and Embodiment 3. For specific description, reference is made to the description of the method in Embodiment 1, Embodiment 2, and Embodiment 3, which is not repeatedly described herein.


The technical solution of the present invention provides a mobile terminal. In the apparatus, the noise scenario is obtained, and the confidence threshold is obtained according to the pre-stored empirical data of the confidence threshold and the noise scenario. The mobile terminal that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Embodiment 6

As shown in FIG. 11, in this embodiment, a mobile phone is taken as an example for specific description of the embodiment of the present invention. It should be understood that the mobile phone shown in the figure is only an example of the mobile phone, and the mobile phone may have more or fewer components than what is shown in the figure, may combine two or more components, or may have different component configurations. Various components shown in the figure may be implemented in hardware or software including one or more signal processing and/or dedicated integrated circuits, or a combination of hardware and software.



FIG. 11 is a schematic structural diagram of a mobile phone according to an embodiment of the present invention. As shown in FIG. 11, the mobile phone includes: a touchscreen 41, a memory 42, a CPU 43, a power management chip 44, an RF circuit 45, a peripheral interface 46, an audio circuit 47, a microphone 48, and an I/O sub-system 49.


The touchscreen 41 is an input interface and an output interface between the mobile phone and a user, and in addition to a function of obtaining touch information and a control instruction of the user, the touchscreen also displays visible output to the user, where the visible output may include a graph, a text, an icon, a video, and so on.


The memory 42 may be configured to store empirical data of a confidence threshold, which is used by the CPU 43 during processing. The memory 42 may be accessed by the CPU 43 and the peripheral interface 46, and the memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, for example, one or more magnetic disk storage devices and flash memory devices, or another volatile solid storage device.


The CPU 43 may be configured to process voice data obtained by the audio circuit 47 and the microphone 48, and obtain a noise scenario according to the voice data; and obtain a confidence threshold according to the noise scenario and the empirical data of the confidence threshold pre-stored by the memory 42. The CPU 43 is a control center of the mobile phone, connects each part of the entire mobile phone by using various interfaces and lines, and executes various functions of the mobile phone and processes data by running or executing software programs and/or modules stored in the memory 42 and invoking data stored in the memory 42, so as to perform entire monitoring on the mobile phone. Optionally, the CPU 43 may include one or more processing units; preferentially, the CPU 43 may integrate an application processor and a modulating and demodulating processor. Optionally, the application processor mainly processes an operating system, a user interface, the application program, and so on, and the modulating and demodulating processor mainly processes wireless communication. It may be understood that the modulating and demodulating processor may be not integrated in the CPU 43. It should be further understood that the foregoing function is only one of functions that the CPU 43 can execute, and other functions are not limited in the embodiment of the present invention.


The power management chip 44 may be configured to perform power supply and power management for the CPU 43, the I/O sub-system 49, and the hardware connected to the peripheral interface 46.


The RF circuit 45 is mainly configured to establish communication between the mobile phone and a wireless network (that is, a network side), so as to implement data obtaining and sending of the mobile phone and the wireless network, for example, receiving and sending a short message and an e-mail. Specifically, the RF circuit 45 obtains and sends an RF signal, where the RF signal is also called an electromagnetic signal. The RF circuit 45 converts an electrical signal into an electromagnetic signal or converts an electromagnetic signal into an electrical signal, and performs communication with a communication network and another device through the electromagnetic signal. The RF circuit 45 may include a known circuit configured to execute the functions, where the circuit includes but is not limited to an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip-set, a subscriber identity module (Subscriber Identity Module, SIM), and so on.


The peripheral interface 46, may connect input and output peripherals of a device to the CPU 43 and the memory 42.


The audio circuit 47 may mainly be configured to obtain audio data from the peripheral interface 46, and convert the audio data into the electrical signal.


The microphone 48 may be configured to obtain the voice data.


The I/O sub-system 49: may control input and output peripheries on the device. The I/O sub-system 49 may include a display controller 491 and one or more input controllers 492 configured to control another input/control device. Optionally, one or more input controllers 792 obtain the electrical signal from another input/control device or send the electrical signal to another input/control device, where the another input/control device may include a physical button (a push button, a rocker button, and so on), a dial plate, a slide switch, a joystick, and a clicking wheel. It should be noted that the input controller 492 may be connected to any one of the following: a keyboard, an infrared port, a USB interface, and an indication device such as a mouse. The display controller 491 in the I/O sub-system 49 obtains the electrical signal from the touchscreen 41 or sends the electrical signal to the touchscreen 41. The touchscreen 41 obtains touch on the touchscreen, the display controller 491 converts the obtained touch into interaction with a user interface object on the touchscreen 41, that is, implements man-machine interaction, where the user interface object displayed on the touchscreen 41 may be an icon of running a game, an icon of connecting to a corresponding network, a filtering mode, and so on. It should be noted that the device may also include an optical mouse, where the optical mouse is a touch sensitive surface not displaying visible output, or is an extension of the touch sensitive surface formed by the touchscreen.


The microphone 48 obtains voice data of a large screen device, and sends the voice data to the CPU 43 through the peripheral interface 46 and the audio circuit 47. The CPU 43 may be configured to process the voice data, obtain a noise scenario according to the voice data; and obtains a confidence threshold according to the noise scenario and the empirical data of the confidence threshold pre-stored by the memory 42.


The foregoing structure may be configured to execute the method in Embodiment 1, Embodiment 2, and Embodiment 3. For specific description, reference is made to the description of the method in Embodiment 1, Embodiment 2, and Embodiment 3, which is not repeatedly described herein.


The technical solution of the present invention provides a mobile phone for voice identification. In the mobile phone, the noise scenario is obtained, and the confidence threshold is obtained according to the pre-stored empirical data of the confidence threshold and the noise scenario. The mobile phone that flexibly adjusts the confidence threshold according to the noise scenario greatly improves a voice identification rate under a noise environment.


Through the description in the foregoing embodiments, a person skilled in the art may be clearly aware that the embodiments of the present invention may be implemented by hardware, or be implemented by firmware, or be implemented by a combination of hardware and firmware. When the present invention is implemented by software, the foregoing functions may be stored in an apparatus readable medium, or be transmitted as one or more commands or code on the apparatus readable medium. The apparatus readable medium includes an apparatus storage medium and a communication medium. An optional communication medium includes any medium that facilitates transmission of an apparatus program from one place to another place. The storage medium may be any usable medium that an apparatus can access. The following is taken as an example but is not limited: The apparatus readable medium may include an RAM, an ROM, an EEPROM, a CD-ROM or another optical disc memory, a disk storage medium or another disk storage device, or any other medium that can be used to carry or store an expected program code in a command or data structure form and can be accessed by an apparatus. In addition, any connection may appropriately become an apparatus readable medium. For example, if the software implements transmission from a website, a server, or another remote source by using a coaxial cable, an optical cable, a twisted-pair cable, a digital subscriber line (DSL), or a wireless technology, such as infrared, radio, or microwave. Then, the coaxial cable, the optical cable, the twisted-pair cable, the DSL, or the wireless technology, such as infrared, radio, or microwave, is included in fixation of a home medium. For example, a disk (Disk) and a disc (disc) used in the embodiments of the present invention include a compact disc (CD), a laser disc, an optical disc, a digital versatile disc (DVD), a floppy disk, and a blue-ray disc. Generally, an optional disk magnetically duplicates data, while a disc optically duplicates data by using laser. A combination of the foregoing should also fall within the protection scope of an apparatus readable medium.


In conclusion, the foregoing description is merely embodiments of the present invention, but is not intended to limit the scope of the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims
  • 1. A voice identification method, comprising: obtaining voice data;obtaining a confidence value according to the voice data;obtaining a noise scenario according to the voice data;obtaining a confidence threshold corresponding to the noise scenario; andprocessing the voice data, if the confidence value is greater than or equal to the confidence threshold.
  • 2. The method according to claim 1, wherein the noise scenario comprises: a noise type; anda noise magnitude.
  • 3. The method according to claim 2, wherein the obtaining the noise scenario according to the voice data specifically comprises: obtaining, according to the voice data, a frequency cepstrum coefficient of a noise in the voice data; andobtaining, according to the frequency cepstrum coefficient of the noise and a pre-established noise type model, the noise type of the voice data.
  • 4. The method according to claim 3, wherein the noise type model is established by implementing the following: obtaining noise data;obtaining a frequency cepstrum coefficient of the noise data according to the noise data; andprocessing the frequency cepstrum coefficient according to an Expectation-maximization (EM) algorithm, and establishing a noise type model.
  • 5. The method according to claim 3, wherein the noise type model is a Gaussian mixture model.
  • 6. The method according to claim 2, wherein the obtaining the noise scenario according to the voice data specifically comprises: obtaining, according to the voice data, a feature parameter of the voice data;performing voice activity detection according to the feature parameter; andobtaining the noise magnitude according to a result of the voice activity detection.
  • 7. The method according to claim 6, wherein the noise magnitude specifically comprises: a signal-to-noise ratio; anda noise energy level.
  • 8. The method according to claim 1, wherein the obtaining the confidence threshold corresponding to the noise scenario comprises: obtaining, according to a correspondence between pre-stored empirical data of a confidence threshold and the noise scenario, the confidence threshold corresponding to the noise scenario.
  • 9. The method according to claim 1, further comprising: prompting a user if the confidence value is smaller than the confidence threshold.
  • 10. A voice identification apparatus, comprising: an obtaining unit, configured to obtain voice data;a confidence value unit, configured to receive the voice data obtained by the obtaining unit, and obtain a confidence value according to the voice data;a noise scenario unit, configured to receive the voice data obtained by the obtaining unit, and obtain a noise scenario according to the voice data;a confidence threshold unit, configured to receive the noise scenario of the noise scenario unit, and obtain a confidence threshold corresponding to the noise scenario; anda processing unit, configured to receive the confidence value obtained by the confidence value unit and the confidence threshold obtained by the confidence threshold unit, and if the confidence value is greater than or equal to the confidence threshold, process the voice data.
  • 11. The apparatus according to claim 10, further comprising: a model establishing unit, configured to obtain noise data, obtain a frequency cepstrum coefficient of the noise data according to the noise data, process the frequency cepstrum coefficient according to an Expectation-maximization (EM) algorithm, and establish a noise type model.
  • 12. The apparatus according to claim 11, wherein the noise scenario unit specifically comprises: a noise type unit, configured to obtain, according to the voice data of the obtaining unit, a frequency cepstrum coefficient of a noise in the voice data, and obtain, according to the frequency cepstrum coefficient of the noise and the noise type model of the model establishing unit, a noise type of the voice data.
  • 13. The apparatus according to claim 10, wherein the noise scenario unit further comprises: a noise magnitude unit, configured to obtain, according to the voice data of the obtaining unit, a feature parameter of the voice data, perform voice activity detection according to the feature parameter, and obtain a noise magnitude according to a result of the voice activity detection.
  • 14. The apparatus according to claim 10, further comprising: a storage unit, configured to store empirical data of a confidence threshold.
  • 15. The apparatus according to claim 14, wherein the confidence threshold unit is configured to obtain, according to a correspondence between the stored empirical data of the confidence threshold pre-stored by the storage unit and the noise scenario, the confidence threshold corresponding to the noise scenario.
  • 16. A mobile terminal, comprising a processor and a microphone, wherein the microphone is configured to obtain voice data; andthe processor is configured to obtain a confidence value and a noise scenario according to the voice data, obtain, according to the noise scenario, a confidence threshold corresponding to the noise scenario, and if the confidence value is greater than or equal to the confidence threshold, process the voice data.
  • 17. The mobile terminal according to claim 16, further comprising a memory, configured to store empirical data of a confidence threshold.
  • 18. The mobile terminal according to claim 17, wherein the processor is configured to obtain the confidence value and the noise scenario according to the voice data;obtain, according to a correspondence between the stored empirical data of the confidence threshold pre-stored by the memory and the noise scenario, the confidence threshold corresponding to the noise scenario; andprocess the voice data if the confidence value is greater than or equal to the confidence threshold.
Priority Claims (1)
Number Date Country Kind
201310027559.9 Jan 2013 CN national