Signal processing method and device, readable storage medium and computer program product
By detecting the original signal with a vocal detection and selecting gain processing based on the detection results, the problems of decreasing vocal clarity and insufficient low-frequency radiation in ultra-thin speakers are solved, and the clarity of the vocal in the signal is improved and the sense of sound volume is improved.
Patent Information
- Application Number
- CN202411526289.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
In ultra-thin large amplitude speakers, murmur interference causes a decrease in vocal clarity, and the narrow acoustic space limits low-frequency radiation, which easily leads to turbidity when increasing low-frequency gain.
By performing vocal detection on the original signal, if there is a vocal, a smaller first gain processing is used, and if there is no vocal, a larger second gain processing is used, and the second gain is greater than the first gain.
Effectively attenuate the noise in the signal, improve the clarity of the voice, and reduce signal attenuation when there is no voice signal, thereby increasing the volume of the sound.
Smart Images

Figure CN119521077A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a signal processing method, device, readable storage medium and computer program product. Background Art
[0002] With the development of lightweight audio equipment, the space occupied by the acoustic system (including area and thickness) has been significantly reduced. In order to ensure sufficient loudness, speakers tend to be ultra-thin and large-amplitude. However, this type of speaker introduces many problems, among which noise is the main manifestation. This noise will interfere with the human voice in the signal, resulting in a decrease in the clarity of the human voice. In addition, the small acoustic space limits the low-frequency radiation of sound waves. In order to obtain enough low frequency, a large amount of gain needs to be added in the low-frequency band to increase the low-frequency volume (including the loudness of the sound), but this operation usually also leads to turbidity of the human voice and a decrease in the clarity of the human voice.
[0003] Therefore, how to improve the clarity of human voice in the signal is a technical problem that needs to be solved urgently in the field of this technology. Summary of the invention
[0004] The main purpose of the present application is to provide a signal processing method, device, readable storage medium and computer program product, aiming at solving the technical problem of how to improve the clarity of human voice in a signal.
[0005] To achieve the above object, the present application provides a signal processing method, the signal processing method comprising:
[0006] Acquire an original signal to be processed, and perform voice detection on the original signal to obtain a detection result;
[0007] If the detection result indicates that human voice exists in the original signal, the original signal is processed with a first gain to obtain a target signal;
[0008] If the detection result indicates that there is no human voice in the original signal, the original signal is processed with a second gain to obtain a target signal, wherein the second gain is greater than the first gain.
[0009] In one embodiment, the step of performing human voice detection on the original signal to obtain a detection result includes:
[0010] Acquire the amplitude of the mid-high frequency signal in the original signal, wherein the mid-high frequency signal is a signal whose signal frequency belongs to a preset mid-high frequency range, and the preset mid-high frequency range is a sound frequency range representing human voice;
[0011] If the amplitude is greater than or equal to a preset threshold, it is determined that there is a human voice in the original signal as a detection result;
[0012] If the amplitude is less than a preset threshold, it is determined that there is no human voice in the original signal as a detection result.
[0013] In one embodiment, the step of obtaining the amplitude of the medium and high frequency signal in the original signal includes:
[0014] Input the original signal into a preset filter, and output a medium-high frequency signal, wherein the passband frequency range of the preset filter is the preset medium-high frequency range;
[0015] The signal amplitude of each signal frequency point in the medium and high frequency signal is calculated, and the amplitude is determined based on all the signal amplitudes, wherein the amplitude is an average value of all the signal amplitudes, or the amplitude is a maximum value of all the signal amplitudes.
[0016] In one embodiment, before the step of processing the original signal with the first gain to obtain the target signal, the method further includes:
[0017] Acquire the amplitude of the medium and high frequency signal in the original signal, and determine a first gain based on the amplitude, wherein the first gain is positively correlated with the amplitude;
[0018] The step of processing the original signal with the first gain to obtain the target signal is performed based on the determined first gain.
[0019] In one embodiment, before the step of processing the original signal with the second gain to obtain the target signal, the method further includes:
[0020] Acquire the amplitude of the medium and high frequency signal in the original signal, and determine a second gain based on the amplitude, wherein the second gain is negatively correlated with the amplitude;
[0021] The step of processing the original signal with the second gain to obtain the target signal is performed based on the determined second gain.
[0022] In one embodiment, after the step of obtaining the original signal to be processed, the method further includes:
[0023] The original signal is input into an equalizer so as to be processed by the equalizer.
[0024] In one embodiment, the step of processing the original signal with a first gain to obtain a target signal includes:
[0025] The gain of the equalizer is set to a first gain, and the original signal is equalized by the equalizer to obtain a target signal.
[0026] In addition, to achieve the above-mentioned purpose, the present application also provides an audio device, which includes: a speaker and a processor, the speaker is connected to the processor, and the processor is used to execute the steps of the signal processing method as described above.
[0027] In addition, to achieve the above-mentioned purpose, the present application also provides a readable storage medium, which is a computer-readable storage medium, and a program for implementing the signal processing method is stored on the computer-readable storage medium. The program for implementing the signal processing method is executed by a processor to implement the steps of the signal processing method as described above.
[0028] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the signal processing method described above are implemented.
[0029] One or more technical solutions proposed in this application have at least the following technical effects:
[0030] The original signal to be processed is obtained, and the original signal is subjected to human voice detection to obtain a detection result; if the detection result indicates that there is human voice in the original signal, the original signal is processed with a first gain to obtain a target signal; if the detection result indicates that there is no human voice in the original signal, the original signal is processed with a second gain to obtain a target signal, wherein the second gain is greater than the first gain. In this way, when the original signal is detected to have human voice in the embodiment of the present application, the original signal is processed with a smaller first gain, so that the noise in the signal can be attenuated to avoid the interference of the noise on the human voice, so as to improve the clarity of the human voice in the signal; when the original signal is detected to have no human voice, the original signal is processed with a larger gain, which can reduce the attenuation of the signal and thus improve the volume of the sound. In other words, the embodiment of the present application does not always apply a larger gain at low frequencies, but takes whether there is human voice in the signal as the basis for applying the gain size. When there is human voice, a smaller gain is applied to attenuate the noise and improve the clarity of the human voice. And when there is no human voice, a larger gain is applied to improve the volume of the sound. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0033] Figure 1 This is a flow chart of the first embodiment of the signal processing method of the present application;
[0034] Figure 2 A gain diagram of an embodiment of a signal processing method of the present application;
[0035] Figure 3 A schematic diagram of a signal processing flow involved in an embodiment of a signal processing method of the present application;
[0036] Figure 4 This is a schematic diagram of the structure of the signal processing device of the present application;
[0037] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the signal processing device in the embodiment of the present application.
[0038] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0039] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme 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 only 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 belong to the scope of protection of the present invention.
[0040] As audio equipment becomes thinner and lighter, the space occupied by the acoustic system (including area and thickness) has decreased significantly. In order to ensure sufficient loudness, speakers tend to be ultra-thin and large-amplitude. However, this type of speaker introduces many problems, among which nonlinear distortion and airflow noise are the main manifestations. In addition, the narrow acoustic space also limits the radiation of low frequencies. In order to obtain sufficient low frequencies, tuning engineers need to add a lot of gain in the low frequency band to improve the low frequency volume, but this operation usually also leads to problems of turbid sound and reduced clarity.
[0041] Based on this, the main solution of the present application is: obtain the original signal to be processed, perform human voice detection on the original signal to obtain a detection result; if the detection result indicates that there is human voice in the original signal, process the original signal with a first gain to obtain a target signal; if the detection result indicates that there is no human voice in the original signal, process the original signal with a second gain to obtain a target signal, wherein the second gain is greater than the first gain.
[0042] This application processes the original signal with a smaller first gain when the presence of human voice is detected in the original signal, thereby attenuating the noise in the signal and avoiding the interference of the noise on the human voice, so as to improve the clarity of the human voice in the signal. When it is detected that there is no human voice in the original signal, the original signal is processed with a larger gain, which can reduce the attenuation of the signal and thus improve the volume of the sound. In other words, this application does not always apply a larger gain at low frequencies, but uses the presence of human voice in the signal as a benchmark for the size of the gain applied. When there is human voice, a smaller gain is applied to attenuate the noise and improve the clarity of the human voice. And when there is no human voice, a larger gain is applied to improve the volume of the sound.
[0043] It should be noted that the execution subject of each embodiment of the signal processing method of the present application may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an audio device capable of realizing the above functions, such as headphones, smart speakers, Bluetooth speakers, portable media players, car audio systems, home theater systems, etc. The embodiments of the signal processing method of the present application do not impose specific restrictions on this.
[0044] Based on this, the present application proposes a signal processing method of the first embodiment, please refer to Figure 1 , the signal processing method comprises steps S10 to S30:
[0045] Step S10, obtaining an original signal to be processed, and performing human voice detection on the original signal to obtain a detection result;
[0046] After the original signal is acquired, the original signal is subjected to human voice detection to obtain a detection result. It should be noted that there are at least two different detection results for human voice detection, one of which indicates that there is a human voice in the original signal, and the other indicates that there is a human voice in the original signal. For example, in a specific embodiment, the detection result may be 0 or 1, wherein 0 indicates that there is no human voice in the original signal, and 1 indicates that there is a human voice in the original signal.
[0047] Furthermore, human voice detection can be performed on the original signal based on a human voice detection algorithm, such as voice activity detection (VAD), energy threshold method, spectrum analysis method, training a model for human voice detection, and using the trained model for human voice detection, etc. Human voice detection can also be performed based on a preset detection method, and this embodiment does not impose any specific restrictions on this.
[0048] It should be noted that after obtaining the original signal, the original signal can also be processed by signal frame division to divide the original signal into one frame or multiple frames of sub-original signals, and each frame of sub-original signal is used as an atom to perform subsequent steps, that is, for each frame of sub-original signal, detect whether there is human voice in this frame of sub-original signal. If so, process this frame of sub-original signal with a first gain; if not, process this frame of sub-original signal with a second gain to improve the fineness of signal processing.
[0049] Step S20, if the detection result indicates that there is a human voice in the original signal, the original signal is processed with a first gain to obtain a target signal;
[0050] When the detection result indicates that there is a human voice in the original signal, the original signal is processed with a first gain to obtain a target signal. It is understandable that the signal can be processed based on the gain in a known manner, such as multiplying the signal value by the gain, adding the signal value to the gain, etc., without specific limitation. Exemplarily, the various embodiments of the present application are described and illustrated in the manner of processing the original signal based on the gain as multiplying the signal value by the gain.
[0051] Considering that when human voice is detected in the signal, the signal has usually reached a loudness level that can be perceived by the human auditory system, processing the signal with a negative gain at this time will not lose too much volume of the human voice, and if there is noise in the signal at the same time, the negative gain can attenuate the noise. In this way, both the volume of the human voice and the attenuation of the noise can be taken into account, reducing the interference of the noise on the human voice. Based on this, in a preferred embodiment, the first gain is a negative gain, that is, the first gain is greater than zero and less than one. Wherein, referring to Figure 2 As shown, if the amplitude of the signal after processing with a certain gain is smaller than the amplitude of the signal before processing, the gain is a negative gain; conversely, if the amplitude of the signal after processing with the gain is larger than the amplitude of the signal before processing, the gain is a positive gain.
[0052] Step S30: If the detection result indicates that there is no human voice in the original signal, the original signal is processed with a second gain to obtain a target signal, wherein the second gain is greater than the first gain.
[0053] Considering that when there is no human voice in the signal, processing the signal with a positive gain will basically not affect the human voice in the signal, while at the same time improving the volume of the sound (for example, when the signal is a low-frequency signal, the low-frequency response of the signal can be improved). Based on this, in a preferred implementation, the second gain is a positive gain, that is, the second gain is greater than one.
[0054] In this embodiment, the original signal to be processed is obtained, and the human voice detection is performed on the original signal to obtain the detection result; if the detection result indicates that there is a human voice in the original signal, the original signal is processed with a first gain to obtain a target signal; if the detection result indicates that there is no human voice in the original signal, the original signal is processed with a second gain to obtain a target signal, wherein the second gain is greater than the first gain. In this way, when the human voice is detected in the original signal in this embodiment, the original signal is processed with a smaller first gain, so that the noise in the signal can be attenuated to avoid the interference of the noise on the human voice, so as to improve the clarity of the human voice in the signal. When it is detected that there is no human voice in the original signal, the original signal is processed with a larger gain, which can reduce the attenuation of the signal and thus improve the volume of the sound. In other words, this embodiment does not always apply a larger gain at low frequencies, but takes whether there is a human voice in the signal as the basis for applying the gain size. When there is a human voice, a smaller gain is applied to attenuate the noise and improve the clarity of the human voice. And when there is no human voice, a larger gain is applied to improve the volume of the sound.
[0055] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. On this basis, the step of performing human voice detection on the original signal to obtain the detection result includes:
[0056] Step A10, obtaining the amplitude of the mid-high frequency signal in the original signal, wherein the mid-high frequency signal is a signal whose signal frequency belongs to a preset mid-high frequency range, and the preset mid-high frequency range is a sound frequency range representing human voice;
[0057] Relevant personnel may set the preset mid-high frequency range in advance. For example, in a specific implementation, the preset mid-high frequency range may be 200 Hz to 1200 Hz.
[0058] The passband frequency range can be set to a filter with a preset mid-high frequency range, so that the original signal is input into the filter, and a mid-high frequency signal is output, and then the amplitude is calculated based on the obtained mid-high frequency signal.
[0059] It should be noted that if there is no mid-high frequency signal in the original signal, it can be determined that there is a human voice in the original signal, or it can be determined that the amplitude of the mid-high frequency signal is zero.
[0060] It should be noted that the amplitude may specifically be a signal amplitude or a signal energy, which is not specifically limited here.
[0061] Step A20, if the amplitude is greater than or equal to a preset threshold, determining that there is a human voice in the original signal is a detection result;
[0062] The preset threshold value may be a value set in advance by relevant personnel based on experience or experimental measurement, and no specific limitation is made here.
[0063] Step A30: If the amplitude is less than a preset threshold, it is determined that there is no human voice in the original signal as a detection result.
[0064] In this embodiment, the amplitude of the original mid-high frequency signal is detected, and the amplitude detection result is used to determine whether there is a human voice in the original signal. It can be understood that the human voice detection algorithm such as VAD usually has a complex detection process and a large amount of calculation. This embodiment takes into account that the human voice has specific characteristics in the frequency domain, such as being concentrated in the mid-frequency to high-frequency range, and the human voice usually has a higher amplitude. Based on this, a preset threshold is set. When the amplitude of the mid-high frequency signal exceeds this threshold, it is considered that the human voice is detected. The implementation process of human voice detection is simple and the calculation amount is small, so that devices with lower computing power can also be implemented, thereby improving universality.
[0065] In a possible implementation, the step of obtaining the amplitude of the medium and high frequency signal in the original signal includes:
[0066] Step B10, inputting the original signal into a preset filter, and outputting a medium-high frequency signal, wherein the passband frequency range of the preset filter is the preset medium-high frequency range;
[0067] It is easy to understand that the cutoff frequency of the preset filter can be set based on the preset mid-high frequency range, so that the passband frequency range of the preset filter is the preset mid-high frequency range.
[0068] It should be noted that the preset filter may be a bandpass filter or other filters, and this embodiment does not impose any specific limitation on this.
[0069] Step B20, calculating the signal amplitude of each signal frequency point in the medium and high frequency signal, and determining the amplitude based on all the signal amplitudes, wherein the amplitude is the average value of all the signal amplitudes, or the amplitude is the maximum value of all the signal amplitudes.
[0070] The amplitude may be an average value of the signal amplitudes of all signal frequencies of the medium and high frequency signal, or may be a maximum value of the signal amplitudes of all signal frequencies of the medium and high frequency signal, and this embodiment does not impose any specific limitation on this.
[0071] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to the above description, and will not be described in detail later. On this basis, before the step of processing the original signal with the first gain to obtain the target signal, the method further includes:
[0072] Step C10, obtaining the amplitude of the medium and high frequency signal in the original signal, and determining a first gain based on the amplitude, wherein the first gain is positively correlated with the amplitude;
[0073] Step C20: Based on the determined first gain, the step of processing the original signal with the first gain to obtain a target signal is performed.
[0074] In this embodiment, the first gain is positively correlated with the amplitude of the medium and high frequency signal, that is, the larger the amplitude of the medium and high frequency signal, the larger the first gain, and the smaller the amplitude of the medium and high frequency signal, the smaller the first gain. It can be understood that when there is human voice, the larger the amplitude of the medium and high frequency signal, the louder the human voice in the signal, and the louder human voice has a certain masking effect on the noise. At this time, the original signal is processed with a larger gain, which can reduce the attenuation of the human voice and basically retain the original signal, thereby basically retaining the clarity of the human voice in the original signal, avoiding the problem of affecting the clarity of the human voice in the signal due to the introduction of excessive gain. Similarly, the smaller the amplitude of the medium and high frequency signal, the smaller the loudness of the human voice in the signal, and the masking effect of the human voice on the noise is general. At this time, the original signal is processed with a smaller gain, which can greatly attenuate the noise in the signal and avoid the interference of the noise on the human voice. And based on the amplitude of the medium and high frequency signal, the adaptive adjustment of the gain is realized, which improves the flexibility of signal processing.
[0075] In a possible implementation manner, before the step of processing the original signal with the second gain to obtain the target signal, the method further includes:
[0076] Step D10, obtaining the amplitude of the medium and high frequency signal in the original signal, and determining a second gain based on the amplitude, wherein the second gain is negatively correlated with the amplitude;
[0077] Step D20, based on the determined second gain, executing the step of processing the original signal with the second gain to obtain the target signal.
[0078] In this embodiment, the second gain is positively correlated with the amplitude of the mid-high frequency signal, that is, the larger the amplitude of the mid-high frequency signal, the smaller the second gain, and the smaller the amplitude of the mid-high frequency signal, the larger the second gain. It can be understood that when there is no speech, the mid-high frequency signal is usually noise. When the amplitude of the mid-high frequency signal is larger, the original signal is processed with a smaller second gain, which can reduce the amount of noise enhancement. And based on the amplitude of the mid-high frequency signal, the gain is adaptively adjusted, which improves the flexibility of signal processing.
[0079] In a possible implementation manner, after the step of obtaining the original signal to be processed, the method further includes:
[0080] Step E10: input the original signal into an equalizer so as to process the original signal through the equalizer.
[0081] An equalizer (EQ) is an audio processing device used to adjust the relative strength of different frequency components in an audio signal. By changing the gain or attenuation of different frequency bands, an equalizer can affect the timbre and pitch of the sound to achieve the purpose of improving sound quality, enhancing clarity, enhancing musicality or adapting to a specific sound system.
[0082] In a possible implementation manner, the step of processing the original signal with a first gain to obtain a target signal includes:
[0083] Step F10, setting the gain of the equalizer to a first gain, and performing equalization processing on the original signal through the equalizer to obtain a target signal.
[0084] It should be noted that, when it is determined that there is no human voice in the original signal, the gain of the equalizer may be set to the second gain, so as to perform equalization processing on the original signal through the equalizer.
[0085] In this embodiment, by setting the gain of the equalizer, the equalizer processes the original signal based on the set gain, so that adaptive adjustment of the equalizer gain can be achieved, instead of fixedly using the gain set by the user to process the signal, thereby improving the flexibility of signal processing.
[0086] In addition, relevant personnel can set parameters such as smoothing width, action time and / or release time in advance. Among them, smoothing width is used to smooth the output-input curve near the preset threshold, making the signal smoother and more natural; action time and release time are used to determine the working sensitivity of the equalizer, which corresponds to the time when the equalizer starts working when the amplitude exceeds the set threshold. By adjusting the action time and release time, the equalizer can work more smoothly.
[0087] In addition, refer to Figure 3As shown, the relevant personnel can set the frequency selection method according to actual needs to filter out the characteristic signals of a certain frequency band. For example, since the displacement of the speaker is the largest when it resonates, it is easy to excite noise problems. A peak filter can be used to select the energy of the resonance frequency point for monitoring; for another example, low-frequency signals excite large displacements and easily cause various noise problems. A low-pass filter can be set to monitor the low-frequency energy. The amplitude of the filtered characteristic signals is detected respectively, and the parameters of the equalizer are set according to the amplitude of the characteristic signal. Specifically, the relevant personnel can set the parameters such as the amplitude threshold, gain slope, smoothing width, action time and release time according to actual needs. Among them, the amplitude threshold represents the set threshold, which is used to classify the amplitude into the part less than the threshold and the part greater than the threshold, so as to adopt different dynamic equalization strategies for different amplitudes in the future; the gain slope is used to describe the corresponding relationship between the input signal size and the output signal size. By setting different gain slopes, the gain that changes with the input signal at different rates of change can be adjusted; the smoothing width is used to smooth the output-input curve near the threshold, making the signal smoother and more natural; the action time and release time are used to determine the working sensitivity of the equalizer. When the signal exceeds the set threshold, the corresponding equalizer starts working. By adjusting the action time and release time, the equalizer can work more smoothly. One or more equalizers process the input signal in turn according to the set parameters and output the processed signal.
[0088] In addition, the present application also provides a signal processing device, referring to Figure 4 As shown, the signal processing device includes:
[0089] The detection module 10 is used to obtain the original signal to be processed, and perform human voice detection on the original signal to obtain a detection result;
[0090] A first processing module 20, configured to process the original signal with a first gain to obtain a target signal if the detection result indicates that a human voice exists in the original signal;
[0091] The second processing module 30 is configured to process the original signal with a second gain to obtain a target signal if the detection result indicates that there is no human voice in the original signal, wherein the second gain is greater than the first gain.
[0092] In one embodiment, the detection module 10 is further used for:
[0093] Acquire the amplitude of the mid-high frequency signal in the original signal, wherein the mid-high frequency signal is a signal whose signal frequency belongs to a preset mid-high frequency range, and the preset mid-high frequency range is a sound frequency range representing human voice;
[0094] If the amplitude is greater than or equal to a preset threshold, it is determined that there is a human voice in the original signal as a detection result;
[0095] If the amplitude is less than a preset threshold, it is determined that there is no human voice in the original signal as a detection result.
[0096] In one embodiment, the detection module 10 is further used for:
[0097] Input the original signal into a preset filter, and output a medium-high frequency signal, wherein the passband frequency range of the preset filter is the preset medium-high frequency range;
[0098] The signal amplitude of each signal frequency point in the medium and high frequency signal is calculated, and the amplitude is determined based on all the signal amplitudes, wherein the amplitude is an average value of all the signal amplitudes, or the amplitude is a maximum value of all the signal amplitudes.
[0099] In one embodiment, the signal processing device further includes a determination module, wherein the determination module is configured to:
[0100] Acquire the amplitude of the medium and high frequency signal in the original signal, and determine a first gain based on the amplitude, wherein the first gain is positively correlated with the amplitude;
[0101] The first processing module processes the original signal based on the first gain to obtain a target signal.
[0102] In one embodiment, the determining module is further used to:
[0103] Acquire the amplitude of the medium and high frequency signal in the original signal, and determine a second gain based on the amplitude, wherein the second gain is negatively correlated with the amplitude;
[0104] The second processing module processes the original signal based on the second gain to obtain a target signal.
[0105] In one embodiment, the signal processing device comprises an input module, wherein the input module is used to:
[0106] The original signal is input into an equalizer so as to be processed by the equalizer.
[0107] In one embodiment, the first processing module 20 is further used for:
[0108] The gain of the equalizer is set to a first gain, and the original signal is equalized by the equalizer to obtain a target signal.
[0109] In addition, an embodiment of the present application further provides an audio device, which includes: a speaker and a processor, and the processor is used to execute the steps of the signal processing method as described above.
[0110] In addition, reference Figure 5 , which shows a schematic diagram of the structure of an audio device suitable for implementing the embodiment of the present application. The audio device in the embodiment of the present application may also include, but is not limited to, mobile terminals such as headphones, smart speakers, Bluetooth speakers, portable media players, car audio systems, home theater systems, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The audio device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0111] like Figure 5 As shown, the audio device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the audio device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the audio device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an audio device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0112] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0113] The audio device provided in the embodiment of the present application adopts the signal processing method in the above embodiment to solve the technical problem of how to improve the clarity of the human voice in the signal. Compared with the prior art, the beneficial effects of the audio device provided in the present application are the same as the beneficial effects of the signal processing method provided in the above embodiment, and other technical features in the audio device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0114] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0116] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also provides a readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the signal processing method in the above-mentioned embodiment.
[0117] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0118] The computer-readable storage medium may be included in the audio device; or may exist independently without being installed in the audio device.
[0119] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the audio device, the audio device: obtains the original signal to be processed, performs human voice detection on the original signal to obtain a detection result; if the detection result indicates that there is human voice in the original signal, processes the original signal with a first gain to obtain a target signal; if the detection result indicates that there is no human voice in the original signal, processes the original signal with a second gain to obtain a target signal, wherein the second gain is greater than the first gain.
[0120] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0123] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned signal processing method, and can solve the technical problem of how to improve the clarity of human voice in the signal. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the signal processing method provided in the above-mentioned embodiment, and will not be repeated here.
[0124] In addition, an embodiment of the present application further proposes a computer program product, including a signal processing program, which implements the steps of the signal processing method described above when executed by a processor.
[0125] The specific implementation of the computer program product of the present application is basically the same as the above-mentioned signal processing method embodiments, and will not be repeated here.
[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0127] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software sensor, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0129] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A signal processing method, characterized in that: The signal processing method comprises the following steps: Acquire an original signal to be processed, and perform voice detection on the original signal to obtain a detection result; If the detection result indicates that human voice exists in the original signal, the original signal is processed with a first gain to obtain a target signal; If the detection result indicates that there is no human voice in the original signal, the original signal is processed with a second gain to obtain a target signal, wherein the second gain is greater than the first gain.
2. The signal processing method according to claim 1, characterized in that: The step of performing human voice detection on the original signal to obtain a detection result comprises: Acquire the amplitude of the mid-high frequency signal in the original signal, wherein the mid-high frequency signal is a signal whose signal frequency belongs to a preset mid-high frequency range, and the preset mid-high frequency range is a sound frequency range representing human voice; If the amplitude is greater than or equal to a preset threshold, it is determined that there is a human voice in the original signal as a detection result; If the amplitude is less than a preset threshold, it is determined that there is no human voice in the original signal as a detection result.
3. The signal processing method according to claim 2, characterized in that: The step of obtaining the amplitude of the medium and high frequency signal in the original signal comprises: Input the original signal into a preset filter, and output a medium-high frequency signal, wherein the passband frequency range of the preset filter is the preset medium-high frequency range; The signal amplitude of each signal frequency point in the medium and high frequency signal is calculated, and the amplitude is determined based on all the signal amplitudes, wherein the amplitude is an average value of all the signal amplitudes, or the amplitude is a maximum value of all the signal amplitudes.
4. The signal processing method according to claim 1, characterized in that: Before the step of processing the original signal with the first gain to obtain the target signal, the method further includes: Acquire the amplitude of the medium and high frequency signal in the original signal, and determine a first gain based on the amplitude, wherein the first gain is positively correlated with the amplitude; The step of processing the original signal with the first gain to obtain the target signal is performed based on the determined first gain.
5. The signal processing method according to claim 1, characterized in that: Before the step of processing the original signal with the second gain to obtain the target signal, the method further includes: Acquire the amplitude of the medium and high frequency signal in the original signal, and determine a second gain based on the amplitude, wherein the second gain is negatively correlated with the amplitude; The step of processing the original signal with the second gain to obtain the target signal is performed based on the determined second gain.
6. The signal processing method according to any one of claims 1 to 5, characterized in that: After the step of obtaining the original signal to be processed, the method further includes: The original signal is input into an equalizer so as to be processed by the equalizer.
7. The signal processing method according to claim 6, characterized in that: The step of processing the original signal with a first gain to obtain a target signal comprises: The gain of the equalizer is set to a first gain, and the original signal is equalized by the equalizer to obtain a target signal.
8. An audio device, characterized in that: The audio device comprises: a speaker and a processor, wherein the speaker is connected to the processor, and the processor is used to execute the steps of the signal processing method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the signal processing method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the signal processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Audio signal processing method, electronic device, storage medium and program product
CN120412557A