Voice recognition method and system for dormitory access control

Through multi-step signal processing and feature extraction, combined with deep belief network training speech recognition system, the problem of environmental noise and transient noise interference in the prior art is solved, the accuracy and robustness of speech recognition are improved, and the more Reliable dormitory access control solution.

CN119132282AInactive Publication Date: 2024-12-13GUANGXI CONSTR VOCATIONAL & TECH COLLEGE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411237866.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing voice recognition access control system is affected by environmental noise and transient noise interference in noisy environments, and its recognition accuracy and robustness are insufficient, making it difficult to effectively deal with various noise situations.

Method used

Multi-step signal processing and feature extraction methods are adopted, including noise cancellation, signal enhancement, transient noise detection and processing, and transient noise recognition is recognized through multi-level spectrum analysis and convolutional neural network, and combined with deep belief network training speech recognition model to generate speech Feature library for matching.

Benefits of technology

It significantly improves the quality and recognition accuracy of voice signals, enhances the reliability and security of the system in complex environments, and provides a convenient and reliable dormitory access control solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119132282A_ABST
    Figure CN119132282A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of dormitory access control, in particular to a voice recognition method and system for dormitory access control, and the method comprises the following steps: S1, voice data collection: collecting a voice signal of a user through a voice collection device arranged at a dormitory doorway; s2, signal preprocessing: preprocessing the collected voice signals; s3, transient noise detection and processing: identifying and processing transient noise; s4, feature extraction: performing feature extraction on the voice signal after transient noise processing; s5, voice recognition model training: generating a voice feature library; s6, voice matching: judging whether the user is a legal user; and S7, verification and feedback: after matching succeeds, sending a verification pass signal, opening a dormitory access control, and if matching fails, sending a verification failure signal, and prompting to re-input the voice signal. According to the invention, high-efficiency speech recognition performance can be maintained in a changeable and complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of dormitory access control, and in particular to a voice recognition method and system for dormitory access control. Background Art

[0002] In modern society, dormitory access control systems have become an important facility to ensure the safety of students and employees. Traditional access control systems mainly rely on physical keys, magnetic cards or passwords for identity authentication. However, these methods are easy to lose, easy to be stolen and difficult to manage, which brings many problems to security and user experience. In recent years, with the development of artificial intelligence technology, access control systems based on biometrics have gradually attracted attention. Among them, voice recognition technology has become a promising application solution due to its convenience and uniqueness.

[0003] Existing voice recognition access control systems face some technical difficulties in practical applications. First, the interference of environmental noise and transient noise will significantly reduce the accuracy of voice recognition, especially in noisy dormitory corridors or public areas. Second, fluctuations in voice signal quality (such as changes caused by factors such as distance and angle) will also affect the recognition effect. In addition, the existing technology lacks effective detection and processing mechanisms when dealing with various transient noises, resulting in insufficient system robustness. These problems limit the practical application and promotion of voice recognition access control systems.

[0004] The purpose of the present invention is to provide a speech recognition method for dormitory access control, which can effectively improve the accuracy and robustness of speech recognition, solve the problems of environmental noise interference, signal quality fluctuation and insufficient transient noise processing in the prior art, and through multi-step signal processing, feature extraction and model training, the present invention not only improves the quality and recognition accuracy of speech signals, but also enhances the reliability and security of the system in complex environments, providing a more convenient and reliable dormitory access control solution. Summary of the invention

[0005] Based on the above objectives, the present invention provides a voice recognition method and system for dormitory access control.

[0006] The voice recognition method for dormitory access control includes the following steps:

[0007] S1, voice data collection: collect the user's voice signal through the voice collection device installed at the dormitory door;

[0008] S2, signal preprocessing: preprocessing the collected speech signal, including noise elimination and signal enhancement;

[0009] S3, transient noise detection and processing: identify and process transient noise to prevent transient noise from interfering with the speech recognition process;

[0010] S4, feature extraction: extracting features from the speech signal after transient noise processing to extract feature parameters from the speech signal;

[0011] S5, speech recognition model training: Use historical speech signals to train the speech recognition model and generate a speech feature library;

[0012] S6, voice matching: matching the extracted feature parameters with the features in the voice feature library to determine whether the user is a legitimate user;

[0013] S7, Verification and feedback: After the match is successful, a verification pass signal is sent to open the dormitory door. If the match fails, a verification failure signal is sent and a voice signal is prompted to be re-entered.

[0014] Furthermore, the voice data collection in S1 includes:

[0015] S11, voice signal collection: collecting the user's voice signal through a voice collection device arranged at the dormitory entrance, the voice collection device includes a plurality of microphone arrays, arranged at the dormitory entrance to form a multi-directional sound pickup network;

[0016] S12, real-time voice capture: real-time capture of user's voice signals at different positions and angles;

[0017] S13, environmental noise monitoring: the voice collection device integrates an environmental noise sensor to monitor the noise level of the surrounding environment in real time;

[0018] S14, Automatically adjust sensitivity: During the acquisition process, automatically adjust the sensitivity and directionality of the microphone to optimize the quality of the voice signal.

[0019] Furthermore, the signal preprocessing in S2 includes:

[0020] S21, noise elimination: performing noise elimination on the collected speech signal, including adaptive filtering, spectrum subtraction and beam forming;

[0021] S22, signal enhancement: performing signal enhancement on the collected speech signal, including speech gain control, dynamic range compression, and noise reduction enhancement.

[0022] Furthermore, the transient noise detection and processing in S3 includes:

[0023] S31, transient noise detection: using multi-level spectrum analysis technology, the energy of the voice signal is detected in the high frequency, medium frequency and low frequency bands respectively. The calculation formula is:

[0024]

[0025] Among them, Ef (t) is the energy of the tth frame in frequency band f, X f (n) is the nth incoming sample point of the speech signal in the frequency band f, and N is the frame length;

[0026] S32, transient noise classification: The detected transient noise is classified by convolutional neural network (CNN) to distinguish different types of transient noise (such as doorbell, footsteps, clapping, etc.);

[0027] S33, transient noise processing: dynamically adjust the weight parameters of speech recognition according to the type of transient noise, and use similar frames of surrounding speech signals for adaptive interpolation repair. The calculation formula is:

[0028]

[0029] in, is the restored speech signal, x prev (n) is the previous frame of speech signal, x next (n) is the next frame of speech signal, and α is the smoothing factor.

[0030] Furthermore, the convolutional neural network (CNN) in S32 includes:

[0031] S321, data preprocessing: preprocess the detected transient noise, convert the time domain signal into a frequency domain signal, generate a short-time Fourier transform (STFT) spectrum diagram, and the calculation formula is:

[0032]

[0033] Where X(t,ω) is the spectrum diagram, x(m) is the input time domain signal, w(nt) is the window function, ω is the frequency, and N is the frame length;

[0034] S322, convolution layer: In the convolution layer, the preprocessed spectrum graph is convolved to extract time and frequency features. The calculation formula is:

[0035]

[0036] Among them, s is the multi-scale convolution kernel, is the output feature map after the lth layer of convolution, f is the ReLU activation function, M and K are the sizes of the convolution kernel, is the convolution kernel of the lth layer, is the value of the input feature map, is the bias term;

[0037] S323, pooling layer: Adaptive multi-scale pooling technology is used to pool features at different time scales. The calculation formula is:

[0038]

[0039] Among them, α s are weight factors at different scales, is the output feature after the lth layer pooling, is the convolution output feature of the lth layer at the sth time scale;

[0040] S324, time-frequency joint feature extraction: before the fully connected layer, add a time-frequency joint feature extraction layer to enhance the classification ability of complex transient noise through joint analysis of time and frequency features. The calculation formula is:

[0041]

[0042] in, is the joint time-frequency feature, N t and N f are the number of features in the time and frequency dimensions, is the weight of the time-frequency joint feature extraction layer, and They are the pooling features in the time and frequency dimensions, is the bias term;

[0043] S325, fully connected layer: After the time-frequency joint feature extraction layer, the joint features are flattened and input into the fully connected layer to generate the final classification result. The calculation formula is:

[0044]

[0045] Among them, y i is the output probability of the i-th class, f is the softmax activation function, is the weight of the fully connected layer, is the time-frequency joint feature, is the bias term;

[0046] S326, classification output: Finally, the probability of each transient noise category is calculated through the softmax activation function for classification. The calculation formula is:

[0047]

[0048] Among them, P(y i |X) is the probability that the input X belongs to the i-th category, and C is the number of categories of transient noise.

[0049] Furthermore, the feature extraction in S4 includes:

[0050] S41, short-time Fourier transform: performing short-time Fourier transform on the speech signal after transient noise processing to generate a spectrum diagram;

[0051] S42, Mel-frequency cepstral coefficient extraction: extracting Mel-frequency cepstral coefficients (MFCC) from the generated spectrum graph, specifically including:

[0052] S421, calculate the power spectrum: P(ω)=|X(t,ω)| 2 ;

[0053] Among them, P(ω) is the power spectrum, X(t,ω) is the frequency spectrum;

[0054] S422, applying a Mel filter bank: passing the power spectrum through the Mel filter bank to obtain a Mel frequency spectrum, the calculation formula is:

[0055]

[0056] Among them, M(m) is the mth Mel frequency spectrum coefficient, H m (ω) is the response of the mth Mel filter, ω1 and ω2 are the frequency ranges of the filter;

[0057] S423, take the logarithm: logM(m);

[0058] S424, calculate discrete cosine transform: perform discrete cosine transform on the logarithmic Mel frequency spectrum to obtain MFCC features. The calculation formula is:

[0059]

[0060] Where C(n) is the nth MFCC coefficient and M is the number of Mel filters;

[0061] S43, feature standardization: standardize the extracted MFCC features, and the calculation formula is:

[0062]

[0063] Among them, C′(n) is the standardized MFCC coefficient, μ is the mean of the MFCC coefficient, and σ is the standard deviation of the MFCC coefficient.

[0064] Furthermore, the speech recognition model training in S5 includes:

[0065] S51, historical data collection: collect historical speech signal data and annotate them to form a training data set and a validation set. The training data set includes a variety of speech samples and their corresponding labels.

[0066] S52, model training: training the speech recognition model using the training data set, specifically including:

[0067] S521, historical data feature extraction: extracting and standardizing features of historical speech signals;

[0068] S522, forward propagation: For each layer of neurons, calculate the output, the calculation formula is:

[0069]

[0070] in, is the output of layer l, is the weight, is the input of the previous layer, is the bias, f is the activation function;

[0071] S523, loss calculation: The loss between the model output and the actual label is calculated by cross entropy loss. The calculation formula is:

[0072]

[0073] Among them, L is the loss, y i is the actual label, is the predicted value;

[0074] S524, back propagation: update the speech recognition model parameters using the gradient descent algorithm, the calculation formula is:

[0075]

[0076] Where η is the learning rate, is the gradient of loss with respect to weight;

[0077] S53, model verification and optimization: Use the verification set to test the performance of the speech recognition model, and adjust the parameters and structure of the speech recognition model according to the verification results;

[0078] S54, generate a speech feature library: After the training is completed, use the speech recognition model to extract features from all trained speech signal samples to generate a speech feature library. The speech feature library contains the feature vector of each speech signal sample and its corresponding label, which is used for matching and verification in the actual recognition process.

[0079] Furthermore, the speech recognition model adopts a deep belief network (DBN) model, and the deep belief network (DBN) model includes:

[0080] Layer-by-layer pre-training: Restricted Boltzmann Machine (RBM) is used for layer-by-layer pre-training. The training steps for each layer are:

[0081] Probability calculation from visible layer to hidden layer: Calculate the activation probability of the visible layer to hidden layer unit. The calculation formula is:

[0082] p(h j =1|v)=σ(∑ i W ij v i +b j );

[0083] Among them, v is the visible layer unit, h is the hidden layer unit, W is the weight matrix, b is the hidden layer bias, and σ is the sigmoid activation function;

[0084] The probability calculation of the hidden layer reconstructing the visible layer: The activation probability of the visible layer unit is reconstructed according to the activation value of the hidden layer unit. The calculation formula is:

[0085] p(v i =1|h)=σ(∑ j W ij h j +a i );

[0086] Among them, a is the visible layer bias;

[0087] Weight update formula: Update the weight matrix according to the contrast divergence algorithm. The calculation formula is:

[0088] ΔW ij =∈( <v i h j > data - <v i h j > model );

[0089] Where,∈ is the learning rate, <·> data Indicates data expectations, <·> model represents the model expectation;

[0090] Stacking RBMs to form DBN: Multiple restricted Boltzmann machines (RBMs) are stacked to form a deep belief network (DBN) model, and pre-trained layer by layer. The steps are expressed as follows:

[0091] First layer restricted Boltzmann machine (RBM): Train the first restricted Boltzmann machine (RBM), with the input being the preprocessed speech signal features and the output being the activation value of the first hidden layer;

[0092] The second layer of restricted Boltzmann machine (RBM): the activation value of the first hidden layer is used as input, the second RBM is trained, and the output is the activation value of the second hidden layer;

[0093] Restricted Boltzmann Machines (RBM) for subsequent layers: Train each Restricted Boltzmann Machine (RBM) layer by layer until the last layer.

[0094] Furthermore, the voice matching in S6 includes:

[0095] S61, feature vector comparison: compare the extracted speech feature parameters with the features in the speech feature library, and the calculation formula is:

[0096]

[0097] Where D(x,y) is the Euclidean distance between the extracted feature vector x and the feature vector y in the feature library, n is the dimension of the feature vector, x i and i is the i-th component in the eigenvectors x and y;

[0098] S62, similarity calculation: Calculate the similarity between the extracted feature vector and each feature vector in the feature library, and the calculation formula is:

[0099]

[0100] Among them, S(x,y) is the cosine similarity between the extracted feature vector x and the feature vector y in the feature library;

[0101] S63, threshold determination: Compare the calculated similarity with the preset threshold T to determine whether the user is a legitimate user, expressed as:

[0102] If S(x,y)≥T, it is judged as a legal user, otherwise, it is judged as an illegal user;

[0103] Among them, T is the similarity threshold.

[0104] The speech recognition system for dormitory access control is used to implement the above-mentioned speech recognition method for dormitory access control, and includes the following modules:

[0105] Voice data collection module: collects the user's voice signal through the voice collection device installed at the dormitory door;

[0106] Signal preprocessing module: preprocess the collected speech signals, including noise elimination and signal enhancement;

[0107] Transient noise detection and processing module: identifies and processes transient noise to prevent it from interfering with the speech recognition process;

[0108] Feature extraction module: extracts features from the speech signal after transient noise processing and extracts characteristic parameters from the speech signal;

[0109] Speech recognition model training module: Use historical speech signals to train the speech recognition model and generate a speech feature library;

[0110] Voice matching module: matches the extracted feature parameters with the features in the voice feature library to determine whether the user is a legitimate user;

[0111] Verification and feedback module: After the match is successful, a verification pass signal is sent to open the dormitory access control. If the match fails, a verification failure signal is sent and a voice signal is prompted to be re-entered.

[0112] Beneficial effects of the present invention:

[0113] The present invention collects voice data through a voice collection device arranged at the entrance of a dormitory, and effectively improves the quality of voice signals through multiple preprocessing steps (including noise elimination, signal enhancement, and transient noise detection and processing). This method pays special attention to voice signal processing in a noisy environment, and adopts technologies such as adaptive filtering, spectrum subtraction, and beamforming, which can significantly reduce background noise and transient interference, ensure the clarity and integrity of voice signals, and provide a solid foundation for subsequent voice recognition.

[0114] The present invention performs model training through historical speech signal data and generates a speech feature library. The feature extraction step adopts Mel-frequency cepstral coefficient (MFCC) extraction and standardization processing to ensure the stability and accuracy of the extracted features. The training adopts a deep belief network (DBN) model. The DBN model formed by layer-by-layer pre-training and stacking RBMs effectively extracts deep features of speech signals and improves the recognition ability and robustness of the model. The training method based on the DBN model can maintain efficient speech recognition performance in a changeable and complex environment.

[0115] The present invention ensures accurate comparison between the extracted voice features and the features in the feature library through calculation of the Euclidean distance and cosine similarity of the feature vectors, and uses the threshold to judge whether the user is a legitimate user. This matching process is not only efficient, but also can resist noise and other interferences to a certain extent, thereby improving the reliability and security of the system. In addition, the perfect verification and feedback mechanism ensures timely feedback and access control after successful matching, thereby improving the security and user experience of the dormitory access control system, and providing users with a more convenient and reliable dormitory access control solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0116] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0117] Figure 1 A schematic diagram of a recognition method flow chart of an embodiment of the present invention;

[0118] Figure 2 Schematic diagram of system function modules according to an embodiment of the present invention. DETAILED DESCRIPTION

[0119] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0120] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0121] like Figure 1 As shown, the voice recognition method for dormitory access control includes the following steps:

[0122] S1, voice data collection: collect the user's voice signal through the voice collection device installed at the dormitory door;

[0123] S2, signal preprocessing: preprocessing the collected speech signal, including noise elimination and signal enhancement, to improve the quality of the speech signal;

[0124] S3, transient noise detection and processing: identify and process transient noise to prevent transient noise from interfering with the speech recognition process;

[0125] S4, feature extraction: extracting features from the speech signal after transient noise processing to extract feature parameters from the speech signal;

[0126] S5, speech recognition model training: Use historical speech signals to train the speech recognition model and generate a speech feature library;

[0127] S6, voice matching: matching the extracted feature parameters with the features in the voice feature library to determine whether the user is a legitimate user;

[0128] S7, verification and feedback: after successful matching, a verification pass signal is sent to open the dormitory door; if matching fails, a verification failure signal is sent and a voice signal is prompted to be re-entered;

[0129] Through the above steps, the voice signal is comprehensively processed and optimized. Combined with transient noise detection and processing technology, the accuracy and robustness of speech recognition are improved. It can effectively filter environmental noise and transient interference to ensure efficient recognition performance in noisy environments. At the same time, through the gradually improved verification and feedback mechanism, the security and user experience of the access control system are enhanced, providing users with a more convenient and reliable dormitory access control solution.

[0130] Voice data collection in S1 includes:

[0131] S11, voice signal collection: collecting the user's voice signal through a voice collection device arranged at the dormitory entrance, the voice collection device includes a plurality of microphone arrays, arranged at the dormitory entrance to form a multi-directional sound pickup network;

[0132] S12, real-time voice capture: real-time capture of user voice signals at different positions and angles to ensure signal integrity and clarity;

[0133] S13, environmental noise monitoring: the voice collection device integrates an environmental noise sensor to monitor the noise level of the surrounding environment in real time;

[0134] S14, automatic sensitivity adjustment: During the acquisition process, the sensitivity and directionality of the microphone are automatically adjusted to optimize the quality of the voice signal;

[0135] Automatic sensitivity adjustment includes:

[0136] Noise monitoring: Environmental noise sensors monitor the noise level of the surrounding environment in real time;

[0137] Noise judgment: Analyze noise data to determine whether the current noise environment interferes with the voice signal;

[0138] Sensitivity adjustment: Dynamically adjust the sensitivity of the microphone according to changes in the noise environment, so that it increases sensitivity when the noise is loud and decreases sensitivity when the noise is quiet;

[0139] Directionality adjustment: By controlling the directionality of the microphone array, the microphone is directed toward the user's location, minimizing the interference of ambient noise and ensuring the best quality of the collected voice signal;

[0140] Through the above steps, the combination of microphone array and environmental noise sensor ensures high-quality voice signal acquisition in a multi-directional and multi-angle sound pickup environment, effectively reduces the interference of environmental noise, improves the accuracy and robustness of voice recognition, and provides users with a more reliable dormitory access control system.

[0141] Signal preprocessing in S2 includes:

[0142] S21, noise elimination: performing noise elimination on the collected speech signal, including adaptive filtering, spectrum subtraction and beam forming;

[0143] Adaptive filtering adjusts the filter parameters in real time according to the noise data provided by the environmental noise sensor to dynamically eliminate background noise. The calculation formula is:

[0144]

[0145] Among them, y(n) is the output signal after filtering, x(n) is the input speech signal, and w i (n) is the weight of the filter, d(ni) is the noise reference signal, and N is the order of the filter;

[0146] The filter weights are updated using the least mean square (LMS) algorithm, calculated as:

[0147] w i (n+1)=w i (n) + μ·e(n)·d(ni);

[0148] The filter weights are updated using the least mean square (LMS) algorithm, calculated as:

[0149] w i (n+1)=w i (n) + μ·e(n)·d(ni);

[0150] Wherein, μ is the step size factor, e(n)=x(n)-y(n) is the error signal;

[0151] Spectral subtraction compares the spectrum of the speech signal with the spectrum of the ambient noise, subtracts the noise spectrum, and retains the main speech component. The calculation formula is:

[0152] X(ω)=S(ω)+N(ω);

[0153] Where X(ω) is the spectrum of the input signal, S(ω) is the spectrum of the pure speech signal, and N(ω) is the spectrum of the noise signal;

[0154] The signal spectrum after noise removal is:

[0155] in, is the estimated noise spectrum;

[0156] Beamforming uses multiple microphone arrays to work together to enhance the voice signal from the user and reduce the noise from other directions. The calculation formula is:

[0157]

[0158] Among them, y(t) is the output signal, h m (t) is the beamforming filter, x m (t) is the input signal received by the mth microphone, M is the number of microphones, and * represents the convolution operation;

[0159] S22, signal enhancement: performing signal enhancement on the collected speech signal, including speech gain control, dynamic range compression and noise reduction enhancement;

[0160] Speech gain control automatically adjusts the gain level according to the strength of the speech signal to ensure that the speech signal can achieve the best recognition effect under different strength conditions;

[0161] Dynamic range compression compresses the dynamic range of the speech signal, so that weak speech signals are enhanced, while strong speech signals are not over-amplified, thus maintaining the balance of the signal;

[0162] Noise reduction enhancement: Based on noise elimination, the signal enhancement algorithm further improves the clarity and recognizability of speech signals and enhances the accuracy of speech recognition.

[0163] Through the above steps, the quality of the speech signal is improved, providing a more reliable data basis for subsequent feature extraction and speech recognition, and significantly improving the accuracy and robustness of speech recognition.

[0164] Transient noise detection and processing in S3 includes:

[0165] S31, transient noise detection: Use multi-level spectrum analysis technology to perform energy detection on the voice signal in the high frequency, medium frequency and low frequency bands to improve the recognition ability of different types of transient noise. The calculation formula is:

[0166]

[0167] Among them, E f (t) is the energy of the tth frame in frequency band f, X f (n) is the nth incoming sample point of the speech signal in the frequency band f, and N is the frame length;

[0168] S32, transient noise classification: The detected transient noise is classified by convolutional neural network (CNN) to distinguish different types of transient noise (such as doorbell, footsteps, clapping, etc.);

[0169] S33, transient noise processing: dynamically adjust the weight parameters of speech recognition according to the type of transient noise to enhance the robustness of the speech signal. For example, for high-frequency doorbell sounds, reduce the weight of the high-frequency band; for low-frequency footsteps, reduce the weight of the low-frequency band, and use similar frames of the surrounding speech signals for adaptive interpolation repair. The calculation formula is:

[0170]

[0171] in, is the restored speech signal, x prev (n) is the previous frame of speech signal, x next (n) is the next frame of speech signal, α is the smoothing factor, which is adaptively adjusted according to the noise type;

[0172] Through the above steps, different types of transient noise events can be accurately identified and distinguished, and dynamic weight adjustment and adaptive interpolation repair technology can be used to innovatively eliminate noise interference, significantly improve the robustness and accuracy of the speech recognition system, and provide users with a more stable and reliable dormitory access control solution.

[0173] The convolutional neural network (CNN) in S32 includes:

[0174] S321, data preprocessing: preprocess the detected transient noise, convert the time domain signal into a frequency domain signal, generate a short-time Fourier transform (STFT) spectrum diagram, and the calculation formula is:

[0175]

[0176] Where X(t,ω) is the spectrum diagram, x(n) is the input time domain signal, w(nt) is the window function, ω is the frequency, and N is the frame length;

[0177] S322, convolution layer: In the convolution layer, the preprocessed spectrum graph is convolved to extract time and frequency features. In order to enhance the convolution layer's ability to recognize different transient noises, multi-scale convolution kernels and spectrum band adaptive adjustment technology are used. The calculation formula is:

[0178]

[0179] Among them, s is the multi-scale convolution kernel, is the output feature map after the lth layer of convolution, f is the ReLU activation function, M and K are the sizes of the convolution kernel, is the convolution kernel of the lth layer, is the value of the input feature map, is the bias term;

[0180] S323, pooling layer: Adaptive multi-scale pooling technology is used to pool features at different time scales to retain more temporal information of transient noise and enhance the processing capability of transient noise of different frequencies. The calculation formula is:

[0181]

[0182] Among them, α s are weight factors at different scales, is the output feature after the lth layer pooling, is the convolution output feature of the lth layer at the sth time scale;

[0183] S324, time-frequency joint feature extraction: before the fully connected layer, add a time-frequency joint feature extraction layer to enhance the classification ability of complex transient noise through joint analysis of time and frequency features. The calculation formula is:

[0184]

[0185] in, is the joint time-frequency feature, N t and N f are the number of features in the time and frequency dimensions, is the weight of the time-frequency joint feature extraction layer, and They are the pooling features in the time and frequency dimensions, is the bias term;

[0186] S325, fully connected layer: After the time-frequency joint feature extraction layer, the joint features are flattened and input into the fully connected layer to generate the final classification result. The calculation formula is:

[0187]

[0188] Among them, y i is the output probability of the i-th class, f is the softmax activation function, is the weight of the fully connected layer, is the time-frequency joint feature, is the bias term;

[0189] S326, classification output: Finally, the probability of each transient noise category is calculated through the softmax activation function for classification. The calculation formula is:

[0190]

[0191] Among them, P(y i |X) is the probability that the input X belongs to the i-th category, and C is the number of categories of transient noise;

[0192] In the present invention, the convolutional neural network (CNN) enhances the ability to capture transient noises of different frequencies through multi-scale convolution kernels and spectral band adaptive adjustment technology. The adaptive multi-scale pooling technology retains more timing information and enhances the classification ability of complex transient noise through the time-frequency joint feature extraction layer. After the time-frequency joint feature extraction, the fully connected layer maps the high-dimensional features to the low-dimensional representation, and finally classifies them through the softmax activation function, so that the speech recognition method of the present invention has higher accuracy and robustness when processing complex background noise and transient interference, providing users with a more reliable dormitory access control system.

[0193] Feature extraction in S4 includes:

[0194] S41, short-time Fourier transform: performing short-time Fourier transform on the speech signal after transient noise processing to generate a spectrum diagram;

[0195] S42, Mel-frequency cepstral coefficient extraction: extracting Mel-frequency cepstral coefficients (MFCC) from the generated spectrum graph, specifically including:

[0196] S421, calculate the power spectrum: P(ω)=|X(t,ω)| 2 ;

[0197] Among them, P(ω) is the power spectrum, X(t,ω) is the frequency spectrum;

[0198] S422, applying a Mel filter bank: passing the power spectrum through the Mel filter bank to obtain a Mel frequency spectrum, the calculation formula is:

[0199]

[0200] Among them, M(m) is the mth Mel frequency spectrum coefficient, H m (ω) is the response of the mth Mel filter, ω1 and ω2 are the frequency ranges of the filter;

[0201] S423, take the logarithm: logM(m);

[0202] S424, calculate discrete cosine transform: perform discrete cosine transform on the logarithmic Mel frequency spectrum to obtain MFCC features. The calculation formula is:

[0203]

[0204] Where C(n) is the nth MFCC coefficient and M is the number of Mel filters;

[0205] S43, feature standardization: Standardize the extracted MFCC features to reduce the impact of environmental changes on feature extraction. The calculation formula is:

[0206]

[0207] Where C′(n) is the standardized MFCC coefficient, μ is the mean of the MFCC coefficient, and σ is the standard deviation of the MFCC coefficient;

[0208] Through the above steps, the stability and accuracy of the extracted features are ensured, so that the speech recognition method of the present invention can more effectively process transient noise and improve the accuracy and robustness of speech recognition.

[0209] Speech recognition model training in S5 includes:

[0210] S51, historical data collection: collect historical speech signal data and annotate them to form a training data set and a validation set. The training data set includes a variety of speech samples and their corresponding labels.

[0211] S52, model training: training the speech recognition model using the training data set, specifically including:

[0212] S521, historical data feature extraction: feature extraction and standardization of historical speech signals, the feature extraction method is the same as the feature extraction of speech signals after transient noise processing mentioned above;

[0213] S522, forward propagation: For each layer of neurons, calculate the output, the calculation formula is:

[0214]

[0215] in, is the output of layer l, is the weight, is the input of the previous layer, is the bias, f is the activation function;

[0216] S523, loss calculation: The loss between the model output and the actual label is calculated by cross entropy loss. The calculation formula is:

[0217]

[0218] Among them, L is the loss, y i is the actual label, is the predicted value;

[0219] S524, back propagation: update the speech recognition model parameters using the gradient descent algorithm, the calculation formula is:

[0220]

[0221] Where η is the learning rate, is the gradient of loss with respect to weight;

[0222] S53, Model Verification and Optimization: Use the verification set to test the performance of the speech recognition model, and adjust the parameters and structure of the speech recognition model according to the verification results to improve the recognition accuracy;

[0223] S54, generating a speech feature library: after the training is completed, the speech recognition model is used to extract features from all the trained speech signal samples to generate a speech feature library, which contains a feature vector of each speech signal sample and its corresponding label, for matching and verification in the actual recognition process;

[0224] Through the above steps, efficient and accurate matching and verification can be provided in the actual recognition process, the robustness and accuracy of the speech recognition system are improved, and a more reliable dormitory access control system is provided for users.

[0225] The speech recognition model uses a deep belief network (DBN) model, which includes:

[0226] Layer-by-layer pre-training: Restricted Boltzmann Machine (RBM) is used for layer-by-layer pre-training. The training steps for each layer are:

[0227] Probability calculation from visible layer to hidden layer: Calculate the activation probability of the visible layer to hidden layer unit. The calculation formula is:

[0228] p(h j =1|v)=σ(∑ i W ij v i +b j );

[0229] Among them, v is the visible layer unit, h is the hidden layer unit, W is the weight matrix, b is the hidden layer bias, and σ is the sigmoid activation function;

[0230] The probability calculation of the hidden layer reconstructing the visible layer: The activation probability of the visible layer unit is reconstructed according to the activation value of the hidden layer unit. The calculation formula is:

[0231] p(v i =1|h)=σ(∑ j W ij h j +a i );

[0232] Among them, a is the visible layer bias;

[0233] Weight update formula: Update the weight matrix according to the contrast divergence algorithm. The calculation formula is:

[0234] ΔW ij=∈( <v i h j ) data - <v i h j > model );

[0235] Where,∈ is the learning rate, <·> data Indicates data expectations, <·> model represents the model expectation;

[0236] Stacking RBMs to form DBN: Multiple restricted Boltzmann machines (RBMs) are stacked to form a deep belief network (DBN) model, and pre-trained layer by layer. The steps are expressed as follows:

[0237] First layer restricted Boltzmann machine (RBM): Train the first restricted Boltzmann machine (RBM), with the input being the preprocessed speech signal features and the output being the activation value of the first hidden layer;

[0238] The second layer of restricted Boltzmann machine (RBM): the activation value of the first hidden layer is used as input, the second RBM is trained, and the output is the activation value of the second hidden layer;

[0239] Restricted Boltzmann Machines (RBMs) for subsequent layers: Train each RBM layer by layer until the last layer;

[0240] The Deep Belief Network (DBN) is trained through a layer-by-layer pre-training step, and each layer is trained using a restricted Boltzmann machine (RBM) to ensure that each layer can effectively extract the features of the speech signal. Specifically, each RBM reconstructs the probability of the visible layer by calculating the probability of the visible layer to the hidden layer, and updates the weight matrix according to the contrastive divergence algorithm. Multiple RBMs are stacked to form a DBN, and through layer-by-layer pre-training, each layer can gradually extract more abstract and advanced features. This ensures that the DBN can efficiently process complex speech signals and provide accurate and reliable speech recognition capabilities for the dormitory access control system.

[0241] Voice Match in S6 includes:

[0242] S61, feature vector comparison: compare the extracted speech feature parameters with the features in the speech feature library, and the calculation formula is:

[0243]

[0244] Where D(x,y) is the Euclidean distance between the extracted feature vector x and the feature vector y in the feature library, n is the dimension of the feature vector, x i and i is the i-th component in the eigenvectors x and y;

[0245] S62, similarity calculation: Calculate the similarity between the extracted feature vector and each feature vector in the feature library, and the calculation formula is:

[0246]

[0247] Among them, S(x,y) is the cosine similarity between the extracted feature vector x and the feature vector y in the feature library;

[0248] S63, threshold determination: Compare the calculated similarity with the preset threshold T to determine whether the user is a legitimate user, expressed as:

[0249] If S(x,y)≥T, it is judged as a legal user, otherwise, it is judged as an illegal user;

[0250] Among them, T is the similarity threshold;

[0251] Through the above steps, the Euclidean distance and cosine similarity calculation of the feature vector can accurately compare the extracted voice features with the features in the feature library, and use the threshold judgment to ensure that only legitimate users can pass through the dormitory access control system. This matching process is not only efficient, but also can resist noise and other interference to a certain extent, improving the reliability and security of the speech recognition system.

[0252] like Figure 2 As shown, the voice recognition system for dormitory access control is used to implement the above-mentioned voice recognition method for dormitory access control, and includes the following modules:

[0253] Voice data collection module: collects the user's voice signal through the voice collection device installed at the dormitory door;

[0254] Signal preprocessing module: preprocess the collected speech signals, including noise elimination and signal enhancement;

[0255] Transient noise detection and processing module: identifies and processes transient noise to prevent it from interfering with the speech recognition process;

[0256] Feature extraction module: extracts features from the speech signal after transient noise processing and extracts characteristic parameters from the speech signal;

[0257] Speech recognition model training module: Use historical speech signals to train the speech recognition model and generate a speech feature library;

[0258] Voice matching module: matches the extracted feature parameters with the features in the voice feature library to determine whether the user is a legitimate user;

[0259] Verification and feedback module: After the match is successful, a verification pass signal is sent to open the dormitory access control. If the match fails, a verification failure signal is sent and a voice signal is prompted to be re-entered.

[0260] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention is limited to these examples. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.

[0261] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A voice recognition method for dormitory access control, characterized in that: The following steps are involved: S1, voice data collection: collect the user's voice signal through the voice collection device installed at the dormitory door; S2, signal preprocessing: preprocessing the collected speech signal, including noise elimination and signal enhancement; S3, transient noise detection and processing: identify and process transient noise to prevent transient noise from interfering with the speech recognition process; S4, feature extraction: extracting features from the speech signal after transient noise processing to extract feature parameters from the speech signal; S5, speech recognition model training: Use historical speech signals to train the speech recognition model and generate a speech feature library; S6, voice matching: matching the extracted feature parameters with the features in the voice feature library to determine whether the user is a legitimate user; S7, Verification and feedback: After the match is successful, a verification pass signal is sent to open the dormitory door. If the match fails, a verification failure signal is sent and a voice signal is prompted to be re-entered.

2. The voice recognition method for dormitory access control according to claim 1, characterized in that: The voice data collection in S1 includes: S11, voice signal collection: collecting the user's voice signal through a voice collection device arranged at the dormitory entrance, the voice collection device includes a plurality of microphone arrays, arranged at the dormitory entrance to form a multi-directional sound pickup network; S12, real-time voice capture: real-time capture of user's voice signals at different positions and angles; S13, environmental noise monitoring: the voice collection device integrates an environmental noise sensor to monitor the noise level of the surrounding environment in real time; S14, Automatically adjust sensitivity: During the acquisition process, automatically adjust the sensitivity and directionality of the microphone to optimize the quality of the voice signal.

3. The voice recognition method for dormitory access control according to claim 1, characterized in that: The signal preprocessing in S2 includes: S21, noise elimination: performing noise elimination on the collected speech signal, including adaptive filtering, spectrum subtraction and beam forming; S22, signal enhancement: performing signal enhancement on the collected speech signal, including speech gain control, dynamic range compression, and noise reduction enhancement.

4. The voice recognition method for dormitory access control according to claim 1, characterized in that: The transient noise detection and processing in S3 includes: S31, transient noise detection: using multi-level spectrum analysis technology, the energy of the voice signal is detected in the high frequency, medium frequency and low frequency bands respectively. The calculation formula is: Among them, E f (t) is the energy of the tth frame in frequency band f, X f (n) is the nth incoming sample point of the speech signal in the frequency band f, and N is the frame length; S32, transient noise classification: The detected transient noise is classified by convolutional neural network to distinguish different types of transient noise; S33, transient noise processing: dynamically adjust the weight parameters of speech recognition according to the type of transient noise, and use similar frames of surrounding speech signals for adaptive interpolation repair. The calculation formula is: in, is the restored speech signal, x prev (n) is the previous frame of speech signal, x next (n) is the next frame of speech signal, and α is the smoothing factor.

5. The voice recognition method for dormitory access control according to claim 4, characterized in that: The convolutional neural network in S32 includes: S321, data preprocessing: preprocess the detected transient noise, convert the time domain signal into a frequency domain signal, generate a short-time Fourier transform spectrum diagram, and the calculation formula is: Where X(t,ω) is the spectrum diagram, x(n) is the input time domain signal, w(nt) is the window function, ω is the frequency, and N is the frame length; S322, convolution layer: In the convolution layer, the preprocessed spectrum graph is convolved to extract time and frequency features. The calculation formula is: Among them, s is the multi-scale convolution kernel, is the output feature map after the lth layer of convolution, f is the ReLU activation function, M and K are the sizes of the convolution kernel, is the convolution kernel of the lth layer, is the value of the input feature map, is the bias term; S323, pooling layer: Adaptive multi-scale pooling technology is used to pool features at different time scales. The calculation formula is: Among them, α s are weight factors at different scales, is the output feature after the lth layer pooling, is the convolution output feature of the lth layer at the sth time scale; S324, time-frequency joint feature extraction: before the fully connected layer, add a time-frequency joint feature extraction layer to enhance the classification ability of complex transient noise through joint analysis of time and frequency features. The calculation formula is: in, is the joint time-frequency feature, N t and N f are the number of features in the time and frequency dimensions, is the weight of the time-frequency joint feature extraction layer, and They are the pooling features in the time and frequency dimensions, is the bias term; S325, fully connected layer: After the time-frequency joint feature extraction layer, the joint features are flattened and input into the fully connected layer to generate the final classification result. The calculation formula is: Among them, y i is the output probability of the i-th class, f is the softmax activation function, is the weight of the fully connected layer, is the time-frequency joint feature, is the bias term; S326, classification output: Finally, the probability of each transient noise category is calculated through the softmax activation function for classification. The calculation formula is: Among them, P(y i |X) is the probability that the input X belongs to the i-th category, and C is the number of categories of transient noise.

6. The voice recognition method for dormitory access control according to claim 5, characterized in that: The feature extraction in S4 includes: S41, short-time Fourier transform: performing short-time Fourier transform on the speech signal after transient noise processing to generate a spectrum diagram; S42, Mel-frequency cepstral coefficient extraction: extracting Mel-frequency cepstral coefficients from the generated spectrum graph, specifically including: S421, calculate the power spectrum: P(ω)=|X(t,ω)| 2 ; Among them, P(ω) is the power spectrum, X(t,ω) is the frequency spectrum; S422, applying a Mel filter bank: passing the power spectrum through the Mel filter bank to obtain a Mel frequency spectrum, the calculation formula is: Among them, M(m) is the mth Mel frequency spectrum coefficient, H m (ω) is the response of the mth Mel filter, ω1 and ω2 are the frequency ranges of the filter; S423, take the logarithm: logM(m); S424, calculate discrete cosine transform: perform discrete cosine transform on the logarithmic Mel frequency spectrum to obtain MFCC features. The calculation formula is: Where C(n) is the nth MFCC coefficient and M is the number of Mel filters; S43, feature standardization: standardize the extracted MFCC features, and the calculation formula is: Among them, C′(n) is the standardized MFCC coefficient, μ is the mean of the MFCC coefficient, and σ is the standard deviation of the MFCC coefficient.

7. The voice recognition method for dormitory access control according to claim 6, characterized in that: The speech recognition model training in S5 includes: S51, historical data collection: collect historical speech signal data and annotate them to form a training data set and a validation set. The training data set includes a variety of speech samples and their corresponding labels. S52, model training: training the speech recognition model using the training data set, specifically including: S521, historical data feature extraction: extracting and standardizing features of historical speech signals; S522, forward propagation: For each layer of neurons, calculate the output, the calculation formula is: in, is the output of layer l, is the weight, is the input of the previous layer, is the bias, f is the activation function; S523, loss calculation: The loss between the model output and the actual label is calculated by cross entropy loss. The calculation formula is: Among them, L is the loss, y i is the actual label, is the predicted value; S524, back propagation: update the speech recognition model parameters using the gradient descent algorithm, the calculation formula is: Where η is the learning rate, is the gradient of loss with respect to weight; S53, model verification and optimization: Use the verification set to test the performance of the speech recognition model, and adjust the parameters and structure of the speech recognition model according to the verification results; S54, generate a speech feature library: After the training is completed, use the speech recognition model to extract features from all trained speech signal samples to generate a speech feature library. The speech feature library contains the feature vector of each speech signal sample and its corresponding label, which is used for matching and verification in the actual recognition process.

8. The voice recognition method for dormitory access control according to claim 7, characterized in that: The speech recognition model adopts a deep belief network model, and the deep belief network model includes: Layer-by-layer pre-training: Restricted Boltzmann machines are used for layer-by-layer pre-training. The training steps for each layer are: Probability calculation from visible layer to hidden layer: Calculate the activation probability of the visible layer to hidden layer unit. The calculation formula is: p(h j =1|v)=σ(∑ i W ij v i +b j ); Among them, v is the visible layer unit, h is the hidden layer unit, W is the weight matrix, b is the hidden layer bias, and σ is the sigmoid activation function; The probability calculation of the hidden layer reconstructing the visible layer: The activation probability of the visible layer unit is reconstructed according to the activation value of the hidden layer unit. The calculation formula is: p(v i =1|h)=σ(∑ j W ij h j +a i ); Among them, a is the visible layer bias; Weight update formula: Update the weight matrix according to the contrast divergence algorithm. The calculation formula is: ΔW ij =∈(<v i h j > data -<v i h j > model ); Where,∈ is the learning rate, <·> data Indicates data expectations, <·> model represents the model expectation; Stacking RBMs to form DBN: Multiple restricted Boltzmann machines are stacked to form a deep belief network model, and pre-training is performed layer by layer. The steps are expressed as follows: First layer restricted Boltzmann machine: Train the first restricted Boltzmann machine, with the input being the preprocessed speech signal features and the output being the activation value of the first hidden layer; The second layer of restricted Boltzmann machine: the activation value of the first hidden layer is used as input, the second RBM is trained, and the output is the activation value of the second hidden layer; Restricted Boltzmann Machines for subsequent layers: Train each Restricted Boltzmann Machine layer by layer until the last layer.

9. The voice recognition method for dormitory access control according to claim 8, characterized in that: The voice matching in S6 includes: S61, feature vector comparison: compare the extracted speech feature parameters with the features in the speech feature library, and the calculation formula is: Where D(x,y) is the Euclidean distance between the extracted feature vector x and the feature vector y in the feature library, n is the dimension of the feature vector, x i and i is the i-th component in the eigenvectors x and y; S62, similarity calculation: Calculate the similarity between the extracted feature vector and each feature vector in the feature library, and the calculation formula is: Among them, S(x,y) is the cosine similarity between the extracted feature vector x and the feature vector y in the feature library; S63, threshold determination: Compare the calculated similarity with the preset threshold T to determine whether the user is a legitimate user, expressed as: If S(x,y)≥T, it is judged as a legal user, otherwise, it is judged as an illegal user; Among them, T is the similarity threshold.

10. A voice recognition system for dormitory access control, used to implement the voice recognition method for dormitory access control as described in any one of claims 1 to 9, characterized in that: Includes the following modules: Voice data collection module: collects the user's voice signal through the voice collection device installed at the dormitory door; Signal preprocessing module: preprocess the collected speech signals, including noise elimination and signal enhancement; Transient noise detection and processing module: identifies and processes transient noise to prevent it from interfering with the speech recognition process; Feature extraction module: extracts features from the speech signal after transient noise processing and extracts characteristic parameters from the speech signal; Speech recognition model training module: Use historical speech signals to train the speech recognition model and generate a speech feature library; Voice matching module: matches the extracted feature parameters with the features in the voice feature library to determine whether the user is a legitimate user; Verification and feedback module: After the match is successful, a verification pass signal is sent to open the dormitory access control. If the match fails, a verification failure signal is sent and a voice signal is prompted to be re-entered.

Citation Information

Cited By

  • Intelligent access control recognition system

    CN120071494A

  • Comprehensive online monitoring system for cable branch box

    CN120074006A