Speech feature extraction method and device, electronic equipment and storage medium

By performing endpoint detection and feature parameter extraction on speech segments and eliminating invalid features, the problem of low speech signal recognition efficiency in existing technologies is solved, and more efficient speech signal recognition is achieved.

CN116543751BActive Publication Date: 2026-03-24CHINA AGRI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In the process of speech signal recognition, existing technologies often introduce invalid feature parameters during feature parameter extraction, resulting in low recognition efficiency.

Method used

By performing speech endpoint detection on the speech segment to be processed, the start frame and end frame are determined, and the Mel frequency cepstral coefficient feature parameters are truncated based on these frames to remove invalid feature parameters. Speech endpoint detection is performed using short-time zero-crossing rate and short-time energy threshold, and valid feature parameters are extracted by combining Mel filtering and discrete Fourier transform.

Benefits of technology

It improves the efficiency of speech signal recognition, eliminates invalid speech signal feature parameters, and enhances recognition accuracy and speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543751B_ABST
    Figure CN116543751B_ABST
Patent Text Reader

Abstract

The application provides a speech feature extraction method and device, electronic equipment and storage medium. The method comprises: performing speech endpoint detection on a to-be-processed speech segment to obtain a starting frame and an ending frame of the to-be-processed speech segment; performing speech feature extraction on the to-be-processed speech segment to obtain a mel-frequency cepstrum coefficient feature parameter of the to-be-processed speech segment; and performing truncation on the mel-frequency cepstrum coefficient feature parameter of the to-be-processed speech segment based on the starting frame and the ending frame to obtain an effective mel-frequency cepstrum coefficient feature parameter of the to-be-processed speech segment. Through the speech feature extraction method provided by the application, invalid speech signal feature parameters are removed in the process of extracting speech signal feature parameters, thereby improving the efficiency of speech signal recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of speech recognition technology, and in particular to a speech feature extraction method, apparatus, electronic device, and storage medium. Background Technology

[0002] In the process of speech signal recognition, the extraction of feature parameters is a key issue in the accuracy of speech recognition. Furthermore, for speech signals, the effectiveness of the extracted feature parameters plays a crucial role in speech recognition.

[0003] According to relevant technologies, current speech signal recognition processes often utilize Mel-frequency cepstral coefficients (MFCC) or linear predictive cepstral coefficients (LPCC). However, during feature parameter extraction, invalid feature parameters are often introduced, reducing the efficiency of speech signal recognition. Summary of the Invention

[0004] This invention provides a speech feature extraction method, apparatus, electronic device, and storage medium to address the shortcomings of existing technologies in which invalid feature parameters are mixed in during the feature parameter extraction process. It achieves the elimination of invalid speech signal feature parameters during the speech signal feature parameter extraction process, thereby improving the efficiency of speech signal recognition.

[0005] This invention provides a speech feature extraction method, which includes: performing speech endpoint detection on a speech segment to be processed to obtain a start frame and an end frame for the speech segment to be processed; performing speech feature extraction on the speech segment to be processed to obtain Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed; and truncating the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame to obtain effective Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed.

[0006] According to a speech feature extraction method provided by the present invention, the step of detecting speech endpoints of a speech segment to be processed to obtain a start frame and an end frame of the speech segment to be processed includes: performing frame segmentation processing on the speech segment to be processed to obtain a segmented speech segment; calculating the short-time zero-crossing rate of each frame in the segmented speech segment to obtain the number of zero-crossings of the speech signal waveform in each frame, and calculating the short-time energy of each frame in the segmented speech segment to obtain the sum of the absolute values ​​of the speech signal energy values ​​in each frame; and performing speech endpoint detection on the speech segment to be processed based on the number of zero-crossings of the speech signal waveform in each frame and the sum of the absolute values ​​of the speech signal energy values ​​in each frame to obtain a start frame and an end frame of the speech segment to be processed.

[0007] According to a speech feature extraction method provided by the present invention, the step of performing speech endpoint detection on a speech segment to be processed based on the sum of the number of zero-crossings of the speech signal waveform in each frame and the sum of the absolute values ​​of the speech signal energy values ​​in each frame to obtain the start frame and end frame of the speech segment to be processed includes: determining a short-time zero-crossing rate threshold, a short-time energy threshold, and a speech segment length threshold; determining the start frame of the speech segment to be processed in chronological order based on the sum of the absolute values ​​of the speech signal energy values ​​in each frame of the segmented speech segment and the short-time energy threshold; determining the speech segment length of the speech segment to be processed in chronological order based on the number of zero-crossings of the speech signal waveform in each frame of the segmented speech segment and the short-time zero-crossing rate threshold; determining the effective speech segment length of the speech segment to be processed based on the speech segment length and the speech segment length threshold, and taking the last frame corresponding to the effective speech segment length as the end frame of the speech segment to be processed.

[0008] According to a speech feature extraction method provided by the present invention, before performing frame segmentation processing on the speech segment to be processed, the method further includes: performing normalization processing on the speech segment to be processed, and taking the normalized speech segment to be processed as the final speech segment to be processed.

[0009] According to a speech feature extraction method provided by the present invention, after performing frame-segmentation processing on the speech segment to be processed to obtain a frame-segmented speech segment, the method further includes: performing first-order digital filtering processing on the frame-segmented speech segment, and taking the frame-segmented speech segment after first-order digital filtering processing as the final frame-segmented speech segment.

[0010] According to a speech feature extraction method provided by the present invention, the step of extracting speech features from the speech segment to be processed to obtain Mel frequency cepstral coefficient feature parameters of the speech segment to be processed includes: performing frame-segmentation processing on the speech segment to be processed to obtain frame-segmented speech segments; performing windowing processing on each frame of the frame-segmented speech segments to obtain windowed speech segments; processing the windowed speech segments based on discrete Fourier transform to obtain Fourier transformed speech segments and complex energy values ​​corresponding to the Fourier transformed speech segments; performing multi-order Mel filtering on the complex energy values ​​to obtain Mel values ​​corresponding to the speech segment to be processed; and obtaining Mel frequency cepstral coefficient feature parameters of the speech segment to be processed through discrete string transform based on the Mel values.

[0011] According to a speech feature extraction method provided by the present invention, the step of performing multi-order Mel filtering on the complex energy value to obtain the Mel value corresponding to the speech segment to be processed includes: determining the function value of a 24th-order Mel filter group; obtaining the Mel value of each frame in the speech segment to be processed based on the complex energy value and the function value of the 24th-order Mel filter group; and obtaining the Mel value corresponding to the speech segment to be processed based on the Mel value of each frame.

[0012] According to a speech feature extraction method provided by the present invention, before performing frame segmentation processing on the speech segment to be processed, the method further includes: performing first-order digital filtering processing on the frame-segmented speech segment, and taking the frame-segmented speech segment after first-order digital filtering processing as the final frame-segmented speech segment.

[0013] The present invention also provides a speech feature extraction device, the device comprising: a detection module for detecting speech endpoints of a speech segment to be processed, thereby obtaining a start frame and an end frame of the speech segment to be processed; an extraction module for extracting speech features from the speech segment to be processed, thereby obtaining Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed; and a processing module for truncating the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame, thereby obtaining effective Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described speech feature extraction methods.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described speech feature extraction methods.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described speech feature extraction methods.

[0017] The speech feature extraction method, apparatus, electronic device, and storage medium provided by this invention extract the Mel-frequency cepstral coefficient feature parameters of the speech segment by obtaining the start and end frames of the speech segment to be processed, thereby obtaining the effective Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed. This achieves the elimination of invalid speech signal feature parameters during the speech signal feature parameter extraction process, thereby improving the efficiency of speech signal recognition. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is one of the flowcharts illustrating the speech feature extraction method provided by the present invention;

[0020] Figure 2 This is a schematic diagram of the process provided by the present invention for detecting speech endpoints of a speech segment to be processed and obtaining the start frame and end frame of the speech segment to be processed.

[0021] Figure 3 This is a schematic diagram of the frame-segmentation process for input voice signals provided by the present invention;

[0022] Figure 4 This is a schematic diagram of the process for detecting speech endpoints of a speech segment to be processed, based on the sum of the number of zero-crossings of the speech signal waveform in each frame and the absolute value of the speech signal energy value in each frame, provided by the present invention.

[0023] Figure 5 This is a schematic diagram of the structure for determining the start frame and the end frame provided by the present invention;

[0024] Figure 6 This is a schematic diagram of the process provided by the present invention for extracting speech features from a speech segment to be processed and obtaining the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0025] Figure 7 This is a schematic diagram of first-order digital filtering processing of a single-frame speech signal provided by the present invention.

[0026] Figure 8 This is a schematic diagram of the speech feature extraction device provided by the present invention;

[0027] Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0029] In speech signal recognition, endpoint detection can improve the speed and accuracy of the entire system. Endpoint detection technology uses digital techniques to analyze and determine the start and end points of the input speech signal. Accurately identifying these endpoints significantly impacts subsequent signal processing and applications. Endpoint detection not only reduces processing time and data storage space but also helps filter noise and eliminate silence segments.

[0030] This invention provides a speech feature extraction method that, by performing speech endpoint detection and speech feature extraction in parallel, can directly extract the effective Mel-frequency cepstral coefficient feature parameters of speech segments from continuously input speech signals, facilitating subsequent speech recognition.

[0031] The present invention will describe the process of the speech feature extraction method in conjunction with the following embodiments.

[0032] Figure 1 This is one of the flowcharts illustrating the speech feature extraction method provided by the present invention.

[0033] In an exemplary embodiment of the present invention, such as Figure 1 As shown, the speech feature extraction method may include steps 110 to 130, which will be described in detail below.

[0034] In step 110, speech endpoint detection is performed on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed.

[0035] In one embodiment, a speech segment to be processed can be acquired, wherein the speech segment to be processed can be a continuous speech segment. During application, speech endpoint detection can be performed on the speech segment to be processed to obtain valid start and end frames for the speech segment to be processed, thereby eliminating invalid speech segment frames.

[0036] In step 120, speech features are extracted from the speech segment to be processed to obtain the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0037] In one embodiment, speech features can be extracted from the speech segment to be processed to obtain the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0038] It should be noted that Mel-scale Frequency Cepstral Coefficients (MFCC) are the most commonly used speech features in modern speech recognition. Compared with other parameters, MFCC features fully consider the auditory perception of the human ear and are now the most widely used and successful feature parameters. Its analysis is based on modeling the auditory characteristics of the human ear. The relationship between the pitch and frequency of various sounds heard by the human ear is not the usual linear proportional relationship. The Mel-scale frequency scale is superior in conforming to the auditory characteristics of the human ear, and the value of the Mel-scale frequency scale roughly corresponds to the logarithmic distribution of the actual frequency. The specific relationship between Mel frequency and actual frequency is expressed by the formula: Mel(f) = 2595lg(1+f / 700), where f is the actual frequency in Hz. The critical frequency bandwidth changes with frequency and increases in line with the Mel-scale frequency. Below 1000Hz, it exhibits a linear distribution with a bandwidth of around 100Hz; above 1000Hz, it exhibits a logarithmic increase. Similar to the division of critical frequency bands, speech frequencies can be divided into a series of triangular filter sequences, i.e., Mel filter banks. The weighted sum of all signal amplitudes within the frequency bandwidth of each triangular filter is taken as the output of each bandpass filter. Then, logarithmic operations are performed on all filter outputs, and then Discrete Cosine Transform (DCT) is performed to obtain the MFCC characteristic parameters.

[0039] In step 130, based on the start frame and the end frame, the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed are truncated to obtain the effective Mel frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0040] In one embodiment, the Mel-frequency cepstral coefficient feature parameters of the entire continuous speech segment to be processed can be extracted based on a determined valid start frame and end frame to obtain the valid Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0041] The speech feature extraction method provided by this invention extracts the Mel-frequency cepstral coefficient feature parameters of the speech segment by using the start and end frames of the segment to be processed, thereby obtaining the effective Mel-frequency cepstral coefficient feature parameters of the speech segment. This method effectively eliminates invalid speech signal feature parameters during the speech signal feature parameter extraction process, thereby improving the efficiency of speech signal recognition.

[0042] To further illustrate the speech feature extraction method provided by this invention, the following embodiments will be used for explanation.

[0043] Figure 2 This is a schematic diagram of the process provided by the present invention for detecting speech endpoints of a speech segment to be processed, and obtaining the start frame and end frame of the speech segment to be processed.

[0044] In an exemplary embodiment of the present invention, such as Figure 2 As shown, performing speech endpoint detection on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed may include steps 210 to 240, and each step will be described below.

[0045] In step 210, the speech segment to be processed is framed to obtain the framed speech segment.

[0046] In one embodiment, the speech segment to be processed can be framed, for example, the speech segment to be processed can be overlapped and segmented to obtain the framed speech segment.

[0047] In one embodiment, a dual-ended random access memory (RAM) and a state machine control can be used for voice framing. During application, read and write addresses are generated under the control of read and write clocks. When a read signal is received, data is read from the RAM pointed to by the read address, and the voice signal is stored in the RAM. Reading from the RAM is performed and counted using the count1 signal. When count1 equals the frame length, count1 is cleared to zero, and the count2 signal is incremented by 1 (count2 is the frame count signal). Simultaneously, the read address is rolled back to continue reading. Figure 3 It can be seen that the backoff length LENBACK = (frame length - frame shift), and the frame splitting process is completed when count2 = the maximum number of frames.

[0048] In step 220, the short-time zero-crossing rate is calculated for each frame of the audio segment after frame processing to obtain the number of zero-crossings of the audio signal waveform in each frame.

[0049] In step 230, short-time energy calculation is performed on each frame of the processed speech segment to obtain the sum of the absolute values ​​of the speech signal energy values ​​of each frame.

[0050] In one embodiment, the number of zero-crossings of the speech signal waveform in each frame of the speech segment after framing can be calculated, as well as the sum of the absolute values ​​of the speech signal energy values ​​in each frame of the speech segment after framing can be calculated.

[0051] In step 240, based on the sum of the number of zero-crossings of the speech signal waveform in each frame and the absolute value of the speech signal energy in each frame, speech endpoint detection is performed on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed.

[0052] By determining the effective start and end frames of the speech segment to be processed in this embodiment, a foundation can be laid for extracting effective speech signal feature parameters of the speech segment to be processed, thereby improving the efficiency of speech signal recognition.

[0053] In one embodiment, such as Figure 4 As shown, based on the sum of the number of zero-crossings of the speech signal waveform in each frame and the absolute value of the speech signal energy value in each frame, speech endpoint detection is performed on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed. This may include steps 410 to 440, and each step will be described below.

[0054] In step 410, the short-time zero-crossing rate threshold, the short-time energy threshold, and the speech segment length threshold are determined.

[0055] In step 420, the starting frame of the speech segment to be processed is determined according to the time sequence, based on the sum of the absolute values ​​of the speech signal energy values ​​of each frame in the speech segment after frame processing, and the short-time energy threshold.

[0056] In step 430, the length of the speech segment to be processed is determined according to the time sequence, based on the number of zero-crossings of the speech signal waveform in each frame of the speech segment after frame processing, and the short-time zero-crossing rate threshold.

[0057] In step 440, the effective length of the speech segment to be processed is determined based on the speech segment length and the speech segment length threshold, and the last frame corresponding to the effective speech segment length is taken as the end frame of the speech segment to be processed.

[0058] In one embodiment, the start and end frames of the speech segment to be processed can also be obtained in the following manner, with the following specific steps:

[0059] Step 1, calculate two energy thresholds amp1 = min(Q1, max(amp) / 4) and amp2 = min(Q2, max(amp) / 8), where Q1 and Q2 can be fixed values. In this embodiment, no specific limitations are imposed on Q1 and Q2. For example, Q1 and Q2 can be 10 and 2 respectively. It can be understood that the energy thresholds amp1 and amp2 can correspond to the short-time energy thresholds described above.

[0060] Step 2, input the speech signal in chronological order and judge the input speech signal (corresponding to the speech segment after frame segmentation described above). When the amp of the input frame in the speech segment after frame segmentation (corresponding to the sum of the absolute values of the speech signal energy values described above) > amp1, record the frame number as the starting frame X1, set the silent frame number Silence = 0, and enter Step 3; otherwise, repeat Step 2.

[0061] Step 3, use count to count the input frames. When amp > amp2 and zcr (corresponding to the number of zero crossings of the speech signal waveform described above) > zcr2, count + 1, and repeat Step 3; otherwise, Silence + 1, and enter Step 4. Here, zcr2 corresponds to the short-time zero-crossing rate threshold described above. In one example, the short-time zero-crossing rate threshold zcr2 can be determined by calculating the average value of the short-time zero-crossing rates of the first 5 frames.

[0062] Step 4, judge Silence. When Silence < maxsilence, count + 1 and repeat Step 3; otherwise, enter Step 5.

[0063] Step 5, judge count. When count is less than the minimum speech segment length minlen (corresponding to the speech segment length threshold), since the speech segment length is insufficient, it can be considered as noise. At this time, the starting frame can be cleared, and Silence and count can be set to zero, and enter Step 2; otherwise, enter Step 6.

[0064] Step 6, the speech detection ends, record the ending frame X2, and output the frame numbers of the starting frame X1 and the ending frame X2 respectively to complete the endpoint detection.

[0065] In another example, in combination with Figure 5It can be seen that endpoint detection processing can be performed on the speech segments to be processed in chronological order. If the energy of the input frame is greater than the low energy threshold (e.g., amp2), it can be determined that the input frame is not a silent frame; if the energy of the input frame is less than the low energy threshold, it can be determined that the input frame is a silent frame. Furthermore, if the energy of the input frame is greater than the high energy threshold (e.g., amp1), and it is determined that the number of frames of the speech segment corresponding to the input frame is greater than the frame number threshold, it can be determined that the speech segment is not an invalid speech segment, and the corresponding input frame can be regarded as the start frame. The speech segments to be processed are processed sequentially according to the aforementioned method, and the last frame is recorded as the end frame, wherein the energy of the end frame is greater than the low energy threshold and the corresponding zero-crossing rate is greater than the zero-crossing rate threshold.

[0066] In an exemplary embodiment of the present invention, continuing with the previously described embodiments, the speech feature extraction method may further include: normalizing the speech segment to be processed before performing frame segmentation processing, and using the normalized speech segment as the final speech segment to be processed. Normalization processing facilitates the processing of the speech segment and reduces computational costs.

[0067] In an exemplary embodiment of the present invention, the following description will continue to be given using the embodiments described above. After the speech segment to be processed is segmented into frames to obtain the segmented speech segment, the speech feature extraction method may further include: performing first-order digital filtering on the segmented speech segment, and using the segmented speech segment after first-order digital filtering as the final segmented speech segment.

[0068] In one embodiment, the framed speech segments can be processed according to formula (1) to obtain the framed speech segments after first-order digital filtering.

[0069] y(n)=x(n)-z*x(n-1) (1)

[0070] Where x(n) represents the current signal in the speech segment to be processed, x(n-1) represents the signal of the previous clock cycle stored in the register, z represents a preset constant, for example z = 0.9375, and y(n) represents the speech segment after frame processing following first-order digital filtering. This embodiment can make the speech segment smoother, laying the foundation for accurately determining the start and end frames of the speech segment to be processed.

[0071] To further illustrate the speech feature extraction method provided by this invention, the following embodiments will be used for explanation.

[0072] Figure 6This is a schematic diagram of the process provided by the present invention for extracting speech features from a speech segment to be processed, and obtaining the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0073] In an exemplary embodiment of the present invention, such as Figure 6 As shown, extracting speech features from the speech segment to be processed and obtaining the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed may include steps 610 to 650, which will be described in detail below.

[0074] In step 610, the speech segment to be processed is framed to obtain the framed speech segment.

[0075] In one embodiment, the speech segment to be processed can be framed, for example, the speech segment to be processed can be overlapped and segmented to obtain the framed speech segment.

[0076] In step 620, windowing is applied to each frame of the segmented speech to obtain the windowed speech segment.

[0077] In one embodiment, combined with Figure 7 It can be seen that each frame of data in the segmented speech can be multiplied by the Hamming window function value in the read-only memory to obtain the windowed speech segment. By windowing the segmented speech segment, the amplitude of each frame signal can be gradually reduced to 0 at both ends, which facilitates Fourier transform and reduces spectral leakage.

[0078] In step 630, the windowed speech segment is processed based on the discrete Fourier transform to obtain the Fourier transformed speech segment and the complex energy value corresponding to the Fourier transformed speech segment.

[0079] In one embodiment, a Discrete Fourier Transform can be performed on the windowed single-frame time-domain signal within the single-frame frequency domain to obtain the single-frame frequency-domain information of the single-frame time-domain signal. The single-frame frequency-domain information may include the Fourier-transformed speech segment and the complex energy value corresponding to the Fourier-transformed speech segment.

[0080] In step 640, the complex energy value is subjected to multi-order Mel filtering to obtain the Mel value corresponding to the speech segment to be processed.

[0081] In one embodiment, the speech signal undergoes a Fourier transform to obtain real and imaginary parts. First, two multipliers and one adder are used to perform a sum of squares on the real and imaginary parts. Then, a square root IP core is used to take the square root of the result to obtain the frequency domain energy value. Finally, the energy value is subjected to multi-order Mel filtering by a MEL filter to obtain the Mel value corresponding to the speech segment to be processed.

[0082] The essence of the MEL filter is a set of triangular filters. In a system, the coefficients of the MEL filter are fixed. The coefficients and frequency points of each triangular filter are stored in a read-only memory. The energy value in the frequency domain is multiplied by the function value of the 24th order Mel filter group pre-stored in the read-only memory. The values ​​of the entire frame signal after multiplication are accumulated, and finally 24 Mel values ​​are obtained for each frame.

[0083] In step 650, based on the Mel value, the Mel frequency cepstral coefficient characteristic parameters of the speech segment to be processed are obtained through discrete string transformation.

[0084] In one embodiment, the Mel values ​​can be logarithmically and discretely cosine transformed to obtain the Mel frequency cepstral coefficient characteristic parameters for the speech segment to be processed. In one example, the input data can be processed through an IP kernel with a logarithm of ln, and the result can be multiplied by the cosine coefficients and then summed. In application, since there are few cosine coefficient parameters, they can be stored in registers for convenient storage.

[0085] In yet another example, the speech signal can be further processed by using the previously obtained start and end frames to extract the accumulated results, and finally obtain the MFCC feature parameters of the effective speech segment of the speech signal.

[0086] This invention will explain the process of performing multi-order Mel filtering on complex energy values ​​to obtain Mel values ​​corresponding to the speech segments to be processed, in conjunction with the following embodiments.

[0087] In one embodiment, multi-order Mel filtering is performed on the complex energy value to obtain the Mel value corresponding to the speech segment to be processed, which can be achieved in the following way:

[0088] Determine the function values ​​of the 24th order Mel filter group;

[0089] Based on the complex energy value and the function value of the 24th order Mel filter group, the Mel value of each frame in the speech segment to be processed is obtained.

[0090] Based on the Mel value of each frame, the Mel value corresponding to the speech segment to be processed is obtained.

[0091] In this embodiment, the function value of the 24th order Mel filter group has a small capacity. Determining the Mel value corresponding to the speech segment to be processed by the function value of the 24th order Mel filter group can reduce the amount of computation and thus improve the processing efficiency.

[0092] In an exemplary embodiment of the present invention, the foregoing embodiment will continue to be used as an example for further explanation. Before performing frame-segmentation processing on the speech segment to be processed, the speech feature extraction method may further include: performing first-order digital filtering processing on the frame-segmented speech segment, and using the frame-segmented speech segment after first-order digital filtering processing as the final frame-segmented speech segment.

[0093] In one embodiment, the framed speech segments can be processed according to formula (2) to obtain the framed speech segments after first-order digital filtering.

[0094] y(n)=x(n)-z*x(n-1) (2)

[0095] Where x(n) represents the current signal in the speech segment to be processed, x(n-1) represents the signal of the previous clock cycle stored in the register, z represents a preset constant, for example, z = 0.9375, and y(n) represents the speech segment after frame processing following first-order digital filtering. This embodiment can make the speech segment smoother, laying the foundation for improving the quality of the Mel-frequency cepstral coefficient characteristic parameters of the speech segment to be processed.

[0096] As described above, the speech feature extraction method provided by this invention extracts the Mel-frequency cepstral coefficient feature parameters of the speech segment by obtaining the start and end frames of the speech segment to be processed, thereby obtaining the effective Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed. This achieves the elimination of invalid speech signal feature parameters during the speech signal feature parameter extraction process, thereby improving the efficiency of speech signal recognition.

[0097] Based on the same concept, the present invention also provides a speech feature extraction device.

[0098] The speech feature extraction device provided by the present invention is described below. The speech feature extraction device described below can be referred to in correspondence with the speech feature extraction method described above.

[0099] Figure 8 This is a schematic diagram of the speech feature extraction device provided by the present invention.

[0100] In an exemplary embodiment of the present invention, such as Figure 8 As shown, the speech feature extraction device may include a detection module 810, an extraction module 820, and a processing module 830. Each module will be described in detail below.

[0101] The detection module 810 can be configured to perform speech endpoint detection on the speech segment to be processed, and obtain the start frame and end frame of the speech segment to be processed.

[0102] The extraction module 820 can be configured to extract speech features from the speech segment to be processed, and obtain the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0103] The processing module 830 can be configured to extract the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame, so as to obtain the effective Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed.

[0104] In an exemplary embodiment of the present invention, the detection module 810 may perform speech endpoint detection on the speech segment to be processed in the following manner to obtain the start frame and end frame of the speech segment to be processed: perform frame segmentation on the speech segment to be processed to obtain the speech segment after frame segmentation; perform short-time zero-crossing rate calculation on each frame of the speech segment after frame segmentation to obtain the number of zero-crossings of the speech signal waveform in each frame, and perform short-time energy calculation on each frame of the speech segment after frame segmentation to obtain the sum of the absolute values ​​of the speech signal energy values ​​in each frame; based on the number of zero-crossings of the speech signal waveform in each frame and the sum of the absolute values ​​of the speech signal energy values ​​in each frame, perform speech endpoint detection on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed.

[0105] In an exemplary embodiment of the present invention, the detection module 810 may perform speech endpoint detection on the speech segment to be processed based on the sum of the number of zero-crossings of the speech signal waveform in each frame and the sum of the absolute values ​​of the speech signal energy values ​​in each frame, to obtain the start frame and end frame of the speech segment to be processed: determining a short-time zero-crossing rate threshold, a short-time energy threshold, and a speech segment length threshold; determining the start frame of the speech segment to be processed in chronological order based on the sum of the absolute values ​​of the speech signal energy values ​​in each frame of the segment after frame processing and the short-time energy threshold; determining the speech segment length of the speech segment to be processed in chronological order based on the number of zero-crossings of the speech signal waveform in each frame of the segment after frame processing and the short-time zero-crossing rate threshold; determining the effective speech segment length of the speech segment to be processed based on the speech segment length and the speech segment length threshold, and taking the last frame corresponding to the effective speech segment length as the end frame of the speech segment to be processed.

[0106] In an exemplary embodiment of the present invention, the detection module 810 may also be configured to perform normalization processing on the speech segment to be processed, and use the normalized speech segment to be processed as the final speech segment to be processed.

[0107] In an exemplary embodiment of the present invention, the detection module 810 may also be configured to perform first-order digital filtering on the frame-processed speech segments and use the frame-processed speech segments after first-order digital filtering as the final frame-processed speech segments.

[0108] In an exemplary embodiment of the present invention, the extraction module 820 may extract speech features from the speech segment to be processed in the following manner to obtain the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed: performing frame-segmentation processing on the speech segment to be processed to obtain a frame-segmented speech segment; performing windowing processing on each frame of the frame-segmented speech segment to obtain a windowed speech segment; processing the windowed speech segment based on discrete Fourier transform to obtain a Fourier transformed speech segment and a complex energy value corresponding to the Fourier transformed speech segment; performing multi-order Mel filtering on the complex energy value to obtain the Mel value corresponding to the speech segment to be processed; and obtaining the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed through discrete string transform based on the Mel value.

[0109] In an exemplary embodiment of the present invention, the extraction module 820 may perform multi-order Mel filtering on the complex energy value to obtain the Mel value corresponding to the speech segment to be processed in the following manner: determine the function value of the 24th order Mel filter group; based on the complex energy value and the function value of the 24th order Mel filter group, obtain the Mel value of each frame in the speech segment to be processed; based on the Mel value of each frame, obtain the Mel value corresponding to the speech segment to be processed.

[0110] In an exemplary embodiment of the present invention, the extraction module 820 may also be configured to perform first-order digital filtering on the frame-processed speech segments and use the frame-processed speech segments after first-order digital filtering as the final frame-processed speech segments.

[0111] Figure 9 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 9As shown, the electronic device may include a processor 910, a communications interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communications interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions in the memory 930 to execute a speech feature extraction method, which includes: performing speech endpoint detection on the speech segment to be processed to obtain a start frame and an end frame for the speech segment to be processed; performing speech feature extraction on the speech segment to be processed to obtain Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed; and truncating the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame to obtain effective Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed.

[0112] Furthermore, the logical instructions in the aforementioned memory 930 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0113] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the speech feature extraction method provided by the above methods. The method includes: performing speech endpoint detection on a speech segment to be processed to obtain a start frame and an end frame for the speech segment to be processed; performing speech feature extraction on the speech segment to be processed to obtain Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed; and truncating the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame to obtain effective Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed.

[0114] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the speech feature extraction method provided by the above methods. The method includes: performing speech endpoint detection on a speech segment to be processed to obtain a start frame and an end frame for the speech segment to be processed; performing speech feature extraction on the speech segment to be processed to obtain Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed; and truncating the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame to obtain effective Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed.

[0115] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0116] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0117] It is further understood that although operations are described in a specific order in the accompanying drawings in the embodiments of this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A speech feature extraction method, characterized in that, The method includes: Speech endpoint detection is performed on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed; Speech features are extracted from the speech segment to be processed to obtain the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed. Based on the start frame and the end frame, the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed are truncated to obtain effective Mel-frequency cepstral coefficient feature parameters for the speech segment to be processed. The step of performing speech endpoint detection on the speech segment to be processed to obtain the start and end frames for the speech segment to be processed includes: The speech segment to be processed is segmented into frames to obtain the segmented speech segment. Short-time zero-crossing rate calculation is performed on each frame of the segmented speech data to obtain the number of zero-crossings of the speech signal waveform in each frame. Short-time energy calculation is performed on each frame of the segmented speech data to obtain the sum of the absolute values ​​of the speech signal energy values ​​of each frame. Based on the sum of the zero-crossing count of the speech signal waveform in each frame and the absolute value of the speech signal energy value in each frame, speech endpoint detection is performed on the speech segment to be processed to obtain the start frame and end frame of the speech segment to be processed. The step of extracting speech features from the speech segment to be processed, to obtain the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed, includes: The speech segment to be processed is segmented into frames to obtain the segmented speech segment. Windowing is applied to each frame of the segmented audio segment to obtain the windowed audio segment. Based on the discrete Fourier transform, the windowed speech segment is processed to obtain the Fourier transformed speech segment and the complex energy value corresponding to the Fourier transformed speech segment. The complex energy value is subjected to multi-order Mel filtering to obtain the Mel value corresponding to the speech segment to be processed. Based on the Mel value, the Mel frequency cepstral coefficient characteristic parameters of the speech segment to be processed are obtained through discrete string transform.

2. The speech feature extraction method according to claim 1, characterized in that, The method of performing speech endpoint detection on the speech segment to be processed based on the sum of the number of zero-crossings of the speech signal waveform in each frame and the absolute value of the speech signal energy value in each frame, to obtain the start frame and end frame of the speech segment to be processed, includes: Determine the short-time zero-crossing rate threshold, the short-time energy threshold, and the speech segment length threshold; Based on the sum of the absolute values ​​of the speech signal energy values ​​of each frame in the segmented speech segment after framing processing, and the short-time energy threshold, the starting frame of the speech segment to be processed is determined in chronological order. Based on the time sequence, the length of the speech segment to be processed is determined according to the number of zero-crossings of the speech signal waveform in each frame of the speech segment after frame processing, and the short-time zero-crossing rate threshold. Based on the speech segment length and the speech segment length threshold, the effective speech segment length of the speech segment to be processed is determined, and the last frame corresponding to the effective speech segment length is taken as the end frame of the speech segment to be processed.

3. The speech feature extraction method according to claim 1, characterized in that, Before performing frame segmentation on the speech segment to be processed, the method further includes: The speech segment to be processed is normalized, and the normalized speech segment is taken as the final speech segment to be processed.

4. The speech feature extraction method according to claim 1, characterized in that, After performing frame segmentation on the speech segment to be processed to obtain the frame-processed speech segment, the method further includes: The segmented audio segments are subjected to first-order digital filtering, and the segmented audio segments after first-order digital filtering are used as the final segmented audio segments.

5. The speech feature extraction method according to claim 1, characterized in that, The step of performing multi-order Mel filtering on the complex energy value to obtain the Mel value corresponding to the speech segment to be processed includes: Determine the function values ​​of the 24th-order Mel filter group; Based on the complex energy value and the function value of the 24th order Mel filter group, the Mel value of each frame in the speech segment to be processed is obtained; Based on the Mel value of each frame, the Mel value corresponding to the speech segment to be processed is obtained.

6. The speech feature extraction method according to claim 1, characterized in that, Before performing frame segmentation on the speech segment to be processed, the method further includes: The segmented audio segments are subjected to first-order digital filtering, and the segmented audio segments after first-order digital filtering are used as the final segmented audio segments.

7. A speech feature extraction device, characterized in that, The apparatus is used to implement the speech feature extraction method according to any one of claims 1 to 6, and the apparatus comprises: The detection module is used to detect speech endpoints of the speech segment to be processed, and to obtain the start frame and end frame of the speech segment to be processed. The extraction module is used to extract speech features from the speech segment to be processed, and obtain the Mel frequency cepstral coefficient feature parameters of the speech segment to be processed. The processing module is used to extract the Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed based on the start frame and the end frame, so as to obtain the effective Mel-frequency cepstral coefficient feature parameters of the speech segment to be processed.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the speech feature extraction method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the speech feature extraction method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the speech feature extraction method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multilingual scene analysis method based on audio characteristic parameters

    CN109036458A

  • Voice emotion recognition method, device, server and computer readable storage medium

    CN111145786A