WO2019237666A1 - Audio processing method and device, storage medium and electronic device - Google Patents

Audio processing method and device, storage medium and electronic device Download PDF

Info

Publication number
WO2019237666A1
WO2019237666A1 PCT/CN2018/117898 CN2018117898W WO2019237666A1 WO 2019237666 A1 WO2019237666 A1 WO 2019237666A1 CN 2018117898 W CN2018117898 W CN 2018117898W WO 2019237666 A1 WO2019237666 A1 WO 2019237666A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
subband
audio signal
audio
predetermined
Prior art date
Application number
PCT/CN2018/117898
Other languages
French (fr)
Chinese (zh)
Inventor
彭学杰
刘佳泽
王宇飞
Original Assignee
广州酷狗计算机科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州酷狗计算机科技有限公司 filed Critical 广州酷狗计算机科技有限公司
Publication of WO2019237666A1 publication Critical patent/WO2019237666A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular, to an audio processing method, device, storage medium, and electronic device.
  • the volume of the player when playing music is adjustable, so the user can turn down the volume and protect the user's hearing system by reducing the volume.
  • the embodiments of the present application provide an audio processing method, device, storage medium, and electronic device, which are used to solve the problem that excessively high treble will cause great damage to a user's hearing system.
  • the technical solution is as follows:
  • an audio processing method includes:
  • the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system
  • an audio processing device includes:
  • An acquisition module configured to acquire a first audio signal to be processed
  • a processing module configured to remove some or all of the audio signals above a predetermined frequency from the first audio signal obtained by the obtaining module to obtain a second audio signal, where the predetermined frequency causes fatigue of a user's hearing system and Frequency of injury
  • An output module is configured to output the second audio signal obtained by the processing module.
  • an electronic device includes:
  • One or more processors are One or more processors; and,
  • the memory stores one or more programs configured to be executed by the one or more processors, the one or more programs containing instructions for performing the following operations:
  • the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system
  • a computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, or the code set. Or the instruction set is loaded and executed by the processor to implement the audio processing method according to the first aspect.
  • the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system
  • the user's hearing included in the second audio signal can be reduced.
  • the system generates fatigue and hurt treble, and even the second audio signal does not include the treble that causes fatigue and damage to the user's hearing system, which can alleviate or even avoid the damage caused by the treble to the user's hearing system, thereby protecting the hearing system. effect.
  • FIG. 1 is a method flowchart of an audio processing method according to an embodiment of the present application
  • FIG. 2 is a method flowchart of an audio processing method according to another embodiment of the present application.
  • FIG. 3 is a structural block diagram of an audio processing apparatus according to an embodiment of the present application.
  • FIG. 4 is a structural block diagram of a terminal provided by an embodiment of the present application.
  • the audio mentioned here may be a separate audio file, such as a song, voice message, voice courseware, etc., or an audio file in a video file, such as a movie or The dubbing, soundtrack, etc. in the TV series are not limited in this embodiment.
  • the player is located in an electronic device, and the electronic device may be a terminal, or a playback device such as a stereo or a television.
  • the electronic device may be a terminal, or a playback device such as a stereo or a television. The two cases are described below.
  • the audio may be pre-stored in the terminal.
  • the audio may be recorded by a terminal, for example, a song recorded by the terminal, a voice memo, and the like.
  • the audio may be stored by the terminal after being sent to the terminal by the server or other devices, for example, songs downloaded by the terminal, voice messages received by the terminal, voice courseware downloaded by the terminal, and so on.
  • the audio may also be obtained by the terminal in real time from the server, for example, a song that the terminal listens to online, etc.
  • the source of the audio is not limited in this embodiment.
  • the audio may be sent to the playback device by a terminal connected to the playback device.
  • the playback device is a stereo
  • the stereo first establishes a wired or wireless network connection with the terminal, and then the terminal sends audio to the stereo through the network for playback.
  • the source of audio in the terminal reference may be made to the description in the previous paragraph, and details are not described herein.
  • FIG. 1 illustrates a method flowchart of an audio processing method according to an embodiment of the present application.
  • the audio processing method may be applied to a player in an electronic device.
  • the audio processing method includes:
  • Step 101 Obtain a first audio signal to be processed.
  • step 102 some or all of the audio signals above a predetermined frequency in the first audio signal are removed to obtain a second audio signal.
  • the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system.
  • Step 103 Output the second audio signal.
  • the audio processing method provided in the embodiment of the present application, because the predetermined frequency is a frequency that causes fatigue and injury to the user's auditory system, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding the treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
  • FIG. 2 illustrates a method flowchart of an audio processing method according to another embodiment of the present application.
  • the audio processing method may be applied to a player in an electronic device.
  • the audio processing method includes:
  • Step 201 Obtain a third audio signal and a window function.
  • the third audio signal is an audio signal to be played by the player.
  • the third audio signal may be a separate audio file, such as a song, a voice, etc., or an audio file in a video file, such as a voice or soundtrack in a movie or a TV series. This embodiment does not determine the type of the third audio signal. Make restrictions.
  • the window function is a function for truncating an audio signal. Since the audio signal usually needs to be sampled and then the obtained sampled value is processed, the window function can also be understood as a function for truncating the sampled value of the audio signal.
  • the window function in this embodiment may be a window function of any kind of window, such as a window function of a rectangular window, a window function of a triangular window, a window function of a Hanning window, a window function of a Hamming window, a window function of a Gaussian window, etc.
  • the window function is not limited in this embodiment. In a possible implementation manner, the window function in this embodiment is a Hamming window.
  • the window length of the window function needs to be set.
  • the window length is used to indicate the number of data of data processed by the window function at a time.
  • the unit of the window length is the number of samples.
  • the window length is used to indicate the number of sampled values processed by the window function each time.
  • the channel is output, the unit of the window length is the number of sampling pairs.
  • the window length is used to represent the logarithm of the sampled value processed by the window function each time.
  • a sample value output through the left channel and a sample value output through the right channel at the same time are referred to as a sample pair.
  • the value of the window length can be selected based on the playback effect required by the user.
  • the value of the window length can be set to 1024 according to the empirical value, and of course, it can also be set to other values, and details are not described herein.
  • Step 202 Sampling the third audio signal to obtain a sample value.
  • the player may buffer the received third audio signal, and then sample the buffered third audio signal according to a set sampling frequency to obtain each sample value.
  • the sampling frequency may be 22.05 kHz, 44.1 kHz, 48 kHz, and the like, which is not limited in this embodiment.
  • Step 203 When the sampled value constitutes an audio frame, perform a windowing process on the audio frame according to a window function to obtain a first audio signal.
  • the number of sampled values included in the audio frame is equal to the window length of the window function.
  • the player can cache each or each pair of sampled values.
  • the number of buffered sampled values is greater than or equal to the window length of the window function, each time the number of sampled values corresponding to the window length is taken out and these sampled values are retrieved.
  • the number of sampling values referred to here is the number of sampling values; when the two-channel output is used, the number of sampling values referred to here is the number of sampling pairs.
  • the window length value Take the window length value as 1024 for example.
  • the number of buffered sample values is greater than or equal to 1024, first take out the 1-1024th (or pair) sample value as an audio frame, and then take out the 1025-2048 (or pair) ) The sampled value is taken as an audio frame, and so on, and it stops until all audio frames are taken from the audio signal.
  • Step 204 Divide the first audio signal into n subband signals.
  • n is a positive integer of 2 or more.
  • the value of n can be selected by comprehensively considering the processing effect and the performance of the player.
  • n can be set to 8 according to the empirical value, and of course, it can also be set to other values, and details are not described herein.
  • the player may divide the first audio signal into n subband signals (SUBBAND) through a polyphase filter.
  • the polyphase filter may be a cascaded QMF (Quadrature mirror filter) or another polyphase filter, which is not limited herein. The following describes the process by which QMF divides subband signals.
  • QMF can equally divide the input first audio signal into two high and low sub-band signals, and then input these two sub-band signals as input signals to QMF to obtain four sub-band signals, and then input these four sub-band signals as input signals. QMF, get eight subband signals.
  • the player may process these subband signals by using at least one of the processing methods in steps 205-207.
  • Step 205 When there is a subband signal with an initial frequency greater than or equal to a predetermined frequency, the subband signal is removed, and the predetermined frequency is a frequency that causes the user's auditory system to be fatigued and injured.
  • Audio signals greater than or equal to a predetermined frequency will cause the fatigue of the auditory system, and continue to develop, and even cause damage to the auditory system. Accumulated physical damage will cause irreversible permanent hearing impairment. In addition, users do not feel any discomfort when listening to audio signals greater than or equal to a predetermined frequency. It can be seen that audio signals greater than or equal to a predetermined frequency may unknowingly harm the user's hearing system. Audio signals equal to a predetermined frequency are removed to protect the hearing system.
  • a predetermined frequency may be set to 17.5 kHz or more. Taking the predetermined frequency as 18 kHz as an example, the audio signal above 18 kHz in the first audio signal can be removed, so that it will not affect the sound quality, and it can also remove treble, thereby protecting the hearing system.
  • the subband signal in this embodiment includes a start frequency and a cutoff frequency.
  • the following describes the implementation manner of excluding audio signals above a predetermined frequency according to the magnitude relationship between the start frequency, the cutoff frequency, and the predetermined frequency.
  • n subband signals include a subband signal with a cutoff frequency less than a predetermined frequency, and a subband signal with an initial frequency equal to the predetermined frequency
  • the subband signal with an initial frequency equal to the predetermined frequency is eliminated, and the subband with a cutoff frequency less than the predetermined frequency With signal.
  • n subband signals include a subband signal with a cutoff frequency less than a predetermined frequency, a subband signal with an initial frequency equal to the predetermined frequency, and a subband signal with an initial frequency greater than the predetermined frequency, the subbands with the initial frequency equal to the predetermined frequency are excluded.
  • the signal and the subband signal whose initial frequency is greater than the predetermined frequency, and the subband signal whose cutoff frequency is smaller than the predetermined frequency are retained.
  • the cutoff frequencies of the remaining subband signals are all smaller than a predetermined frequency, so it can be considered that all audio signals above the predetermined frequency are excluded.
  • n subband signals include a subband signal with a cutoff frequency less than a predetermined frequency, a subband signal with an initial frequency less than a predetermined frequency and a cutoff frequency greater than a predetermined frequency, and a subband signal with an initial frequency greater than the predetermined frequency, excluding the initial frequency greater than
  • a subband signal with a cutoff frequency smaller than the predetermined frequency, a subband signal with an initial frequency smaller than the predetermined frequency, and a cutoff frequency larger than the predetermined frequency are retained.
  • the remaining subband signals include subband signals whose initial frequency is less than the predetermined frequency and whose cutoff frequency is greater than the predetermined frequency.
  • the audio signals between the predetermined frequency and the cutoff frequency in the subband signal are not removed, so, It can be considered that part of the audio audio signal above a predetermined frequency is eliminated.
  • Step 206 When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal is attenuated.
  • the subband signal When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal may be removed to protect the hearing system. If the subband signal is removed, for some users with more sensitive hearing systems, the final audio signal will lack the audio signal from the starting frequency to a predetermined frequency, thereby affecting the sound quality.
  • the subband signal may be retained and the subband signal is not subjected to attenuation processing to ensure sound quality.
  • the subband signal may be retained, and the subband signal may be attenuated to balance the protection of the hearing system and the sound quality, that is, the subband signal may be attenuated to reduce The signal strength of the subband signal, that is, the volume of the subband signal is reduced, so that both the hearing system and the sound quality can be guaranteed.
  • a predetermined attenuation ratio may be set in advance. At this time, attenuating the subband signal may be achieved by attenuating the signal strength of the subband signal according to the predetermined attenuation ratio, and the predetermined attenuation ratio is greater than or equal to 0 and less than Is equal to 1. Wherein, when the predetermined attenuation ratio is 0, it is equivalent to excluding the subband signal; when the predetermined attenuation ratio is 1, it is equivalent to not performing attenuation processing on the subband signal.
  • the seventh sub-band signal can be Band signals are attenuated.
  • Step 207 When there is a subband signal with a cutoff frequency less than a predetermined frequency, the subband signal is compressed and limited.
  • the signal strength of the subband signal after the compression and limited processing is less than or equal to a predetermined threshold.
  • the predetermined threshold is It is determined according to a dynamic range threshold, which is a dynamic range that causes the auditory system to fatigue and harm.
  • the dynamic range refers to the difference between the maximum value and the minimum value of the audio signal. Listening to audio signals greater than or equal to the dynamic range threshold for a long time will cause the fatigue of the auditory system, continue to develop, and even cause damage to the auditory system, and the cumulative physical damage will cause irreversible permanent hearing impairment. In addition, when listening to an audio signal greater than or equal to the dynamic range threshold, the user does not feel any discomfort. It can be seen that the audio signal greater than or equal to the dynamic range threshold may unknowingly harm the user's hearing system. Reduce the dynamic range of the audio signal to protect the hearing system.
  • a compression limiter may be configured for each sub-band signal whose cut-off frequency is less than a predetermined frequency, and then a predetermined threshold value is determined according to the dynamic range threshold, and the sub-band signal is compressed and limited by the compression limiter. , So that the signal strength of the subband signal after the compression and clipping processing is less than a predetermined threshold value, so as to reduce the dynamic range of the subband signal, so that the synthesized second audio signal is smoother.
  • the player needs to determine whether it is necessary to compress and limit the subband signal.
  • the subband signal is subjected to compression limiting processing; when the signal strength of the subband signal is less than the corresponding compression limiter
  • compression limiting processing refers to performing compression processing and gain processing on a subband signal when the signal strength of the subband signal is greater than or equal to a predetermined threshold.
  • Compression processing refers to compressing the subband signal according to a predetermined compression ratio in the compression limiter, and the compression ratio is used to indicate the speed of the compression of the subband signal, and the dynamic range of the subband signal after compression processing is less than the dynamic Range threshold;
  • Gain processing refers to the absolute processing of the subband signal according to the predetermined gain in the compression limiter, and the predetermined gain is greater than or equal to 0 and less than or equal to the predetermined threshold value. That is, the subband signal is amplified.
  • the predetermined gain here is used to indicate the amplification factor of the signal strength of the subband signal.
  • the threshold value, the compression ratio, and the gain value may be preset empirical values, which are not limited in this embodiment.
  • the compression process is used to reduce the dynamic range of the sub-band signal. At this time, the volume of the audio signal will also be reduced accordingly.
  • the player does not perform gain processing on the compressed subband signal to protect the hearing system.
  • the volume of the subband signal after compression processing is low, resulting in poor sound quality
  • a balance can also be made between protecting the hearing system and ensuring sound quality, that is, the Take the signal for gain processing, that is, increase the volume of the audio signal to ensure the sound quality.
  • the predetermined gain when the predetermined gain is 0, it is equivalent to not performing gain processing on the compressed subband signal; when the predetermined gain is an absolute value of the predetermined threshold value, it is equivalent to performing gain on the compressed subband signal.
  • the signal strength of the sub-band signal after processing is less than or equal to a predetermined threshold.
  • a compression limiter is configured for the first subband signal (SUBBAND [1]) to the sixth subband signal (SUBBAND [6]), and its configuration parameters As shown in Table II below.
  • LIM4 -6 1 5 1.0 20 180 LIM5 -6 1:10 0 20 180 LIM6 -6 1:10 0 30 200
  • LIM1 corresponds to SUBBAND [1]
  • LIM2 corresponds to SUBBAND [2]
  • LIM2 corresponds to SUBBAND [2]
  • This embodiment uses LIM1 to illustrate the processing process of SUBBAND [1], then first determine whether the signal strength of SUBBAND [1] is greater than or equal to -3dB; when the signal strength is greater than or equal to -3dB, according to 1: infinity Compress SUBBAND [1] with a predetermined compression ratio, where 1: infinity means compressing SUBBAND [1] according to the fastest compression speed; and then perform 1.5 gain processing on SUBBAND [1] obtained after compression processing to obtain LIM1 (SUBBAND [1]); When the signal strength is less than -3dB, SUBBAND [1] is not processed.
  • the compression and clipping processing of other subband signals is similar to the compression and clipping processing of SUBBAND [1], and will not be described again.
  • Attack time can also be referred to as input time, which refers to the time when the subband signal is input to the corresponding compression limiter; Release time can also be referred to as output time, which means that the subband signal is output to the corresponding compression limiter. time.
  • the Attack time and Release time are the experimental data of one experiment. Different electronic devices can have different Attack time and Release time.
  • Step 208 Synthesize the remaining subband signals to obtain a second audio signal.
  • the player may synthesize the subband signals obtained in steps 205-207 to obtain a second audio signal.
  • Step 209 Perform inverse window processing on the second audio signal according to the window function to obtain a fourth audio signal.
  • Inverse window processing refers to multiplying a second audio signal by a second function in the window function for performing inverse window processing.
  • Step 210 Output the fourth audio signal.
  • the audio processing method because the predetermined frequency is a frequency that causes fatigue and injury to the user's auditory system, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed. Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding the treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
  • the subband signal When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal can be removed to protect the auditory system; the subband signal can also be retained without performing the subband signal Attenuation processing to ensure sound quality; the subband signal can also be retained, and the subband signal can be attenuated to balance the protection of the hearing system and the sound quality, that is, the subband signal can be attenuated to reduce the Decreasing the signal strength of the sub-band signal, that is, reducing the volume of the sub-band signal, can not only protect the hearing system, but also ensure the sound quality.
  • a compression limiter is configured for each subband signal, and a predetermined threshold value is determined according to the dynamic range threshold.
  • the subband signal is compressed and limited by the compression limiter. Processing so that the signal strength of the subband signal after compression and clipping processing is less than a predetermined threshold value to reduce the dynamic range of the subband signal, which can either protect the auditory system by reducing the dynamic range of the subband signal, or make the The second audio signal is smoother.
  • FIG. 3 shows a structural block diagram of an audio processing apparatus according to an embodiment of the present application.
  • the audio processing apparatus may be applied to a player in an electronic device.
  • the audio processing device includes:
  • An acquisition module 301 configured to acquire a first audio signal to be processed
  • the audio processing device because the predetermined frequency is a frequency that causes the user's hearing system to be fatigued and injured, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed. Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
  • FIG. 3 shows a structural block diagram of an audio processing apparatus according to another embodiment of the present application.
  • the audio processing apparatus may be applied to a player in an electronic device.
  • the audio processing device includes:
  • An acquisition module 301 configured to acquire a first audio signal to be processed
  • a processing module 302 is configured to remove part or all of the audio signals above a predetermined frequency from the first audio signal obtained by the obtaining module 301 to obtain a second audio signal.
  • the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system.
  • the output module 303 is configured to output the second audio signal obtained by the processing module 302.
  • the predetermined frequency is 17.5 kHz or more.
  • processing module 302 is further configured to:
  • n is a positive integer greater than or equal to 2;
  • the subband signal When there is a subband signal with a starting frequency greater than or equal to a predetermined frequency, the subband signal is removed;
  • the remaining subband signals are synthesized to obtain a second audio signal.
  • processing module 302 is further configured to:
  • the subband signal is attenuated when there is a subband signal having a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency.
  • processing module 302 is further configured to:
  • the signal strength of the subband signal is attenuated according to a predetermined attenuation ratio, and the predetermined attenuation ratio is greater than or equal to 0 and less than or equal to 1.
  • the subband signal Before synthesizing the remaining subband signals to obtain a second audio signal, when there is a subband signal with a cutoff frequency less than a predetermined frequency, the subband signal is compressed and limited, and the signal of the subband signal after the compression limited processing is performed.
  • the intensity is less than or equal to a predetermined threshold value.
  • the predetermined threshold value is determined according to a dynamic range threshold.
  • the dynamic range threshold is a dynamic range that causes the hearing system to be fatigued and injured.
  • processing module 302 is further configured to:
  • the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after compression processing is less than the dynamic range threshold;
  • Gain processing is performed on the compressed subband signal according to a predetermined gain.
  • the predetermined gain is used to indicate a magnification of the signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to an absolute value of a predetermined threshold.
  • the obtaining module 301 is further configured to: obtain a third audio signal and a window function; sample the third audio signal to obtain a sample value; and when the sampled value constitutes an audio frame, perform an operation on the audio frame according to the window function.
  • the windowing process is performed to obtain a first audio signal, and the number of sampling values included in the audio frame is equal to the value of the window length of the window function;
  • the output module 303 is further configured to perform inverse window processing on the second audio signal according to a window function to obtain a fourth audio signal; and output the fourth audio signal.
  • the audio processing device because the predetermined frequency is a frequency that causes the user's hearing system to be fatigued and injured, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed. Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding the treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
  • the subband signal When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal can be removed to protect the auditory system; the subband signal can also be retained without performing the subband signal Attenuation processing to ensure sound quality; the subband signal can also be retained, and the subband signal can be attenuated to balance the protection of the hearing system and the sound quality, that is, the subband signal can be attenuated to reduce the Decreasing the signal strength of the sub-band signal, that is, reducing the volume of the sub-band signal, can not only protect the hearing system, but also ensure the sound quality.
  • a compression limiter is configured for each subband signal, and a predetermined threshold value is determined according to the dynamic range threshold.
  • the subband signal is compressed and limited by the compression limiter. Processing so that the signal strength of the subband signal after compression and clipping processing is less than a predetermined threshold value to reduce the dynamic range of the subband signal, which can either protect the auditory system by reducing the dynamic range of the subband signal, or make the The second audio signal is smoother.
  • FIG. 4 shows a structural block diagram of a terminal 400 provided by an exemplary embodiment of the present application.
  • the terminal 400 may be a portable mobile terminal, such as: smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Audio Layer IV, dynamic Photographic expert compression standard audio layer 4) Player, laptop or desktop computer.
  • the terminal 400 may also be called other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
  • a player is installed in the terminal 400.
  • the terminal 400 includes a processor 401 and a memory 402.
  • the processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 401 may use at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). achieve.
  • the processor 401 may also include a main processor and a co-processor.
  • the main processor is a processor for processing data in the wake-up state, also called a CPU (Central Processing Unit).
  • the co-processor is Low-power processor for processing data in standby.
  • the processor 401 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing content required to be displayed on the display screen.
  • the processor 401 may further include an AI (Artificial Intelligence) processor, and the AI processor is configured to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • the memory 402 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 402 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash storage devices.
  • non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction that is executed by the processor 401 to implement the audio processing provided by the method embodiment in this application method.
  • the terminal 400 may optionally include a peripheral device interface 403 and at least one peripheral device.
  • the processor 401, the memory 402, and the peripheral device interface 403 may be connected through a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 403 through a bus, a signal line, or a circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 404, a touch display screen 405, a camera 406, an audio circuit 407, a positioning component 408, and a power source 409.
  • the peripheral device interface 403 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 401 and the memory 402.
  • the processor 401, the memory 402, and the peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 401, the memory 402, and the peripheral device interface 403 or Both can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
  • the radio frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 404 communicates with a communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • the radio frequency circuit 404 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocols include, but are not limited to: metropolitan area networks, mobile communication networks of various generations (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks.
  • the radio frequency circuit 404 may further include circuits related to Near Field Communication (NFC), which is not limited in this application.
  • NFC Near Field Communication
  • the display screen 405 is used to display a UI (User Interface).
  • the UI may include graphics, text, icons, videos, and any combination thereof.
  • the display screen 405 also has the ability to collect touch signals on or above the surface of the display screen 405.
  • the touch signal can be input as a control signal to the processor 401 for processing.
  • the display screen 405 may also be used to provide a virtual button and / or a virtual keyboard, which is also called a soft button and / or a soft keyboard.
  • the display screen 405 may be one, and the front panel of the terminal 400 is provided; in other embodiments, the display screen 405 may be at least two, which are respectively disposed on different surfaces of the terminal 400 or have a folded design; In still other embodiments, the display screen 405 may be a flexible display screen disposed on a curved surface or a folded surface of the terminal 400. Moreover, the display screen 405 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
  • the display screen 405 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
  • the camera component 406 is used for capturing images or videos.
  • the camera component 406 includes a front camera and a rear camera.
  • the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal.
  • the camera assembly 406 may further include a flash.
  • the flash can be a monochrome temperature flash or a dual color temperature flash.
  • a dual color temperature flash is a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
  • the audio circuit 407 may include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 401 for processing, or input them to the radio frequency circuit 404 to implement voice communication.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves.
  • the speaker can be a traditional film speaker or a piezoelectric ceramic speaker.
  • the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for ranging purposes.
  • the audio circuit 407 may further include a headphone jack.
  • the positioning component 408 is used to locate the current geographic position of the terminal 400 to implement navigation or LBS (Location Based Service).
  • the positioning component 408 may be a positioning component based on the United States' GPS (Global Positioning System), the Beidou system in China, the Granas system in Russia, or the Galileo system in the European Union.
  • the power supply 409 is used to power various components in the terminal 400.
  • the power source 409 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery may support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • the terminal 400 further includes one or more sensors 410.
  • the one or more sensors 410 include, but are not limited to, an acceleration sensor 411, a gyroscope sensor 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, and a proximity sensor 416.
  • the acceleration sensor 411 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established by the terminal 400.
  • the acceleration sensor 411 may be used to detect components of the acceleration of gravity on three coordinate axes.
  • the processor 401 may control the touch display screen 405 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 411.
  • the acceleration sensor 411 may also be used for collecting motion data of a game or a user.
  • the gyro sensor 412 can detect the body direction and rotation angle of the terminal 400, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect a 3D motion of the user on the terminal 400.
  • the processor 401 can implement the following functions according to the data collected by the gyro sensor 412: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
  • the pressure sensor 413 may be disposed on a side frame of the terminal 400 and / or a lower layer of the touch display screen 405.
  • a user's holding signal to the terminal 400 can be detected, and the processor 401 can perform left-right hand recognition or quick operation according to the holding signal collected by the pressure sensor 413.
  • the processor 401 operates according to the user's pressure operation on the touch display screen 405 to control the operable controls on the UI interface.
  • the operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 414 is used to collect a user's fingerprint, and the processor 401 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as trusted, the processor 401 authorizes the user to perform related sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
  • the fingerprint sensor 414 may be provided on the front, back, or side of the terminal 400. When a physical button or a manufacturer's logo is set on the terminal 400, the fingerprint sensor 414 can be integrated with the physical button or the manufacturer's logo.
  • the optical sensor 415 is used to collect ambient light intensity.
  • the processor 401 may control the display brightness of the touch display screen 405 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is decreased.
  • the processor 401 may also dynamically adjust the shooting parameters of the camera component 406 according to the ambient light intensity collected by the optical sensor 415.
  • FIG. 4 does not constitute a limitation on the terminal 400, and may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.
  • An embodiment of the present application provides a computer-readable storage medium.
  • the storage medium stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, or the instruction set.
  • a code set or instruction set is loaded and executed by the processor to implement the audio processing method as described above.
  • An embodiment of the present application provides an electronic device.
  • the electronic device includes:
  • One or more processors are One or more processors; and,
  • the memory stores one or more programs configured to be executed by the one or more processors, the one or more programs containing instructions for performing the following operations:
  • the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system
  • the predetermined frequency is 17.5 kHz or more.
  • the one or more programs further include instructions for performing the following operations:
  • n is a positive integer greater than or equal to 2;
  • the remaining subband signals are synthesized to obtain the second audio signal.
  • the one or more programs further include instructions for performing the following operations:
  • the one or more programs further include instructions for performing the following operations:
  • the one or more programs further include instructions for performing the following operations:
  • the compression limit After the amplitude processing, the signal strength of the sub-band signal is less than or equal to a predetermined threshold value, which is determined according to a dynamic range threshold value, which is a dynamic range that causes the hearing system to generate fatigue and injury. .
  • the one or more programs further include instructions for performing the following operations:
  • Compressing the subband signal according to a predetermined compression ratio where the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after the compression processing is smaller than the dynamic range Range threshold
  • the predetermined gain is used to indicate a magnification of a signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to the The absolute value of the predetermined threshold.
  • the one or more programs further include instructions for performing the following operations:
  • the audio processing device provided in the foregoing embodiment performs audio processing
  • only the above-mentioned division of functional modules is used as an example.
  • the foregoing functions may be allocated by different functional modules as required. That is, the internal structure of the audio processing device is divided into different functional modules to complete all or part of the functions described above.
  • the audio processing apparatus and the audio processing method embodiments provided by the foregoing embodiments belong to the same concept. For specific implementation processes, refer to the method embodiments, and details are not described herein again.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The embodiments of the present application relate to the technical field of computers, and disclosed thereby are an audio processing method and device, a storage medium and an electronic device. The method comprises: acquiring first audio signals to be processed; removing part or all of audio signals having frequencies above a predetermined frequency from among the first audio signal so as to obtain second audio signals, the predetermined frequency being a frequency that causes fatigue and damage to the auditory system of a user; and outputting the second audio signals. According to the embodiments of the present application, by removing part or all of audio signals having frequencies above a predetermined frequency from first audio signals, high-pitched sound which causes fatigue and damage to the auditory system of a user that is comprised in second audio signals may be reduced, or the second audio signals may comprise no high-pitched sound which causes fatigue and damage to the auditory system of the user, thereby being able to dull or even avoid damage to the auditory system of the user which is caused by high-pitched sound, and achieve the effect of protecting the auditory system.

Description

音频处理方法、装置、存储介质及电子设备Audio processing method, device, storage medium and electronic equipment
本申请要求于2018年06月13日提交的申请号为201810609905.7、发明名称为“音频处理方法、装置、存储介质及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority from a Chinese patent application filed on June 13, 2018 with an application number of 201810609905.7 and an invention name of "Audio Processing Method, Device, Storage Medium, and Terminal", the entire contents of which are incorporated herein by reference. .
技术领域Technical field
本申请实施例涉及计算机技术领域,特别涉及一种音频处理方法、装置、存储介质及电子设备。The embodiments of the present application relate to the field of computer technology, and in particular, to an audio processing method, device, storage medium, and electronic device.
背景技术Background technique
听音乐已经成为人们日常生活中最普遍的休闲娱乐项目。由于长时间听音乐会导致用户的听觉***疲劳,甚至会对听觉***造成物理伤害,所以,需要在播放音乐时保护用户的听觉***。Listening to music has become the most common leisure and entertainment project in people's daily lives. Since listening to a concert for a long time causes fatigue of the user's hearing system and even causes physical damage to the hearing system, it is necessary to protect the user's hearing system when playing music.
相关技术中,播放器播放音乐时的音量是可调节的,所以,用户可以调低音量,通过减小音量来保护用户的听觉***。In the related art, the volume of the player when playing music is adjustable, so the user can turn down the volume and protect the user's hearing system by reducing the volume.
除了音量之外,过强的高音也会对用户的听觉***造成很大的伤害。In addition to volume, excessively high treble also causes great damage to the user's hearing system.
发明内容Summary of the Invention
本申请实施例提供了一种音频处理方法、装置、存储介质及电子设备,用于解决过强的高音会对用户的听觉***造成很大的伤害的问题。所述技术方案如下:The embodiments of the present application provide an audio processing method, device, storage medium, and electronic device, which are used to solve the problem that excessively high treble will cause great damage to a user's hearing system. The technical solution is as follows:
一方面,提供了一种音频处理方法,所述方法包括:In one aspect, an audio processing method is provided. The method includes:
获取待处理的第一音频信号;Obtaining a first audio signal to be processed;
对所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;Removing some or all of the audio signals above a predetermined frequency from the first audio signal to obtain a second audio signal, where the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system;
对所述第二音频信号进行输出。And outputting the second audio signal.
一方面,提供了一种音频处理装置,所述装置包括:In one aspect, an audio processing device is provided, and the device includes:
获取模块,用于获取待处理的第一音频信号;An acquisition module, configured to acquire a first audio signal to be processed;
处理模块,用于对所述获取模块得到的所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;A processing module, configured to remove some or all of the audio signals above a predetermined frequency from the first audio signal obtained by the obtaining module to obtain a second audio signal, where the predetermined frequency causes fatigue of a user's hearing system and Frequency of injury
输出模块,用于对所述处理模块得到的所述第二音频信号进行输出。An output module is configured to output the second audio signal obtained by the processing module.
一方面,提供了一种电子设备,所述电子设备包括:In one aspect, an electronic device is provided. The electronic device includes:
一个或多个处理器;和,One or more processors; and,
存储器;Memory
所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于执行以下操作的指令:The memory stores one or more programs configured to be executed by the one or more processors, the one or more programs containing instructions for performing the following operations:
获取待处理的第一音频信号;Obtaining a first audio signal to be processed;
对所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;Removing some or all of the audio signals above a predetermined frequency from the first audio signal to obtain a second audio signal, where the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system;
对所述第二音频信号进行输出。And outputting the second audio signal.
一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如第一方面所述的音频处理方法。In one aspect, a computer-readable storage medium is provided. The storage medium stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, or the code set. Or the instruction set is loaded and executed by the processor to implement the audio processing method according to the first aspect.
本申请实施例提供的技术方案的有益效果至少包括:The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
由于预定频率是使用户的听觉***产生疲劳以及伤害的频率,所以,通过对第一音频信号中预定频率以上的部分或全部音频信号进行剔除,可以减少第二音频信号中包含的使用户的听觉***产生疲劳以及伤害的高音,甚至使第二音频信号中不包含使用户的听觉***产生疲劳以及伤害的高音,从而可以缓解甚至避免高音对用户的听觉***造成的伤害,达到了保护听觉***的效果。Since the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system, by removing some or all of the audio signals above the predetermined frequency in the first audio signal, the user's hearing included in the second audio signal can be reduced. The system generates fatigue and hurt treble, and even the second audio signal does not include the treble that causes fatigue and damage to the user's hearing system, which can alleviate or even avoid the damage caused by the treble to the user's hearing system, thereby protecting the hearing system. effect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application more clearly, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are just some embodiments of the application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1是本申请一个实施例提供的音频处理方法的方法流程图;FIG. 1 is a method flowchart of an audio processing method according to an embodiment of the present application;
图2是本申请另一实施例提供的音频处理方法的方法流程图;2 is a method flowchart of an audio processing method according to another embodiment of the present application;
图3是本申请一个实施例提供的音频处理装置的结构框图;FIG. 3 is a structural block diagram of an audio processing apparatus according to an embodiment of the present application; FIG.
图4是本申请一个实施例提供的终端的结构框图。FIG. 4 is a structural block diagram of a terminal provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
下面对本申请涉及的应用场景进行说明:The following describes the application scenarios involved in this application:
本申请应用于使用播放器播放音频的应用场景中,这里所说的音频可以是单独的音频文件,如歌曲、语音消息、语音课件等等,也可以是视频文件中的音频文件,如电影或电视剧中的配音、配乐等等,本实施例不作限定。This application is applied to an application scenario where a player is used to play audio. The audio mentioned here may be a separate audio file, such as a song, voice message, voice courseware, etc., or an audio file in a video file, such as a movie or The dubbing, soundtrack, etc. in the TV series are not limited in this embodiment.
其中,播放器位于电子设备中,该电子设备可以是终端,也可以是音响、电视机等播放设备,下面分别对这两种情况进行介绍。The player is located in an electronic device, and the electronic device may be a terminal, or a playback device such as a stereo or a television. The two cases are described below.
当电子设备是终端时,该音频可以是终端中预存的。在一种实现方式中,该音频可以是终端录制的,比如,终端录制的歌曲、语音备忘录等等。在另一种实现方式中,该音频可以是服务器或其他设备发送给终端后,终端保存的,比如,终端下载的歌曲、终端接收到的语音消息、终端下载的语音课件等等。或者,该音频也可以是终端从服务器中实时获取的,比如,终端在线试听的歌曲等等,本实施例不限定音频的来源。When the electronic device is a terminal, the audio may be pre-stored in the terminal. In an implementation manner, the audio may be recorded by a terminal, for example, a song recorded by the terminal, a voice memo, and the like. In another implementation manner, the audio may be stored by the terminal after being sent to the terminal by the server or other devices, for example, songs downloaded by the terminal, voice messages received by the terminal, voice courseware downloaded by the terminal, and so on. Alternatively, the audio may also be obtained by the terminal in real time from the server, for example, a song that the terminal listens to online, etc. The source of the audio is not limited in this embodiment.
当电子设备是播放设备时,该音频可以是与该播放设备相连的终端发送给该播放设备的。比如,当播放设备是音响时,该音响先与终端建立有线或无线网络连接,终端再通过该网络将音频发送给音响进行播放。其中,终端中的音频的来源可以参考上一段中的描述,此处不作赘述。When the electronic device is a playback device, the audio may be sent to the playback device by a terminal connected to the playback device. For example, when the playback device is a stereo, the stereo first establishes a wired or wireless network connection with the terminal, and then the terminal sends audio to the stereo through the network for playback. For the source of audio in the terminal, reference may be made to the description in the previous paragraph, and details are not described herein.
请参考图1,其示出了本申请一个实施例提供的音频处理方法的方法流程图,该音频处理方法可以应用于电子设备中的播放器中。该音频处理方法,包 括:Please refer to FIG. 1, which illustrates a method flowchart of an audio processing method according to an embodiment of the present application. The audio processing method may be applied to a player in an electronic device. The audio processing method includes:
步骤101,获取待处理的第一音频信号。Step 101: Obtain a first audio signal to be processed.
步骤102,对第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,该预定频率是使用户的听觉***产生疲劳以及伤害的频率。In step 102, some or all of the audio signals above a predetermined frequency in the first audio signal are removed to obtain a second audio signal. The predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system.
步骤103,对第二音频信号进行输出。Step 103: Output the second audio signal.
综上所述,本申请实施例提供的音频处理方法,由于预定频率是使用户的听觉***产生疲劳以及伤害的频率,所以,通过对第一音频信号中预定频率以上的部分或全部音频信号进行剔除,可以减少第二音频信号中包含的使用户的听觉***产生疲劳以及伤害的高音,甚至使第二音频信号中不包含使用户的听觉***产生疲劳以及伤害的高音,从而可以缓解甚至避免高音对用户的听觉***造成的伤害,达到了保护听觉***的效果。In summary, the audio processing method provided in the embodiment of the present application, because the predetermined frequency is a frequency that causes fatigue and injury to the user's auditory system, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding the treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
请参考图2,其示出了本申请另一实施例提供的音频处理方法的方法流程图,该音频处理方法可以应用于电子设备中的播放器中。该音频处理方法,包括:Please refer to FIG. 2, which illustrates a method flowchart of an audio processing method according to another embodiment of the present application. The audio processing method may be applied to a player in an electronic device. The audio processing method includes:
步骤201,获取第三音频信号和窗函数。Step 201: Obtain a third audio signal and a window function.
第三音频信号是播放器待播放的音频信号。第三音频信号可以是单独的音频文件,如歌曲、语音等等,也可以是视频文件中的音频文件,如电影或电视剧中的配音、配乐等等,本实施例不对第三音频信号的类型作限定。The third audio signal is an audio signal to be played by the player. The third audio signal may be a separate audio file, such as a song, a voice, etc., or an audio file in a video file, such as a voice or soundtrack in a movie or a TV series. This embodiment does not determine the type of the third audio signal. Make restrictions.
窗函数是用于对音频信号进行截断的函数。由于通常需要对音频信号进行采样,再对得到的采样值进行处理,所以,窗函数也可以理解为是用于对音频信号的采样值进行截断的函数。本实施例中的窗函数可以是任意一种窗的窗函数,比如矩形窗的窗函数、三角窗的窗函数、汉宁窗的窗函数、海明窗的窗函数、高斯窗的窗函数等等,本实施例不对窗函数作限定。在一种可能的实现方式中,本实施例中的窗函数为海明窗。The window function is a function for truncating an audio signal. Since the audio signal usually needs to be sampled and then the obtained sampled value is processed, the window function can also be understood as a function for truncating the sampled value of the audio signal. The window function in this embodiment may be a window function of any kind of window, such as a window function of a rectangular window, a window function of a triangular window, a window function of a Hanning window, a window function of a Hamming window, a window function of a Gaussian window, etc. The window function is not limited in this embodiment. In a possible implementation manner, the window function in this embodiment is a Hamming window.
在选定了窗函数之后,还需要设置窗函数的窗长的数值。该窗长用于表示窗函数每次处理的数据的数据个数。其中,当第三音频信号经单声道输出时,窗长的单位为采样个数,此时窗长用于表示窗函数每次处理的采样值的个数;当第三音频信号经双声道输出时,窗长的单位为采样对的个数,此时窗长用于 表示窗函数每次处理的采样值的对数。这里将同时经左声道输出的一个采样值和经右声道输出的一个采样值称为一个采样对。After the window function is selected, the window length of the window function needs to be set. The window length is used to indicate the number of data of data processed by the window function at a time. Wherein, when the third audio signal is output through a mono channel, the unit of the window length is the number of samples. At this time, the window length is used to indicate the number of sampled values processed by the window function each time. When the channel is output, the unit of the window length is the number of sampling pairs. At this time, the window length is used to represent the logarithm of the sampled value processed by the window function each time. Here, a sample value output through the left channel and a sample value output through the right channel at the same time are referred to as a sample pair.
在选择窗长的数值时,当选取的窗长的数值过大,即窗长过长时,每次处理的数据的数据个数较多,会导致播放卡顿的问题;当选取的窗长的数值过小,即窗长过短时,虽然每次处理的数据的数据个数较少,但处理频率会提高,也会导致播放卡顿的问题,从而影响播放效果。所以,可以综合用户需求的播放效果来选择窗长的数值。本实施例中,可以根据经验值将窗长的数值设置为1024,当然也可以设置为其它数值,此处不作赘述。When selecting the window length value, when the selected window length value is too large, that is, when the window length is too long, the number of data processed each time is large, which will cause the problem of playback freeze; when the selected window length is The value of is too small, that is, when the window length is too short, although the number of data processed each time is small, the processing frequency will increase, which will also cause the problem of playback freeze, which will affect the playback effect. Therefore, the value of the window length can be selected based on the playback effect required by the user. In this embodiment, the value of the window length can be set to 1024 according to the empirical value, and of course, it can also be set to other values, and details are not described herein.
步骤202,对第三音频信号进行采样,得到采样值。Step 202: Sampling the third audio signal to obtain a sample value.
播放器可以对接收到的第三音频信号进行缓存,再按照设定的采样频率对缓存的第三音频信号进行采样,得到各个采样值。其中,采样频率可以是22.05kHz、44.1kHz、48kHz等等,本实施例不作限定。The player may buffer the received third audio signal, and then sample the buffered third audio signal according to a set sampling frequency to obtain each sample value. The sampling frequency may be 22.05 kHz, 44.1 kHz, 48 kHz, and the like, which is not limited in this embodiment.
步骤203,当采样值每构成一个音频帧时,根据窗函数对该音频帧进行加窗处理,得到第一音频信号,该音频帧所包含的采样值的数量等于窗函数的窗长的数值。Step 203: When the sampled value constitutes an audio frame, perform a windowing process on the audio frame according to a window function to obtain a first audio signal. The number of sampled values included in the audio frame is equal to the window length of the window function.
播放器可以对每个或每对采样值进行缓存,当缓存的采样值的数量大于等于窗函数的窗长的数值时,每次从中取出该窗长对应的数量的采样值,将这些采样值作为一个音频帧。其中,当单声道输出时,这里所说的采样值的数量为采样值的个数;当双声道输出时,这里所说的采样值的数量为采样对的个数。The player can cache each or each pair of sampled values. When the number of buffered sampled values is greater than or equal to the window length of the window function, each time the number of sampled values corresponding to the window length is taken out and these sampled values are retrieved. As an audio frame. Among them, when the mono is output, the number of sampling values referred to here is the number of sampling values; when the two-channel output is used, the number of sampling values referred to here is the number of sampling pairs.
以窗长的数值为1024进行举例,当缓存的采样值的数量大于等于1024时,先取出第1-1024个(或对)采样值作为一个音频帧,再取出第1025-2048个(或对)采样值作为一个音频帧,依此类推,直至从音频信号中取出所有的音频帧后停止。Take the window length value as 1024 for example. When the number of buffered sample values is greater than or equal to 1024, first take out the 1-1024th (or pair) sample value as an audio frame, and then take out the 1025-2048 (or pair) ) The sampled value is taken as an audio frame, and so on, and it stops until all audio frames are taken from the audio signal.
对于得到的每个音频帧,播放器对该音频帧进行加窗处理。其中,加窗处理是指将音频帧乘以窗函数中用于进行加窗处理的第一函数。假设音频帧为X,窗函数中的第一函数为W,则第一音频信号XW=X*W。For each audio frame obtained, the player performs windowing on the audio frame. The windowing process refers to multiplying an audio frame by a first function in the window function for performing the windowing process. Assuming that the audio frame is X and the first function in the window function is W, the first audio signal XW = X * W.
步骤204,将第一音频信号划分成n个子带信号。Step 204: Divide the first audio signal into n subband signals.
其中,n为大于等于2的正整数。当n的数值较大时,虽然每个子带信号的频带较窄,剔除效果较好,但划分成n个子带信号的耗时较长,导致播放器的性能较差;当n的数值较小时,虽然划分成n个子带信号的耗时较短,但每个子带信号的频带较宽,剔除效果不好,所以,可以综合考虑处理效果和播放 器的性能来选择n的数值。本实施例中,可以根据经验值将n设置为8,当然也可以设置为其它数值,此处不作赘述。Here, n is a positive integer of 2 or more. When the value of n is large, although the frequency band of each subband signal is narrow and the culling effect is good, it takes longer to divide into n subband signals, resulting in poor performance of the player; when the value of n is small Although it takes less time to divide into n subband signals, the frequency band of each subband signal is wide and the rejection effect is not good. Therefore, the value of n can be selected by comprehensively considering the processing effect and the performance of the player. In this embodiment, n can be set to 8 according to the empirical value, and of course, it can also be set to other values, and details are not described herein.
其中,播放器可以通过多相滤波器将第一音频信号划分成n个子带信号(SUBBAND)。本实施例中,多相滤波器可以是级联的QMF(Quadrature mirror filter,正交镜像滤波器),也可以是其他多相滤波器,此处不作限定。下面对QMF划分子带信号的过程进行介绍。The player may divide the first audio signal into n subband signals (SUBBAND) through a polyphase filter. In this embodiment, the polyphase filter may be a cascaded QMF (Quadrature mirror filter) or another polyphase filter, which is not limited herein. The following describes the process by which QMF divides subband signals.
QMF可以将输入的第一音频信号等分为高低两个子带信号,再分别将这两个子带信号作为输入信号输入QMF,得到四个子带信号,再分别将这四个子带信号作为输入信号输入QMF,得到八个子带信号。QMF can equally divide the input first audio signal into two high and low sub-band signals, and then input these two sub-band signals as input signals to QMF to obtain four sub-band signals, and then input these four sub-band signals as input signals. QMF, get eight subband signals.
以采样频率为44.1kHz,则得到的八个子带信号如下表一所示。With a sampling frequency of 44.1kHz, the eight subband signals obtained are shown in Table 1 below.
表一Table I
子带IDSubband ID 起始频率(Hz)Starting frequency (Hz) 截止频率(Hz)Cut-off frequency (Hz) 中心频率(Hz)Center frequency (Hz)
11 00 2756.252756.25 1378.1251378.125
22 2756.252756.25 5512.55512.5 4134.3754134.375
33 5512.55512.5 8268.758268.75 6890.6256890.625
44 8268.758268.75 1102511025 9646.8759646.875
55 1102511025 13781.2513781.25 12403.12512403.125
66 13781.2513781.25 16537.516537.5 15159.37515159.375
77 16537.516537.5 19293.7519293.75 17915.62517915.625
88 19293.7519293.75 2205022050 20671.87520671.875
由于强度过高的高音会对听觉***造成伤害,所以,播放器可以通过步骤205-207中的至少一种处理方式对这些子带信号进行处理。Because high-intensity treble may cause damage to the hearing system, the player may process these subband signals by using at least one of the processing methods in steps 205-207.
步骤205,当存在起始频率大于或等于预定频率的子带信号时,对该子带信号进行剔除,该预定频率是使用户的听觉***产生疲劳以及伤害的频率。Step 205: When there is a subband signal with an initial frequency greater than or equal to a predetermined frequency, the subband signal is removed, and the predetermined frequency is a frequency that causes the user's auditory system to be fatigued and injured.
用户长时间收听大于或等于预定频率的音频信号会造成听觉***疲劳,继续发展下去,甚至会对听觉***造成伤害,而日积月累的物理伤害则会造成不可逆的永久性听力障碍。并且,用户在收听大于或等于预定频率的音频信号时,感觉不到任何的不适,可见,大于或等于预定频率的音频信号会在不知不觉中伤害用户的听觉***,所以,需要对大于或等于预定频率的音频信号进行剔除,以保护听觉***。Long-term listening to audio signals greater than or equal to a predetermined frequency will cause the fatigue of the auditory system, and continue to develop, and even cause damage to the auditory system. Accumulated physical damage will cause irreversible permanent hearing impairment. In addition, users do not feel any discomfort when listening to audio signals greater than or equal to a predetermined frequency. It can be seen that audio signals greater than or equal to a predetermined frequency may unknowingly harm the user's hearing system. Audio signals equal to a predetermined frequency are removed to protect the hearing system.
在确定预定频率时,除了需要考虑保护听觉***,还需要考虑音频信号的 音质,即用户的听觉感受。由于大部分用户的听觉感知在17.5kHz以上时会快速衰减,所以,剔除17.5kHz以上的音频信号对用户的听觉感受的影响不大,可以设置预定频率大于等于17.5kHz。以预定频率为18kHz为例,则可以对第一音频信号中18kHz以上的音频信号进行剔除,这样既不会影响音质,也可以剔除高音,从而保护听觉***。When determining the predetermined frequency, in addition to protecting the hearing system, it is also necessary to consider the sound quality of the audio signal, that is, the user's hearing experience. Since the hearing perception of most users will rapidly decay above 17.5 kHz, the audio signal above 17.5 kHz will have little effect on the user's hearing experience, and a predetermined frequency may be set to 17.5 kHz or more. Taking the predetermined frequency as 18 kHz as an example, the audio signal above 18 kHz in the first audio signal can be removed, so that it will not affect the sound quality, and it can also remove treble, thereby protecting the hearing system.
本实施例中的子带信号包括起始频率和截止频率,下面根据起始频率、截止频率和预定频率之间的大小关系,对剔除预定频率以上的音频信号的实现方式进行说明。The subband signal in this embodiment includes a start frequency and a cutoff frequency. The following describes the implementation manner of excluding audio signals above a predetermined frequency according to the magnitude relationship between the start frequency, the cutoff frequency, and the predetermined frequency.
(1)当n个子带信号中包括截止频率小于预定频率的子带信号、初始频率等于预定频率的子带信号时,剔除初始频率等于预定频率的子带信号,保留截止频率小于预定频率的子带信号。(1) When the n subband signals include a subband signal with a cutoff frequency less than a predetermined frequency, and a subband signal with an initial frequency equal to the predetermined frequency, the subband signal with an initial frequency equal to the predetermined frequency is eliminated, and the subband with a cutoff frequency less than the predetermined frequency With signal.
(2)当n个子带信号中包括截止频率小于预定频率的子带信号、初始频率等于预定频率的子带信号、初始频率大于预定频率的子带信号时,剔除初始频率等于预定频率的子带信号、初始频率大于预定频率的子带信号,保留截止频率小于预定频率的子带信号。(2) When the n subband signals include a subband signal with a cutoff frequency less than a predetermined frequency, a subband signal with an initial frequency equal to the predetermined frequency, and a subband signal with an initial frequency greater than the predetermined frequency, the subbands with the initial frequency equal to the predetermined frequency are excluded. The signal and the subband signal whose initial frequency is greater than the predetermined frequency, and the subband signal whose cutoff frequency is smaller than the predetermined frequency are retained.
在(1)和(2)中,剩余的子带信号的截止频率都小于预定频率,所以,可以认为剔除了预定频率以上的全部音频信号。In (1) and (2), the cutoff frequencies of the remaining subband signals are all smaller than a predetermined frequency, so it can be considered that all audio signals above the predetermined frequency are excluded.
(3)当n个子带信号中包括截止频率小于预定频率的子带信号、初始频率小于预定频率且截止频率大于预定频率的子带信号,初始频率大于预定频率的子带信号,剔除初始频率大于预定频率的子带信号,保留截止频率小于预定频率的子带信号、初始频率小于预定频率且截止频率大于预定频率的子带信号。(3) When the n subband signals include a subband signal with a cutoff frequency less than a predetermined frequency, a subband signal with an initial frequency less than a predetermined frequency and a cutoff frequency greater than a predetermined frequency, and a subband signal with an initial frequency greater than the predetermined frequency, excluding the initial frequency greater than For a subband signal of a predetermined frequency, a subband signal with a cutoff frequency smaller than the predetermined frequency, a subband signal with an initial frequency smaller than the predetermined frequency, and a cutoff frequency larger than the predetermined frequency are retained.
在(3)中,剩余的子带信号中包括初始频率小于预定频率且截止频率大于预定频率的子带信号,该子带信号中预定频率和截止频率之间的音频信号未被剔除,所以,可以认为剔除了预定频率以上的部分音频音频信号。In (3), the remaining subband signals include subband signals whose initial frequency is less than the predetermined frequency and whose cutoff frequency is greater than the predetermined frequency. The audio signals between the predetermined frequency and the cutoff frequency in the subband signal are not removed, so, It can be considered that part of the audio audio signal above a predetermined frequency is eliminated.
以表一中的八个子带信号为例,由于第八个子带信号(SUBBAND[8])的起始频率大于18kHz,所以,可以对频带在19.2kHz-22kHz的第八个子带信号进行剔除。即,SUBBAND[8]=SUBBAND[8]*0。Taking the eight subband signals in Table 1 as an example, since the starting frequency of the eighth subband signal (SUBBAND [8]) is greater than 18kHz, the eighth subband signal with a frequency band of 19.2kHz-22kHz can be eliminated. That is, SUBBAND [8] = SUBBAND [8] * 0.
步骤206,当存在起始频率小于预定频率,且截止频率大于预定频率的子带信号时,对该子带信号进行衰减。Step 206: When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal is attenuated.
当存在起始频率小于预定频率,且截止频率大于预定频率的子带信号时, 可以对该子带信号进行剔除,以保护听觉***。若对该子带信号进行剔除,对于一些听觉***较敏感的用户来说,会听出最终得到的音频信号中缺少从该起始频率到预定频率之间的音频信号,从而影响音质。When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal may be removed to protect the hearing system. If the subband signal is removed, for some users with more sensitive hearing systems, the final audio signal will lack the audio signal from the starting frequency to a predetermined frequency, thereby affecting the sound quality.
可选的,可以保留该子带信号,且不对该子带信号进行衰减处理,以保证音质。或者,可选的,还可以保留该子带信号,且对该子带信号进行衰减处理,从而在保护听觉***和保证音质之间进行平衡,即可以对该子带信号进行衰减,以减小该子带信号的信号强度,也即减小该子带信号的音量,这样既可以保护听觉***,也可以保证音质。Optionally, the subband signal may be retained and the subband signal is not subjected to attenuation processing to ensure sound quality. Alternatively, optionally, the subband signal may be retained, and the subband signal may be attenuated to balance the protection of the hearing system and the sound quality, that is, the subband signal may be attenuated to reduce The signal strength of the subband signal, that is, the volume of the subband signal is reduced, so that both the hearing system and the sound quality can be guaranteed.
本实施例中,可以预先设置一个预定衰减比例,此时,对子带信号进行衰减,可以实现为:按照预定衰减比例对子带信号的信号强度进行衰减,该预定衰减比例大于等于0且小于等于1。其中,当预定衰减比例为0时,即相当于对该子带信号进行剔除;当预定衰减比例为1时,即相当于不对该子带信号进行衰减处理。In this embodiment, a predetermined attenuation ratio may be set in advance. At this time, attenuating the subband signal may be achieved by attenuating the signal strength of the subband signal according to the predetermined attenuation ratio, and the predetermined attenuation ratio is greater than or equal to 0 and less than Is equal to 1. Wherein, when the predetermined attenuation ratio is 0, it is equivalent to excluding the subband signal; when the predetermined attenuation ratio is 1, it is equivalent to not performing attenuation processing on the subband signal.
以表一中的八个子带信号为例,且假设预定频率为18kHz,由于第七个子带信号(SUBBAND[7])的起始频率小于18kHz,截止频率大于18kHz,所以,可以对第七个子带信号进行衰减,以预定衰减比例为0.5为例,则可以将第七个子带信号的信号强度衰减至原始的信号强度的一半,即,SUBBAND[7]=SUBBAND[7]*0.5。此时相当于将第七个子带信号的信号强度衰减一半,也即相当于将第七个子带信号的音量减小一半。Taking the eight sub-band signals in Table 1 as an example, and assuming a predetermined frequency of 18 kHz, since the starting frequency of the seventh sub-band signal (SUBBAND [7]) is less than 18 kHz and the cut-off frequency is greater than 18 kHz, the seventh sub-band signal can be Band signals are attenuated. Taking the predetermined attenuation ratio as 0.5, for example, the signal strength of the seventh subband signal can be attenuated to half of the original signal strength, ie, SUBBAND [7] = SUBBAND [7] * 0.5. This is equivalent to attenuating the signal strength of the seventh subband signal by half, that is, reducing the volume of the seventh subband signal by half.
步骤207,当存在截止频率小于预定频率的子带信号时,对子带信号进行压缩限幅处理,压缩限幅处理后子带信号的信号强度小于等于预定门限值,该预定门限值是根据动态范围阈值确定的,该动态范围阈值是使听觉***产生疲劳以及伤害的动态范围。Step 207: When there is a subband signal with a cutoff frequency less than a predetermined frequency, the subband signal is compressed and limited. The signal strength of the subband signal after the compression and limited processing is less than or equal to a predetermined threshold. The predetermined threshold is It is determined according to a dynamic range threshold, which is a dynamic range that causes the auditory system to fatigue and harm.
其中,动态范围是指音频信号的最大值和最小值的差值。用户长时间收听大于或等于动态范围阈值的音频信号会造成听觉***疲劳,继续发展下去,甚至会对听觉***造成伤害,而日积月累的物理伤害则会造成不可逆的永久性听力障碍。并且,用户在收听大于或等于动态范围阈值的音频信号时,感觉不到任何的不适,可见,大于或等于动态范围阈值的音频信号会在不知不觉中伤害用户的听觉***,所以,需要对减小音频信号的动态范围,以保护听觉***。The dynamic range refers to the difference between the maximum value and the minimum value of the audio signal. Listening to audio signals greater than or equal to the dynamic range threshold for a long time will cause the fatigue of the auditory system, continue to develop, and even cause damage to the auditory system, and the cumulative physical damage will cause irreversible permanent hearing impairment. In addition, when listening to an audio signal greater than or equal to the dynamic range threshold, the user does not feel any discomfort. It can be seen that the audio signal greater than or equal to the dynamic range threshold may unknowingly harm the user's hearing system. Reduce the dynamic range of the audio signal to protect the hearing system.
本实施例中,可以对截止频率小于预定频率的每个子带信号配置一个压缩限幅器,再根据动态范围阈值确定一个预定门限值,通过压缩限幅器对子带信 号进行压缩限幅处理,使得压缩限幅处理后子带信号的信号强度小于预定门限值,以减小子带信号的动态范围,从而使得合成后的第二音频信号较为平滑。In this embodiment, a compression limiter may be configured for each sub-band signal whose cut-off frequency is less than a predetermined frequency, and then a predetermined threshold value is determined according to the dynamic range threshold, and the sub-band signal is compressed and limited by the compression limiter. , So that the signal strength of the subband signal after the compression and clipping processing is less than a predetermined threshold value, so as to reduce the dynamic range of the subband signal, so that the synthesized second audio signal is smoother.
播放器需要判断是否需要对子带信号进行压缩限幅处理。当子带信号的信号强度大于或等于对应的一个压缩限幅器的预定门限值时,对该子带信号进行压缩限幅处理;当子带信号的信号强度小于对应的一个压缩限幅器的预定门限值时,不对该子带信号进行压缩限幅处理。其中,压缩限幅处理是指在子带信号的信号强度大于或等于预定门限值时,对子带信号进行压缩处理和增益处理。压缩处理是指按照压缩限幅器中的预定压缩比对子带信号进行压缩处理,且压缩比用于指示对子带信号的压缩速度的快慢,且压缩处理后子带信号的动态范围小于动态范围阈值;增益处理是指按照压缩限幅器中的预定增益对子带信号进行增益处理,且预定增益大于等于0且小于等于预定门限值的绝对值。也即对子带信号进行放大,这里的预定增益用于指示对子带信号的信号强度的放大倍数。其中,门限值、压缩比和增益值可以是预先设置的经验值,本实施例不作限定。The player needs to determine whether it is necessary to compress and limit the subband signal. When the signal strength of a subband signal is greater than or equal to a predetermined threshold value of a corresponding compression limiter, the subband signal is subjected to compression limiting processing; when the signal strength of the subband signal is less than the corresponding compression limiter When the predetermined threshold is set, compression and clipping processing is not performed on the subband signal. The compression limiting processing refers to performing compression processing and gain processing on a subband signal when the signal strength of the subband signal is greater than or equal to a predetermined threshold. Compression processing refers to compressing the subband signal according to a predetermined compression ratio in the compression limiter, and the compression ratio is used to indicate the speed of the compression of the subband signal, and the dynamic range of the subband signal after compression processing is less than the dynamic Range threshold; Gain processing refers to the absolute processing of the subband signal according to the predetermined gain in the compression limiter, and the predetermined gain is greater than or equal to 0 and less than or equal to the predetermined threshold value. That is, the subband signal is amplified. The predetermined gain here is used to indicate the amplification factor of the signal strength of the subband signal. The threshold value, the compression ratio, and the gain value may be preset empirical values, which are not limited in this embodiment.
需要说明的是,压缩处理用于减小子带信号的动态范围,此时,音频信号的音量也会相应减小。在一种实现方式中,播放器不对压缩处理后的子带信号进行增益处理,以保护听觉***。或者,由于压缩处理后子带信号的音量较小,导致音质较差,所以,在另一种实现方式中,还可以在保护听觉***和保证音质之间进行平衡,即对压缩处理后的子带信号进行增益处理,也即增大音频信号的音量,以保证音质。其中,当预定增益为0时,即相当于不对压缩处理后的子带信号进行增益处理;当预定增益为预定门限值的绝对值时,即相当于对压缩处理后的子带信号进行增益处理,且增益处理后子带信号的信号强度小于或等于预定门限值。It should be noted that the compression process is used to reduce the dynamic range of the sub-band signal. At this time, the volume of the audio signal will also be reduced accordingly. In one implementation, the player does not perform gain processing on the compressed subband signal to protect the hearing system. Or, because the volume of the subband signal after compression processing is low, resulting in poor sound quality, in another implementation manner, a balance can also be made between protecting the hearing system and ensuring sound quality, that is, the Take the signal for gain processing, that is, increase the volume of the audio signal to ensure the sound quality. Wherein, when the predetermined gain is 0, it is equivalent to not performing gain processing on the compressed subband signal; when the predetermined gain is an absolute value of the predetermined threshold value, it is equivalent to performing gain on the compressed subband signal. And the signal strength of the sub-band signal after processing is less than or equal to a predetermined threshold.
仍然以表一种的八个子带信号为例,则对第一个子带信号(SUBBAND[1])至第六个子带信号(SUBBAND[6])分别配置一个压缩限幅器,其配置参数如下表二所示。Still taking the eight subband signals of the table as an example, a compression limiter is configured for the first subband signal (SUBBAND [1]) to the sixth subband signal (SUBBAND [6]), and its configuration parameters As shown in Table II below.
表二Table II
IDID 门限(dB)Threshold (dB) 压缩比Compression ratio 增益(dB)Gain (dB) Attack时间(ms)Attack time (ms) Release时间(ms)Release time (ms)
LIM1LIM1 -3-3 1:无穷大1: infinity 1.51.5 1010 100100
LIM2LIM2 -5-5 1:51: 5 1.01.0 1515 150150
LIM3LIM3 -5-5 1:51: 5 1.01.0 1515 150150
LIM4LIM4 -6-6 1:51: 5 1.01.0 2020 180180
LIM5LIM5 -6-6 1:101:10 00 2020 180180
LIM6LIM6 -6-6 1:101:10 00 3030 200200
其中,LIM1对应于SUBBAND[1],LIM2对应于SUBBAND[2],依此类推。Among them, LIM1 corresponds to SUBBAND [1], LIM2 corresponds to SUBBAND [2], and so on.
本实施例以LIM1对SUBBAND[1]的处理过程进行举例说明,则先判断SUBBAND[1]的信号强度是否大于或等于-3dB;当该信号强度大于或等于-3dB时,按照1:无穷大的预定压缩比对SUBBAND[1]进行压缩,这里1:无穷大是指按照最快的压缩速度压缩SUBBAND[1];再对压缩处理后得到的SUBBAND[1]进行1.5的增益处理,得到LIM1(SUBBAND[1]);当该信号强度小于-3dB时,不对SUBBAND[1]进行处理。其他子带信号的压缩限幅处理与SUBBAND[1]的压缩限幅处理类似,不再赘述。This embodiment uses LIM1 to illustrate the processing process of SUBBAND [1], then first determine whether the signal strength of SUBBAND [1] is greater than or equal to -3dB; when the signal strength is greater than or equal to -3dB, according to 1: infinity Compress SUBBAND [1] with a predetermined compression ratio, where 1: infinity means compressing SUBBAND [1] according to the fastest compression speed; and then perform 1.5 gain processing on SUBBAND [1] obtained after compression processing to obtain LIM1 (SUBBAND [1]); When the signal strength is less than -3dB, SUBBAND [1] is not processed. The compression and clipping processing of other subband signals is similar to the compression and clipping processing of SUBBAND [1], and will not be described again.
其中,Attack时间也可以称为输入时间,是指将子带信号输入对应的压缩限幅器的时间;Release时间也可以称为输出时间,是指将子带信号输出对应的压缩限幅器的时间。这里的Attack时间和Release时间是一次实验的实验数据,不同的电子设备可以具有不同的Attack时间和Release时间。Among them, Attack time can also be referred to as input time, which refers to the time when the subband signal is input to the corresponding compression limiter; Release time can also be referred to as output time, which means that the subband signal is output to the corresponding compression limiter. time. The Attack time and Release time are the experimental data of one experiment. Different electronic devices can have different Attack time and Release time.
步骤208,对剩余的子带信号进行合成,得到第二音频信号。Step 208: Synthesize the remaining subband signals to obtain a second audio signal.
播放器可以对步骤205-207得到的子带信号进行合成,得到第二音频信号。The player may synthesize the subband signals obtained in steps 205-207 to obtain a second audio signal.
仍然以表一中的八个子带信号为例,则第二音频信号Y=SUBBAND[8]*0+SUBBAND[7]*0.5+LIM6(SUBBAND[6])+LIM5(SUBBAND[5])+…+LIM1(SUBBAND[1])。Taking the eight subband signals in Table 1 as an example, the second audio signal Y = SUBBAND [8] * 0 + SUBBAND [7] * 0.5 + LIM6 (SUBBAND [6]) + LIM5 (SUBBAND [5]) + ... + LIM1 (SUBBAND [1]).
步骤209,根据窗函数对第二音频信号进行逆窗处理,得到第四音频信号。Step 209: Perform inverse window processing on the second audio signal according to the window function to obtain a fourth audio signal.
逆窗处理是指将第二音频信号乘以窗函数中用于进行逆窗处理的第二函数。其中,窗函数中第一函数和第二函数的乘积为1。即,假设第一函数为W,第二函数为IW,则W*IW=1。Inverse window processing refers to multiplying a second audio signal by a second function in the window function for performing inverse window processing. The product of the first function and the second function in the window function is 1. That is, assuming that the first function is W and the second function is IW, then W * IW = 1.
假设第四音频信号为OUT,且该窗函数的第二函数为IW,则OUT=Y*IW。Assuming that the fourth audio signal is OUT and the second function of the window function is IW, then OUT = Y * IW.
步骤210,对第四音频信号进行输出。Step 210: Output the fourth audio signal.
播放器对第四音频信号进行播放,由于较强的高音被剔除了,所以,无论用户是否佩戴耳机,都不会对用户的听觉***造成伤害。The player plays the fourth audio signal. Because the strong treble is removed, no matter whether the user wears headphones, the user's hearing system will not be harmed.
综上所述,本申请实施例提供的音频处理方法,由于预定频率是使用户的听觉***产生疲劳以及伤害的频率,所以,通过对第一音频信号中预定频率以 上的部分或全部音频信号进行剔除,可以减少第二音频信号中包含的使用户的听觉***产生疲劳以及伤害的高音,甚至使第二音频信号中不包含使用户的听觉***产生疲劳以及伤害的高音,从而可以缓解甚至避免高音对用户的听觉***造成的伤害,达到了保护听觉***的效果。In summary, the audio processing method provided in the embodiment of the present application, because the predetermined frequency is a frequency that causes fatigue and injury to the user's auditory system, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed. Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding the treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
当存在起始频率小于预定频率,且截止频率大于预定频率的子带信号时,可以对该子带信号进行剔除,以保护听觉***;还可以保留该子带信号,且不对该子带信号进行衰减处理,以保证音质;还可以保留该子带信号,且对该子带信号进行衰减处理,从而在保护听觉***和保证音质之间进行平衡,即可以对该子带信号进行衰减,以减小该子带信号的信号强度,也即减小该子带信号的音量,这样既可以保护听觉***,也可以保证音质。When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal can be removed to protect the auditory system; the subband signal can also be retained without performing the subband signal Attenuation processing to ensure sound quality; the subband signal can also be retained, and the subband signal can be attenuated to balance the protection of the hearing system and the sound quality, that is, the subband signal can be attenuated to reduce the Decreasing the signal strength of the sub-band signal, that is, reducing the volume of the sub-band signal, can not only protect the hearing system, but also ensure the sound quality.
当存在截止频率小于预定频率的子带信号时,对每个子带信号配置一个压缩限幅器,再根据动态范围阈值确定一个预定门限值,通过压缩限幅器对子带信号进行压缩限幅处理,使得压缩限幅处理后子带信号的信号强度小于预定门限值,以减小子带信号的动态范围,既可以通过减少子带信号的动态范围来保护听觉***,也可以使得合成后的第二音频信号较为平滑。When there is a subband signal with a cutoff frequency less than a predetermined frequency, a compression limiter is configured for each subband signal, and a predetermined threshold value is determined according to the dynamic range threshold. The subband signal is compressed and limited by the compression limiter. Processing so that the signal strength of the subband signal after compression and clipping processing is less than a predetermined threshold value to reduce the dynamic range of the subband signal, which can either protect the auditory system by reducing the dynamic range of the subband signal, or make the The second audio signal is smoother.
请参考图3,其示出了本申请一个实施例提供的音频处理装置的结构框图,该音频处理装置可以应用于电子设备中的播放器中。该音频处理装置,包括:Please refer to FIG. 3, which shows a structural block diagram of an audio processing apparatus according to an embodiment of the present application. The audio processing apparatus may be applied to a player in an electronic device. The audio processing device includes:
获取模块301,用于获取待处理的第一音频信号;An acquisition module 301, configured to acquire a first audio signal to be processed;
处理模块302,用于对获取模块301得到的第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,该预定频率是使用户的听觉***产生疲劳以及伤害的频率;A processing module 302 is configured to remove part or all of the audio signals above a predetermined frequency from the first audio signal obtained by the obtaining module 301 to obtain a second audio signal. The predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system. ;
输出模块303,用于对处理模块302得到的第二音频信号进行输出。The output module 303 is configured to output the second audio signal obtained by the processing module 302.
综上所述,本申请实施例提供的音频处理装置,由于预定频率是使用户的听觉***产生疲劳以及伤害的频率,所以,通过对第一音频信号中预定频率以上的部分或全部音频信号进行剔除,可以减少第二音频信号中包含的使用户的听觉***产生疲劳以及伤害的高音,甚至使第二音频信号中不包含使用户的听觉***产生疲劳以及伤害的高音,从而可以缓解甚至避免高音对用户的听觉***造成的伤害,达到了保护听觉***的效果。In summary, the audio processing device provided in the embodiment of the present application, because the predetermined frequency is a frequency that causes the user's hearing system to be fatigued and injured, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed. Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
请参考图3,其示出了本申请再一实施例提供的音频处理装置的结构框图, 该音频处理装置可以应用于电子设备中的播放器中。该音频处理装置,包括:Please refer to FIG. 3, which shows a structural block diagram of an audio processing apparatus according to another embodiment of the present application. The audio processing apparatus may be applied to a player in an electronic device. The audio processing device includes:
获取模块301,用于获取待处理的第一音频信号;An acquisition module 301, configured to acquire a first audio signal to be processed;
处理模块302,用于对获取模块301得到的第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,该预定频率是使用户的听觉***产生疲劳以及伤害的频率;A processing module 302 is configured to remove part or all of the audio signals above a predetermined frequency from the first audio signal obtained by the obtaining module 301 to obtain a second audio signal. The predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system. ;
输出模块303,用于对处理模块302得到的第二音频信号进行输出。The output module 303 is configured to output the second audio signal obtained by the processing module 302.
可选的,预定频率大于等于17.5kHz。Optionally, the predetermined frequency is 17.5 kHz or more.
可选的,处理模块302,还用于:Optionally, the processing module 302 is further configured to:
将第一音频信号划分成n个子带信号,n为大于等于2的正整数;Dividing the first audio signal into n subband signals, where n is a positive integer greater than or equal to 2;
当存在起始频率大于或等于预定频率的子带信号时,对子带信号进行剔除;When there is a subband signal with a starting frequency greater than or equal to a predetermined frequency, the subband signal is removed;
对剩余的子带信号进行合成,得到第二音频信号。The remaining subband signals are synthesized to obtain a second audio signal.
可选的,处理模块302,还用于:Optionally, the processing module 302 is further configured to:
在对剩余的子带信号进行合成,得到第二音频信号之前,当存在起始频率小于预定频率,且截止频率大于预定频率的子带信号时,对子带信号进行衰减。Before synthesizing the remaining subband signals to obtain a second audio signal, the subband signal is attenuated when there is a subband signal having a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency.
可选的,处理模块302,还用于:Optionally, the processing module 302 is further configured to:
按照预定衰减比例对子带信号的信号强度进行衰减,预定衰减比例大于等于0且小于等于1。The signal strength of the subband signal is attenuated according to a predetermined attenuation ratio, and the predetermined attenuation ratio is greater than or equal to 0 and less than or equal to 1.
可选的,处理模块302,还用于:Optionally, the processing module 302 is further configured to:
在对剩余的子带信号进行合成,得到第二音频信号之前,当存在截止频率小于预定频率的子带信号时,对子带信号进行压缩限幅处理,压缩限幅处理后子带信号的信号强度小于等于预定门限值,预定门限值是根据动态范围阈值确定的,动态范围阈值是使听觉***产生疲劳以及伤害的动态范围。Before synthesizing the remaining subband signals to obtain a second audio signal, when there is a subband signal with a cutoff frequency less than a predetermined frequency, the subband signal is compressed and limited, and the signal of the subband signal after the compression limited processing is performed. The intensity is less than or equal to a predetermined threshold value. The predetermined threshold value is determined according to a dynamic range threshold. The dynamic range threshold is a dynamic range that causes the hearing system to be fatigued and injured.
可选的,处理模块302,还用于:Optionally, the processing module 302 is further configured to:
根据预定压缩比对子带信号进行压缩处理,预定压缩比用于指示对子带信号的压缩速度的快慢,且压缩处理后子带信号的动态范围小于动态范围阈值;Compressing the subband signal according to a predetermined compression ratio, the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after compression processing is less than the dynamic range threshold;
根据预定增益对压缩处理后的子带信号进行增益处理,预定增益用于指示对子带信号的信号强度的放大倍数,且预定增益大于等于0且小于等于预定门限值的绝对值。Gain processing is performed on the compressed subband signal according to a predetermined gain. The predetermined gain is used to indicate a magnification of the signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to an absolute value of a predetermined threshold.
可选的,获取模块301,还用于:获取第三音频信号和窗函数;对第三音频信号进行采样,得到采样值;当采样值每构成一个音频帧时,根据窗函数对 音频帧进行加窗处理,得到第一音频信号,音频帧所包含的采样值的数量等于窗函数的窗长的数值;Optionally, the obtaining module 301 is further configured to: obtain a third audio signal and a window function; sample the third audio signal to obtain a sample value; and when the sampled value constitutes an audio frame, perform an operation on the audio frame according to the window function. The windowing process is performed to obtain a first audio signal, and the number of sampling values included in the audio frame is equal to the value of the window length of the window function;
输出模块303,还用于:根据窗函数对第二音频信号进行逆窗处理,得到第四音频信号;对第四音频信号进行输出。The output module 303 is further configured to perform inverse window processing on the second audio signal according to a window function to obtain a fourth audio signal; and output the fourth audio signal.
综上所述,本申请实施例提供的音频处理装置,由于预定频率是使用户的听觉***产生疲劳以及伤害的频率,所以,通过对第一音频信号中预定频率以上的部分或全部音频信号进行剔除,可以减少第二音频信号中包含的使用户的听觉***产生疲劳以及伤害的高音,甚至使第二音频信号中不包含使用户的听觉***产生疲劳以及伤害的高音,从而可以缓解甚至避免高音对用户的听觉***造成的伤害,达到了保护听觉***的效果。In summary, the audio processing device provided in the embodiment of the present application, because the predetermined frequency is a frequency that causes the user's hearing system to be fatigued and injured, therefore, part or all of the audio signals above the predetermined frequency in the first audio signal are processed. Elimination can reduce the treble contained in the second audio signal that causes the user's auditory system to fatigue and hurt, and even make the second audio signal not include the treble that causes the user's auditory system to fatigue and hurt, thereby reducing or even avoiding the treble The damage caused to the user's hearing system has achieved the effect of protecting the hearing system.
当存在起始频率小于预定频率,且截止频率大于预定频率的子带信号时,可以对该子带信号进行剔除,以保护听觉***;还可以保留该子带信号,且不对该子带信号进行衰减处理,以保证音质;还可以保留该子带信号,且对该子带信号进行衰减处理,从而在保护听觉***和保证音质之间进行平衡,即可以对该子带信号进行衰减,以减小该子带信号的信号强度,也即减小该子带信号的音量,这样既可以保护听觉***,也可以保证音质。When there is a subband signal with a start frequency less than a predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal can be removed to protect the auditory system; the subband signal can also be retained without performing the subband signal Attenuation processing to ensure sound quality; the subband signal can also be retained, and the subband signal can be attenuated to balance the protection of the hearing system and the sound quality, that is, the subband signal can be attenuated to reduce the Decreasing the signal strength of the sub-band signal, that is, reducing the volume of the sub-band signal, can not only protect the hearing system, but also ensure the sound quality.
当存在截止频率小于预定频率的子带信号时,对每个子带信号配置一个压缩限幅器,再根据动态范围阈值确定一个预定门限值,通过压缩限幅器对子带信号进行压缩限幅处理,使得压缩限幅处理后子带信号的信号强度小于预定门限值,以减小子带信号的动态范围,既可以通过减少子带信号的动态范围来保护听觉***,也可以使得合成后的第二音频信号较为平滑。When there is a subband signal with a cutoff frequency less than a predetermined frequency, a compression limiter is configured for each subband signal, and a predetermined threshold value is determined according to the dynamic range threshold. The subband signal is compressed and limited by the compression limiter. Processing so that the signal strength of the subband signal after compression and clipping processing is less than a predetermined threshold value to reduce the dynamic range of the subband signal, which can either protect the auditory system by reducing the dynamic range of the subband signal, or make the The second audio signal is smoother.
当电子设备是终端时,图4示出了本申请一个示例性实施例提供的终端400的结构框图。该终端400可以是便携式移动终端,比如:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端400还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。终端400中安装有播放器。When the electronic device is a terminal, FIG. 4 shows a structural block diagram of a terminal 400 provided by an exemplary embodiment of the present application. The terminal 400 may be a portable mobile terminal, such as: smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III, moving picture expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Audio Layer IV, dynamic Photographic expert compression standard audio layer 4) Player, laptop or desktop computer. The terminal 400 may also be called other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like. A player is installed in the terminal 400.
通常,终端400包括有:处理器401和存储器402。Generally, the terminal 400 includes a processor 401 and a memory 402.
处理器401可以包括一个或多个处理核心,比如4核心处理器、8核心处 理器等。处理器401可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器401也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器401可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器401还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 401 may use at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). achieve. The processor 401 may also include a main processor and a co-processor. The main processor is a processor for processing data in the wake-up state, also called a CPU (Central Processing Unit). The co-processor is Low-power processor for processing data in standby. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor, and the AI processor is configured to process computing operations related to machine learning.
存储器402可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器402还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器402中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器401所执行以实现本申请中方法实施例提供的音频处理方法。The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction that is executed by the processor 401 to implement the audio processing provided by the method embodiment in this application method.
在一些实施例中,终端400还可选包括有:***设备接口403和至少一个***设备。处理器401、存储器402和***设备接口403之间可以通过总线或信号线相连。各个***设备可以通过总线、信号线或电路板与***设备接口403相连。具体地,***设备包括:射频电路404、触摸显示屏405、摄像头406、音频电路407、定位组件408和电源409中的至少一种。In some embodiments, the terminal 400 may optionally include a peripheral device interface 403 and at least one peripheral device. The processor 401, the memory 402, and the peripheral device interface 403 may be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 403 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 404, a touch display screen 405, a camera 406, an audio circuit 407, a positioning component 408, and a power source 409.
***设备接口403可被用于将I/O(Input/Output,输入/输出)相关的至少一个***设备连接到处理器401和存储器402。在一些实施例中,处理器401、存储器402和***设备接口403被集成在同一芯片或电路板上;在一些其他实施例中,处理器401、存储器402和***设备接口403中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 403 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 401 and the memory 402. In some embodiments, the processor 401, the memory 402, and the peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 401, the memory 402, and the peripheral device interface 403 or Both can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
射频电路404用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路404通过电磁信号与通信网络以及其他通信设备进行通信。射频电路404将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路404包括:天线***、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模 块卡等等。射频电路404可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路404还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 404 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 404 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, mobile communication networks of various generations (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 404 may further include circuits related to Near Field Communication (NFC), which is not limited in this application.
显示屏405用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏405是触摸显示屏时,显示屏405还具有采集在显示屏405的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器401进行处理。此时,显示屏405还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏405可以为一个,设置终端400的前面板;在另一些实施例中,显示屏405可以为至少两个,分别设置在终端400的不同表面或呈折叠设计;在再一些实施例中,显示屏405可以是柔性显示屏,设置在终端400的弯曲表面上或折叠面上。甚至,显示屏405还可以设置成非矩形的不规则图形,也即异形屏。显示屏405可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to collect touch signals on or above the surface of the display screen 405. The touch signal can be input as a control signal to the processor 401 for processing. At this time, the display screen 405 may also be used to provide a virtual button and / or a virtual keyboard, which is also called a soft button and / or a soft keyboard. In some embodiments, the display screen 405 may be one, and the front panel of the terminal 400 is provided; in other embodiments, the display screen 405 may be at least two, which are respectively disposed on different surfaces of the terminal 400 or have a folded design; In still other embodiments, the display screen 405 may be a flexible display screen disposed on a curved surface or a folded surface of the terminal 400. Moreover, the display screen 405 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 405 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
摄像头组件406用于采集图像或视频。可选地,摄像头组件406包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件406还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera component 406 is used for capturing images or videos. Optionally, the camera component 406 includes a front camera and a rear camera. Generally, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, each of which is a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the integration of the main camera and the depth-of-field camera. Integrate with a wide-angle camera to achieve panoramic shooting and VR (Virtual Reality, virtual reality) shooting functions or other fusion shooting functions. In some embodiments, the camera assembly 406 may further include a flash. The flash can be a monochrome temperature flash or a dual color temperature flash. A dual color temperature flash is a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
音频电路407可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器401进行处理,或者输入至射频电路404以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端400的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器401或射频电路404的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶 瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路407还可以包括耳机插孔。The audio circuit 407 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 401 for processing, or input them to the radio frequency circuit 404 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively disposed at different parts of the terminal 400. The microphone can also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The speaker can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for ranging purposes. In some embodiments, the audio circuit 407 may further include a headphone jack.
定位组件408用于定位终端400的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件408可以是基于美国的GPS(Global Positioning System,全球定位***)、中国的北斗***、俄罗斯的格雷纳斯***或欧盟的伽利略***的定位组件。The positioning component 408 is used to locate the current geographic position of the terminal 400 to implement navigation or LBS (Location Based Service). The positioning component 408 may be a positioning component based on the United States' GPS (Global Positioning System), the Beidou system in China, the Granas system in Russia, or the Galileo system in the European Union.
电源409用于为终端400中的各个组件进行供电。电源409可以是交流电、直流电、一次性电池或可充电电池。当电源409包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。The power supply 409 is used to power various components in the terminal 400. The power source 409 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 409 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端400还包括有一个或多个传感器410。该一个或多个传感器410包括但不限于:加速度传感器411、陀螺仪传感器412、压力传感器413、指纹传感器414、光学传感器415以及接近传感器416。In some embodiments, the terminal 400 further includes one or more sensors 410. The one or more sensors 410 include, but are not limited to, an acceleration sensor 411, a gyroscope sensor 412, a pressure sensor 413, a fingerprint sensor 414, an optical sensor 415, and a proximity sensor 416.
加速度传感器411可以检测以终端400建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器411可以用于检测重力加速度在三个坐标轴上的分量。处理器401可以根据加速度传感器411采集的重力加速度信号,控制触摸显示屏405以横向视图或纵向视图进行用户界面的显示。加速度传感器411还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 411 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established by the terminal 400. For example, the acceleration sensor 411 may be used to detect components of the acceleration of gravity on three coordinate axes. The processor 401 may control the touch display screen 405 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 may also be used for collecting motion data of a game or a user.
陀螺仪传感器412可以检测终端400的机体方向及转动角度,陀螺仪传感器412可以与加速度传感器411协同采集用户对终端400的3D动作。处理器401根据陀螺仪传感器412采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 412 can detect the body direction and rotation angle of the terminal 400, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect a 3D motion of the user on the terminal 400. The processor 401 can implement the following functions according to the data collected by the gyro sensor 412: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
压力传感器413可以设置在终端400的侧边框和/或触摸显示屏405的下层。当压力传感器413设置在终端400的侧边框时,可以检测用户对终端400的握持信号,由处理器401根据压力传感器413采集的握持信号进行左右手识别或快捷操作。当压力传感器413设置在触摸显示屏405的下层时,由处理器401根据用户对触摸显示屏405的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 413 may be disposed on a side frame of the terminal 400 and / or a lower layer of the touch display screen 405. When the pressure sensor 413 is disposed on the side frame of the terminal 400, a user's holding signal to the terminal 400 can be detected, and the processor 401 can perform left-right hand recognition or quick operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed on the lower layer of the touch display screen 405, the processor 401 operates according to the user's pressure operation on the touch display screen 405 to control the operable controls on the UI interface. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器414用于采集用户的指纹,由处理器401根据指纹传感器414采集到的指纹识别用户的身份,或者,由指纹传感器414根据采集到的指纹识 别用户的身份。在识别出用户的身份为可信身份时,由处理器401授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器414可以被设置终端400的正面、背面或侧面。当终端400上设置有物理按键或厂商Logo时,指纹传感器414可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 414 is used to collect a user's fingerprint, and the processor 401 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as trusted, the processor 401 authorizes the user to perform related sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 414 may be provided on the front, back, or side of the terminal 400. When a physical button or a manufacturer's logo is set on the terminal 400, the fingerprint sensor 414 can be integrated with the physical button or the manufacturer's logo.
光学传感器415用于采集环境光强度。在一个实施例中,处理器401可以根据光学传感器415采集的环境光强度,控制触摸显示屏405的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏405的显示亮度;当环境光强度较低时,调低触摸显示屏405的显示亮度。在另一个实施例中,处理器401还可以根据光学传感器415采集的环境光强度,动态调整摄像头组件406的拍摄参数。The optical sensor 415 is used to collect ambient light intensity. In one embodiment, the processor 401 may control the display brightness of the touch display screen 405 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is decreased. In another embodiment, the processor 401 may also dynamically adjust the shooting parameters of the camera component 406 according to the ambient light intensity collected by the optical sensor 415.
接近传感器416,也称距离传感器,通常设置在终端400的前面板。接近传感器416用于采集用户与终端400的正面之间的距离。在一个实施例中,当接近传感器416检测到用户与终端400的正面之间的距离逐渐变小时,由处理器401控制触摸显示屏405从亮屏状态切换为息屏状态;当接近传感器416检测到用户与终端400的正面之间的距离逐渐变大时,由处理器401控制触摸显示屏405从息屏状态切换为亮屏状态。The proximity sensor 416, also called a distance sensor, is usually disposed on the front panel of the terminal 400. The proximity sensor 416 is used to collect the distance between the user and the front side of the terminal 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the terminal 400 becomes gradually smaller, the processor 401 controls the touch display screen 405 to switch from the bright screen state to the closed screen state; when the proximity sensor 416 detects When the distance between the user and the front side of the terminal 400 gradually becomes larger, the processor 401 controls the touch display screen 405 to switch from the on-screen state to the on-screen state.
本领域技术人员可以理解,图4中示出的结构并不构成对终端400的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 4 does not constitute a limitation on the terminal 400, and may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.
本申请一个实施例提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如上所述的音频处理方法。An embodiment of the present application provides a computer-readable storage medium. The storage medium stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, or the instruction set. A code set or instruction set is loaded and executed by the processor to implement the audio processing method as described above.
本申请一个实施例提供了一种电子设备,所述电子设备包括:An embodiment of the present application provides an electronic device. The electronic device includes:
一个或多个处理器;和,One or more processors; and,
存储器;Memory
所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于执行以下操作的指令:The memory stores one or more programs configured to be executed by the one or more processors, the one or more programs containing instructions for performing the following operations:
获取待处理的第一音频信号;Obtaining a first audio signal to be processed;
对所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;Removing some or all of the audio signals above a predetermined frequency from the first audio signal to obtain a second audio signal, where the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system;
对所述第二音频信号进行输出。And outputting the second audio signal.
可选的,所述预定频率大于等于17.5kHz。Optionally, the predetermined frequency is 17.5 kHz or more.
可选的,所述一个或多个程序还包含用于执行以下操作的指令:Optionally, the one or more programs further include instructions for performing the following operations:
将所述第一音频信号划分成n个子带信号,所述n为大于等于2的正整数;Dividing the first audio signal into n subband signals, where n is a positive integer greater than or equal to 2;
当存在起始频率大于或等于所述预定频率的子带信号时,对所述子带信号进行剔除;When there is a subband signal with an initial frequency greater than or equal to the predetermined frequency, culling the subband signal;
对剩余的子带信号进行合成,得到所述第二音频信号。The remaining subband signals are synthesized to obtain the second audio signal.
可选的,所述一个或多个程序还包含用于执行以下操作的指令:Optionally, the one or more programs further include instructions for performing the following operations:
在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,当存在起始频率小于所述预定频率,且截止频率大于所述预定频率的子带信号时,对所述子带信号进行衰减。Before the synthesizing the remaining subband signals to obtain the second audio signal, when there is a subband signal having a start frequency less than the predetermined frequency and a cutoff frequency greater than the predetermined frequency, With signal attenuation.
可选的,所述一个或多个程序还包含用于执行以下操作的指令:Optionally, the one or more programs further include instructions for performing the following operations:
按照预定衰减比例对所述子带信号的信号强度进行衰减,所述预定衰减比例大于等于0且小于等于1。Attenuate the signal strength of the subband signal according to a predetermined attenuation ratio, where the predetermined attenuation ratio is greater than or equal to 0 and less than or equal to 1.
可选的,所述一个或多个程序还包含用于执行以下操作的指令:Optionally, the one or more programs further include instructions for performing the following operations:
在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,当存在截止频率小于所述预定频率的子带信号时,对所述子带信号进行压缩限幅处理,压缩限幅处理后所述子带信号的信号强度小于等于预定门限值,所述预定门限值是根据动态范围阈值确定的,所述动态范围阈值是使所述听觉***产生疲劳以及伤害的动态范围。Before the synthesizing the remaining subband signals to obtain the second audio signal, when there is a subband signal having a cutoff frequency smaller than the predetermined frequency, performing compression and limit processing on the subband signal, the compression limit After the amplitude processing, the signal strength of the sub-band signal is less than or equal to a predetermined threshold value, which is determined according to a dynamic range threshold value, which is a dynamic range that causes the hearing system to generate fatigue and injury. .
可选的,所述一个或多个程序还包含用于执行以下操作的指令:Optionally, the one or more programs further include instructions for performing the following operations:
根据预定压缩比对所述子带信号进行压缩处理,所述预定压缩比用于指示对所述子带信号的压缩速度的快慢,且压缩处理后所述子带信号的动态范围小于所述动态范围阈值;Compressing the subband signal according to a predetermined compression ratio, where the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after the compression processing is smaller than the dynamic range Range threshold
根据预定增益对所述压缩处理后的子带信号进行增益处理,所述预定增益用于指示对所述子带信号的信号强度的放大倍数,且所述预定增益大于等于0且小于等于所述预定门限值的绝对值。Performing gain processing on the compression-processed subband signal according to a predetermined gain, where the predetermined gain is used to indicate a magnification of a signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to the The absolute value of the predetermined threshold.
可选的,所述一个或多个程序还包含用于执行以下操作的指令:Optionally, the one or more programs further include instructions for performing the following operations:
获取第三音频信号和窗函数;对所述第三音频信号进行采样,得到采样值;当所述采样值每构成一个音频帧时,根据所述窗函数对所述音频帧进行加窗处理,得到所述第一音频信号,所述音频帧所包含的采样值的数量等于所述窗函数的窗长的数值;Acquiring a third audio signal and a window function; sampling the third audio signal to obtain a sample value; and when each of the sampled values constitutes an audio frame, performing window processing on the audio frame according to the window function, Obtaining the first audio signal, and the number of sampling values included in the audio frame is equal to a value of a window length of the window function;
根据所述窗函数对所述第二音频信号进行逆窗处理,得到第四音频信号;对所述第四音频信号进行输出。Performing inverse window processing on the second audio signal according to the window function to obtain a fourth audio signal; and outputting the fourth audio signal.
需要说明的是:上述实施例提供的音频处理装置在进行音频处理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将音频处理装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的音频处理装置与音频处理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the audio processing device provided in the foregoing embodiment performs audio processing, only the above-mentioned division of functional modules is used as an example. In practical applications, the foregoing functions may be allocated by different functional modules as required. That is, the internal structure of the audio processing device is divided into different functional modules to complete all or part of the functions described above. In addition, the audio processing apparatus and the audio processing method embodiments provided by the foregoing embodiments belong to the same concept. For specific implementation processes, refer to the method embodiments, and details are not described herein again.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps for implementing the foregoing embodiments may be implemented by hardware, or may be instructed by a program to complete related hardware. The program may be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk.
以上所述并不用以限制本申请实施例,凡在本申请实施例的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。The above is not intended to limit the embodiments of the present application. Any modification, equivalent replacement, or improvement made within the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims (25)

  1. 一种音频处理方法,其特征在于,所述方法包括:An audio processing method, characterized in that the method includes:
    获取待处理的第一音频信号;Obtaining a first audio signal to be processed;
    对所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;Removing some or all of the audio signals above a predetermined frequency from the first audio signal to obtain a second audio signal, where the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system;
    对所述第二音频信号进行输出。And outputting the second audio signal.
  2. 根据权利要求1所述的方法,其特征在于,所述预定频率大于等于17.5kHz。The method according to claim 1, wherein the predetermined frequency is 17.5 kHz or more.
  3. 根据权利要求1所述的方法,其特征在于,所述对所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,包括:The method according to claim 1, wherein the step of removing a part or all of the audio signals above a predetermined frequency in the first audio signal to obtain a second audio signal comprises:
    将所述第一音频信号划分成n个子带信号,所述n为大于等于2的正整数;Dividing the first audio signal into n subband signals, where n is a positive integer greater than or equal to 2;
    当存在起始频率大于或等于所述预定频率的子带信号时,对所述子带信号进行剔除;When there is a subband signal with an initial frequency greater than or equal to the predetermined frequency, culling the subband signal;
    对剩余的子带信号进行合成,得到所述第二音频信号。The remaining subband signals are synthesized to obtain the second audio signal.
  4. 根据权利要求3所述的方法,其特征在于,在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,所述方法还包括:The method according to claim 3, wherein before the synthesizing the remaining subband signals to obtain the second audio signal, the method further comprises:
    当存在起始频率小于所述预定频率,且截止频率大于所述预定频率的子带信号时,对所述子带信号进行衰减。When there is a subband signal with a start frequency less than the predetermined frequency and a cutoff frequency greater than the predetermined frequency, the subband signal is attenuated.
  5. 根据权利要求4所述的方法,其特征在于,所述对所述子带信号进行衰减,包括:The method according to claim 4, wherein the attenuating the subband signal comprises:
    按照预定衰减比例对所述子带信号的信号强度进行衰减,所述预定衰减比例大于等于0且小于等于1。Attenuate the signal strength of the subband signal according to a predetermined attenuation ratio, where the predetermined attenuation ratio is greater than or equal to 0 and less than or equal to 1.
  6. 根据权利要求3所述的方法,其特征在于,在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,所述方法还包括:The method according to claim 3, wherein before the synthesizing the remaining subband signals to obtain the second audio signal, the method further comprises:
    当存在截止频率小于所述预定频率的子带信号时,对所述子带信号进行压 缩限幅处理,压缩限幅处理后所述子带信号的信号强度小于等于预定门限值,所述预定门限值是根据动态范围阈值确定的,所述动态范围阈值是使所述听觉***产生疲劳以及伤害的动态范围。When there is a subband signal with a cutoff frequency smaller than the predetermined frequency, the subband signal is compressed and limited. After the compression and limiting processing, the signal strength of the subband signal is less than or equal to a predetermined threshold. The threshold value is determined according to a dynamic range threshold, which is a dynamic range that causes fatigue and injury to the auditory system.
  7. 根据权利要求6所述的方法,其特征在于,所述对所述子带信号进行压缩限幅处理,包括:The method according to claim 6, wherein the performing compression and clipping processing on the subband signal comprises:
    根据预定压缩比对所述子带信号进行压缩处理,所述预定压缩比用于指示对所述子带信号的压缩速度的快慢,且压缩处理后所述子带信号的动态范围小于所述动态范围阈值;Compressing the subband signal according to a predetermined compression ratio, where the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after the compression processing is smaller than the dynamic range Range threshold
    根据预定增益对所述压缩处理后的子带信号进行增益处理,所述预定增益用于指示对所述子带信号的信号强度的放大倍数,且所述预定增益大于等于0且小于等于所述预定门限值的绝对值。Performing gain processing on the compression-processed subband signal according to a predetermined gain, where the predetermined gain is used to indicate a magnification of a signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to the The absolute value of the predetermined threshold.
  8. 根据权利要求1至7任一所述的方法,其特征在于,The method according to any one of claims 1 to 7, characterized in that:
    所述获取待处理的第一音频信号,包括:获取第三音频信号和窗函数;对所述第三音频信号进行采样,得到采样值;当所述采样值每构成一个音频帧时,根据所述窗函数对所述音频帧进行加窗处理,得到所述第一音频信号,所述音频帧所包含的采样值的数量等于所述窗函数的窗长的数值;The acquiring the first audio signal to be processed includes: acquiring a third audio signal and a window function; sampling the third audio signal to obtain a sampling value; and when each of the sampling values constitutes an audio frame, The window function performs windowing processing on the audio frame to obtain the first audio signal, and the number of sampling values included in the audio frame is equal to a value of a window length of the window function;
    所述对所述第二音频信号进行输出,包括:根据所述窗函数对所述第二音频信号进行逆窗处理,得到第四音频信号;对所述第四音频信号进行输出。The outputting the second audio signal includes: performing inverse window processing on the second audio signal according to the window function to obtain a fourth audio signal; and outputting the fourth audio signal.
  9. 一种音频处理装置,其特征在于,所述装置包括:An audio processing device, characterized in that the device includes:
    获取模块,用于获取待处理的第一音频信号;An acquisition module, configured to acquire a first audio signal to be processed;
    处理模块,用于对所述获取模块得到的所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;A processing module, configured to remove some or all of the audio signals above a predetermined frequency from the first audio signal obtained by the obtaining module to obtain a second audio signal, where the predetermined frequency causes fatigue of a user's hearing system and Frequency of injury
    输出模块,用于对所述处理模块得到的所述第二音频信号进行输出。An output module is configured to output the second audio signal obtained by the processing module.
  10. 根据权利要求9所述的装置,其特征在于,所述预定频率大于等于17.5kHz。The device according to claim 9, wherein the predetermined frequency is 17.5 kHz or more.
  11. 根据权利要求9所述的装置,其特征在于,所述处理模块,还用于:The apparatus according to claim 9, wherein the processing module is further configured to:
    将所述第一音频信号划分成n个子带信号,所述n为大于等于2的正整数;Dividing the first audio signal into n subband signals, where n is a positive integer greater than or equal to 2;
    当存在起始频率大于或等于所述预定频率的子带信号时,对所述子带信号进行剔除;When there is a subband signal with an initial frequency greater than or equal to the predetermined frequency, culling the subband signal;
    对剩余的子带信号进行合成,得到所述第二音频信号。The remaining subband signals are synthesized to obtain the second audio signal.
  12. 根据权利要求11所述的装置,其特征在于,所述处理模块,还用于:The apparatus according to claim 11, wherein the processing module is further configured to:
    在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,当存在起始频率小于所述预定频率,且截止频率大于所述预定频率的子带信号时,对所述子带信号进行衰减。Before the synthesizing the remaining subband signals to obtain the second audio signal, when there is a subband signal having a start frequency less than the predetermined frequency and a cutoff frequency greater than the predetermined frequency, With signal attenuation.
  13. 根据权利要求12所述的装置,其特征在于,所述处理模块,还用于:The apparatus according to claim 12, wherein the processing module is further configured to:
    按照预定衰减比例对所述子带信号的信号强度进行衰减,所述预定衰减比例大于等于0且小于等于1。Attenuate the signal strength of the subband signal according to a predetermined attenuation ratio, where the predetermined attenuation ratio is greater than or equal to 0 and less than or equal to 1.
  14. 根据权利要求11所述的装置,其特征在于,所述处理模块,还用于:The apparatus according to claim 11, wherein the processing module is further configured to:
    在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,当存在截止频率小于所述预定频率的子带信号时,对所述子带信号进行压缩限幅处理,压缩限幅处理后所述子带信号的信号强度小于等于预定门限值,所述预定门限值是根据动态范围阈值确定的,所述动态范围阈值是使所述听觉***产生疲劳以及伤害的动态范围。Before the synthesizing the remaining subband signals to obtain the second audio signal, when there is a subband signal having a cutoff frequency smaller than the predetermined frequency, performing compression and limit processing on the subband signal, the compression limit After the amplitude processing, the signal strength of the sub-band signal is less than or equal to a predetermined threshold value, which is determined according to a dynamic range threshold value, which is a dynamic range that causes the hearing system to generate fatigue and injury. .
  15. 根据权利要求14所述的装置,其特征在于,所述处理模块,还用于:The apparatus according to claim 14, wherein the processing module is further configured to:
    根据预定压缩比对所述子带信号进行压缩处理,所述预定压缩比用于指示对所述子带信号的压缩速度的快慢,且压缩处理后所述子带信号的动态范围小于所述动态范围阈值;Compressing the subband signal according to a predetermined compression ratio, where the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after the compression processing is smaller than the dynamic range Range threshold
    根据预定增益对所述压缩处理后的子带信号进行增益处理,所述预定增益用于指示对所述子带信号的信号强度的放大倍数,且所述预定增益大于等于0且小于等于所述预定门限值的绝对值。Performing gain processing on the compression-processed subband signal according to a predetermined gain, where the predetermined gain is used to indicate a magnification of a signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to the The absolute value of the predetermined threshold.
  16. 根据权利要求9至15任一所述的装置,其特征在于,The device according to any one of claims 9 to 15, wherein:
    所述获取模块,还用于:获取第三音频信号和窗函数;对所述第三音频信号进行采样,得到采样值;当所述采样值每构成一个音频帧时,根据所述窗函数对所述音频帧进行加窗处理,得到所述第一音频信号,所述音频帧所包含的采样值的数量等于所述窗函数的窗长的数值;The acquisition module is further configured to: acquire a third audio signal and a window function; sample the third audio signal to obtain a sample value; and when each of the sampled values constitutes an audio frame, use the window function to Performing windowing processing on the audio frame to obtain the first audio signal, and the number of sampling values included in the audio frame is equal to a value of a window length of the window function;
    所述输出模块,还用于:根据所述窗函数对所述第二音频信号进行逆窗处理,得到第四音频信号;对所述第四音频信号进行输出。The output module is further configured to perform inverse window processing on the second audio signal according to the window function to obtain a fourth audio signal; and output the fourth audio signal.
  17. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, characterized in that the electronic device includes:
    一个或多个处理器;和,One or more processors; and,
    存储器;Memory
    所述存储器存储有一个或多个程序,所述一个或多个程序被配置成由所述一个或多个处理器执行,所述一个或多个程序包含用于执行以下操作的指令:The memory stores one or more programs configured to be executed by the one or more processors, the one or more programs containing instructions for performing the following operations:
    获取待处理的第一音频信号;Obtaining a first audio signal to be processed;
    对所述第一音频信号中预定频率以上的部分或全部音频信号进行剔除,得到第二音频信号,所述预定频率是使用户的听觉***产生疲劳以及伤害的频率;Removing some or all of the audio signals above a predetermined frequency from the first audio signal to obtain a second audio signal, where the predetermined frequency is a frequency that causes fatigue and injury to the user's hearing system;
    对所述第二音频信号进行输出。And outputting the second audio signal.
  18. 根据权利要求17所述的电子设备,其特征在于,所述预定频率大于等于17.5kHz。The electronic device according to claim 17, wherein the predetermined frequency is 17.5 kHz or more.
  19. 根据权利要求17所述的电子设备,其特征在于,所述一个或多个程序还包含用于执行以下操作的指令:The electronic device of claim 17, wherein the one or more programs further comprise instructions for performing the following operations:
    将所述第一音频信号划分成n个子带信号,所述n为大于等于2的正整数;Dividing the first audio signal into n subband signals, where n is a positive integer greater than or equal to 2;
    当存在起始频率大于或等于所述预定频率的子带信号时,对所述子带信号进行剔除;When there is a subband signal with an initial frequency greater than or equal to the predetermined frequency, culling the subband signal;
    对剩余的子带信号进行合成,得到所述第二音频信号。The remaining subband signals are synthesized to obtain the second audio signal.
  20. 根据权利要求19所述的电子设备,其特征在于,所述一个或多个程序还包含用于执行以下操作的指令:The electronic device of claim 19, wherein the one or more programs further comprise instructions for performing the following operations:
    在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,当存在起始频率小于所述预定频率,且截止频率大于所述预定频率的子带信号时,对 所述子带信号进行衰减。Before the synthesizing the remaining subband signals to obtain the second audio signal, when there is a subband signal having a start frequency less than the predetermined frequency and a cutoff frequency greater than the predetermined frequency, With signal attenuation.
  21. 根据权利要求20所述的电子设备,其特征在于,所述一个或多个程序还包含用于执行以下操作的指令:The electronic device according to claim 20, wherein the one or more programs further comprise instructions for performing the following operations:
    按照预定衰减比例对所述子带信号的信号强度进行衰减,所述预定衰减比例大于等于0且小于等于1。Attenuate the signal strength of the subband signal according to a predetermined attenuation ratio, where the predetermined attenuation ratio is greater than or equal to 0 and less than or equal to 1.
  22. 根据权利要求19所述的电子设备,其特征在于,所述一个或多个程序还包含用于执行以下操作的指令:The electronic device of claim 19, wherein the one or more programs further comprise instructions for performing the following operations:
    在所述对剩余的子带信号进行合成,得到所述第二音频信号之前,当存在截止频率小于所述预定频率的子带信号时,对所述子带信号进行压缩限幅处理,压缩限幅处理后所述子带信号的信号强度小于等于预定门限值,所述预定门限值是根据动态范围阈值确定的,所述动态范围阈值是使所述听觉***产生疲劳以及伤害的动态范围。Before the synthesizing the remaining subband signals to obtain the second audio signal, when there is a subband signal having a cutoff frequency smaller than the predetermined frequency, performing compression and limit processing on the subband signal, the compression limit After the amplitude processing, the signal strength of the sub-band signal is less than or equal to a predetermined threshold value, which is determined according to a dynamic range threshold value, which is a dynamic range that causes the hearing system to generate fatigue and injury. .
  23. 根据权利要求22所述的电子设备,其特征在于,所述一个或多个程序还包含用于执行以下操作的指令:The electronic device according to claim 22, wherein the one or more programs further comprise instructions for performing the following operations:
    根据预定压缩比对所述子带信号进行压缩处理,所述预定压缩比用于指示对所述子带信号的压缩速度的快慢,且压缩处理后所述子带信号的动态范围小于所述动态范围阈值;Compressing the subband signal according to a predetermined compression ratio, where the predetermined compression ratio is used to indicate how fast the subband signal is compressed, and the dynamic range of the subband signal after the compression processing is smaller than the dynamic range Range threshold
    根据预定增益对所述压缩处理后的子带信号进行增益处理,所述预定增益用于指示对所述子带信号的信号强度的放大倍数,且所述预定增益大于等于0且小于等于所述预定门限值的绝对值。Performing gain processing on the compression-processed subband signal according to a predetermined gain, where the predetermined gain is used to indicate a magnification of a signal strength of the subband signal, and the predetermined gain is greater than or equal to 0 and less than or equal to the The absolute value of the predetermined threshold.
  24. 根据权利要求17至23任一所述的电子设备,其特征在于,所述一个或多个程序还包含用于执行以下操作的指令:The electronic device according to any one of claims 17 to 23, wherein the one or more programs further include instructions for performing the following operations:
    获取第三音频信号和窗函数;对所述第三音频信号进行采样,得到采样值;当所述采样值每构成一个音频帧时,根据所述窗函数对所述音频帧进行加窗处理,得到所述第一音频信号,所述音频帧所包含的采样值的数量等于所述窗函数的窗长的数值;Acquiring a third audio signal and a window function; sampling the third audio signal to obtain a sample value; and when each of the sampled values constitutes an audio frame, performing window processing on the audio frame according to the window function, Obtaining the first audio signal, and the number of sampling values included in the audio frame is equal to a value of a window length of the window function;
    根据所述窗函数对所述第二音频信号进行逆窗处理,得到第四音频信号; 对所述第四音频信号进行输出。Performing inverse window processing on the second audio signal according to the window function to obtain a fourth audio signal; and outputting the fourth audio signal.
  25. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至8任一所述的音频处理方法。A computer-readable storage medium, characterized in that the storage medium stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or The instruction set is loaded and executed by the processor to implement the audio processing method according to any one of claims 1 to 8.
PCT/CN2018/117898 2018-06-13 2018-11-28 Audio processing method and device, storage medium and electronic device WO2019237666A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810609905.7A CN108804072A (en) 2018-06-13 2018-06-13 Audio-frequency processing method, device, storage medium and terminal
CN201810609905.7 2018-06-13

Publications (1)

Publication Number Publication Date
WO2019237666A1 true WO2019237666A1 (en) 2019-12-19

Family

ID=64085834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117898 WO2019237666A1 (en) 2018-06-13 2018-11-28 Audio processing method and device, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN108804072A (en)
WO (1) WO2019237666A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804072A (en) * 2018-06-13 2018-11-13 广州酷狗计算机科技有限公司 Audio-frequency processing method, device, storage medium and terminal
CN110074780A (en) * 2019-04-25 2019-08-02 内蒙古农业大学 A kind of music pattern adjusting method based on ERP technology
CN110139181B (en) * 2019-04-30 2020-11-06 维沃移动通信有限公司 Audio processing method and device, earphone, terminal equipment and storage medium
CN110931021B (en) * 2019-10-29 2023-10-13 平安科技(深圳)有限公司 Audio signal processing method and device
CN111128167B (en) * 2019-12-30 2023-10-27 深圳创维-Rgb电子有限公司 Far-field voice awakening method and device, electronic product and storage medium
CN111884673A (en) * 2020-08-05 2020-11-03 成都国卫通信技术有限公司 Frequency domain filtering interference suppression method based on inverse window compensation processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104185870A (en) * 2012-03-12 2014-12-03 歌乐株式会社 Audio signal processing device and audio signal processing method
CN104409086A (en) * 2014-12-01 2015-03-11 联想(北京)有限公司 Method for audio processing and electronic equipment
CN104934043A (en) * 2015-06-17 2015-09-23 广东欧珀移动通信有限公司 Audio processing method and device
CN107833579A (en) * 2017-10-30 2018-03-23 广州酷狗计算机科技有限公司 Noise cancellation method, device and computer-readable recording medium
CN108804072A (en) * 2018-06-13 2018-11-13 广州酷狗计算机科技有限公司 Audio-frequency processing method, device, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104185870A (en) * 2012-03-12 2014-12-03 歌乐株式会社 Audio signal processing device and audio signal processing method
CN104409086A (en) * 2014-12-01 2015-03-11 联想(北京)有限公司 Method for audio processing and electronic equipment
CN104934043A (en) * 2015-06-17 2015-09-23 广东欧珀移动通信有限公司 Audio processing method and device
CN107833579A (en) * 2017-10-30 2018-03-23 广州酷狗计算机科技有限公司 Noise cancellation method, device and computer-readable recording medium
CN108804072A (en) * 2018-06-13 2018-11-13 广州酷狗计算机科技有限公司 Audio-frequency processing method, device, storage medium and terminal

Also Published As

Publication number Publication date
CN108804072A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
WO2019237666A1 (en) Audio processing method and device, storage medium and electronic device
US10924877B2 (en) Audio signal processing method, terminal and storage medium thereof
CN111050250B (en) Noise reduction method, device, equipment and storage medium
CN109524016B (en) Audio processing method and device, electronic equipment and storage medium
WO2020052088A1 (en) Method and device for recovering audio signal
CN110166890B (en) Audio playing and collecting method and device and storage medium
US9241215B2 (en) Mobile apparatus and control method thereof
CN109547848B (en) Loudness adjustment method and device, electronic equipment and storage medium
CN111586431B (en) Method, device and equipment for live broadcast processing and storage medium
US10461712B1 (en) Automatic volume leveling
CN111445901B (en) Audio data acquisition method and device, electronic equipment and storage medium
CN111083289B (en) Audio playing method and device, storage medium and mobile terminal
WO2019237667A1 (en) Method and apparatus for playing audio data
CN112133332B (en) Method, device and equipment for playing audio
WO2021139535A1 (en) Method, apparatus and system for playing audio, and device and storage medium
WO2023151526A1 (en) Audio acquisition method and apparatus, electronic device and peripheral component
CN110856152A (en) Method, device, electronic equipment and medium for playing audio data
US20230014836A1 (en) Method for chorus mixing, apparatus, electronic device and storage medium
CN113516991A (en) Audio playing and equipment management method and device based on group session
CN109360582B (en) Audio processing method, device and storage medium
CN109360577B (en) Method, apparatus, and storage medium for processing audio
CN112133319A (en) Audio generation method, device, equipment and storage medium
CN111508513B (en) Audio processing method and device and computer storage medium
CN113632060A (en) Device, method, computer program or system for indicating audibility of audio content presented in a virtual space
CN113380249B (en) Voice control method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18922622

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18922622

Country of ref document: EP

Kind code of ref document: A1