Audio signal processing method, electronic device and storage medium
By combining the vector direction characteristics of the data matrix to determine the sign of the SVD result, the speech self-cancellation problem caused by the uncertainty of the singular vector direction in the audio signal processing of the SVD method is solved, and the correct enhancement of the audio effect is achieved.
Patent Information
- Application Number
- CN202111590307.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-12-23
AI Technical Summary
The existing MVDR algorithm and other methods using SVD do not distinguish the direction of singular vectors in audio signal processing, resulting in audio phase errors and speech self-cancellation problems.
By combining the vector direction characteristics of the data matrix, the sign of the SVD result is determined, and the SVD result with the determined sign is output for audio signal processing to ensure the correctness of the singular vector direction.
Achieved correct results for singular vector directions, enhanced audio effects, prevented audio self-cancellation, and improved audio quality.
Smart Images

Figure CN114171047B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of audio signal processing, and in particular relates to an audio signal processing method, an electronic device and a storage medium. Background Art
[0002] MVDR (minimum variance distortionless response) is an adaptive beamforming algorithm based on the maximum signal-to-interference-plus-noise ratio (SINR) criterion. The MVDR algorithm can adaptively minimize the array output power in the desired direction while maximizing the signal-to-interference-plus-noise ratio.
[0003] MVDR and other algorithms that use the SVD (Singular Value Decomposition) method to find the steering vector have the problem that the obtained audio phase is opposite to the actual phase, resulting in self-cancellation of speech, because the SVD method itself does not distinguish the direction of the vector in the mathematical scope. Summary of the invention
[0004] The embodiments of the present invention provide an audio signal processing method and device, which are used to solve at least one of the above technical problems.
[0005] In a first aspect, an embodiment of the present invention provides an audio signal processing method, comprising: using an SVD method to calculate an SVD result of a data matrix corresponding to an audio signal; determining the sign of the SVD result in combination with a vector direction characteristic of the data matrix; and outputting the SVD result after the sign is determined to perform audio signal processing.
[0006] According to a second aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the audio signal processing method of any embodiment of the present invention.
[0007] In a third aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the steps of the audio signal processing method of any embodiment of the present invention.
[0008] The method, electronic device and storage medium of the present application determine the sign of the SVD result by combining the vector direction characteristics of the data matrix, and then output the SVD result after the sign is determined for audio signal processing, so that the correct result of the singular vector direction can be obtained, the audio effect can be correctly enhanced, and the audio self-cancellation can be prevented. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A flowchart of an audio signal processing method provided by an embodiment of the present invention;
[0011] Figure 2 A flowchart of another audio signal processing method provided by an embodiment of the present invention;
[0012] Figure 3 A flowchart of another audio signal processing method provided by an embodiment of the present invention;
[0013] Figure 4 A matrix diagram of a specific example of an audio signal processing method provided by an embodiment of the present invention;
[0014] Figure 5 A Matlab SVD result diagram of a specific example of the audio signal processing method provided by an embodiment of the present invention;
[0015] Figure 6 A frequency spectrum diagram of a specific example of an audio signal processing method provided by an embodiment of the present invention;
[0016] Figure 7 A waveform diagram of a specific example of an audio signal processing method provided by an embodiment of the present invention;
[0017] Figure 8 A frequency spectrum diagram of another specific example of the audio signal processing method provided by an embodiment of the present invention;
[0018] Fig. 9 A symbol determination algorithm diagram of a specific example of an audio signal processing method provided by an embodiment of the present invention;
[0019] Fig.10 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Please refer to Figure 1 , which shows a flowchart of an embodiment of an audio signal processing method of the present application.
[0022] like Figure 1 As shown, in step 101, the SVD result of the data matrix corresponding to the audio signal is calculated using the SVD method;
[0023] In step 102, the sign of the SVD result is determined in combination with the vector direction characteristics of the data matrix;
[0024] In step 103, the SVD result after the sign is determined is output for audio signal processing.
[0025] In this embodiment, for step 101, the audio signal processing apparatus calculates the SVD result of the data matrix corresponding to the audio signal using the SVD method, wherein the SVD result includes the left singular vectors of the x symbols to be determined and the right singular vectors of the x symbols to be determined.
[0026] For step 102, the audio signal processing device determines the sign of the SVD result in combination with the vector direction characteristics of the data matrix, wherein the direction vector is a mathematical concept, and the direction of a spatial straight line is represented by a non-zero vector parallel to the straight line, and the vector is called a direction vector of the straight line. For example, the direction of a spatial straight line is represented by a non-zero vector parallel to the straight line, and the vector is called a direction vector of the straight line. The position of a straight line in space is completely determined by a point in space it passes through and a direction vector thereof.
[0027] For step 103, the audio signal processing device outputs the SVD result after the sign is determined to perform audio signal processing.
[0028] The method of this embodiment determines the sign of the SVD result by combining the vector direction characteristics of the data matrix, and then outputs the SVD result after the sign is determined for audio signal processing, so that the correct result of the singular vector direction can be obtained, the audio effect can be correctly enhanced, and the audio self-cancellation can be prevented.
[0029] Further references Figure 2 , which shows a flowchart of another audio signal processing method provided by an embodiment of the present application. Figure 1 A flowchart of the steps further defined in the process of "determining the sign of the SVD result in combination with the vector direction characteristics of the data matrix", wherein the SVD result includes x left singular vectors of the symbols to be determined and x right singular vectors of the symbols to be determined.
[0030] like Figure 2 As shown, in step 201, based on the data matrix, the kth left singular vector of the symbol to be determined and the kth right singular vector of the symbol to be determined, a left singular vector matrix after symbol correction and a right singular vector matrix after symbol correction are determined, wherein the SVD result includes the left singular vector matrix and the right singular vector matrix, k<=x;
[0031] In step 202, the sign of the SVD result is determined based on the sign-corrected left singular vector matrix and the sign-corrected right singular vector matrix.
[0032] The method of this embodiment determines the left singular vector matrix after symbol correction and the right singular vector matrix after symbol correction based on the data matrix, the kth left singular vector of the symbol to be determined, and the kth right singular vector of the symbol to be determined, thereby determining the sign of the SVD result.
[0033] Further references Figure 3 , which shows a flowchart of another audio signal processing method provided by an embodiment of the present application. Figure 2 A flowchart of the steps further defined in the process of "determining the left singular vector matrix after symbol correction and the right singular vector matrix after symbol correction based on the data matrix, the kth left singular vector of the symbol to be determined and the kth right singular vector of the symbol to be determined".
[0034] like Figure 3 As shown, in step 301, the left singular vector matrix after the correction of the sign is determined based on the sign of the inner product of the left singular vector matrix, the column vector of the data matrix and the kth left singular vector;
[0035] In step 302, the right singular vector matrix after sign correction is determined based on the sign of the inner product of the right singular vector matrix, the row vector of the data matrix and the kth right singular vector.
[0036] The method of this embodiment can determine the left singular vector matrix after sign correction based on the inner product sign of the left singular vector matrix, the column vector of the data matrix and the kth left singular vector. Further, the right singular vector matrix after sign correction can be determined based on the inner product sign of the right singular vector matrix, the row vector of the data matrix and the kth right singular vector.
[0037] In some optional embodiments, the calculation formula for determining the left singular vector matrix after the correction sign based on the inner product sign of the left singular vector matrix, the column vector of the data matrix and the kth left singular vector is:
[0038]
[0039] Among them, S left is the left singular vector matrix, a n A is the data matrix mxn , is the kth left singular vector;
[0040] The calculation formula for determining the right singular vector matrix after the correction sign based on the inner product sign of the right singular vector matrix, the row vector of the data matrix and the kth right singular vector is:
[0041]
[0042] Among them, S right is the left singular vector matrix, a m The data matrix A mxn The row vector of is the kth right singular vector.
[0043] The method of this embodiment can determine the correction sign through the calculation formula of the left singular vector matrix and the calculation formula of the right singular vector matrix.
[0044] In some optional embodiments, determining the sign of the SVD result based on the sign-corrected left singular vector matrix and the sign-corrected right singular vector matrix includes:
[0045] If the signs of the sign-corrected left singular vector matrix and the sign-corrected right singular vector matrix are consistent, the sign-corrected left singular vector matrix is used as the sign of the SVD result.
[0046] The method of this embodiment uses the left singular vector matrix after sign correction as the sign of the SVD result, so that the correction sign can be determined.
[0047] In some optional embodiments, determining the sign of the SVD result based on the sign-corrected left singular vector matrix and the sign-corrected right singular vector matrix further includes:
[0048] If the signs of the left singular vector matrix after sign correction and the right singular vector matrix after sign correction are inconsistent, the corrected sign of the singular matrix with the highest absolute value between the left singular vector matrix and the right singular vector matrix is selected as the sign of the SVD result.
[0049] The method of this embodiment selects the corrected sign of the singular matrix with the highest absolute value in the left singular vector matrix and the right singular vector matrix as the sign of the SVD result, so that the corrected sign can be determined.
[0050] In some optional embodiments, the audio signal processing includes audio signal enhancement.
[0051] In some optional embodiments, the audio signal enhancement includes using a minimum variance distortionless response to adaptively enable the data matrix to output an audio signal with minimum power in a desired direction and maximum signal-to-interference-noise ratio.
[0052] It should be noted that the above method steps are not used to limit the execution order of each step. In fact, some steps may be executed simultaneously or in the opposite order to the specified step order, and this application has no limitation on this.
[0053] The following describes some problems encountered by the inventor in the process of implementing the present invention and a specific embodiment of the solution finally determined, so that those skilled in the art can better understand the solution of the present application.
[0054] The inventors found in the process of implementing this application that the defects in the prior art are mainly caused by the following reasons:
[0055] In the prior art, each group of singular vectors satisfies the following:
[0056]
[0057] Thus, the SVD decomposition itself does not provide a method for computing the sign of each eigenvector. In actual algorithmic implementations, this uncertainty is inherited, so the individual singular vectors have an "arbitrary" sign. This sign is a byproduct of computing the decomposition's stable data, so the determined sign is no different from a random assignment, and therefore the sign has no meaningful interpretation in terms of the data represented by the decomposition.
[0058] The steering vector of the speech signal has a fixed direction. If the sign cannot be determined after using SVD to solve it, the phase of the audio signal will be disordered, resulting in audio self-cancellation.
[0059] The inventors also found that the audio self-cancellation caused by SVD symbol ambiguity will keep the audio quality within an acceptable range. Researchers often ignore this impact, but in fact, if the problem of symbol ambiguity is solved, the audio quality will be significantly improved.
[0060] The solution of this application is designed and optimized mainly from the following aspects:
[0061] Please refer to Figure 4 , which shows a matrix diagram A of a specific example of an audio signal processing method provided by an embodiment of the present invention. Figure 4 As shown, matrix A is obviously positive data.
[0062] Continue to refer Figure 5 , which shows a Matlab SVD result diagram of a specific example of the audio signal processing method provided by an embodiment of the present invention. It shows the SVD result of the A matrix. As can be seen from the figure, the singular vectors are still all negative. In fact, in the implementation of SVD by the linear algebra package currently used in matlab, the first singular vector from the all-positive matrix always has all-negative elements.
[0063] The inventors conducted the following comparative experiments in audio data processing, for example, using MVDR:
[0064] a). Use the SVD function in Matlab to generate audio normally.
[0065] b). Reverse all the signs of the SVD results to generate audio.
[0066] c). Randomly flip the SVD result signs to generate audio.
[0067] in, Figure 6 A spectrum comparison diagram of a) and b) provided by an embodiment of the present invention is shown. It can be seen that there is no difference in the spectrum between the results of a) and b) (the upper one is the result of a) and the lower one is the result of b)). Figure 7 The waveform comparison diagram of a) and b) provided by an embodiment of the present invention is shown. It can be seen that although the frequency spectrum is the same, the phase is opposite (the upper one is the result of a) and the lower one is the result of b). Figure 8 , which shows a comparison of the spectra of a) and c) provided by an embodiment of the present invention. It can be clearly seen from the spectrum that the speech part of audio c) is self-canceled (the upper one is the result of a) and the lower one is the result of c)).
[0068] Different vectors)
[0069] Output: After sign correction
[0070] Step 1, find the sign of the left singular vector (a n is a column vector).
[0071]
[0072] Step 2: Find the sign of the right singular vector (a m is a row vector).
[0073]
[0074] Step 3 is the step of determining the symbol, such as Fig. 9 shown.
[0075] in Fig. 9 A specific example of a sign determination algorithm diagram of an audio signal processing method provided by an embodiment of the present invention. If the sign of the left singular vector is different from the sign of the right singular vector, the absolute values of the left singular vector and the right singular vector are compared. If the absolute value of the left singular vector is less than the absolute value of the right singular vector, the sign of the left singular vector is flipped. If the absolute value of the left singular vector is not less than the absolute value of the right singular vector, the sign of the right singular vector is flipped. The abs function in the figure is a function for finding the absolute value of data that exists in multiple programming languages (including but not limited to: C language, C++, Fortran, Matlab, Pascal, Delphi, Visual Basic and VBA).
[0076] final,
[0077] The inventors found that a deeper effect was achieved during the process of implementing the present invention:
[0078] The present invention is based on the application of the mathematical method singular value decomposition in the field of speech, and solves the problem that when the mathematical method is used in the field of speech, the direction of singular vectors is not distinguished, resulting in self-cancellation of audio.
[0079] The singular vector direction verification method combines the vector direction characteristics of the input audio itself to verify the output singular vector direction, so that the singular vector direction can obtain the correct result and the audio effect can be correctly enhanced.
[0080] The sign can be determined by the sign of the inner product of the singular vector and a single independent data. The individual data vectors may have different directions, but it is more intuitive and practical to choose the direction of the majority vector. This can be found by calculating the sign of the sum of the signed inner products. If the two best signs of the left and right singular vectors calculated in this way do not agree, the overall sign can be determined by choosing the sign with the highest absolute value of the left and right singular vectors.
[0081] In view of the influence of the sign ambiguity problem of the mathematical method itself on the speech enhancement effect when singular value decomposition is applied in the field of speech, the embodiment of the present application proposes the above-mentioned solution.
[0082] In some other embodiments, the present invention further provides a non-volatile computer storage medium, the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the audio signal processing method in any of the above method embodiments;
[0083] As an implementation mode, the non-volatile computer storage medium of the present invention stores computer executable instructions, and the computer executable instructions are configured as follows:
[0084] Use the SVD method to calculate the SVD result of the data matrix corresponding to the audio signal;
[0085] Determining the sign of the SVD result in combination with the vector direction characteristic of the data matrix;
[0086] Output the SVD result after determining the sign for audio signal processing.
[0087] The non-volatile computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the audio signal processing device, etc. In addition, the non-volatile computer-readable storage medium may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the audio signal processing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0088] An embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes any of the above-mentioned audio signal processing methods.
[0089] Fig.10 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig.10 As shown, the device includes: one or more processors 1010 and a memory 1020, Fig.10 A processor 1010 is taken as an example. The device of the audio signal processing method may also include: an input device 1030 and an output device 1040. The processor 1010, the memory 1020, the input device 1030 and the output device 1040 may be connected via a bus or other means. Fig.10The example of connecting via a bus is taken. The memory 1020 is the above-mentioned non-volatile computer-readable storage medium. The processor 1010 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 1020, that is, the audio signal processing method of the above-mentioned method embodiment is realized. The input device 1030 can receive input digital or character information, and generate key signal input related to user settings and function control of the communication compensation device. The output device 1040 may include display devices such as display screens.
[0090] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0091] As an implementation mode, the electronic device is applied to an audio signal processing device, used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0092] Use the SVD method to calculate the SVD result of the data matrix corresponding to the audio signal;
[0093] Determining the sign of the SVD result in combination with the vector direction characteristic of the data matrix;
[0094] Output the SVD result after determining the sign for audio signal processing.
[0095] The electronic device of the embodiment of the present application exists in various forms, including but not limited to:
[0096] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
[0097] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.
[0098] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0099] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to the general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.
[0100] (5) Other electronic devices with data interaction functions.
[0101] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An audio signal processing method, comprising: Use the SVD method to calculate the SVD result of the data matrix corresponding to the audio signal; Determining the sign of the SVD result in combination with the vector direction characteristic of the data matrix; Output the SVD result after determining the sign for audio signal processing; The SVD result includes x left singular vectors of the symbols to be determined and x right singular vectors of the symbols to be determined, and the symbols of the SVD result determined in combination with the vector direction characteristics of the data matrix include: Determine a left singular vector matrix after symbol correction and a right singular vector matrix after symbol correction based on the data matrix, the kth left singular vector of the symbol to be determined, and the kth right singular vector of the symbol to be determined, wherein the SVD result includes the left singular vector matrix and the right singular vector matrix, k<=x; The sign of the SVD result is determined based on the sign-corrected left singular vector matrix and the sign-corrected right singular vector matrix.
2. The method according to claim 1, wherein: The determining of a left singular vector matrix after symbol correction and a right singular vector matrix after symbol correction based on the data matrix, the kth left singular vector of the symbol to be determined, and the kth right singular vector of the symbol to be determined includes: Determine the left singular vector matrix after sign correction based on the sign of the inner product of the left singular vector matrix, the column vector of the data matrix and the kth left singular vector; The right singular vector matrix after sign correction is determined based on the sign of the inner product of the right singular vector matrix, the row vector of the data matrix and the kth right singular vector.
3. The method according to claim 2, wherein: The calculation formula for determining the left singular vector matrix after the correction sign based on the inner product sign of the left singular vector matrix, the column vector of the data matrix and the kth left singular vector is: Among them, S left is the left singular vector matrix, a n A is the data matrix mxn , is the kth left singular vector; The calculation formula for determining the right singular vector matrix after the correction sign based on the inner product sign of the right singular vector matrix, the row vector of the data matrix and the kth right singular vector is: Among them, S right is the right singular vector matrix, a m A is the data matrix mxn The row vector of is the kth right singular vector.
4. The method according to claim 1, wherein: The determining the sign of the SVD result based on the left singular vector matrix after sign correction and the right singular vector matrix after sign correction includes: If the signs of the sign-corrected left singular vector matrix and the sign-corrected right singular vector matrix are consistent, the sign-corrected left singular vector matrix is used as the sign of the SVD result.
5. The method according to claim 1, wherein: The step of determining the sign of the SVD result based on the left singular vector matrix after sign correction and the right singular vector matrix after sign correction also includes: If the signs of the left singular vector matrix after sign correction and the right singular vector matrix after sign correction are inconsistent, the corrected sign of the singular matrix with the highest absolute value between the left singular vector matrix and the right singular vector matrix is selected as the sign of the SVD result.
6. The method according to any one of claims 1 to 5, wherein: The audio signal processing includes audio signal enhancement. 7 . The method according to claim 6 , wherein the audio signal enhancement comprises using a minimum variance distortionless response to adaptively make the data matrix output an audio signal with minimum power in a desired direction and maximum signal-to-interference-noise ratio.
8. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method described in any one of claims 1 to 7.
9. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
