Summary of the invention
The technical matters that the present invention solves is to provide a kind of audio signal processing method and device, can obtain good voice quality in different modes to realize portable speech ciphering equipment.
The embodiment provides a kind of audio signal processing method, described method comprises: the pattern configuring portable speech ciphering equipment; When described portable speech ciphering equipment is in hands-free mode, the first microphone on enable described portable speech ciphering equipment body and second microphone detect targeted voice signal in default beam area; When described portable speech ciphering equipment is not in hands-free mode, enable described first microphone detects targeted voice signal, enable described second microphone detection background noise signal, and utilizes described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Alternatively, when portable speech ciphering equipment is not in hands-free mode, described method also comprises: when portable speech ciphering equipment is in headset mode, the 3rd microphone on enable earphone cord detects targeted voice signal, enable described first microphone or second microphone detection background noise signal, and utilize described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Alternatively, when portable speech ciphering equipment is not in hands-free mode, described method also comprises: when portable speech ciphering equipment is in headset mode, and enable described first microphone and second microphone detect targeted voice signal in default beam area.
Alternatively, the pattern of the described portable speech ciphering equipment of described configuration comprises: when described portable speech ciphering equipment receives the hands-free instruction of user's input and the earphone jack of described portable speech ciphering equipment is not connected to headset plug, described portable speech ciphering equipment is set to hands-free mode; When the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
Alternatively, the pattern of the described portable speech ciphering equipment of described configuration comprises: when detect the distance between described portable speech ciphering equipment and the head of user more than the first preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode; When the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
Alternatively, the pattern of the described portable speech ciphering equipment of described configuration comprises: when detect signal amplitude difference that described first microphone and second microphone detect not more than the second preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode; When the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
Alternatively, describedly utilize described ambient noise signal to carry out noise reduction process to described targeted voice signal to comprise: utilize the difference of described ambient noise signal and described targeted voice signal to carry out voice activity detection, noise is estimated and speech enhan-cement process.
Alternatively, after enable described first microphone and second microphone detect targeted voice signal in default beam area, described method also comprises: carry out filtering to described targeted voice signal, to eliminate ambient noise signal.
Embodiments of the invention additionally provide a kind of speech signal processing device, and described device comprises: dispensing unit, for configuring the pattern of portable speech ciphering equipment; First processing unit, for when described portable speech ciphering equipment is in hands-free mode, the first microphone on enable described portable speech ciphering equipment body and second microphone detect targeted voice signal in default beam area; Second processing unit, for not being in hands-free mode when described portable speech ciphering equipment, enable described first microphone detects targeted voice signal, enable described second microphone detection background noise signal, and utilizes described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Alternatively, described device also comprises: the 3rd processing unit, for when portable speech ciphering equipment is not in hands-free mode but is in headset mode, the 3rd microphone on enable earphone cord detects targeted voice signal, enable described first microphone or second microphone detection background noise signal, and utilize described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Alternatively, described device also comprises: fourth processing unit, and for when portable speech ciphering equipment is not in hands-free mode but is in headset mode, enable described first microphone and second microphone detect targeted voice signal in default beam area.
Alternatively, described dispensing unit comprises: the first configuration subelement, for receive when described portable speech ciphering equipment user input hands-free instruction and the earphone jack of described portable speech ciphering equipment be not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, with for when the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
Alternatively, described dispensing unit comprises: the second configuration subelement, for when detect the distance between described portable speech ciphering equipment and the head of user more than during the first preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, with for when the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
Alternatively, described dispensing unit comprises: the 3rd configuration subelement, for when detect signal amplitude difference that described first microphone and second microphone detect not more than during the second preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, with for when the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
Alternatively, described second processing unit comprises: the first noise reduction subelement, carries out voice activity detection, noise is estimated and speech enhan-cement process for utilizing the difference of described ambient noise signal and described targeted voice signal; 3rd processing unit comprises: the second noise reduction subelement, carries out voice activity detection, noise is estimated and speech enhan-cement process for utilizing the difference of described ambient noise signal and described targeted voice signal.
Alternatively, described first processing unit comprises: the 3rd noise reduction subelement, for after enable described first microphone and second microphone detect targeted voice signal in default beam area, filtering is carried out to described targeted voice signal, to eliminate ambient noise signal; Fourth processing unit comprises: the 4th noise reduction subelement, for after enable described first microphone and second microphone detect targeted voice signal in default beam area, carries out filtering, to eliminate ambient noise signal to described targeted voice signal.
Compared with prior art, in technique scheme, configure the pattern of described portable speech ciphering equipment; When portable speech ciphering equipment is in hands-free mode, the first microphone on enable described portable speech ciphering equipment body and second microphone detect targeted voice signal in default beam area; When portable speech ciphering equipment is not in hands-free mode, enable described first microphone detects targeted voice signal, enable described second microphone detection background noise signal, and utilizes described ambient noise signal to carry out noise reduction process to described targeted voice signal.That is, when described portable speech ciphering equipment is in different patterns, correspondingly adopt different audio signal processing methods, this has taken into full account voice environment characteristic and the hardware state of equipment under different mode, achieves described portable speech ciphering equipment and can obtain good voice quality in different modes.
Embodiment
For making those skilled in the art understand better and realize the present invention, referring to accompanying drawing, be described in detail by specific embodiment.
Embodiment one
Fig. 1 is the process flow diagram of audio signal processing method in the embodiment of the present invention one.
Please refer to Fig. 1, described method comprises: step S100 to S102.
Step S100, configures the pattern of portable speech ciphering equipment.
In an embodiment of the present invention, described portable speech ciphering equipment can be other portable speech ciphering equipments such as mobile phone, panel computer.
As previously mentioned, described portable speech ciphering equipment in use, can change with the relative position of target sound source, and its signal wiring state also can change, so, in the step s 100, just can be configured its pattern with its software and hardware state according to the relative position of described portable speech ciphering equipment and target sound source.
In one embodiment of this invention, please refer to Fig. 3, when described portable speech ciphering equipment receives the hands-free instruction of user's input and the earphone jack of described portable speech ciphering equipment is not connected to headset plug, described portable speech ciphering equipment is set to hands-free mode.
And when described portable speech ciphering equipment is not in hands-free mode, if when detecting that the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode, please refer to Fig. 4.
And when described portable speech ciphering equipment receives the hands-free instruction of cancellation of user's input and the earphone jack of described portable speech ciphering equipment is not connected to headset plug, that is now, described portable speech ciphering equipment be not both in hands-free mode and be not in headset mode yet, described portable speech ciphering equipment is set to hand-held mode, please refer to Fig. 5.
In another embodiment of the invention, hands-free mode is set without the need to the instruction by accepting user's input and cancels hands-free mode, but distance-sensor can be set on described portable speech ciphering equipment, be used for detecting the distance of described portable speech ciphering equipment and target sound source (mouth of user), thus by judging that described distance configures described portable speech ciphering equipment and whether is in hands-free mode.
Please refer to Fig. 3, when detect the distance between described portable speech ciphering equipment and the head of user more than during the first preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode.Described first predeterminable range can be arranged according to the demand of user.
On the contrary, when detect the distance between described portable speech ciphering equipment and the head of user not more than during the first preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment be not both in hands-free mode and be not in headset mode yet, described portable speech ciphering equipment is set to hand-held mode, please refer to Fig. 5.
When the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode, please refer to Fig. 4.
In another embodiment of the present invention, equally hands-free mode be set without the need to the instruction by accepting user's input and cancel hands-free mode, but by the signal amplitude difference that the first microphone on described portable speech ciphering equipment and second microphone detect, configure described portable speech ciphering equipment and whether be in hands-free mode.Obviously, when described portable speech ciphering equipment is more away from described target sound source, described signal amplitude difference is less.
Please refer to Fig. 3, when the signal amplitude difference described first microphone MIC1 and second microphone MIC2 being detected not more than during the second preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, wherein, described second preset value can be arranged according to user's request.
On the contrary, please refer to Fig. 5, when detect the signal amplitude difference of described first microphone MIC1 and second microphone MIC2 more than during the second preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hand-held mode.
When the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode, please refer to Fig. 4.
When by after good for the pattern configurations of described portable speech ciphering equipment, just different audio signal processing methods can be adopted according to described pattern.
Step S101, when portable speech ciphering equipment is in hands-free mode, the first microphone on enable described portable speech ciphering equipment body and second microphone detect targeted voice signal in default beam area.
In an embodiment of the present invention, described hands-free mode can comprise hands-free voice call, hands-free video calling and hands-free voice identification etc.
Particularly, please refer to Fig. 3, when hands-free mode, described first microphone MIC1 and second microphone MIC2 lays respectively at bottom and the top of described portable speech ciphering equipment, target sound source (mouth of user) is positioned at the dead ahead of described portable speech ciphering equipment, Adaptive beamformer technology can be utilized, described first microphone MIC1 and second microphone MIC2 is made to form default wave beam, point to described target sound source, in described default beam area, receive the targeted voice signal that described target sound source produces, described targeted voice signal in described beam area can undistortedly pass through, and the voice signal in other directions beyond described default beam area can be suppressed, thus the quality of described targeted voice signal can be improved preferably.
It should be noted that, some ground unrests may be also being comprised by the targeted voice signal after Adaptive beamformer technical finesse, therefore, after enable described first microphone and second microphone detect targeted voice signal in default beam area, filtering can also be carried out to described targeted voice signal, to eliminate ambient noise signal, such as, can carry out filtering by the method such as spectrum-subtraction or Wiener Filter Method to by the targeted voice signal after Adaptive beamformer technical finesse.
Step S102, when portable speech ciphering equipment is not in hands-free mode, enable described first microphone detects targeted voice signal, enable described second microphone detection background noise signal, and utilizes described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Particularly, please refer to Fig. 5, when portable speech ciphering equipment is not in hands-free mode, described first microphone MIC1 and second microphone MIC2 lays respectively at bottom and the top of described portable speech ciphering equipment, described first microphone MIC1 can be utilized to be main microphone, detect targeted voice signal, and adopt described second microphone MIC2 to be reference microphone, detection background noise signal, then the difference of described ambient noise signal and described targeted voice signal is utilized to carry out voice activity detection, noise is estimated and speech enhan-cement process, thus noise reduction process is carried out to described targeted voice signal, to obtain good voice quality.
It should be noted that, when portable speech ciphering equipment is not in hands-free mode, described portable speech ciphering equipment can be in headset mode, also can not be in headset mode.Therefore whether be in headset mode according to described portable equipment, different method of speech processing can be adopted respectively, below will to described portable speech ciphering equipment, whether headset mode describes in detail respectively by enforcement two.
Embodiment two
Fig. 2 is the process flow diagram of audio signal processing method in the embodiment of the present invention two.
Please refer to Fig. 2, described method comprises: step S110 to S113.Wherein, step S110 and step S111 is similar with the step S100 in embodiment one and step S101 respectively, and specific implementation process please refer to embodiment one.
Step S112, when portable speech ciphering equipment is not in hands-free mode but is in headset mode, the 3rd microphone on enable earphone cord detects targeted voice signal, enable described first microphone or second microphone detection background noise signal, and utilize described ambient noise signal to carry out noise reduction process to described targeted voice signal, or enable described first microphone and second microphone detect targeted voice signal in default beam area.
Particularly, please refer to Fig. 4, when headset mode, described first microphone MIC1 and second microphone MIC2 lays respectively at bottom and the top of described portable speech ciphering equipment, described 3rd microphone MIC3 is positioned on described earphone cord, described target sound source (mouth of user) is positioned at the dead ahead of described portable speech ciphering equipment, obviously, the distance of described 3rd microphone MIC3 and described target sound source is nearer relative to described first microphone MIC1 and second microphone MIC2, the acoustic energy that described 3rd microphone MIC3 obtains is larger relative to described first microphone MIC1 and second microphone MIC2, therefore, described 3rd microphone MIC3 can be utilized to be main microphone, detect targeted voice signal, and adopt any one in described first microphone MIC1 and second microphone MIC2 for reference microphone, detection background noise signal, then the difference of described ambient noise signal and described targeted voice signal is utilized to carry out voice activity detection, noise is estimated and speech enhan-cement process, thus noise reduction process is carried out to described targeted voice signal, to obtain good voice quality.
When headset mode, described first microphone MIC1 is the same with hands-free mode with second microphone MIC2 also relative to sound source, therefore, in concrete enforcement, also can utilize Adaptive beamformer technology, make described first microphone MIC1 and second microphone MIC2 form default wave beam, point to described target sound source, in described default beam area, receive the targeted voice signal that described target sound source produces, to obtain the quality that improve described targeted voice signal preferably.
Step S113, when portable speech ciphering equipment is not in hands-free mode and is not in headset mode, enable described first microphone detects targeted voice signal, enable described second microphone detection background noise signal, and utilize described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Particularly, please refer to Fig. 5, when portable speech ciphering equipment is not in hands-free mode and is not in headset mode, such as, when hand-held mode, described first microphone MIC1 and second microphone MIC2 lays respectively at bottom and the top of described portable speech ciphering equipment, obviously, the distance of described first microphone MIC1 and described target sound source is nearer relative to described second microphone MIC2, the acoustic energy that described first microphone MIC1 obtains is larger relative to second microphone MIC2, therefore, described first microphone MIC1 can be utilized to be main microphone, detect targeted voice signal, and adopt described second microphone MIC2 to be reference microphone, detection background noise signal, then the difference of described ambient noise signal and described targeted voice signal is utilized to carry out voice activity detection, noise is estimated and speech enhan-cement process, thus noise reduction process is carried out to described targeted voice signal, to obtain good voice quality.
It should be noted that, when described portable speech ciphering equipment is in hands-free mode or headset mode, between described first microphone MIC1 and the signal amplitude detected by second microphone MIC2, difference is little, if still use the sound processing techniques of hand-held mode, good voice quality can not be obtained, therefore, relative position according to described portable speech ciphering equipment and target sound source is configured its pattern with its signal wiring state, and adopt different sound processing techniques according to different patterns, described portable speech ciphering equipment can be realized and can obtain good voice quality in different modes.
Embodiments of the invention additionally provide a kind of speech signal processing device, please refer to Fig. 6, and described device 200 comprises: dispensing unit 210, for configuring the pattern of portable speech ciphering equipment; First processing unit 220, for when described portable speech ciphering equipment is in hands-free mode, the first microphone on enable described portable speech ciphering equipment body and second microphone detect targeted voice signal in default beam area; Second processing unit 230, for not being in hands-free mode when described portable speech ciphering equipment, enable described first microphone detects targeted voice signal, enable described second microphone detection background noise signal, and utilizes described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Please refer to Fig. 7, in an embodiment of the present invention, described device 200 can also comprise: the 3rd processing unit 240, for when portable speech ciphering equipment is not in hands-free mode but is in headset mode, the 3rd microphone on enable earphone cord detects targeted voice signal, enable described first microphone or second microphone detection background noise signal, and utilize described ambient noise signal to carry out noise reduction process to described targeted voice signal.
Please refer to Fig. 8, in an embodiment of the present invention, described device 200 can also comprise: fourth processing unit 250, for when portable speech ciphering equipment is not in hands-free mode but is in headset mode, enable described first microphone and second microphone detect targeted voice signal in default beam area.
In an embodiment of the present invention, described dispensing unit 210 can comprise: the first configuration subelement (figure does not show), for receive when described portable speech ciphering equipment user input hands-free instruction and the earphone jack of described portable speech ciphering equipment be not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, with for when the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
In an embodiment of the present invention, described dispensing unit 210 can comprise: the second configuration subelement (figure does not show), for when detect the distance between described portable speech ciphering equipment and the head of user more than during the first preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, with for when the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
In an embodiment of the present invention, described dispensing unit 210 can comprise: the 3rd configuration subelement (figure does not show), for when detect signal amplitude difference that described first microphone and second microphone detect not more than during the second preset value and the earphone jack of described portable speech ciphering equipment is not connected to headset plug time, described portable speech ciphering equipment is set to hands-free mode, with for when the earphone jack of described portable speech ciphering equipment is connected to headset plug, described portable speech ciphering equipment is set to headset mode.
In an embodiment of the present invention, described second processing unit 230 can comprise: the first noise reduction subelement (figure does not show), carries out voice activity detection, noise is estimated and speech enhan-cement process for utilizing the difference of described ambient noise signal and described targeted voice signal; 3rd processing unit 240 can comprise: the second noise reduction subelement (figure does not show), carries out voice activity detection, noise is estimated and speech enhan-cement process for utilizing the difference of described ambient noise signal and described targeted voice signal.
In an embodiment of the present invention, described first processing unit 220 can comprise: the 3rd noise reduction subelement (figure does not show), for after enable described first microphone and second microphone detect targeted voice signal in default beam area, filtering is carried out to described targeted voice signal, to eliminate ambient noise signal; Fourth processing unit 250 can comprise: the 4th noise reduction subelement (figure does not show), for after enable described first microphone and second microphone detect targeted voice signal in default beam area, filtering is carried out to described targeted voice signal, to eliminate ambient noise signal.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Although the present invention discloses as above, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.