Sound signal processing method, apparatus and computer readable storage medium
1. A sound signal processing method for a sound signal processing apparatus including a microphone, and a first sound pickup channel and a second sound pickup channel communicating with the microphone, the second sound pickup channel being longer than the first sound pickup channel, the sound signal processing method comprising:
acquiring the delay time and signal compensation parameters of a second sound pickup channel relative to a first sound pickup channel;
according to the delay time, acquiring a first sound signal corresponding to a first sound pickup channel and a second sound signal comprising sound transmitted by a second sound pickup channel from sound signals received by the microphone;
according to the delay time, carrying out delay processing on the first sound signal, and according to the signal compensation parameter, carrying out compensation processing on the second sound signal;
and acquiring and outputting a target sound signal according to the first sound signal after the time delay processing and the second sound signal after the compensation processing.
2. The sound signal processing method of claim 1, wherein the step of obtaining the delay time and the signal compensation parameter of the second sound pickup channel relative to the first sound pickup channel comprises:
a sound pickup hole of the second sound pickup channel is blocked, and a first standard sound signal of a standard sound source placed at the sound pickup hole of the first sound pickup channel is acquired through the microphone;
the sound pickup hole of the first sound pickup channel is blocked, and a second standard sound signal of a standard sound source placed at the sound pickup hole of the second sound pickup channel is acquired through the microphone;
and acquiring the delay time and the signal compensation parameter according to the first standard sound signal and the second standard sound signal.
3. The sound signal processing method according to claim 2, wherein the step of obtaining the delay time and the signal compensation parameter from the first standard sound signal and the second standard sound signal comprises:
calculating the time difference value of the received second standard sound signal and the received first standard sound signal in the time domain to obtain the delay time;
and calculating the ratio of the signal intensity between the second standard sound signal and the first standard sound signal to obtain the signal compensation parameter.
4. The sound signal processing method according to any one of claims 1 to 3, wherein the step of obtaining the target sound signal from the first sound signal after the delay processing and the second sound signal after the compensation processing and outputting the target sound signal comprises:
and performing beam forming processing on the first sound signal after the time delay processing and the second sound signal after the compensation processing to obtain the target sound signal and then outputting the target sound signal.
5. The sound signal processing method according to claim 4, wherein before the step of performing the beam forming process on the first sound signal after the delay process and the second sound signal after the compensation process to obtain the target sound signal and then outputting the target sound signal, the sound signal processing method further comprises:
and filtering out partial signals of the sound transmitted by the first pickup channel and included in the second sound signal.
6. An acoustic signal processing apparatus characterized by comprising:
the sound pickup device comprises a shell, a first sound pickup channel and a second sound pickup channel, wherein the second sound pickup channel is longer than the first sound pickup channel;
the microphone is arranged on the shell and is communicated with the first sound pickup channel and the second sound pickup channel; and
a memory and a processor, the memory having stored thereon a sound signal processing program operable on the processor, the sound signal processing program when executed by the processor implementing the steps of the sound signal processing method according to any one of claims 1 to 5.
7. The acoustic signal processing apparatus of claim 6, wherein the pickup hole of the first pickup channel and the pickup aperture of the second pickup channel are exposed at a lower side of the housing.
8. The acoustic signal processing apparatus of claim 6, wherein the sound pickup aperture of the first sound pickup channel and the sound pickup aperture of the second sound pickup channel are symmetrically disposed in the housing.
9. The sound signal processing device of any one of claims 6 to 8, wherein the sound signal processing device is a head-mounted VR device or a head-mounted AR device or an earphone.
10. A computer-readable storage medium, characterized in that a sound signal processing program is stored thereon, which when executed by a processor implements the steps of the sound signal processing method according to any one of claims 1 to 5.
Background
Currently, in acoustic products (including but not limited to a head-mounted VR device, a head-mounted AR device, or an earphone), when reducing noise of sound, a microphone array is generally used to realize spatial directivity of sound and improve voice quality. However, the microphone array requires a plurality of microphones, which is costly.
Disclosure of Invention
The invention mainly aims to provide a sound signal processing method, aiming at reducing the cost of realizing sound space directivity.
In order to achieve the above object, a sound signal processing method according to the present invention is applied to a sound signal processing apparatus including a microphone, and a first sound pickup channel and a second sound pickup channel communicating with the microphone, the second sound pickup channel being longer than the first sound pickup channel, the sound signal processing method including:
acquiring the delay time and signal compensation parameters of a second sound pickup channel relative to a first sound pickup channel;
according to the delay time, acquiring a first sound signal corresponding to a first sound pickup channel and a second sound signal comprising sound transmitted by a second sound pickup channel from sound signals received by the microphone;
according to the delay time, carrying out delay processing on the first sound signal, and according to the signal compensation parameter, carrying out compensation processing on the second sound signal;
and acquiring and outputting a target sound signal according to the first sound signal after the time delay processing and the second sound signal after the compensation processing.
Optionally, the step of obtaining the delay time and the signal compensation parameter of the second sound pickup channel relative to the first sound pickup channel includes:
a sound pickup hole of the second sound pickup channel is blocked, and a first standard sound signal of a standard sound source placed at the sound pickup hole of the first sound pickup channel is acquired through the microphone;
the sound pickup hole of the first sound pickup channel is blocked, and a second standard sound signal of a standard sound source placed at the sound pickup hole of the second sound pickup channel is acquired through the microphone;
and acquiring the delay time and the signal compensation parameter according to the first standard sound signal and the second standard sound signal.
Optionally, the step of obtaining the delay time and the signal compensation parameter according to the first standard sound signal and the second standard sound signal includes:
calculating the time difference value of the received second standard sound signal and the received first standard sound signal in the time domain to obtain the delay time;
and calculating the ratio of the signal intensity between the second standard sound signal and the first standard sound signal to obtain the signal compensation parameter.
Optionally, the step of obtaining the target sound signal and outputting the target sound signal according to the first sound signal after the delay processing and the second sound signal after the compensation processing includes:
and performing beam forming processing on the first sound signal after the time delay processing and the second sound signal after the compensation processing to obtain the target sound signal and then outputting the target sound signal.
Optionally, before the step of performing beamforming processing on the first sound signal after the delay processing and the second sound signal after the compensation processing to obtain the target sound signal and then outputting the target sound signal, the sound signal processing method further includes:
and filtering out partial signals of the sound transmitted by the first pickup channel and included in the second sound signal.
The present invention also proposes a sound signal processing apparatus comprising:
the sound pickup device comprises a shell, a first sound pickup channel and a second sound pickup channel, wherein the second sound pickup channel is longer than the first sound pickup channel;
the microphone is arranged on the shell and is communicated with the first sound pickup channel and the second sound pickup channel; and
a memory and a processor, the memory having stored thereon a sound signal processing program operable on the processor, the sound signal processing program when executed by the processor implementing the steps of the sound signal processing method previously described.
Optionally, the sound pickup hole of the first sound pickup channel and the sound pickup hole of the second sound pickup channel are exposed at the lower side of the housing.
Optionally, the sound pickup holes of the first sound pickup channel and the sound pickup holes of the second sound pickup channel are symmetrically arranged on the housing.
Optionally, the sound signal processing device is a head-mounted VR device or a head-mounted AR device or an earphone.
The present invention also proposes a computer readable storage medium having stored thereon a sound signal processing program which, when executed by a processor, implements the steps of the sound signal processing method described above.
The technical scheme of the invention carries out time delay processing on the first sound signal corresponding to the shorter first sound pickup channel, so that the first sound signal is synchronized with the second sound signal in the time domain, and by performing compensation processing on the second sound signal corresponding to the longer second sound pickup channel, which is more attenuated, so as to avoid the influence of the signal difference caused by the attenuation difference on the processing performance of the subsequent sound signals, and then process the first sound signal after the time delay processing and the second sound signal after the compensation processing to obtain and output the target sound signal, thus, a microphone array is not needed, and the sound with space directivity can be obtained by only adopting one microphone, the enhancement and the noise reduction of the sound can be effectively realized at low cost, the signal performance of the output target sound signal is ensured, and the sound identification rate is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a sound signal processing method according to an embodiment of the present invention;
fig. 2 is a waveform diagram of a first standard sound signal and a second standard sound signal;
FIG. 3 is a diagram of an embodiment of a sound signal processing apparatus according to the present invention in a wearing state;
FIG. 4 is a bottom view of the acoustic signal processing apparatus of FIG. 3;
fig. 5 is a schematic sectional structure view of the sound signal processing apparatus of fig. 3.
The reference numbers illustrate:
reference numerals
Name (R)
Reference numerals
Name (R)
10
Shell body
11
First pickup channel
12
Second sound pickup channel
20
Microphone (CN)
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture, and if the specific posture is changed, the directional indications are changed accordingly.
In addition, if there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, if the meaning of "and/or" and/or "appears throughout, the meaning includes three parallel schemes, for example," A and/or B "includes scheme A, or scheme B, or a scheme satisfying both schemes A and B. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a sound signal processing method.
Referring to fig. 1, in an embodiment of the present invention, the sound signal processing method is applied to a sound signal processing apparatus including a microphone, and a first sound pickup channel and a second sound pickup channel which are communicated with the microphone, and the second sound pickup channel is longer than the first sound pickup channel. The sound signal processing method includes:
step S10, obtaining the delay time and signal compensation parameter of the second sound pickup channel relative to the first sound pickup channel;
step S20, according to the delay time, acquiring a first sound signal corresponding to a first sound pickup channel and a second sound signal including sound transmitted by a second sound pickup channel from the sound signals received by the microphone;
step S30, according to the delay time, carrying out delay processing on the first sound signal, and according to the signal compensation parameter, carrying out compensation processing on the second sound signal;
and step S40, obtaining the target sound signal according to the first sound signal after the delay processing and the second sound signal after the compensation processing, and outputting the target sound signal.
In this embodiment, since the second sound-collecting channel is longer than the first sound-collecting channel, the time required for the sound to reach the microphone through the first sound-collecting channel is shorter than the time required for the sound to reach the microphone through the second sound-collecting channel, and the time difference between the two is the delay time. In addition, since the second sound pickup channel is longer than the first sound pickup channel, sound is attenuated more in the process of passing through the longer second sound pickup channel, and compensation processing is performed on the second sound signal in order to avoid the influence of signal difference caused by the attenuation difference on the processing performance of subsequent sound signals.
The technical scheme of the invention carries out time delay processing on the first sound signal corresponding to the shorter first sound pickup channel, so that the first sound signal is synchronized with the second sound signal in the time domain, and by performing compensation processing on the second sound signal corresponding to the longer second sound pickup channel, which is more attenuated, so as to avoid the influence of the signal difference caused by the attenuation difference on the processing performance of the subsequent sound signals, and then process the first sound signal after the time delay processing and the second sound signal after the compensation processing to obtain and output the target sound signal, thus, a microphone array is not needed, and the sound with space directivity can be obtained by only adopting one microphone, the enhancement and the noise reduction of the sound can be effectively realized at low cost, the signal performance of the output target sound signal is ensured, and the sound identification rate is improved.
Further, the step S10 includes:
step S11, blocking the sound pickup hole of the second sound pickup channel, and acquiring a first standard sound signal of a standard sound source placed at the sound pickup hole of the first sound pickup channel through the microphone;
step S12, blocking the sound pickup hole of the first sound pickup channel, and acquiring a second standard sound signal of a standard sound source placed at the sound pickup hole of the second sound pickup channel through the microphone;
step S13, obtaining the delay time and the signal compensation parameter according to the first standard sound signal and the second standard sound signal.
In this embodiment, it is ensured that the sound received at the sound pickup hole of the second sound pickup channel is consistent with the sound received at the sound pickup hole of the first sound pickup channel in the experiment by using a standard sound source, so that the difference between the first standard sound signal and the second standard sound signal is only due to the difference between the second sound pickup channel and the first sound pickup channel, thereby ensuring the accuracy of the obtained delay time and the obtained signal compensation parameter. In this embodiment, the delay time and the signal compensation parameter are obtained through an experiment, and data obtained through the experiment is more accurate. However, the design is not limited thereto, and in other embodiments, the delay time and the signal compensation parameter may be obtained by querying data and using empirical data in combination with a difference between the second sound pickup channel and the first sound pickup channel.
It should be noted that the sequence between the step S11 and the step S12 may be changed, and the present invention is not limited thereto.
Further, the step S13 includes:
step S131, calculating a time difference value of the received second standard sound signal and the received first standard sound signal in a time domain to obtain the delay time;
step S132, calculating a ratio of signal intensities between the second standard sound signal and the first standard sound signal to obtain the signal compensation parameter.
In the present embodiment, referring to fig. 2, fig. 2 is a waveform diagram of a first standard sound signal and a second standard sound signal, and it can be seen from fig. 2 that, after a standard sound source emits sound, a time interval t1 is elapsed before a microphone receives the first standard sound signal; the second standard sound signal is received by the microphone after the time interval t 2; the delay time T is T2-T1. In addition, as can be seen from fig. 2, the signal intensity S01 of the first standard sound signal is stronger than the signal intensity S02 of the second standard sound signal, and the signal compensation parameter F is S02/S01.
It should be noted that the sequence between the step S131 and the step S132 may be changed, and the present invention is not limited thereto.
In this embodiment, in the step S30, when performing the delay processing on the first sound signal, the waveform of the first sound signal is usually translated in the time domain by the delay time T to obtain the waveform of the first sound signal after the delay processing; when the second sound signal is compensated, the signal intensity S2 of the second sound signal is usually divided by the signal compensation parameter F, that is, the signal intensity of the compensated second sound signal is S2/F, and the second sound signal is amplified.
Further, the step S40 includes:
and performing beam forming processing on the first sound signal after the time delay processing and the second sound signal after the compensation processing to obtain the target sound signal and then outputting the target sound signal.
In this embodiment, by means of the beam forming process, the first sound signal after the delay process and the second sound signal after the compensation process are extracted and combined, so that the effects of enhancing the sound signal and reducing the signal noise can be achieved, the signal performance of the output target sound signal can be ensured, and the sound recognition rate can be improved. Further, before the step S40, the sound signal processing method further includes: step S50, filtering out a part of the sound transmitted by the first sound pickup channel included in the second sound signal; in this way, the existence of interference components in the second sound signal during the beam forming process can be avoided, thereby improving the processing performance of the sound signal. In addition, in other embodiments, the first audio signal after the delay processing and the second audio signal after the compensation processing may be processed by other processing methods capable of obtaining the sound space directivity, which is not limited in the present invention.
The present invention further provides a sound signal processing apparatus, where the sound signal processing apparatus includes a casing, a microphone, a memory, and a processor, where the microphone is disposed in the casing, and the memory stores a sound signal processing program that can be run on the processor, and the sound signal processing program is executed by the processor to implement the steps of the sound signal processing method. Wherein, the casing is equipped with first pickup passageway and second pickup passageway, the second pickup passageway is longer than first pickup passageway, the microphone with first pickup passageway with the second pickup passageway all communicates.
In the present invention, the sound signal processing device is a head-mounted VR device, a head-mounted AR device, an earphone, or the like.
Without loss of generality, the following description takes the sound signal processing device as a head-mounted VR device as an example.
Referring to fig. 3 to 5, in the present embodiment, the housing 10 is a housing of a head-mounted VR device, which is generally worn on the front side of the binocular position of the head, and the microphone 20 is generally built in the housing 10.
Further, the sound pickup hole of the first sound pickup channel 11 and the sound pickup hole of the second sound pickup channel 12 are exposed at the lower side of the housing 10. It can be understood that, on one hand, the lower side of the housing 10 is closer to the mouth of the user, that is, closer to the sound emitting position, and faces the sound emitting position, which is beneficial to picking up the sound emitted by the user more clearly, and improving the sound pickup effect of the product; on the other hand, the arrangement below the housing 10 allows the sound pickup hole of the first sound pickup channel 11 and the sound pickup hole of the second sound pickup channel 12 to face downward, and the probability of the sound pickup hole being blocked by the foreign matter can be reduced in consideration of the downward tendency of the foreign matter to be subjected to the force of gravity. However, the design is not limited thereto, and in other embodiments, the sound-collecting hole of the first sound-collecting channel 11 and the sound-collecting hole of the second sound-collecting channel 12 may also be exposed to the front side of the housing 10.
Further, the sound pickup holes of the first sound pickup channel 11 and the sound pickup holes of the second sound pickup channel 12 are symmetrically arranged on the housing 10; therefore, the sound generated by the user can reach the sound pickup hole of the first sound pickup channel 11 and the sound pickup hole of the second sound pickup channel 12 at the same time, so that the sound entering from the two sound pickup holes has no time difference and the same phase, the sound performance after processing is improved, and the sound recognition rate is improved. Of course, in other embodiments, the two pickup holes may also have slight asymmetry.
The present invention further provides a computer-readable storage medium, where a sound signal processing program is stored on the computer-readable storage medium, and the sound signal processing program is executed by a processor to implement the steps of the sound signal processing method, where the specific steps of the sound signal processing method refer to the foregoing embodiments.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.