CN106328111B - Audio-frequency processing method and device - Google Patents
Audio-frequency processing method and device Download PDFInfo
- Publication number
- CN106328111B CN106328111B CN201610703661.XA CN201610703661A CN106328111B CN 106328111 B CN106328111 B CN 106328111B CN 201610703661 A CN201610703661 A CN 201610703661A CN 106328111 B CN106328111 B CN 106328111B
- Authority
- CN
- China
- Prior art keywords
- audio frame
- sampling rate
- processing
- frequency
- audio
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H1/00—Details of electrophonic musical instruments
- G10H1/02—Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H2210/00—Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
- G10H2210/155—Musical effects
- G10H2210/195—Modulation effects, i.e. smooth non-discontinuous variations over a time interval, e.g. within a note, melody or musical transition, of any sound parameter, e.g. amplitude, pitch, spectral response, playback speed
- G10H2210/201—Vibrato, i.e. rapid, repetitive and smooth variation of amplitude, pitch or timbre within a note or chord
Abstract
The present invention relates to a kind of audio-frequency processing method and devices, belong to multi-media processing field.The method includes:After often receiving an audio frame, according to preset beat frequency and trembling amplitude, the resampling ratio of the audio frame is calculated;First is carried out to the audio frame to be filtered, and obtains the first processing audio frame;According to the resampling ratio, resampling interpolation processing is carried out to the first processing audio frame, obtains second processing audio frame;Second is carried out to obtained second processing audio frame to be filtered, and obtains trill audio signal.Due to pending audio signal is filtered and the processing such as resampling difference after, periodically-varied fundamental frequency can be achieved, therefore trill audio has been reached so that commonly singing the sound that fan normally sends out can also achieve the effect that trill, user's viscosity are high.
Description
Technical field
The present invention relates to multi-media processing field, more particularly to a kind of audio-frequency processing method and device.
Background technology
The mankind sing activity after developing to certain altitude, have been gradually added into various singing skills, and then form various countries
The colourful vocal music culture of various nationalities.In singing, people send out that a series of frequencies, amplitude are different to shake by vocal cords
Dynamic, these vibrations are by being compounded to form sound.There are one the vibration that frequency is minimum in these vibrations, it is by the sound that it sends out
Fundamental tone.The frequency of fundamental tone is fundamental frequency, determines the pitch of entire sound.In various singing skills, trill is more popular in recent years
A kind of singing skills.Wherein, it is in wave activity, also known as sound wave that trill, which refers to song, is a kind of higher singing skill.
The principle that trill generates is when breath is made a sound by vocal cords, and chanteur consciously vibrates it, makes vocal cord vibration frequency
Rate is vibrated with certain frequency around fundamental frequency back and forth, and then realizes that the trill of arbitrary trembling amplitude and beat frequency generates.But it is right
It is commonly sung for fan in what is practiced without vocal music, it is difficult to which the vocal cord vibration by oneself achievees the effect that trill.Cause
There is an urgent need for a kind of audio-frequency processing methods for this so that commonly trill can also be achieved the effect that by singing the sound that fan normally sends out.
Invention content
To overcome problems of the prior art, a kind of audio-frequency processing method of present invention offer and device.
According to a first aspect of the embodiments of the present invention, a kind of audio-frequency processing method is provided, including:
After often receiving an audio frame, according to preset beat frequency and trembling amplitude, the weight of the audio frame is calculated
Sampling ratio;
First is carried out to the audio frame to be filtered, and obtains the first processing audio frame;
According to the resampling ratio, resampling interpolation processing is carried out to the first processing audio frame, is obtained at second
Manage audio frame;
Second is carried out to obtained second processing audio frame to be filtered, and obtains trill audio signal.
Optionally, described that the audio frame is calculated using following formula according to preset beat frequency and trembling amplitude
Resampling ratio, including:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, A is the trembling amplitude, and fs is the beat frequency, and N is
The duration of the audio frame, Fs are the crude sampling rate of the audio frame, and the value of n is positive integer, and n is the frame of the audio frame
Number.
Optionally, described that audio frame progress first is filtered, the first processing audio frame is obtained, including:
According to the trembling amplitude, the maximum down-sampling rate of the audio frame is calculated;
According to the crude sampling rate of maximum the down-sampling rate and the audio frame, the first algorithm frequency is calculated;
According to the first algorithm frequency, first is carried out to the audio frame and is filtered, the first processing sound is obtained
Frequency frame.
Optionally, the crude sampling rate according to maximum the down-sampling rate and the audio frame, using following formula,
The first algorithm frequency of the first processing audio frame is calculated, including:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is described
Maximum down-sampling rate.
Optionally, described pair of obtained second processing audio frame progress second is filtered, and is obtained trill audio signal, is wrapped
It includes:
According to the trembling amplitude, the maximum up-sampling rate of the audio frame is calculated;
According to the crude sampling rate of maximum the up-sampling rate and the audio frame, the second algorithm frequency is calculated;
According to the second algorithm frequency, second is carried out to the second processing audio and is filtered, trill is obtained
Audio signal.
Optionally, the crude sampling rate according to maximum the up-sampling rate and the audio frame, using following formula,
The second algorithm frequency is calculated, including:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is described
Maximum up-sampling rate.
According to a second aspect of the embodiments of the present invention, a kind of apparatus for processing audio is provided, including:
Computing module is configured as after often receiving an audio frame, according to preset beat frequency and trembling amplitude, meter
Calculate the resampling ratio of the audio frame;
First processing module is configured as being filtered audio frame progress first, obtains the first processing audio frame;
Second processing module is configured as, according to the resampling ratio, adopting the first processing audio frame again
Sample interpolation processing obtains second processing audio frame;
Third processing module is configured as being filtered obtained second processing audio frame progress second, obtains trill
Audio signal.
Optionally, the computing module is configured to apply following formula, calculates the resampling ratio of the audio frame:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, A is the trembling amplitude, and fs is the beat frequency, and N is
The duration of the audio frame, Fs are the crude sampling rate of the audio frame, and the value of n is positive integer, and n is the frame of the audio frame
Number.
Optionally, the first processing module is configured as, according to the trembling amplitude, calculating the maximum of the audio frame
Down-sampling rate;According to the crude sampling rate of maximum the down-sampling rate and the audio frame, the first algorithm frequency is calculated;Root
According to the first algorithm frequency, first is carried out to the audio frame and is filtered, the first processing audio frame is obtained.
Optionally, the first processing module is configured as the original according to maximum the down-sampling rate and the audio frame
Beginning sample rate calculates the first algorithm frequency of the first processing audio frame using following formula:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is described
Maximum down-sampling rate.
Optionally, the Second processing module is configured as, according to the trembling amplitude, calculating the maximum of the audio frame
Up-sampling rate;According to the crude sampling rate of maximum the up-sampling rate and the audio frame, the second algorithm frequency is calculated;Root
According to the second algorithm frequency, second is carried out to the second processing audio and is filtered, trill audio signal is obtained.
Optionally, the Second processing module is configured as the original according to maximum the up-sampling rate and the audio frame
Beginning sample rate calculates the second algorithm frequency using following formula:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is described
Maximum up-sampling rate.
The technical solution that the embodiment of the present invention provides can include the following benefits:
After often receiving an audio frame, according to preset beat frequency and trembling amplitude, the weight of the audio frame is calculated
Sampling ratio, and first is carried out to the audio frame and is filtered, obtain the first processing audio frame;Later, according to the resampling ratio
Rate pair first handles audio frame and carries out resampling interpolation processing, obtains second processing audio frame;Next, to obtain second at
Reason audio frame carries out second and is filtered, and then obtains trill audio signal.Due to being filtered to pending audio signal
, it can be achieved that periodically-varied fundamental frequency after the processing such as wave and resampling difference, therefore trill audio is reached so that common song
Singing the sound that fan normally sends out can also achieve the effect that trill, user's viscosity are high.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not
The disclosure can be limited.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the present invention
Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of audio-frequency processing method shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of audio-frequency processing method shown according to an exemplary embodiment;
Fig. 3 is a kind of block diagram of apparatus for processing audio shown according to an exemplary embodiment;
Fig. 4 is a kind of block diagram of apparatus for processing audio shown according to an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
Fig. 1 is a kind of flow chart of audio-frequency processing method shown according to an exemplary embodiment, as shown in Figure 1, including
Following steps.
In a step 101, after often receiving an audio frame, according to preset beat frequency and trembling amplitude, calculating should
The resampling ratio of audio frame.
In a step 102, it carries out first to the audio frame to be filtered, obtains the first processing audio frame.
In step 103, according to the resampling ratio, resampling interpolation processing is carried out to the first processing audio frame, is obtained
To second processing audio frame.
At step 104, it carries out second to obtained second processing audio frame to be filtered, obtains trill audio signal.
Method provided in an embodiment of the present invention according to preset beat frequency and is quivered after often receiving an audio frame
Dynamic amplitude calculates the resampling ratio of the audio frame, and carries out first to the audio frame and be filtered, and obtains the first processing audio
Frame;Later, audio frame is handled according to the resampling ratio pair first and carries out resampling interpolation processing, obtain second processing audio
Frame;It is filtered next, carrying out second to obtained second processing audio frame, and then obtains trill audio signal.Due to
To pending audio signal be filtered and the processing such as resampling difference after, it can be achieved that periodically-varied fundamental frequency, therefore
Trill audio is reached so that commonly trill, user's viscosity can also be achieved the effect that by singing the sound that fan normally sends out
It is high.
Optionally, the resampling of the audio frame is calculated using following formula according to preset beat frequency and trembling amplitude
Ratio, including:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, A is the trembling amplitude, and fs is the beat frequency, and N is the audio
The duration of frame, Fs are the crude sampling rate of the audio frame, and the value of n is positive integer, and n is the frame number of the audio frame.
Optionally, it carries out first to the audio frame to be filtered, obtains the first processing audio frame, including:
According to the trembling amplitude, the maximum down-sampling rate of the audio frame is calculated;
According to the crude sampling rate of the maximum down-sampling rate and the audio frame, the first algorithm frequency is calculated.
Optionally, according to the crude sampling rate of the maximum down-sampling rate and the audio frame, using following formula, calculate this
First algorithm frequency of one processing audio frame, including:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is under the maximum
Sample rate.
Optionally, it carries out second to obtained second processing audio frame to be filtered, obtains trill audio signal, including:
According to the trembling amplitude, the maximum up-sampling rate of the audio frame is calculated;
According to the crude sampling rate of the maximum up-sampling rate and the audio frame, the second algorithm frequency is calculated;
According to the second algorithm frequency, second is carried out to the second processing audio and is filtered, trill audio is obtained
Signal.
Optionally, according to the crude sampling rate of the maximum up-sampling rate and the audio frame second is calculated using following formula
Algorithm frequency, including:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is in the maximum
Sample rate.
The alternative embodiment that any combination forms the present invention may be used, herein no longer in above-mentioned all optional technical solutions
It repeats one by one.
Fig. 2 is a kind of flow chart of audio-frequency processing method shown according to an exemplary embodiment.As shown in Fig. 2, including
Following steps.
In step 201, after often receiving an audio frame, according to preset beat frequency and trembling amplitude, calculating should
The resampling ratio of audio frame.
In embodiments of the present invention, the audio frame be real-time reception and duration be equal to preset duration audio signal.Its
In, preset duration is to pre-set duration limitation, and the audio frame duration of real-time reception can be handled equal to preset duration, the sound
Frequency frame is voluntarily inputted by user.For example the real-time input audio signal of user is carried out when singing at trill that is, during singing
Reason.After user starts to sing, if the audio signal duration of real-time reception is equal to preset duration, which is equal to preset duration
Audio signal handled as first audio frame.For example, preset duration is 10ms, then when the user's input received
Audio signal duration when reaching 10ms, using the audio signal of the 10ms as first audio frame, later immediately to this first
A audio frame carries out trill processing.Audio signal input by user is continued to, when the audio signal input by user received
When duration reaches 10ms again, then using this when a length of 10ms audio signal as second audio frame, and so on.
In another embodiment, processing can carry out outside trill processing with real-time reception audio signal and in real time, the present invention
Embodiment can also receive the audio signal of one section input by user fixed duration, and using the audio signal as pending audio
Signal is reprocessed after being divided to the pending audio signal.For example, if the duration of pending audio signal is in 10s
Between~50s, preset duration 5ms is at least one audio frame that duration size is 5ms to audio signal framing;If
The duration of pending audio signal is between 50s~100s, preset duration 10ms, i.e., to audio signal framing for when grow up
Small at least one audio frame for 10ms.The embodiment of the present invention is corresponding to the audio signal of preset duration, different durations default
Duration size is without specifically limiting.
In step 202, according to preset beat frequency and trembling amplitude, the resampling ratio of the audio frame is calculated.
In embodiments of the present invention, to each audio frame received, according to preset beat frequency and amplitude is trembleed,
Using following formula one, the resampling ratio of the audio frame is calculated.Wherein formula one is as follows:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, i.e. αnFor the ratio of resampling rate and crude sampling rate, A quivers for this
Dynamic amplitude, fs are the beat frequency, and N is the duration of the audio frame, and Fs is the crude sampling rate of the audio frame, and the value of n is just
Integer, n are the frame number of the audio frame.The duration size of a length of audio frame when wherein.
Wherein, preset beat frequency and trembling amplitude are voluntarily arranged as needed by user.For example, terminal can preset packet
The song of the part containing trill carries out example, and marks the beat frequency and trembling amplitude of trill part, so that user is according to example
The tremolo effect for selecting oneself desired.For example, preset song A realizes tremolo effect at 56 seconds 19 seconds to 2 points at 2 points, mark
Note beat frequency is 5Hz, and trembling amplitude is 0.018.In addition, terminal can also configure input frame, input frame include beat frequency and
Amplitude is trembleed, user directly can input what oneself was wanted in beat frequency and the corresponding input frame of trembling amplitude as needed
Numerical value.For example, if user needs to set beat frequency as 8Hz, trembling amplitude is 0.016, then is corresponded in input in input frame
State numerical value.Wherein, the embodiment of the present invention to setting beat frequency and trembles the mode of amplitude without specifically limiting.
In step 203, it carries out first to the audio frame to be filtered, obtains the first processing audio frame.
In embodiments of the present invention, first is carried out to the audio frame to be filtered, obtain according to the first algorithm frequency
First processing audio frame.Wherein, which is to apply following formula two, according to the maximum down-sampling rate and is somebody's turn to do
What the crude sampling rate of audio frame was calculated:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is under the maximum
Sample rate.
This first is filtered as according to the low-pass filtering treatment of the first algorithm frequency.In the process of low-pass filtering
In, aliasing caused by down-sampling in order to prevent, so the embodiment of the present invention can calculate the first algorithm frequency, root
First is carried out to the audio frame to be filtered, showing for spectral aliasing occurs to avoid the audio frame according to the first algorithm frequency
As.
In step 204, according to resampling ratio, resampling interpolation processing is carried out to the first processing audio frame, is obtained
Second processing audio frame.
In embodiments of the present invention, resampling ratio is for realizing the resampling to audio signal.Wherein, to audio
After signal carries out resampling, is still played out, stored with former sample rate, playing duration can be varied from, while fundamental frequency also can
Make corresponding change.For example, using the 2 multiple value sizes of former sample rate 22K as resampling ratio, according to 44K sample rates to sound
Frequency signal carries out resampling, but audio is still played out with former sample rate 22K, then playing duration can become original playing duration
2 times, while fundamental frequency can also be reduced to original half.I.e. resampling can cause audio signal speed change to modify tone.Due to the generation of trill
It is required that be the modified tone not speed change of audio signal, therefore by being filtered to pending audio signal and the processing such as resampling,
Change fundamental frequency to property performance period, fundamental frequency is made to be vibrated back and forth with certain frequency, the pitch periods required using trill are shaken
It moves and realizes that the trill of arbitrary trembling amplitude and beat frequency generates to realize the not speed change of the modified tone in the vibration period.Make without sound
The common of happy practice sings fan and can produce the works with trill by audio effect processing.Wherein, the embodiment of the present invention
To the method for the not speed change of modifying tone without specifically limiting.
Resampling interpolation is used for filling the gap of the first processing audio frame when first is filtered between audio frame.Profit
With resampling interpolation, state of the audio frame at limited a audio frame can be handled by first, estimate the first processing sound
Approximation state of the frequency frame at other audio frames.On the basis of the first processing audio frame, interpolation audio frame so that this first
It is complete to handle audio frame.Wherein, different resampling interpolation methods can be selected according to actual demand, for example, linear interpolation,
The methods of spline interpolation, Lagrange's interpolation.Counterweight sample interpolation method of the embodiment of the present invention is without specifically limiting
It is fixed.
In step 205, second is carried out to the second processing audio frame to be filtered, obtain according to the second algorithm frequency
To trill audio signal.
Wherein, which is to apply following formula three, according to maximum up-sampling rate and the audio frame
Crude sampling rate is calculated:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is in the maximum
Sample rate.
This second is filtered as according to the low-pass filtering treatment of the second algorithm frequency.In the process of low-pass filtering
In, spectral image phenomenon caused by up-sampling in order to prevent, the embodiment of the present invention can calculate the second algorithm frequency, according to this
Second algorithm frequency carries out second to the audio frame and is filtered, and to avoid the audio frame, there is a phenomenon where spectral images.
It should be noted that empirically otherwise the value of (1+A) is easy to cause and gets out of tune no more than half of semitone.Due to 1 octave packet
Containing 12 semitones, therefore the calculation formula of half of semitone is 2^ (0.5/12)=1.0293, and wherein ^ indicates power operation.Therefore A
Value is preferably not more than 0.0293.
It should be noted that taking above-mentioned steps 203 to mode shown in step 206 to carry out each audio frame
Processing can obtain the corresponding trill audio signal of audio signal input by user later, realize automatically do not have trill to be normal
The audio signal of audio increases trill audio.In addition above-mentioned audio-frequency processing method can voluntarily be completed by terminal.In addition, being limited to end
The processing capacity at end limits, and pending audio signal can be also sent to server and handled, treated by server by terminal
The audio signal of processing carries out audio frequency process, obtains trill audio signal, trill audio signal is returned to terminal again later, this
Inventive embodiments are to the executive agent of audio frequency process without specifically limiting.
Method provided in an embodiment of the present invention according to preset beat frequency and is quivered after often receiving an audio frame
Dynamic amplitude calculates the resampling ratio of the audio frame, and carries out first to the audio frame and be filtered, and obtains the first processing audio
Frame;Later, audio frame is handled according to the resampling ratio pair first and carries out resampling interpolation processing, obtain second processing audio
Frame;It is filtered next, carrying out second to obtained second processing audio frame, and then obtains trill audio signal.Due to
To pending audio signal be filtered and the processing such as resampling difference after, it can be achieved that periodically-varied fundamental frequency, therefore
Trill audio is reached so that commonly trill, user's viscosity can also be achieved the effect that by singing the sound that fan normally sends out
It is high.
Fig. 3 is a kind of block diagram of apparatus for processing audio shown according to an exemplary embodiment.With reference to Fig. 3, the device packet
It includes:Computing module 301, first processing module 302, Second processing module 303, third processing module 304.
The computing module 301 is configured as after often receiving an audio frame, is shaken according to preset beat frequency and trembling
Width calculates the resampling ratio of the audio frame;
The first processing module 302 is configured as being filtered audio frame progress first, obtains the first processing sound
Frequency frame;
The Second processing module 303 is configured as, according to the resampling ratio, carrying out the first processing audio frame
Resampling interpolation processing obtains second processing audio frame;
The third processing module 304 is configured as being filtered obtained second processing audio frame progress second, obtain
Trill audio signal.
Optionally, the computing module 301, is configured to apply following formula, calculates the resampling ratio of the audio frame:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, A is the trembling amplitude, and fs is the beat frequency, and N is
The duration of the audio frame, Fs are the crude sampling rate of the audio frame, and the value of n is positive integer, and n is the frame of the audio frame
Number.
Optionally, the first processing module 302 is configured as, according to the trembling amplitude, calculating the audio frame most
Big down-sampling rate;According to the crude sampling rate of maximum the down-sampling rate and the audio frame, the first algorithm frequency is calculated;
According to the first algorithm frequency, first is carried out to the audio frame and is filtered, the first processing audio frame is obtained.
Optionally, the first processing module 302 is configured as the original according to maximum the down-sampling rate and the audio frame
Beginning sample rate calculates the first algorithm frequency of the first processing audio frame using following formula:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is described
Maximum down-sampling rate.
Optionally, the Second processing module 303 is configured as, according to the trembling amplitude, calculating the audio frame most
Big up-sampling rate;According to the crude sampling rate of maximum the up-sampling rate and the audio frame, the second algorithm frequency is calculated;
According to the second algorithm frequency, second is carried out to the second processing audio and is filtered, trill audio signal is obtained.
Optionally, the Second processing module 303 is configured as the original according to maximum the up-sampling rate and the audio frame
Beginning sample rate calculates the second algorithm frequency using following formula:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is described
Maximum up-sampling rate.
Device provided in an embodiment of the present invention according to preset beat frequency and quivers after often receiving an audio frame
Dynamic amplitude calculates the resampling ratio of the audio frame, and carries out first to the audio frame and be filtered, and obtains the first processing audio
Frame;Later, audio frame is handled according to the resampling ratio pair first and carries out resampling interpolation processing, obtain second processing audio
Frame;It is filtered next, carrying out second to obtained second processing audio frame, and then obtains trill audio signal.Due to
To pending audio signal be filtered and the processing such as resampling difference after, it can be achieved that periodically-varied fundamental frequency, therefore
Trill audio is reached so that commonly trill, user's viscosity can also be achieved the effect that by singing the sound that fan normally sends out
It is high.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 4 is a kind of block diagram of apparatus for processing audio 400 shown according to an exemplary embodiment.For example, device 400 can
To be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices are good for
Body equipment, personal digital assistant etc..
With reference to Fig. 4, device 400 may include following one or more components:Processing component 402, memory 404, power supply
Component 406, multimedia component 408, audio component 410, the interface 412 of I/O (Input/Output, input/output), sensor
Component 414 and communication component 416.
The integrated operation of 402 usual control device 400 of processing component, such as with display, call, data communication, phase
Machine operates and record operates associated operation.Processing component 402 may include that one or more processors 420 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 402 may include one or more modules, just
Interaction between processing component 402 and other assemblies.For example, processing component 402 may include multi-media module, it is more to facilitate
Interaction between media component 408 and processing component 402.
Memory 404 is configured as storing various types of data to support the operation in device 400.These data are shown
Example includes instruction for any application program or method that are operated on device 400, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as SRAM (Static Random Access Memory, static RAM), EEPROM
(Electrically-Erasable Programmable Read-Only Memory, the read-only storage of electrically erasable
Device), EPROM (Erasable Programmable Read Only Memory, Erasable Programmable Read Only Memory EPROM), PROM
(Programmable Read-Only Memory, programmable read only memory), and ROM (Read-Only Memory, it is read-only to deposit
Reservoir), magnetic memory, flash memory, disk or CD.
Power supply module 406 provides electric power for the various assemblies of device 400.Power supply module 406 may include power management system
System, one or more power supplys and other generated with for device 400, management and the associated component of distribution electric power.
Multimedia component 408 is included in the screen of one output interface of offer between described device 400 and user.One
In a little embodiments, screen may include LCD (Liquid Crystal Display, liquid crystal display) and TP (Touch
Panel, touch panel).If screen includes touch panel, screen may be implemented as touch screen, from the user to receive
Input signal.Touch panel includes one or more touch sensors to sense the gesture on touch, slide, and touch panel.Institute
The boundary of a touch or slide action can not only be sensed by stating touch sensor, but also be detected and the touch or slide phase
The duration and pressure of pass.In some embodiments, multimedia component 408 includes that a front camera and/or postposition are taken the photograph
As head.When device 400 is in operation mode, when such as screening-mode or video mode, front camera and/or rear camera can
With the multi-medium data outside reception.Each front camera and rear camera can be a fixed optical lens systems
Or there are focusing and optical zoom capabilities.
Audio component 410 is configured as output and/or input audio signal.For example, audio component 410 includes a MIC
(Microphone, microphone), when device 400 is in operation mode, such as call model, logging mode and speech recognition mode
When, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory 404
Or it is sent via communication component 416.In some embodiments, audio component 410 further includes a loud speaker, for exporting audio
Signal.
I/O interfaces 412 provide interface between processing component 402 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock
Determine button.
Sensor module 414 includes one or more sensors, and the state for providing various aspects for device 400 is commented
Estimate.For example, sensor module 414 can detect the state that opens/closes of equipment 400, the relative positioning of component, such as component
For the display and keypad of device 400, sensor module 414 can be with the position of 400 1 components of detection device 400 or device
Set change, the existence or non-existence that user contacts with device 400, the temperature of 400 orientation of device or acceleration/deceleration and device 400
Variation.Sensor module 414 may include proximity sensor, be configured to detect without any physical contact near
The presence of object.Sensor module 414 can also include optical sensor, such as CMOS (Complementary Metal Oxide
Semiconductor, complementary metal oxide) or CCD (Charge-coupled Device, charge coupled cell) image biography
Sensor, for being used in imaging applications.In some embodiments, which can also include acceleration sensing
Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device
400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary implementation
In example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 416 further includes that (Near Field Communication, near field are logical by NFC
Letter) module, to promote short range communication.For example, RFID (Radio Frequency can be based in NFC module
Identification, radio frequency identification) technology, IrDA (Infra-red Data Association, Infrared Data Association) skill
Art, UWB (Ultra Wideband, ultra wide band) technology, BT (Bluetooth, bluetooth) technologies and other technologies are realized.
In the exemplary embodiment, device 400 can be by one or more ASIC (Application Specific
Integrated Circuit, application specific integrated circuit), DSP (Digital signal Processor, at digital signal
Manage device), DSPD (Digital signal Processor Device, digital signal processing appts), PLD (Programmable
Logic Device, programmable logic device), FPGA) (Field Programmable Gate Array, field programmable gate
Array), controller, microcontroller, microprocessor or other electronic components realize, for executing the above method.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of
Such as include the memory 404 of instruction, above-metioned instruction can be executed by the processor 420 of device 400 to complete the above method.For example,
The non-transitorycomputer readable storage medium can be ROM, RAM (Random Access Memory, random access memory
Device), CD-ROM (Compact Disc Read-Only Memory, compact disc read-only memory), tape, floppy disk and light data deposit
Store up equipment etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by apparatus for processing audio
When processor executes so that the device is able to carry out above-mentioned audio-frequency processing method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the present invention
Its embodiment.This application is intended to cover the present invention any variations, uses, or adaptations, these modifications, purposes or
Person's adaptive change follows the general principle of the present invention and includes the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the invention is not limited in the precision architectures for being described above and being shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of audio-frequency processing method, which is characterized in that the method includes:
After often receiving an audio frame, according to preset beat frequency and trembling amplitude, the resampling of the audio frame is calculated
Ratio;
According to the trembling amplitude, the maximum down-sampling rate of the audio frame is calculated;
According to the crude sampling rate of maximum the down-sampling rate and the audio frame, the first algorithm frequency is calculated;
According to the first algorithm frequency, first is carried out to the audio frame and is filtered, the first processing audio frame is obtained;
According to the resampling ratio, resampling interpolation processing is carried out to the first processing audio frame, obtains second processing sound
Frequency frame;
Second is carried out to obtained second processing audio frame to be filtered, and obtains trill audio signal.
2. according to the method described in claim 1, it is characterized in that, it is described according to preset beat frequency and trembling amplitude, answer
With following formula, the resampling ratio of the audio frame is calculated, including:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, A is the trembling amplitude, and fs is the beat frequency, and N is the sound
The duration of frequency frame, Fs are the crude sampling rate of the audio frame, and the value of n is positive integer, and n is the frame number of the audio frame.
3. according to the method described in claim 1, it is characterized in that, described according to the maximum down-sampling rate and the audio frame
Crude sampling rate calculate the first algorithm frequency of the first processing audio frame using following formula, including:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is the maximum
Down-sampling rate.
4. according to the method described in claim 1, it is characterized in that, described pair of obtained second processing audio frame carries out the second filter
Wave processing, obtains trill audio signal, including:
According to the trembling amplitude, the maximum up-sampling rate of the audio frame is calculated;
According to the crude sampling rate of maximum the up-sampling rate and the audio frame, the second algorithm frequency is calculated;
According to the second algorithm frequency, second is carried out to the second processing audio frame and is filtered, trill sound is obtained
Frequency signal.
5. according to the method described in claim 4, it is characterized in that, described according to the maximum up-sampling rate and the audio frame
Crude sampling rate calculate the second algorithm frequency using following formula, including:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is the maximum
Up-sampling rate.
6. a kind of apparatus for processing audio, which is characterized in that described device includes:
Computing module is configured as after often receiving an audio frame, according to preset beat frequency and trembling amplitude, calculates institute
State the resampling ratio of audio frame;
First processing module is configured as calculating the maximum down-sampling rate of the audio frame according to the trembling amplitude;According to institute
Maximum down-sampling rate and the crude sampling rate of the audio frame are stated, the first algorithm frequency is calculated;It is filtered according to described first
Frequency of fadings carries out first to the audio frame and is filtered, obtains the first processing audio frame;
Second processing module, is configured as according to the resampling ratio, and carrying out resampling to the first processing audio frame inserts
Value processing, obtains second processing audio frame;
Third processing module is configured as being filtered obtained second processing audio frame progress second, obtains trill audio
Signal.
7. device according to claim 6, which is characterized in that the computing module is configured to apply following formula, meter
Calculate the resampling ratio of the audio frame:
αn=1.0+A*sin (2 π * fs* (n*N/Fs))
Wherein, αnFor the resampling ratio of the audio frame, A is the trembling amplitude, and fs is the beat frequency, and N is the sound
The duration of frequency frame, Fs are the crude sampling rate of the audio frame, and the value of n is positive integer, and n is the frame number of the audio frame.
8. device according to claim 6, which is characterized in that the first processing module is configured as according to most
The crude sampling rate of big down-sampling rate and the audio frame calculates the first of the first processing audio frame using following formula
Algorithm frequency:
fc1=Fs/2* (1.0-A)
Wherein, fc1For the first algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0-A is the maximum
Down-sampling rate.
9. device according to claim 6, which is characterized in that the Second processing module is configured as quivering according to
Dynamic amplitude, calculates the maximum up-sampling rate of the audio frame;It is adopted according to the maximum up-sampling rate and the original of the audio frame
Sample rate calculates the second algorithm frequency;According to the second algorithm frequency, second is carried out to the second processing audio
It is filtered, obtains trill audio signal.
10. device according to claim 9, which is characterized in that the Second processing module is configured as according to most
The crude sampling rate of big up-sampling rate and the audio frame calculates the second algorithm frequency using following formula:
Wherein, fc2For the second algorithm frequency, Fs is the crude sampling rate of the audio frame, and 1.0+A is the maximum
Up-sampling rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610703661.XA CN106328111B (en) | 2016-08-22 | 2016-08-22 | Audio-frequency processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610703661.XA CN106328111B (en) | 2016-08-22 | 2016-08-22 | Audio-frequency processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106328111A CN106328111A (en) | 2017-01-11 |
CN106328111B true CN106328111B (en) | 2018-09-04 |
Family
ID=57741357
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610703661.XA Active CN106328111B (en) | 2016-08-22 | 2016-08-22 | Audio-frequency processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106328111B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3671747A4 (en) | 2017-08-18 | 2020-08-12 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Sound volume adjustment method and apparatus, mobile terminal, and storage medium |
CN108269579B (en) * | 2018-01-18 | 2020-11-10 | 厦门美图之家科技有限公司 | Voice data processing method and device, electronic equipment and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5917917A (en) * | 1996-09-13 | 1999-06-29 | Crystal Semiconductor Corporation | Reduced-memory reverberation simulator in a sound synthesizer |
CN1581290A (en) * | 2003-08-06 | 2005-02-16 | 雅马哈株式会社 | Singing voice synthesizing method |
CN101740034A (en) * | 2008-11-04 | 2010-06-16 | 刘盛举 | Method for realizing sound speed-variation without tone variation and system for realizing speed variation and tone variation |
CN102543091A (en) * | 2011-12-29 | 2012-07-04 | 深圳市万兴软件有限公司 | System and method for generating simulation sound effect |
CN104467739A (en) * | 2014-12-15 | 2015-03-25 | 天津大学 | Bandwidth-adjustable and center-frequency-adjustable digital filter and implementation method thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2405061B (en) * | 2001-12-05 | 2005-05-18 | Matsushita Electric Ind Co Ltd | Multirate digital transceiver |
JP4847501B2 (en) * | 2008-09-11 | 2011-12-28 | 京楽産業.株式会社 | Pachinko machine |
US8817917B2 (en) * | 2011-06-21 | 2014-08-26 | Ibiquity Digital Corporation | Method and apparatus for implementing signal quality metrics and antenna diversity switching control |
WO2015161493A1 (en) * | 2014-04-24 | 2015-10-29 | Motorola Solutions, Inc. | Method and apparatus for enhancing alveolar trill |
-
2016
- 2016-08-22 CN CN201610703661.XA patent/CN106328111B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5917917A (en) * | 1996-09-13 | 1999-06-29 | Crystal Semiconductor Corporation | Reduced-memory reverberation simulator in a sound synthesizer |
CN1581290A (en) * | 2003-08-06 | 2005-02-16 | 雅马哈株式会社 | Singing voice synthesizing method |
CN101740034A (en) * | 2008-11-04 | 2010-06-16 | 刘盛举 | Method for realizing sound speed-variation without tone variation and system for realizing speed variation and tone variation |
CN102543091A (en) * | 2011-12-29 | 2012-07-04 | 深圳市万兴软件有限公司 | System and method for generating simulation sound effect |
CN104467739A (en) * | 2014-12-15 | 2015-03-25 | 天津大学 | Bandwidth-adjustable and center-frequency-adjustable digital filter and implementation method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN106328111A (en) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104021148B (en) | Method and device for adjusting sound effect | |
CN108538291A (en) | Sound control method, terminal device, cloud server and system | |
CN104991754B (en) | The way of recording and device | |
CN108495149A (en) | Multimedia content playback method and device | |
CN106024033B (en) | Control method for playing back and device | |
CN110097890A (en) | A kind of method of speech processing, device and the device for speech processes | |
CN108259991A (en) | Method for processing video frequency and device | |
CN106600530B (en) | Picture synthesis method and device | |
CN110278450A (en) | Multimedia content playback method and device | |
CN108831508A (en) | Voice activity detection method, device and equipment | |
CN109003621B (en) | Audio processing method and device and storage medium | |
CN109243479B (en) | Audio signal processing method and device, electronic equipment and storage medium | |
CN110121106A (en) | Video broadcasting method and device | |
CN109862421A (en) | A kind of video information recognition methods, device, electronic equipment and storage medium | |
CN109308905A (en) | Audio data processing method, device, electronic equipment and storage medium | |
CN108156506A (en) | The progress adjustment method and device of barrage information | |
CN106328111B (en) | Audio-frequency processing method and device | |
CN109446346A (en) | Multimedia resource edit methods and device | |
CN109302631A (en) | Video clip display methods and device | |
CN108495162A (en) | Method for processing video frequency and device | |
CN108174269A (en) | Visualize audio frequency playing method and device | |
CN115273831A (en) | Voice conversion model training method, voice conversion method and device | |
CN109359218A (en) | Multimedia resource methods of exhibiting and device | |
CN106782576A (en) | audio mixing method and device | |
CN110147466A (en) | A kind of interaction content displaying method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17 Applicant after: Guangzhou KuGou Networks Co., Ltd. Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F Applicant before: Guangzhou KuGou Networks Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |