Keyword-based non-standard speech recognition method, device, equipment and medium
By performing filtering, noise reduction and vocal enhancement processing on the real-time audio data of the elderly, combining the long and short-term memory network to extract audio features, and performing similarity calculations with keyword features in the speech template library, the existing technology solves the problem for the elderly. It solves the problem of low speech recognition accuracy and achieves timely response in emergency situations.
Patent Information
- Application Number
- CN202410805064.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Existing speech recognition technology has low recognition accuracy for elderly people with specific accents or non-standard pronunciation. In particular, models trained based on standard speech libraries cannot effectively recognize the speech of elderly people with local accents.
A non-standard speech recognition method based on keywords is used to obtain real-time audio data for filtering, noise reduction and vocal enhancement processing. The audio feature extraction model constructed using a long short-term memory network is used to extract the audio features of the target elderly person, and combined with the speech template library Calculate the similarity of the feature vectors of the keywords in the keywords, and identify the corresponding keywords when the similarity is greater than the threshold.
It improves the speech recognition accuracy of the elderly, ensuring timely recognition and response in emergency situations. By removing noise and interference, it improves the clarity and quality of audio signals and provides a better basis for feature extraction and recognition.
Smart Images

Figure CN118379986B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of speech recognition technology, and in particular to a keyword-based non-standard speech recognition method, device, equipment and medium. Background Art
[0002] Speech recognition technology is an important research area in the field of artificial intelligence and natural language processing. It involves converting human speech into text or other forms of representation through computer systems. Speech recognition technology is widely used in many fields, such as virtual assistants, voice command control, voice transcription, and telephone customer service. These applications require high accuracy and real-time performance of speech recognition technology.
[0003] Existing speech recognition technologies mainly rely on models trained with large amounts of speech data. These models are usually trained based on standard speech libraries, which contain a large amount of speech data from different speakers. During the training process, the model learns various speech features, such as phonemes, pitch, speaking speed, and intonation, so that it can accurately recognize and convert speech signals in practical applications. However, these models are usually trained for standard accents and widely used languages, and have poor recognition effects on speech with specific accents or non-standard pronunciations.
[0004] In the prior art, general speech recognition models are also commonly used for the elderly. These models are mainly trained based on standard speech libraries, and usually perform well for speech recognition with standard accents, but have low recognition accuracy for elderly people with specific accents. This low accuracy is mainly because the accents and speech habits of the elderly are quite different from the data trained in the standard speech library. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a keyword-based non-standard speech recognition method, apparatus, device and storage medium to solve the problem of inaccurate pronunciation of Chinese characters in the prior art, such as low accuracy of speech recognition for elderly people with local accents.
[0006] In a first aspect, an embodiment of the present invention provides a keyword-based non-standard speech recognition method, the method comprising:
[0007] Obtain real-time audio data of the target elderly;
[0008] Preprocessing the real-time audio data to obtain target audio data, wherein the preprocessing includes filtering, noise reduction and voice enhancement;
[0009] Obtaining a first audio feature vector of the target audio data according to the target audio data and a pre-constructed audio feature extraction model, wherein the audio feature extraction model is constructed based on a long short-term memory network;
[0010] Respectively obtaining similarity values between the first audio feature vector and the second audio feature vector of each keyword in a speech template library, wherein the speech template library includes second audio feature vectors corresponding to a plurality of keywords one by one, and the second audio feature vectors are obtained based on the audio feature extraction model;
[0011] When any of the similarity values is greater than a similarity threshold, the corresponding keyword exists in the real-time audio data.
[0012] Preferably, the preprocessing of the real-time audio data to obtain target audio data includes:
[0013] According to the gender information of the target elderly person, obtaining the basic audio frequency range of the target elderly person;
[0014] Performing filtering processing on the real-time audio data according to the audio basic frequency range to obtain filtered audio data;
[0015] Performing noise reduction processing on the filtered audio data according to spectral subtraction and the audio basic frequency range to obtain noise-reduced audio data;
[0016] Performing voice enhancement processing on the noise reduction audio data to obtain enhanced audio data;
[0017] Dynamic range compression is performed on the enhanced audio data to obtain the target audio data.
[0018] Preferably, the performing noise reduction processing on the filtered audio data according to the spectral subtraction method and the audio basic frequency range to obtain the noise-reduced audio data comprises:
[0019] determining a noise suppression smoothing parameter based on the filtered audio data;
[0020] Obtaining noise estimation data of the filtered audio data according to the noise suppression smoothing parameter and the recursive averaging method;
[0021] The noise reduction audio data is obtained according to the filtered audio data and the noise estimation data.
[0022] Preferably, obtaining the noise reduction audio data according to the filtered audio data and the noise estimation data comprises:
[0023] Acquiring fundamental frequency energy distribution data according to the filtered audio data;
[0024] Determining a gain adjustment factor according to the fundamental frequency energy distribution data, wherein the gain adjustment factor is used to adjust the ratio between human voice and noise in noise reduction processing;
[0025] Acquire initial noise reduction audio data according to the filtered audio data and the noise estimation data;
[0026] The initial noise reduction audio data is gained by using the gain adjustment factor to obtain the noise reduction audio data.
[0027] Preferably, performing dynamic range compression processing on the enhanced audio data to obtain the target audio data includes:
[0028] Determine the maximum output amplitude and the minimum output amplitude according to the basic frequency range of the audio of the target elderly person;
[0029] Obtaining peak data according to the peak value of the enhanced audio data;
[0030] According to the maximum output amplitude, the minimum output amplitude and the peak data, the enhanced audio data is subjected to dynamic range compression processing to obtain the target audio data, wherein the target audio data is calculated by the following formula: Wherein, k is the frequency index, l is the time index, C(k,l) is the target audio data, V(k,l) is the enhanced audio data, V min is the minimum output amplitude, V max is the maximum output amplitude, V peak (k, l) is the peak data.
[0031] Preferably, obtaining a first audio feature vector of the target audio data according to the target audio data and a pre-built audio feature extraction model comprises:
[0032] Obtaining Mel-frequency cepstrum coefficients of the target audio data;
[0033] Obtaining coefficient features of the target audio data according to features of the Mel-frequency cepstrum coefficients of the target audio data;
[0034] The coefficient features of the target audio data are input into the audio feature extraction model to obtain the first audio feature vector, wherein the first audio feature vector includes the accent features, pronunciation habit features and speech intensity change features of the target elderly person.
[0035] Preferably, the step of respectively obtaining the similarity between the first audio feature vector and the second audio feature vector of each keyword in the speech template library includes:
[0036] Acquire historical audio data of a keyword of the target elderly person, wherein the keyword corresponds to a preset number of historical audio data;
[0037] Preprocessing each of the historical audio data to obtain target historical audio data;
[0038] According to the Mel-frequency cepstrum coefficients of the historical target audio data, coefficient features of each of the target historical audio data are obtained;
[0039] Inputting coefficient features of each of the target historical audio data into the audio feature extraction model to obtain an initial historical audio feature vector;
[0040] Determining a weight parameter of a corresponding initial historical audio feature vector according to the volume of the historical audio data;
[0041] According to the weight parameter, the initial historical audio feature vectors corresponding to each of the keywords are weighted averaged to obtain a second audio feature vector for each of the keywords,
[0042] The similarity between the first audio feature vector and the second audio feature vector of each keyword is calculated according to the cosine similarity.
[0043] In a second aspect, an embodiment of the present invention provides a keyword-based non-standard speech recognition device, the device comprising:
[0044] An audio data acquisition module is used to acquire real-time audio data of the target elderly person;
[0045] A preprocessing module, used to preprocess the real-time audio data to obtain target audio data, wherein the preprocessing includes filtering processing, noise reduction processing and vocal enhancement processing;
[0046] A feature extraction module, configured to obtain a first audio feature vector of the target audio data according to the target audio data and a pre-constructed audio feature extraction model, wherein the audio feature extraction model is constructed based on a long short-term memory network;
[0047] A similarity acquisition module, which respectively acquires a similarity value between the first audio feature vector and a second audio feature vector of each keyword in a speech template library, wherein the speech template library includes second audio feature vectors corresponding to a plurality of keywords one by one, and the second audio feature vectors are obtained based on the audio feature extraction model;
[0048] The determination module is used to determine that when any of the similarity values is greater than a similarity threshold, the corresponding keyword exists in the real-time audio data.
[0049] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect in the above-mentioned embodiment.
[0050] In a fourth aspect, an embodiment of the present invention provides a storage medium having computer program instructions stored thereon, which implements the method of the first aspect in the above-mentioned embodiment when the computer program instructions are executed by a processor.
[0051] In summary, the beneficial effects of the present invention are as follows:
[0052] The keyword-based non-standard speech recognition method, device, equipment and storage medium provided by the embodiment of the present invention can help to immediately identify and respond to the elderly when they make an emergency call by acquiring the audio data of the target elderly in real time, ensuring timely action. Through filtering, noise reduction and voice enhancement processing, noise and interference are removed to improve the clarity and quality of the audio signal. The voice enhancement processing can enhance the voice part of the target elderly, making it clearer and more prominent, providing a better basis for subsequent feature extraction and recognition. The audio feature extraction model constructed by the long short-term memory network can effectively extract the audio features of the target elderly, including accent, pronunciation habits and voice intensity changes. By calculating the similarity between the first audio feature vector and the second audio feature vector of each keyword in the voice template library, the matching degree between the target elderly's voice and the pre-defined keywords can be measured. When the similarity is greater than the similarity threshold, the system can immediately make an emergency call to ensure timely response to the elderly in an emergency. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the embodiment of the present invention will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.
[0054] Figure 1 The present invention is a flowchart of a keyword-based non-standard speech recognition method according to an embodiment of the present invention.
[0055] Figure 2 This is another flowchart of the keyword-based non-standard speech recognition method according to an embodiment of the present invention.
[0056] Figure 3 This is another flowchart of the keyword-based non-standard speech recognition method according to an embodiment of the present invention.
[0057] Figure 4 4 is a schematic diagram of the structure of a keyword-based non-standard speech recognition device according to an embodiment of the present invention.
[0058] Figure 5 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0060] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the process, method, article or device that includes the elements;
[0061] It should also be noted that all actions of acquiring signals, information or data in the present invention are performed in compliance with the corresponding data protection laws and policies of the location and with the authorization given by the owner of the corresponding device.
[0062] Example 1
[0063] See also Figure 1 The embodiment of the present invention provides a keyword-based non-standard speech recognition method, characterized in that the method comprises:
[0064] S1. Obtain real-time audio data of the target elderly person;
[0065] Specifically, the target elderly refers to the monitored object, that is, the elderly who need to be monitored. Real-time audio data refers to the audio signal directly obtained from the sound source at the same time as the target elderly makes a sound. These signals are usually captured in real time through a microphone or other audio sensor.
[0066] In this step, an audio acquisition device (such as a microphone) is used to capture the voice of the target elderly. The device should be placed near the target elderly to obtain the elderly's voice in real time. The audio data needs to be transmitted to the subsequent processing module in real time for further audio preprocessing and analysis.
[0067] By acquiring the target elderly's audio data in real time, the system can instantly monitor the target elderly's status and respond to potential emergency calls in a timely manner.
[0068] S2, preprocessing the real-time audio data to obtain target audio data, wherein the preprocessing includes filtering, noise reduction and voice enhancement;
[0069] Specifically, this step can effectively remove background noise, echo and other interference through the preprocessing step, making the target audio data clearer and purer, providing high-quality data for subsequent analysis.
[0070] Wherein, the preprocessing includes but is not limited to filtering, noise reduction and voice enhancement. The filtering is to process the real-time audio data in the frequency domain by applying a filter to remove unnecessary frequency components. According to the voice characteristics of the target elderly, a bandpass filter can be used to retain the sound within the target frequency range, or other types of filters can be used to suppress high-frequency or low-frequency noise. Noise reduction is intended to reduce the noise in the audio signal. Common methods include spectral subtraction, subspace method, time-frequency masking, etc. These methods analyze the frequency spectrum of the noise and voice signal, distinguish the noise part and suppress it. The purpose of voice enhancement is to improve the quality of the voice signal and make it clearer. Common methods include adjusting the gain of the signal, dynamic range compression, etc. These methods can increase the loudness of the voice part in the audio signal and increase the intelligibility of the speech.
[0071] The target audio data after preprocessing is of high quality, providing a reliable foundation for subsequent audio feature extraction and matching, and improving the performance and accuracy of the overall system.
[0072] Preferably, see Figure 2 , the preprocessing of the real-time audio data to obtain target audio data includes:
[0073] S21. Acquire the basic audio frequency range of the target elderly person according to the gender information of the target elderly person;
[0074] Specifically, the audio basic frequency range refers to the range of the fundamental frequency (F0) of the target elderly when speaking. The fundamental frequency is the most basic frequency in the speech signal and reflects the speaker's vocal characteristics. According to the gender information of the target elderly, the fundamental frequency range of their speech can be determined. Generally speaking, the fundamental frequency range of elderly men is between 85-155 Hz, and the fundamental frequency range of elderly women is between 100-200 Hz. By obtaining the audio basic frequency range of the target elderly according to their gender information, customized parameters can be provided for audio processing to improve the processing effect.
[0075] S22, filtering the real-time audio data according to the audio basic frequency range to obtain filtered audio data;
[0076] Select a suitable filter, usually a bandpass filter, according to the basic frequency range of the target elderly audio. This filter can retain the signal within the target frequency range and remove the signal in other frequency ranges. Set the parameters of the filter according to the basic frequency range of the target elderly audio. Including the lower limit frequency f_lower and the upper limit frequency f_upper, which represent the lower and upper limits of the base frequency range respectively. Apply the filter to the real-time audio data. The filter will retain the audio signal within the target frequency range and remove the signal in other frequency ranges. The audio data after filtering is called filtered audio data. These data remove the frequency components outside the target frequency range and retain the voice of the target elderly.
[0077] S23, performing noise reduction processing on the filtered audio data according to spectral subtraction and the audio basic frequency range to obtain noise-reduced audio data;
[0078] Specifically, spectral subtraction is a commonly used noise reduction method that reduces noise by calculating the noise power spectrum in the mixed signal and subtracting the noise power spectrum from the power spectrum of the mixed signal. Based on the filtered audio data, the noise power spectrum present therein is estimated. This can be done by selecting a portion of the audio without vocals (silent segments) as noise samples to estimate the noise power spectrum. The power spectrum of the mixed signal is obtained by calculating the power spectrum of the filtered audio data. Using spectral subtraction, the power spectrum of the filtered audio data is calculated minus the estimated noise power spectrum to obtain the net power spectrum of the vocal signal. The net power spectrum is converted back to the time domain to obtain the denoised audio data. This step is usually achieved by inverse Fourier transform or other time-frequency conversion methods.
[0079] Through spectral subtraction, the background noise in the filtered audio data can be effectively removed, making the audio signal clearer. The noise reduction process uses the basic frequency range of the target elderly's audio to remove noise in a targeted manner while retaining the target elderly's voice as much as possible.
[0080] Preferably, see Figure 3 , performing noise reduction processing on the filtered audio data according to spectral subtraction and the audio basic frequency range to obtain noise-reduced audio data, including:
[0081] S231, determining a noise suppression smoothing parameter according to the filtered audio data;
[0082] Specifically, the characteristics of the audio signal are analyzed from the filtered audio data, including the spectrum and energy distribution of the signal, and the noise suppression smoothing parameter is determined according to the analysis results of the filtered audio data. This parameter affects the smoothness of the noise estimation, that is, the weighted average used in the estimation process. The selection of the smoothing parameter should be adjusted according to the change of the noise. A higher smoothing parameter helps smooth the estimation, but may react slowly to noise changes. A lower smoothing parameter can react to noise changes more quickly, but may cause fluctuations in the estimation results.
[0083] S232, obtaining noise estimation data of the filtered audio data according to the noise suppression smoothing parameter and the recursive averaging method;
[0084] Specifically, the noise estimation at the previous moment and the estimation result in the current filtered audio data are used for smoothing by the recursive averaging method. The noise estimation data in the filtered audio data is updated according to the noise suppression smoothing parameter and the recursive averaging method. The noise estimation is dynamically adjusted according to the change of the audio signal to ensure the accuracy and stability of the estimation result.
[0085] Specifically, the noise estimation data can be calculated by the following formula: Wherein, k is the frequency index, l is the time index, α is the noise suppression smoothing parameter, Y(k,l) is the spectrum of the filtered audio data, is the noise estimate at the previous moment, N updated (k,l) is the updated noise estimate;
[0086] Among them, α is a factor related to the fundamental frequency (Fundamental Frequency), which can be used to dynamically adjust the strength of noise suppression;
[0087] S233. Obtain the noise reduction audio data according to the filtered audio data and the noise estimation data.
[0088] Specifically, based on the filtered audio data and the estimated noise data, the noise-reduced audio data can be calculated by spectral subtraction. This includes subtracting the estimated noise power spectrum from the power spectrum of the filtered audio data. In the spectral subtraction, relevant parameters such as gain and smoothing coefficient can be adjusted according to the characteristics of the audio signal and the audio characteristics of the target elderly. The net power spectrum obtained by spectral subtraction is converted back to the time domain to obtain the noise-reduced audio data.
[0089] Preferably, obtaining the noise reduction audio data according to the filtered audio data and the noise estimation data comprises:
[0090] S2331. Acquire fundamental frequency energy distribution data according to the filtered audio data;
[0091] Specifically, this step analyzes the filtered audio data to determine the frequency distribution within the fundamental frequency range of the target elderly, and generates fundamental frequency energy distribution data within the fundamental frequency range of the target elderly according to the calculation results. These data reflect the speech energy distribution of the target elderly within a specific frequency range. The fundamental frequency energy distribution data helps to improve the effect of spectral subtraction and enhance the accuracy of noise reduction.
[0092] S2332. Determine a gain adjustment factor according to the fundamental frequency energy distribution data, wherein the gain adjustment factor is used to adjust the ratio between human voice and noise in noise reduction processing;
[0093] Specifically, the gain adjustment factor is calculated based on the extracted fundamental frequency energy distribution data. The gain adjustment factor is used to adjust the ratio between human voice and noise in the noise reduction process, that is, the gain adjustment factor is used to dynamically adjust the signal enhancement effect in the noise reduction process to ensure that the fundamental frequency component is better preserved and enhanced.
[0094] The fundamental frequency energy distribution data reflects the energy distribution of the audio signal on each fundamental frequency and its harmonic components. By analyzing these data, a gain adjustment factor can be designed to enhance the main speech component and suppress noise. For each frame of audio data, the energy distribution of its fundamental frequency and its harmonic components is extracted to form an energy distribution spectrum; for example but not limited to, for each frequency component, the ratio of its fundamental frequency energy (including the fundamental frequency and its harmonic components) to the total audio energy is calculated. This can be obtained by dividing the sum of the energy of the fundamental frequency and its harmonic components by the total energy. Based on the fundamental frequency energy ratio, a gain function can be used to adjust the gain. Common gain function forms can be a linear or nonlinear function, the purpose of which is to adjust the gain according to the fundamental frequency energy ratio of different frequency components.
[0095] In one embodiment, the gain adjustment factor may also be determined by the fundamental frequency stability, and the gain factor is increased for frames with high fundamental frequency stability (i.e., dominated by speech components), and the gain factor is decreased for frames with low fundamental frequency stability (i.e., frames that may contain noise or non-speech components).
[0096] S2333. Acquire initial noise reduction audio data according to the filtered audio data and the noise estimation data;
[0097] Specifically, preliminary noise reduction audio data is calculated based on the filtered audio data and the noise estimation data. The preliminary noise reduction data is obtained by processing the energy spectrum of the filtered audio data and the noise estimation data.
[0098] S2334, performing gain adjustment on the initial noise reduction audio data to obtain the noise reduction audio data;
[0099] Finally, the gain of the preliminary noise reduction data is adjusted according to the calculated gain adjustment factor to further optimize the noise reduction effect and obtain the final noise reduction audio data. The gain adjustment factor ensures that the fundamental frequency component is enhanced after the modulus square of the signal spectrum minus the updated noise estimate, thereby better preserving the signal content.
[0100] In one embodiment, the noise reduction audio data is calculated using the following formula: In the formula, k is the frequency index, l is the time index, D(k,l) represents the audio power of the noise reduction audio data at the kth frequency point in the lth frame, N(k,l) represents the noise power of the noise estimation data at the kth frequency point in the lth frame, G(k,l) is the gain adjustment factor obtained based on the fundamental frequency energy distribution data, and X(k,l) is the energy spectrum of the filtered audio data.
[0101] G(k,l) can be dynamically adjusted based on the stability of the fundamental frequency or the energy distribution of the signal. The energy distribution of the audio signal reflects the strength of the speech signal in different frequency ranges. In the speech of the elderly, the energy distribution may be concentrated in the lower frequency range. Therefore, the value of G(k,l) can be dynamically adjusted based on the energy distribution of the signal to make it more consistent with the speech characteristics of the elderly. D(k,l) is the signal spectrum after gain adjustment, where G(k,l) is applied to the square of the modulus of the signal spectrum minus the updated noise estimate, further emphasizing the signal content; the process of dynamically adjusting G(k,l) and its application in the noise reduction process help improve the noise reduction effect, emphasize the speech characteristics of the target elderly, and improve the quality and clarity of the speech signal. X(k,l) is the energy spectrum of the filtered audio data, reflecting the energy distribution of each frequency point.
[0102] S24, performing voice enhancement processing on the noise reduction audio data to obtain enhanced audio data;
[0103] Specifically, the human voice enhancement processing aims to enhance the human voice part in the audio to make it clearer and more recognizable. This is achieved by adjusting the gain of the audio signal or other technical means. According to the basic frequency range of the audio of the target elderly, the noise reduction audio data is spectrally adjusted to enhance the human voice signal. Specifically, the human voice can be highlighted by amplifying the part within the frequency range of the human voice signal and reducing the part in other frequency ranges. The gain of the audio signal is dynamically adjusted according to the voice characteristics of the target elderly and the energy distribution in the audio data. Usually, the gain is increased within the frequency range of the human voice part in the audio to enhance the voice of the target elderly. When enhancing the human voice signal, the audio data can also be smoothed to reduce the possible mutations or jitters in the audio signal to ensure the smooth effect of the human voice enhancement processing. According to the gender and voice characteristics of the target elderly, the enhanced frequency range is adjusted in a targeted manner. By focusing on enhancing voice features such as fundamental frequency and resonance peaks, the voice of the target elderly is made clearer.
[0104] In one embodiment, the human voice enhancement processing can be performed based on the frequency spectrum characteristics of the target elderly person. The main energy of the target elderly person's voice is concentrated in the middle and low frequency area. Therefore, the gain of this key frequency band is targeted to enhance the human voice signal while avoiding the introduction of excessive noise or loss.
[0105] Specifically, the vocal gain factor can be determined by the basic frequency range of the audio of the target elderly person. It is set to a value greater than 1 in the main frequency range of vocal sound, and is set to a value close to 1 or slightly less than 1 in non-vocal frequency or noise-intensive areas to avoid noise amplification. The enhanced audio data can be obtained through the vocal gain factor and the noise reduction audio data.
[0106] S25. Perform dynamic range compression processing on the enhanced audio data to obtain the target audio data.
[0107] Specifically, when processing the speech of the elderly, considering that their speech dynamic range may be narrow, dynamic range compression (DRC) can further improve the clarity of the speech. This processing method helps to improve the intelligibility and quality of the speech signal. Dynamic range compression refers to compressing the dynamic range of audio data so that the audio signal remains stable within different volume ranges. The parameters of dynamic range compression, such as compression ratio, threshold, etc., are determined according to the speech characteristics of the target elderly. Dynamic range compression is applied to the enhanced audio data so that the dynamic range of the audio is compressed.
[0108] By compressing the dynamic range of the audio signal, the lower volume parts of the signal will be boosted to a more noticeable level, which can make the speech signal clearer in the lower volume range. This processing is particularly beneficial for the speech of the elderly, whose speech may be softer and easily drowned out by the ambient noise. The compressed signal is more intelligible.
[0109] Preferably, performing dynamic range compression processing on the enhanced audio data to obtain the target audio data includes:
[0110] S251, determining a maximum output amplitude and a minimum output amplitude according to a basic frequency range of the audio of the target elderly person;
[0111] Specifically, the maximum output amplitude and the minimum output amplitude of the dynamic range compression are determined according to the basic audio frequency range of the target elderly. By setting the maximum output amplitude and the minimum output amplitude, the volume range of the target audio data can be controlled to improve the stability of the audio signal.
[0112] S252, obtaining peak data according to the peak value of the enhanced audio data;
[0113] According to the maximum output amplitude, the minimum output amplitude and the peak data, the enhanced audio data is subjected to dynamic range compression processing to obtain the target audio data, wherein the target audio data is calculated by the following formula: In the formula, k is the frequency index, l is the time index, C (k, l) is the target audio data, V (k, l) is the enhanced audio data, Vmin is the minimum output amplitude, Vmax is the maximum output amplitude, and Vpeak (k, l) is the peak data.
[0114] Specifically, according to the formula, the enhanced audio data V(k, l) is subjected to dynamic range compression according to the formula. By combining Vmax and Vmin with Vpeak(k, l) and V(k, l), the target audio data C(k, l) is calculated. By compressing the dynamic range of the audio signal to between the maximum output amplitude Vmax and the minimum output amplitude Vmin, the stability and clarity of the audio signal are improved. Compression processing can reduce signal distortion and keep the audio data consistent within different volume ranges. The target audio data obtained after dynamic range compression is more stable, providing a good foundation for subsequent speech recognition and analysis.
[0115] S3. Obtaining a first audio feature vector of the target audio data according to the target audio data and a pre-constructed audio feature extraction model, wherein the audio feature extraction model is constructed based on a long short-term memory network;
[0116] Specifically, the audio feature extraction model is a machine learning model used to extract representative features from target audio data. The model used here is built based on the long short-term memory network (LSTM). LSTM is a neural network architecture suitable for sequence data, especially for processing time series data such as audio. It can capture the temporal dependency and dynamic change characteristics in audio signals.
[0117] The preprocessed target audio data is input into the audio feature extraction model. The data is usually divided into sequence form to fit the input structure of LSTM. The LSTM model runs on the input data and processes the audio data sequence frame by frame. During the processing, the model captures important features in the audio signal, such as pitch, intonation, pronunciation habits, etc., through the memory and forgetting mechanism. After processing the audio data, the model outputs a feature vector. This vector is usually the output of the final state of the model after processing the target audio data sequence. The vector contains the main feature information of the target audio data.
[0118] Through the LSTM model, the system can extract key time series features from the target audio data to reflect the voice characteristics of the target elderly. The extracted first audio feature vector is a concise representation of the target audio data, which retains the main features in the audio signal while reducing the dimension of the data and improving processing efficiency.
[0119] Preferably, obtaining a first audio feature vector of the target audio data according to the target audio data and a pre-built audio feature extraction model comprises:
[0120] S31, obtaining Mel-frequency cepstrum coefficients of the target audio data;
[0121] Specifically, the audio data is converted to the time-frequency domain through the short-time Fourier transform (STFT) of the audio data or other time-frequency transform techniques. The spectrum data is filtered through the Mel filter bank to simulate the human ear's perception of frequency. The Mel spectrum is logarithmically transformed and the discrete cosine transform (DCT) is applied to calculate the Mel frequency cepstral coefficients (MFCCs). MFCCs is a commonly used method for representing speech features and can effectively extract features from speech signals.
[0122] S32, obtaining coefficient features of the target audio data according to features of the Mel-frequency cepstrum coefficients of the target audio data;
[0123] Select a set of characteristic coefficients from the calculated Mel-frequency cepstral coefficients (MFCCs). These coefficients may be the first few Mel-frequency cepstral coefficients, or feature vectors selected according to the actual application. Through feature selection, the characteristic data of the Mel-frequency cepstral coefficients are extracted to form the coefficient features of the target audio data.
[0124] S33. Input the coefficient features of the target audio data into the audio feature extraction model to obtain the first audio feature vector, wherein the first audio feature vector includes the accent features, pronunciation habit features and speech intensity change features of the target elderly person.
[0125] The coefficient features of the target audio data are used as input to the pre-built audio feature extraction model, and the model outputs a first audio feature vector based on the input data. The vector contains the target elderly's accent features, pronunciation habit features, and speech intensity change features.
[0126] Specifically, the model includes multiple LSTM layers and fully connected layers to process input data and output features, and the LSTM model is trained using speech samples of the target elderly. The training process includes inputting speech data and its corresponding labels (such as keywords) and adjusting the weights and biases of the model. After the model is trained, the model is inferred using speech samples of the target elderly. The last layer of the model is usually a feature layer, which outputs a feature vector that represents the speech features of the target elderly. These output features are extracted as the first audio feature vector, which reflects the unique speech features of the target elderly, including accent, pronunciation habits, and changes in speech intensity.
[0127] S4, respectively obtaining similarities between the first audio feature vector and second audio feature vectors of each keyword in a speech template library, wherein the speech template library includes second audio feature vectors corresponding to a plurality of keywords one by one, and the second audio feature vectors are obtained based on the audio feature extraction model;
[0128] Specifically, keywords refer to specific words or phrases used to trigger emergency call responses. These words are pre-set by the target elderly or users, and are usually words or phrases that are commonly used and easy to recognize by the elderly. In an emergency, the elderly can trigger an emergency call by saying these words or phrases. The voice template library stores second audio feature vectors corresponding to several keywords. These vectors are features extracted from pre-recorded samples, representing the audio features of different keywords.
[0129] In this step, the second audio feature vector corresponding to each keyword is obtained from the speech template library. These feature vectors in the speech template library are extracted from known audio samples using the same audio feature extraction model in the training phase. The similarity between the first audio feature vector and the second audio feature vector corresponding to each keyword in the speech template library is compared. Commonly used similarity measurement methods include cosine similarity, Euclidean distance, etc.
[0130] Preferably, the step of respectively obtaining the similarity between the first audio feature vector and the second audio feature vector of each keyword in the speech template library includes:
[0131] S41, obtaining historical audio data of a keyword of the target elderly person, wherein a keyword corresponds to a preset number of historical audio data;
[0132] Specifically, audio data containing target keywords are extracted from the historical audio data of the target elderly. These data can be pre-recorded audio clips or from the life records of the target elderly. For each target keyword, a preset amount of historical audio data is determined, which should be rich and balanced enough to ensure the training and analysis effect of the model.
[0133] S42, preprocessing each of the historical audio data to obtain target historical audio data;
[0134] Specifically, the historical audio data is preprocessed, including filtering, noise reduction, vocal enhancement, etc., to improve the quality of the audio signal. After preprocessing, the target historical audio data is obtained, providing a better data basis for subsequent steps. The preprocessing process is the same as the preprocessing of the test audio data, and will not be repeated here.
[0135] S43, obtaining coefficient features of each of the target historical audio data according to the Mel-frequency cepstrum coefficients of the historical target audio data;
[0136] The Mel frequency cepstral coefficients of the target historical audio data are calculated through short-time Fourier transform and Mel filter bank, and the coefficient features of the target historical audio data are extracted according to the Mel frequency cepstral coefficients.
[0137] S44, inputting the coefficient features of each of the target historical audio data into the audio feature extraction model to obtain an initial historical audio feature vector;
[0138] The coefficient features of the target historical audio data are input into a pre-built audio feature extraction model, the model processes the input data, and outputs an initial historical audio feature vector.
[0139] S45, determining a weight parameter of a corresponding initial historical audio feature vector according to the volume of the historical audio data;
[0140] Specifically, the volume of the historical audio data is calculated. According to the volume of the historical audio data, the weight parameter of the initial historical audio feature vector is determined. Determining the weight parameter according to the volume can enhance the representativeness of the feature vector, and the weight parameter is proportional to the volume.
[0141] S46. Perform weighted averaging on the initial historical audio feature vectors corresponding to each of the keywords according to the weight parameters to obtain a second audio feature vector for each of the keywords.
[0142] According to the weight parameter, the initial historical audio feature vector corresponding to each keyword is weighted averaged. After weighted average, the second audio feature vector of each keyword is obtained. Weighted average helps to ensure that the second audio feature vector of each keyword is balanced and avoid feature deviation. By weighted average of feature vectors, the recognition accuracy of the model for the target elderly can be improved.
[0143] S47: Calculate the similarity between the first audio feature vector and the second audio feature vector of each keyword according to the cosine similarity.
[0144] Calculating the cosine similarity between the first audio feature vector and the second audio feature vector of each keyword;
[0145] S5. When any of the similarity values is greater than a similarity threshold, the real-time audio data contains the corresponding keyword.
[0146] When comparing the similarity between the audio feature vector of the target elderly and the feature vectors of each keyword in the speech template library, a threshold is set. This value means that when the similarity of the audio feature vector is greater than this threshold, the audio of the target elderly is considered to match a certain keyword. Compare each calculated similarity value with the preset similarity threshold. When any similarity value is greater than the similarity threshold, it means that the audio data of the target elderly matches the feature vector of a certain keyword. If the above conditions are met, that is, the similarity is greater than the threshold;
[0147] In one embodiment, the keyword may be an emergency call word, which may include but is not limited to the following: help, help me, something happened, emergency, alarm, fire, injury, etc. When an emergency call word is detected, it means that the elderly may be in an emergency and need to take immediate action such as calling the police, immediately dialing a pre-set emergency contact phone number, such as a family member or caregiver, or sending a text message notification to the emergency contact, the content of which may include the detected emergency call word and audio timestamp.
[0148] In another embodiment, the keywords may include important words related to daily life, such as taking medicine, being hungry, drinking water, etc. When these keywords are detected, corresponding reminders or responses are triggered, such as reminders to take medicine or drink water.
[0149] In one embodiment, the similarity threshold is set to 0.75.
[0150] Example 2
[0151] See also Figure 4 The embodiment of the present invention provides a keyword-based non-standard speech recognition device, characterized in that the device comprises:
[0152] An audio data acquisition module is used to acquire real-time audio data of the target elderly person;
[0153] A preprocessing module, used to preprocess the real-time audio data to obtain target audio data, wherein the preprocessing includes filtering processing, noise reduction processing and vocal enhancement processing;
[0154] A feature extraction module, configured to obtain a first audio feature vector of the target audio data according to the target audio data and a pre-constructed audio feature extraction model, wherein the audio feature extraction model is constructed based on a long short-term memory network;
[0155] A similarity acquisition module, which respectively acquires a similarity value between the first audio feature vector and a second audio feature vector of each keyword in a speech template library, wherein the speech template library includes second audio feature vectors corresponding to a plurality of keywords one by one, and the second audio feature vectors are obtained based on the audio feature extraction model;
[0156] The determination module is used to determine that when any of the similarity values is greater than a similarity threshold, the corresponding keyword exists in the real-time audio data.
[0157] It should be noted that the modules and units in the keyword-based non-standard speech recognition device in this embodiment correspond one-to-one to the steps in the keyword-based non-standard speech recognition method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned keyword-based non-standard speech recognition method, which will not be repeated here.
[0158] Example 3
[0159] In addition, combined Figure 1 The keyword-based non-standard speech recognition method according to the embodiment of the present invention described above can be implemented by an electronic device. Figure 5 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention is shown.
[0160] The electronic device may include a processor and a memory storing computer program instructions.
[0161] Specifically, the processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0162] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside the data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0163] The processor implements any one of the keyword-based non-standard speech recognition methods in the above embodiments by reading and executing computer program instructions stored in the memory.
[0164] In one example, the electronic device may further include a communication interface and a bus. Figure 5 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0165] The communication interface is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiments of the present invention.
[0166] The bus includes hardware, software or both, and the components of the electronic device are coupled to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnection, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnection, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus may include one or more buses. Although the embodiments of the present invention describe and illustrate a specific bus, the present invention contemplates any suitable bus or interconnection.
[0167] Example 4
[0168] In addition, in combination with the keyword-based non-standard speech recognition method in the above embodiment, the embodiment of the present invention can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the keyword-based non-standard speech recognition methods in the above embodiment is implemented.
[0169] In summary, the keyword-based non-standard speech recognition method, device, equipment and storage medium provided by the embodiment of the present invention can help to immediately identify and respond when the elderly make an emergency call by acquiring the audio data of the target elderly in real time, ensuring timely action. Through filtering, noise reduction and voice enhancement processing, noise and interference are removed to improve the clarity and quality of the audio signal. Voice enhancement processing can enhance the voice part of the target elderly, making it clearer and more prominent, providing a better basis for subsequent feature extraction and recognition. The audio feature extraction model constructed by the long short-term memory network can effectively extract the audio features of the target elderly, including accent, pronunciation habits and voice intensity changes. By calculating the similarity between the first audio feature vector and the second audio feature vector of each keyword in the voice template library, the matching degree between the target elderly's voice and the pre-defined keywords can be measured. When the similarity is greater than the similarity threshold, the system can immediately make an emergency call to ensure timely response to the elderly in an emergency.
[0170] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0171] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0172] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0173] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A keyword-based non-standard speech recognition method, characterized in that: The method comprises: Obtain real-time audio data of the target elderly; Preprocessing the real-time audio data to obtain target audio data, wherein the preprocessing includes filtering processing, noise reduction processing and voice enhancement processing, and preprocessing the real-time audio data to obtain target audio data includes: According to the gender information of the target elderly person, obtaining the basic audio frequency range of the target elderly person; Performing filtering processing on the real-time audio data according to the audio basic frequency range to obtain filtered audio data; The filtered audio data is subjected to noise reduction processing according to the spectral subtraction method and the audio basic frequency range to obtain noise-reduced audio data, which specifically includes: determining a noise suppression smoothing parameter based on the filtered audio data; Obtaining noise estimation data of the filtered audio data according to the noise suppression smoothing parameter and the recursive averaging method; The noise reduction audio data is obtained according to the filtered audio data and the noise estimation data, which specifically includes: Acquiring fundamental frequency energy distribution data according to the filtered audio data; Determining a gain adjustment factor according to the fundamental frequency energy distribution data, wherein the gain adjustment factor is used to adjust the ratio between human voice and noise in noise reduction processing; Acquire initial noise reduction audio data according to the filtered audio data and the noise estimation data; The initial noise reduction audio data is gained by the gain adjustment factor to obtain the noise reduction audio data, wherein the noise reduction audio data is calculated by the following formula: Wherein, k is the frequency index, l is the time index, D(k, l) represents the audio power of the noise reduction audio data at the kth frequency point in the lth frame, N(k, l) represents the noise power of the noise estimation data at the kth frequency point in the lth frame, G(k, l) is the gain adjustment factor, and X(k, l) is the energy spectrum of the filtered audio data; Performing voice enhancement processing on the noise reduction audio data to obtain enhanced audio data; Performing dynamic range compression processing on the enhanced audio data to obtain the target audio data specifically includes: Determine the maximum output amplitude and the minimum output amplitude according to the basic frequency range of the audio of the target elderly person; Obtaining peak data according to the peak value of the enhanced audio data; According to the maximum output amplitude, the minimum output amplitude and the peak data, the enhanced audio data is subjected to dynamic range compression processing to obtain the target audio data, wherein the target audio data is calculated by the following formula: Wherein, k is the frequency index, l is the time index, C(k,l) is the target audio data, V(k,l) is the enhanced audio data, V min is the minimum output amplitude, V max is the maximum output amplitude, V peak (k, l) is the peak value data; Obtaining a first audio feature vector of the target audio data according to the target audio data and a pre-constructed audio feature extraction model, wherein the audio feature extraction model is constructed based on a long short-term memory network; Respectively obtaining similarity values between the first audio feature vector and the second audio feature vector of each keyword in a speech template library, wherein the speech template library includes second audio feature vectors corresponding to a plurality of keywords one by one, and the second audio feature vectors are obtained based on the audio feature extraction model; When any of the similarity values is greater than a similarity threshold, the corresponding keyword exists in the real-time audio data.
2. The keyword-based non-standard speech recognition method according to claim 1, characterized in that: The step of obtaining a first audio feature vector of the target audio data according to the target audio data and a pre-built audio feature extraction model includes: Obtaining Mel-frequency cepstrum coefficients of the target audio data; Obtaining coefficient features of the target audio data according to features of the Mel-frequency cepstrum coefficients of the target audio data; The coefficient features of the target audio data are input into the audio feature extraction model to obtain the first audio feature vector, wherein the first audio feature vector includes the accent features, pronunciation habit features and speech intensity change features of the target elderly person.
3. The keyword-based non-standard speech recognition method according to claim 2, characterized in that: The obtaining of similarity values between the first audio feature vector and the second audio feature vector of each keyword in the speech template library respectively includes: Acquire historical audio data of a keyword of the target elderly person, wherein the keyword corresponds to a preset number of historical audio data; Preprocessing each of the historical audio data to obtain target historical audio data; According to the Mel-frequency cepstrum coefficients of the target historical audio data, coefficient features of each of the target historical audio data are obtained; Inputting coefficient features of each of the target historical audio data into the audio feature extraction model to obtain an initial historical audio feature vector; Determining a weight parameter of a corresponding initial historical audio feature vector according to the volume of the historical audio data; According to the weight parameter, weighted averaging is performed on the initial historical audio feature vectors corresponding to each of the keywords to obtain a second audio feature vector for each of the keywords; The similarity value between the first audio feature vector and the second audio feature vector of each keyword is calculated according to the cosine similarity.
4. A keyword-based non-standard speech recognition device, characterized in that: The device comprises: An audio data acquisition module is used to acquire real-time audio data of the target elderly person; A preprocessing module is used to preprocess the real-time audio data to obtain target audio data, wherein the preprocessing includes filtering processing, noise reduction processing and voice enhancement processing, and the preprocessing of the real-time audio data to obtain the target audio data includes: According to the gender information of the target elderly person, obtaining the basic audio frequency range of the target elderly person; Performing filtering processing on the real-time audio data according to the audio basic frequency range to obtain filtered audio data; The filtered audio data is subjected to noise reduction processing according to the spectral subtraction method and the audio basic frequency range to obtain noise-reduced audio data, which specifically includes: determining a noise suppression smoothing parameter based on the filtered audio data; Obtaining noise estimation data of the filtered audio data according to the noise suppression smoothing parameter and the recursive averaging method; The noise reduction audio data is obtained according to the filtered audio data and the noise estimation data, which specifically includes: Acquiring fundamental frequency energy distribution data according to the filtered audio data; Determining a gain adjustment factor according to the fundamental frequency energy distribution data, wherein the gain adjustment factor is used to adjust the ratio between human voice and noise in noise reduction processing; Acquire initial noise reduction audio data according to the filtered audio data and the noise estimation data; The initial noise reduction audio data is gained by the gain adjustment factor to obtain the noise reduction audio data, wherein the noise reduction audio data is calculated by the following formula: Wherein, k is the frequency index, l is the time index, D(k, l) represents the audio power of the noise reduction audio data at the kth frequency point in the lth frame, N(k, l) represents the noise power of the noise estimation data at the kth frequency point in the lth frame, G(k, l) is the gain adjustment factor, and X(k, l) is the energy spectrum of the filtered audio data; Performing voice enhancement processing on the noise reduction audio data to obtain enhanced audio data; Performing dynamic range compression processing on the enhanced audio data to obtain the target audio data specifically includes: Determine the maximum output amplitude and the minimum output amplitude according to the basic frequency range of the audio of the target elderly person; Obtaining peak data according to the peak value of the enhanced audio data; According to the maximum output amplitude, the minimum output amplitude and the peak data, the enhanced audio data is subjected to dynamic range compression processing to obtain the target audio data, wherein the target audio data is calculated by the following formula: Wherein, k is the frequency index, l is the time index, C(k,l) is the target audio data, V(k,l) is the enhanced audio data, V min is the minimum output amplitude, V max is the maximum output amplitude, V peak (k, l) is the peak value data; A feature extraction module, configured to obtain a first audio feature vector of the target audio data according to the target audio data and a pre-constructed audio feature extraction model, wherein the audio feature extraction model is constructed based on a long short-term memory network; A similarity acquisition module, which respectively acquires a similarity value between the first audio feature vector and a second audio feature vector of each keyword in a speech template library, wherein the speech template library includes second audio feature vectors corresponding to a plurality of keywords one by one, and the second audio feature vectors are obtained based on the audio feature extraction model; The determination module is used to determine that when any of the similarity values is greater than a similarity threshold, the corresponding keyword exists in the real-time audio data.
5. An electronic device, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 3.
6. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 3 is implemented.
