A non-transitory computer-storable medium having stored thereon computer program instructions which, when executed by a processor, implement a speech recognition method, which comprises:
- acquiring first linear spectrums corresponding to to-be-trained audios with different sampling rates, wherein an abscissa of the first linear spectrums is a spectrum-sequence serial number, an ordinate of the first linear spectrums is a frequency-domain serial number, and a value of a coordinate point determined by the abscissa and the ordinate is an original amplitude value corresponding to the to-be-trained audios;
- determining a maximum sampling rate and other sampling rate than the maximum sampling rate in the different sampling rates;
- determining a maximum frequency-domain serial number of the first linear spectrums corresponding to the other sampling rate as a first frequency-domain serial number;
- determining a maximum frequency-domain serial number of the first linear spectrums corresponding to the maximum sampling rate as a second frequency-domain serial number;
- setting, to zero, amplitude values corresponding to each frequency-domain serial number that is greater than the first frequency-domain serial number and less than or equal to the second frequency-domain serial number, in the first linear spectrums corresponding to the other sampling rate, to obtain second linear spectrums corresponding to the other sampling rate;
- determining first speech features of the to-be-trained audios with the maximum sampling rate according to first Mel-spectrum features of the first linear spectrums corresponding to the maximum sampling rate;
- determining second speech features of the to-be-trained audios with the other sampling rate according to second Mel-spectrum features of the second linear spectrums corresponding to the other sampling rate;
- and
- training a machine learning model by using the first speech features and the second speech features,
- wherein the determining second speech features of the to-be-trained audios with the other sampling rate comprises performing local normalization processing on the second Mel-spectrum features to obtain the second speech features and the local normalization processing comprises:
- according to a maximum linear-spectrum frequency corresponding to the to-be-trained audios with the other sampling rate, acquiring a Mel-spectrum frequency corresponding to the maximum linear-spectrum frequency;
- calculating a maximum Mel-filter serial number corresponding to the Mel-spectrum frequency;
- acquiring first amplitude values corresponding to each other Mel-filter serial number in the second Mel-spectrum features, the other Mel-filter serial number being a Mel-filter serial number less than or equal to the maximum Mel-filter serial number;
- respectively calculating a mean and a standard deviation of all first amplitude values as a local mean and a local standard deviation;
- calculating a first difference between each of the first amplitude values and the local mean thereof;
- calculating a ratio of each first difference to the local standard deviation as a normalized first amplitude value corresponding to each first amplitude value;
- and
- replacing each first amplitude value in the second Mel-spectrum features with the normalized first amplitude value corresponding to each first amplitude value.