A high-precision audio signal denoising method based on improved NMF and K-means++
Obtain the optimal initial value of the NMF algorithm through the K-means++ algorithm and introduce regularization parameters and clustering matrices to update the dictionary matrix, which solves the problems of the NMF algorithm being sensitive to initial values and insufficient feature extraction capabilities, and improves the accuracy of audio signal denoising. The accuracy and accuracy significantly improve the signal-to-noise ratio and reduce the harmonic distortion rate.
Patent Information
- Application Number
- CN202410600756.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The existing NMF algorithm is sensitive to the initial value, easily falls into the local optimal solution, and has insufficient feature extraction capabilities for high-precision audio signals. Especially in signal processing with high signal-to-noise ratio and low harmonic distortion, it is difficult to accurately reflect audio characteristics.
The K-means++ algorithm is used to obtain the optimal initial value of the dictionary matrix, and regularization parameters and clustering matrices are introduced into the improved NMF algorithm to update the dictionary matrix column by column, enhance the feature extraction capability of sparse coding, and reduce the number of iterations and computational burden.
It improves the accuracy and precision of audio signal denoising, reduces the number of iterations and computational burden of the algorithm, significantly improves the signal-to-noise ratio and reduces the harmonic distortion rate. Compared with the original NMF algorithm, the signal-to-noise is increased by 1-2dB on average. Ratio and harmonic distortion rate of 3-10dB.
Smart Images

Figure CN118197342B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of audio signal denoising method, cluster center selection, speech signal feature extraction and noise separation, and in particular to a high-precision audio signal denoising method based on improved NMF and K-means++. Background Art
[0002] Matrix decomposition is the process of decomposing a high-dimensional matrix into the product of several low-dimensional matrices. Through this process, the original audio data is compressed and the hidden information in the original audio data can be extracted to achieve the purpose of audio denoising.
[0003] Non-negative matrix factorization (NMF) is a mature algorithm used in the field of audio processing. It can effectively reduce the amount of data that needs to be stored and has good feature extraction capabilities. However, most NMF algorithms use random initialization, which can easily lead to the results falling into local optimal solutions. The clustering center of the K-means++ algorithm can just solve this problem and initialize the dictionary matrix W. In addition, for some high-precision audio signals, the feature extraction capability of the original NMF algorithm is slightly insufficient. Therefore, a regularization parameter is added to the sparse coding part. , increasing the feature extraction capability of the NMF algorithm.
[0004] Comparative document CN108985356A discloses an image decomposition method based on NMF, one of the steps of which uses the NMF algorithm to separate the original image, taking advantage of the high decomposition efficiency and good decomposition effect of the NMF algorithm.
[0005] However, the NMF algorithm also has the following disadvantages:
[0006] (1) It is sensitive to the initial input value. If the initial value is far away from the final result, it will take a long time to run, and the limited number of iterations cannot produce the final decomposition matrix.
[0007] (2) The ability to extract high-precision audio signal features is weak. For signals with high signal-to-noise ratio and low harmonic distortion, the coefficient matrix and dictionary matrix cannot accurately reflect the audio characteristics of the audio signal. Summary of the invention
[0008] In view of the problems existing in the prior art, the purpose of the present invention is to provide a high-precision audio signal denoising method based on improved NMF and K-means++, so as to achieve the separation of speech after obtaining the initial value of the optimal dictionary matrix W through the K-means++ algorithm and inputting it into the improved NMF algorithm, while improving the accuracy and precision of speech signal separation.
[0009] To achieve the above object, the technical solution adopted by the present invention is: a high-precision audio signal denoising method based on improved NMF and K-means++, the method comprising the following steps:
[0010] S1. Obtain the original matrix of the audio signal and randomly select sample points in the original matrix for clustering operation;
[0011] S2. Calculate the distance between the data and the cluster center, assign the data to the nearest cluster, and output the cluster center composition matrix , as the dictionary matrix in the NMF algorithm training process The initial value of
[0012] S3. Introducing regularization parameters in the sparse coding part of the original NMF algorithm , so that the regularization parameter Iterate with the coefficient matrix H and update the dictionary matrix W column by column;
[0013] S4. The speech signal with noise Separate and output clean speech signals.
[0014] In step S2, the cluster center A is output according to the K-means++ algorithm, and the cluster center A is copied by column to obtain an initialized dictionary matrix W. The obtained dictionary matrix W is expressed as:
[0015] W=\left [ {{A}^{1},...,{A}^{n}} \right ] ,
[0016] Further, in step S3, the improved NMF algorithm includes the following steps:
[0017] S3.1 Get the original matrix Finally, the regularization parameter is introduced in the sparse coding part , construct sparse coding function;
[0018] S3.2 The coefficient matrix obtained by the sparse coding function , introduce the formula , the restriction coefficient matrix The size of is updated iteratively;
[0019] S3.3 Introducing the clustering matrix and , for the dictionary matrix Update by column to get the optimal dictionary matrix .
[0020] Furthermore, based on the coefficient matrix in the original NMF algorithm Update principle, add regularization parameters , enhance the algorithm feature extraction capability, expressed by the formula:
[0021] ,
[0022] in, refers to the initialization coefficient matrix, is the transpose of the dictionary matrix W, is the original matrix, refers to the dictionary matrix and the coefficient matrix Dot product.
[0023] Furthermore, for high-precision and high-sampling-rate audio signals, it is necessary to limit sufficient audio feature information to as few rows and columns as possible to reduce the coefficient matrix The dimension of the constraint coefficient matrix is:
[0024] ,
[0025] in, is a dictionary matrix The product of the transposed and original matrices, is a dictionary matrix Transpose and dictionary matrix product.
[0026] Furthermore, the initialized dictionary matrix is obtained through the K-means++ algorithm Then, the clustering matrix is introduced and , update the dictionary matrix column by column, the formula is:
[0027] W'\left [ {:,j} \right ]=W\left [ {:,j-1} \right ]-\left ( {\frac {1} {{D}_{t}\left [ {j,j} \right ]+1}} \right )\ast \left ( {W\cdot \left ( {\left ( {{D}_{t}\left [ {:,j} \right ]} \right )-{E}^{T}_{t}\left [ {:,j} \right ]} \right )} \right ) ,
[0028] where W'\left [ {:,j} \right ] is the first Column, {D}_{t}\left [ {j,j} \right ] yes The clustering matrix, {E}^{T}_{t}\left [ {:,j} \right ] is the transpose of the clustering matrix List.
[0029] Beneficial Effects of the Invention
[0030] Compared with the prior art, the advantages of the present invention are:
[0031] The present invention uses the K-means++ algorithm to improve the optimal dictionary matrix of the NMF algorithm. The initial value of the improved NMF algorithm solves the problem that the algorithm is sensitive to the initial value and easily falls into the local optimal solution; increase the regularization parameter , improve the sparse function and improve the algorithm's ability to extract audio features; divide the original signal spectrum into sub-matrices according to the time series, and perform column-by-column analysis on the dictionary matrix Updates are made to reduce the computational burden of each iteration of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flow chart of the steps of the present invention;
[0033] Figure 2 It is a schematic diagram of the principle of NMF decomposition in a specific implementation of the present invention;
[0034] Figure 3 This is a data comparison of the noise filtering effect of the method of the present invention and the NMF algorithm on audio signals. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments, and all other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making creative work are within the scope of protection of the present invention.
[0036] A high-precision audio signal denoising method based on improved NMF and K-means++. This method improves the initial value randomization problem during program operation through the K-means++ algorithm, reduces the number of iterations, and makes the dictionary matrix The initialization value plays a role in improving the overall signal denoising algorithm. The method comprises the following steps:
[0037] S1. Obtain the original matrix of the audio signal, and randomly select sample points in the original matrix for clustering operation;
[0038] S2. Calculate the distance between the data and the cluster centers, assign the data to the nearest cluster, and output the matrix composed of the cluster centers , as the initial value of the dictionary matrix in the training process of the NMF algorithm ;
[0039] S3. In the sparse coding part of the original NMF algorithm, introduce a regularization parameter , and make the regularization parameter iterate with the coefficient matrix , and at the same time update the dictionary matrix column by column;
[0040] S4. Separate the noisy speech signal , and output the clean speech signal.
[0041] The steps of S1 are as follows: Obtain the data matrix of the audio signal to be decomposed , randomly select part of the data from the data matrix (r < m), and perform K-means clustering operation on (r < m). After obtaining the initial cluster centers, use the rotation method to continuously update the cluster centers;
[0042] The steps of S2 are as follows: According to the Euclidean distance formula, its form is:
[0043] ,
[0044] where and are two column vectors with dimension n. Calculate the distance between part of the data (r < m) and the cluster centers. According to the distance, assign part of the data (r < m) to the nearest class, and calculate the average value to replace the cluster centers.
[0045] Set the upper limit of clustering iteration or whether the cluster centers converge. Judge whether the upper limit of clustering iteration is reached or whether the cluster centers converge. If not convergent, recalculate the cluster centers; if the iteration upper limit is reached or convergent, the recursive result can be output, and all the data in the dataset are clustered. This operation makes the initialization result closer to the final result of the NMF algorithm, and solves the drawback that the NMF algorithm is sensitive to initialization and is easy to fall into the local optimal solution.
[0046] Output the cluster centers according to the K-means++ algorithm , copy the cluster centers A column by column to obtain the initialized dictionary matrix , the resulting dictionary matrix It is expressed as:
[0047] W=\left [ {{A}^{1},...,{A}^{n}} \right ] ,
[0048] The step S3 is as follows: Step S2 obtains the dictionary matrix After the initial value of , sparse coding is used to obtain the coefficient matrix , introduce regularization parameters in the sparse coding part , which is of the form:
[0049] ,
[0050] refers to the initialization coefficient matrix, is the transpose of the dictionary matrix W, is the original matrix, It refers to the dot product of the dictionary matrix W and the coefficient matrix H. Each column of the coefficient matrix H represents the reconstruction coefficient of a sample on the feature basis. Although there is a certain gap between the product of the dictionary matrix and the coefficient matrix after each iteration. However, for some high-precision audio signals with high signal-to-noise ratio and low harmonic distortion rate, it is difficult to reflect the gap of the audio signal after each iteration from the ratio. Therefore, a regularization coefficient is added Enlarging the gap between them, at the same time, the dimension of the audio signal affects the coefficient matrix The dimension of the long audio signal will result in more time windows and increase the coefficient matrix The number of columns of the coefficient matrix increases with the higher sampling rate of the audio signal. The number of rows, so by introducing the formula , which can limit sufficient audio feature information to as few rows and columns as possible, reducing the coefficient matrix Dimensions, save running time, formula for:
[0051] ,
[0052] in, is a dictionary matrix The product of the transposed and original matrices, is a dictionary matrix Transpose and dictionary matrix product.
[0053] Get the coefficient matrix Then, using two clustering matrices and , to ensure theoretical convergence, the new dictionary matrix is calculated by the multiplication update criterion , which is of the form:
[0054]
[0055] ,
[0056] Where t is the number of iterations. To improve the memory efficiency of the entire operation process. According to the time series, the spectrum of the original matrix is compared to a time slice and divided into sub-matrices of the time series. The update criterion formula is:
[0057] W'\left [ {:,j} \right ]=W\left [ {:,j-1} \right ]-\left ( {\frac {1} {{D}_{t}\left [ {j,j} \right ]+1}} \right )\ast \left ( {W\cdot \left ( {\left ( {{D}_{t}\left [ {:,j} \right ]} \right )-{E}^{T}_{t}\left [ {:,j} \right ]} \right )} \right ) ,
[0058] where W'\left [ {:,j} \right ] is the first Column, {D}_{t}\left [ {j,j} \right ] yes The clustering matrix, {E}^{T}_{t}\left [ {:,j} \right ] is the transpose of the clustering matrix The dictionary matrix is updated column by column, which ensures theoretical convergence.
[0059] The step S4 is as follows: In the speech signal separation stage, the dictionary matrix W and coefficient matrix H obtained in the training stage are used. By the following formula:
[0060] ,
[0061] After processing the phase spectrum and amplitude spectrum, a clean speech signal is output.
[0062] In order to more intuitively show the noise suppression effect of the present invention on the audio signal, the method of the present invention is applied to the audio signal passing through the audio capture card, and the noise suppression effect is compared with the original NMF algorithm. The signal-to-noise ratio (SNR) is improved by an average of 1-2dB compared with the original NMF algorithm, and the harmonic distortion (THD) is reduced by an average of 3-10dB compared with the original NMF algorithm.
[0063] Aiming at the problems that the NMF algorithm is sensitive to initial values and has poor ability to extract high-precision audio signal features, the present invention proposes a high-precision audio signal denoising method based on improved NMF and K-means++. The method uses Euclidean distance to calculate the distance between the data volume and the cluster center, obtains the initial value of the dictionary matrix W through normalization processing, and obtains the optimal coefficient matrix and dictionary matrix through iterative update and sparse coding of the NMF algorithm. The optimal coefficient matrix and dictionary matrix are used as input signals in the noise signal separation process, and finally an estimated separation signal is obtained.
[0064] The above is only a preferred specific implementation of the present invention: but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solution and its improved conception of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A high-precision audio signal denoising method based on improved NMF and K-means++, the method comprising the following steps: S1. Obtain the original matrix of the audio signal and randomly select sample points in the original matrix for clustering operation; S2. Use distance expression: , in, and It is a two-dimensional n-column vector. The size of n depends on the number of rows in the input matrix. After calculating the distance between the data and the cluster center, the data is assigned to the nearest cluster. It is determined whether the cluster center converges or whether the number of iterations has been reached. If one of the conditions is met, the cluster center composition matrix A is output and the matrix A is copied column by column. The specific mathematical expression is: W=\left [ {{A}^{1},...,{A}^{n}} \right ] , The resulting matrix As the initial value of the dictionary matrix during the training process of the improved NMF algorithm; S3. In the sparse coding part of the original NMF algorithm, in order to improve clustering accuracy, extract audio signal features in multiple dimensions, increase the audio signal signal-to-noise ratio and reduce the harmonic loss rate, a regularization parameter is introduced , so that the regularization parameter With the coefficient matrix Perform column-by-column iteration. The specific mathematical expression is: , in, refers to the initialization coefficient matrix, is the transpose of the dictionary matrix W, is the original matrix, refers to the dictionary matrix and the coefficient matrix After performing the dot product and obtaining the updated coefficient matrix H, the dictionary matrix W is updated column by column; S4. The speech signal with noise Separate and output clean speech signal and noisy speech signal.
2. The high-precision audio signal denoising method based on improved NMF and K-means++ according to claim 1, characterized in that: The step S3, the improved NMF algorithm comprises the following steps: S3.1 Get the original matrix Finally, the regularization parameter is introduced in the sparse coding part , construct a sparse coding function; S3.2 The coefficient matrix obtained by the sparse coding function Finally, the formula for the dimension of the constraint coefficient matrix is introduced for: , in, is a dictionary matrix The product of the transposed and original matrices, is a dictionary matrix Transpose and dictionary matrix product; S3.3 Introducing the clustering matrix and , for the dictionary matrix Update by column to get the optimal dictionary matrix .
3. The high-precision audio signal denoising method based on improved NMF and K-means++ according to claim 2, characterized in that: The step S3.3 comprises: The initialized dictionary matrix is obtained through the K-means++ algorithm Then, the clustering matrix is introduced and , update the dictionary matrix column by column, the formula is: W'\left [ {:,j} \right ]=W\left [ {:,j-1} \right ]-\left ( {\frac {1} {{D}_{t}\left [ {j,j} \right ]+1}} \right )\ast \left ( {W\cdot \left ( {\left ( {{D}_{t}\left [ {:,j} \right ]} \right )-{E}^{T}_{t}\left [ {:,j} \right ]} \right )} \right ) , where W'\left [ {:,j} \right ] is the first Column, {D}_{t}\left [ {j,j} \right ] yes The clustering matrix, {D}_{t}\left [ {:,j} \right ] is the clustering matrix Column, {E}^{T}_{t}\left [ {:,j} \right ] is the transpose of the clustering matrix List.
