CN111627412A - Audio frequency speed changing method, device, electronic equipment and computer readable storage medium - Google Patents

Audio frequency speed changing method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111627412A
CN111627412A CN202010373241.6A CN202010373241A CN111627412A CN 111627412 A CN111627412 A CN 111627412A CN 202010373241 A CN202010373241 A CN 202010373241A CN 111627412 A CN111627412 A CN 111627412A
Authority
CN
China
Prior art keywords
speed
beat frequency
target
audio
original
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.)
Granted
Application number
CN202010373241.6A
Other languages
Chinese (zh)
Other versions
CN111627412B (en
Inventor
顾正明
李鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010373241.6A priority Critical patent/CN111627412B/en
Publication of CN111627412A publication Critical patent/CN111627412A/en
Application granted granted Critical
Publication of CN111627412B publication Critical patent/CN111627412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC 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/00Details of electrophonic musical instruments
    • G10H1/36Accompaniment arrangements
    • G10H1/40Rhythm
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/04Time compression or expansion
    • G10L21/043Time compression or expansion by changing speed
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC 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/00Aspects 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/031Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal
    • G10H2210/076Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal for extraction of timing, tempo; Beat detection
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC 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/00Aspects 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/375Tempo or beat alterations; Music timing control

Abstract

The application relates to an audio frequency speed changing method and device, electronic equipment and a computer readable storage medium. The method comprises the steps of obtaining original audio; performing beat detection on the original audio to obtain the original beat frequency of the original audio; acquiring a beat frequency range and acquiring a target beat frequency; audio corresponding to the beat frequency within the beat frequency range is fidelity during playing; determining a speed multiplying range of the original audio based on the beat frequency range and the original beat frequency; and determining the target speed multiplication of the original audio within the speed multiplication range based on the original beat frequency and the target beat frequency. The method and the device for detecting the head gesture, the electronic equipment and the computer readable storage medium can ensure that the sound is not distorted when the original audio is played at the target speed.

Description

Audio frequency speed changing method, device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of audio processing technologies, and in particular, to an audio speed changing method, an audio speed changing device, an electronic device, and a computer-readable storage medium.
Background
With the development of electronic products, more and more electronic products can play various audios. When playing the audio, the user can perform variable speed processing on the audio, namely fast forward or slow down. However, in the conventional audio speed change method, there is a problem that the played audio is distorted after speed change.
Disclosure of Invention
The embodiment of the application provides an audio speed changing method and device, electronic equipment and a computer readable storage medium, which can ensure the accuracy of audio playing after the audio speed is changed.
An audio shifting method comprising:
acquiring original audio;
performing beat detection on the original audio to obtain the original beat frequency of the original audio;
acquiring a beat frequency range and acquiring a target beat frequency; audio corresponding to the beat frequency in the beat frequency range is fidelity during playing;
determining a speed doubling range of the original audio based on the beat frequency range and the original beat frequency;
and determining a target speed multiplication of the original audio within the speed multiplication range based on the original beat frequency and the target beat frequency.
An audio transmission comprising:
the original audio acquisition module is used for acquiring original audio;
the beat detection module is used for carrying out beat detection on the original audio to obtain the original beat frequency of the original audio;
the target beat frequency acquisition module is used for acquiring a beat frequency range and acquiring a target beat frequency; audio corresponding to the beat frequency in the beat frequency range is fidelity during playing;
a speed range determining module, configured to determine a speed range of the original audio based on the beat frequency range and the original beat frequency;
and the target speed doubling determining module is used for determining the target speed doubling of the original audio within the speed doubling range based on the original beat frequency and the target beat frequency.
An electronic device comprising a memory and a processor, the memory having a computer program stored therein, the computer program, when executed by the processor, causing the processor to perform the steps of the audio shifting method as described above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
The audio frequency speed changing method, the device, the electronic equipment and the computer readable storage medium obtain the original audio frequency; performing beat detection on the original audio to obtain the original beat frequency of the original audio; acquiring a beat frequency range and acquiring a target beat frequency; determining a speed multiplying range of the original audio based on the beat frequency range and the original beat frequency; the audio corresponding to the beat frequency in the beat frequency range is fidelity when being played, and the speed multiplying range is determined by the beat frequency range, so that the audio is also fidelity when being played at the speed multiplying range; based on the original beat frequency and the target beat frequency, the target speed doubling of the original audio is determined in the speed doubling range, so that the original audio is guaranteed not to be distorted, namely fidelity, when being played at the target speed doubling.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an audio shifting method in one embodiment;
FIG. 2 is a schematic diagram of a beat detection method in one embodiment;
FIG. 3 is a flow diagram that illustrates the steps of determining a target speed multiplier in one embodiment;
FIG. 4 is a flow chart of steps in another embodiment for determining a target speed multiplier;
FIG. 5 is a block diagram of an audio transmission according to one embodiment;
fig. 6 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 is a flow chart of an audio shifting method in one embodiment. As shown in fig. 1, the audio shifting method includes steps 102 to 110.
Step 102, obtaining an original audio.
The original audio may be a piece of music, a piece of recording, audio included in a piece of video, etc., without being limited thereto. The length of the original audio is not limited, and may be 10 seconds long audio or 1 hour long audio.
In one embodiment, the method further comprises preprocessing the raw audio. The pre-processing may include filtering, difference processing, fourier transform, etc., to filter out noise in the original audio.
And step 104, performing beat detection on the original audio to obtain the original beat frequency of the original audio.
The original Beat frequency (Beat Per Minute) is the number of beats Per Minute in the original audio. The larger the original beat frequency, the faster the tempo representing the original audio; the smaller the original beat frequency, the slower the tempo representing the original audio.
In one embodiment, as shown in fig. 2, the electronic device acquires an original audio signal, and pre-processes the original audio signal to obtain a pre-processed audio signal. The preprocessing may include filtering, difference processing, fourier transform, etc., to filter out noise in the original audio. The electronic equipment performs signal Reduction (Reduction) on the preprocessed audio signal, detects the audio signal after the signal Reduction by adopting a detection function, can detect each peak value in the audio signal, performs peak value selection, positions the selected peak value, can detect the position of each beat in the original audio signal, counts each beat in the original audio signal, and can obtain the original beat frequency of the original audio signal.
Step 106, acquiring a beat frequency range and acquiring a target beat frequency; and audio corresponding to the beat frequency in the beat frequency range is fidelity during playing.
It can be understood that when the beat frequency of the audio is too large or too small, the audio may have a distortion problem when played. Therefore, a beat frequency range is obtained, and audio corresponding to the beat frequency within the beat frequency range is fidelity when played. For example, the beat frequency range may be [45,190], i.e., the minimum beat frequency of the audio is 45 and the maximum beat frequency is 190; as another example, the beat frequency range may be [100,150], i.e., the minimum beat frequency of the audio is 100 and the maximum beat frequency is 150. The beat frequency range can be set according to the needs of the user.
The target beat frequency is the beat frequency after the original audio is shifted. When the target beat frequency is greater than the original beat frequency, fast forwarding the original audio is represented; when the target beat frequency is less than the original beat frequency, it means to slow down the original audio.
In one embodiment, at least two candidate beat frequencies are determined from within a range of beat frequencies; a target beat frequency is determined from the at least two candidate beat frequencies based on the selection instruction.
It will be appreciated that music has fixed beat frequencies, and the electronic device may set these fixed beat frequencies as candidate beat frequencies within a range of beat frequencies, such as 90,120,160. When a user selects one of the at least two candidate beat frequencies, a selection instruction is generated, and the selected candidate beat frequency is used as a target beat frequency based on the selection instruction.
Step 108, determining the speed range of the original audio based on the beat frequency range and the original beat frequency.
Specifically, the beat frequency range has an upper limit beat frequency, which is the maximum value of the beat frequency range, and a lower limit beat frequency, which is the minimum value of the beat frequency range. The electronic device divides the upper limit beat frequency and the lower limit beat frequency by the original beat frequency respectively to obtain the multiple speed range of the original audio.
It can be understood that, after the beat frequency range is determined, the closer the original beat frequency of the original audio is to the maximum value of the beat frequency range, the smaller the maximum speed in the speed range of the original audio is, that is, the smaller the space in which the original audio can be fast-forwarded is, the larger the space in which the original audio can be slowly played is; accordingly, the closer the original beat frequency of the original audio is to the minimum value of the beat frequency range, the larger the minimum multiple speed in the multiple speed range of the original audio, that is, the smaller the space in which the original audio can be slowly played, the larger the space in which the original audio can be fast-forwarded.
For example, the determined beat frequency range is [45,180], when the original beat frequency of the original audio is 160, the multiple speed range of the original audio is [0.28125, 1.125], the space in which the original audio can be fast-forwarded is (1,1.125], and the space in which the original audio can be slow-played is [0.28125, 1); when the original beat frequency of the original audio is 50, the multiple speed range of the original audio is [0.9, 3.6], the space in which the original audio can be fast-forwarded is (1, 3.6), and the space in which the original audio can be slow-played is [0.9, 1 ].
Step 110, determining a target speed multiple of the original audio within the speed multiple range based on the original beat frequency and the target beat frequency.
The target double speed refers to a speed of the target audio relative to the original audio after the original audio is shifted. When the target multiple speed is greater than 1, it represents that the original audio is fast-forwarded. When the target multiple speed is less than 1, the original audio is indicated to be slowly played. When the target multiple speed is equal to 1, the original audio speed is not changed, and the original audio is not processed.
After the electronic equipment acquires the original beat frequency of the original audio and the target beat frequency, dividing the target beat frequency by the original beat frequency to obtain the multiple speed of the original audio. However, in order to ensure that the target audio after the original audio is changed in speed can still be true when playing, the target speed of the original audio is determined from the speed range.
The audio frequency speed changing method obtains original audio frequency; performing beat detection on the original audio to obtain the original beat frequency of the original audio; acquiring a beat frequency range and acquiring a target beat frequency; determining a speed multiplying range of the original audio based on the beat frequency range and the original beat frequency; the audio corresponding to the beat frequency in the beat frequency range is fidelity when being played, and the speed multiplying range is determined by the beat frequency range, so that the audio is also fidelity when being played at the speed multiplying range; based on the original beat frequency and the target beat frequency, the target speed doubling of the original audio is determined in the speed doubling range, so that the original audio is guaranteed not to be distorted, namely fidelity, when being played at the target speed doubling.
In addition, the traditional audio speed changing method generally has the problem of inaccurate adjustment because a user manually pulls a speed changing strip for adjustment, and the audio speed changing method does not need to manually adjust the speed multiplication and only needs to input a target beat frequency, so that the audio speed change is converted from the angle of the speed multiplication into the angle of the beat number, the problem of inaccuracy in speed multiplication adjustment is avoided, and the accuracy of the audio speed change is improved.
In one embodiment, the beat frequency range includes respective beat frequencies between an upper limit beat frequency and a lower limit beat frequency; determining a speed doubling range of the original audio based on the beat frequency range and the original beat frequency, comprising: dividing the upper limit beat frequency by the original beat frequency to obtain an upper limit speed; dividing the lower limit beat frequency by the original beat frequency to obtain a lower limit speed; a speed range of the original audio is generated based on the upper limit speed and the lower limit speed.
The beat frequency range has an upper limit beat frequency, which is the maximum value of the beat frequency range, and a lower limit beat frequency, which is the minimum value of the beat frequency range.
The electronic device divides the upper limit beat frequency by the original beat frequency to obtain the upper limit double speed. The electronic device divides the lower limit beat frequency by the original beat frequency to obtain the lower limit multiple speed. The upper limit speed multiplication is the maximum value of the speed multiplication range, the lower limit speed multiplication is the minimum value of the speed multiplication range, and the speed multiplication range comprises each speed multiplication between the upper limit speed multiplication and the lower limit speed multiplication.
In this embodiment, the upper limit beat frequency is divided by the original beat frequency to obtain the upper limit speed; dividing the lower limit beat frequency by the original beat frequency to obtain a lower limit speed; the speed range of the original audio can be accurately generated based on the upper limit speed and the lower limit speed.
In one embodiment, as shown in fig. 3, determining a target multiple speed of the original audio within a multiple speed range based on the original beat frequency and the target beat frequency includes:
step 302, dividing the target beat frequency by the original beat frequency to obtain a reference speed multiplier.
For example, if the target beat frequency is 150 and the original beat frequency is 100, the target beat frequency 150 is divided by the original beat frequency 100 to obtain a reference multiple speed of 1.5. If the target beat frequency is 50 and the original beat frequency is 100, the reference speed is 0.5 by dividing the target beat frequency 50 by the original beat frequency 100.
And 304, matching the reference speed multiplication range with the speed multiplication range to obtain a matching result.
It can be understood that, when the electronic device matches the reference double speed with the double speed range, the obtained matching result may be that the reference double speed is within the double speed range, or that the reference double speed exceeds the double speed range.
And step 306, determining the target speed multiplication range of the original audio from the speed multiplication range based on the matching result.
And determining the target multiple speed of the original audio from the multiple speed range based on the matching result, wherein the determined target multiple speed can ensure that the sound of the target audio obtained after the original audio is subjected to speed change is not distorted during playing, namely fidelity.
In one embodiment, the multiple speed range includes individual multiple speeds between an upper multiple speed to a lower multiple speed.
The upper limit speed multiplication is the maximum value of the speed multiplication range, the lower limit speed multiplication is the minimum value of the speed multiplication range, and the speed multiplication range comprises each speed multiplication between the upper limit speed multiplication and the lower limit speed multiplication.
As shown in fig. 4, determining a target multiple speed of the original audio from the multiple speed range based on the matching result includes:
and step 402, when the reference speed is in the speed range, taking the reference speed as the target speed of the original audio.
When the reference speed is within the speed range, the sound is not distorted when the original audio is played at the reference speed, and the reference speed can be used as the target speed of the original audio.
And step 404, when the reference speed is larger than the upper limit speed of the speed range, taking the upper limit speed as the target speed of the original audio.
When the reference multiple speed is higher than the upper limit multiple speed of the multiple speed range, it indicates that the reference multiple speed is too high, and the sound is distorted when the original audio is played at the reference multiple speed. Therefore, the electronic device can take the maximum value of the double speed range, i.e., the upper limit double speed, as the target double speed of the original audio.
In another embodiment, when the reference speed is greater than the upper speed of the speed range, other speeds in the speed range may also be used as the target speed of the original audio.
And 406, when the reference speed is lower than the lower limit speed of the speed range, taking the lower limit speed as the target speed of the original audio.
When the reference multiple speed is less than the lower limit multiple speed of the multiple speed range, it means that the reference multiple speed is too small, and the sound is distorted when the original audio is played at the reference multiple speed. Therefore, the electronic device can take the minimum value of the multiple speed range, i.e., the lower limit multiple speed, as the target multiple speed of the original audio.
In another embodiment, when the reference multiple speed is less than the lower limit multiple speed of the multiple speed range, other multiple speeds in the multiple speed range may also be used as the target multiple speed of the original audio.
In this embodiment, whether the reference speed is within the speed-doubling range or not, the determined target speed-doubling of the original audio can be ensured to be within the speed-doubling range, so that sound fidelity can be ensured when the original audio is played at the target speed-doubling.
In one embodiment, the method further comprises: adjusting the original audio frequency by adopting the target multiple speed to obtain a target audio frequency; and acquiring a playing instruction of the target audio, and playing the target audio according to the playing instruction.
And when the target speed is higher than 1, the original audio is fast forwarded, and frames of the original audio are deleted to obtain the target audio. And when the target multiple speed is less than 1, representing that the original audio is slowly played, and performing frame interpolation on the original audio to obtain the target audio. When the target multiple speed is equal to 1, the original audio speed is not changed, and the original audio is not processed, namely the target audio is the original audio.
The electronic equipment divides the pitch period (the time of opening and closing the vocal cords once) for the original audio frequency, and then adopts an overlap addition algorithm to perform frame interpolation or frame deletion on the pitch period, so as to achieve the purpose of fast forward or slow play of the audio frequency.
In this embodiment, the original audio is adjusted by using the target multiple speed to obtain the target audio, and the sound of the target audio is not distorted during playing, i.e., fidelity is maintained.
In one embodiment, the method further comprises: determining a target vibration frequency of the motor based on the target beat frequency; and when the target audio is played, controlling the motor to vibrate by adopting the target vibration frequency.
In one embodiment, the target vibration frequency of the motor may be the same as the target beat frequency. In other embodiments, the target vibration frequency of the motor may also be different from the target beat frequency, such as the target vibration frequency of the motor being half of the target beat frequency, such as the target vibration frequency of the motor being twice the target beat frequency, and so on.
When the electronic equipment plays the target audio, the motor is controlled to vibrate at the target vibration frequency, the target audio can be played from the dimension of sound, the rhythm of the target audio during playing can be reflected from the dimension of touch, and the user can be better reminded that the electronic equipment is in the state of playing the target audio at the moment.
For example, the electronic device presets a target audio as a ring tone, when an incoming call is received, the electronic device plays the target audio, and controls the motor to vibrate at the target vibration frequency, so that the electronic device can remind the user of receiving the incoming call from the dimension of sound and can remind the user of receiving the incoming call from the dimension of touch.
In one embodiment, the method further comprises: when a call request is received, playing a target audio, and executing a step of controlling a motor to vibrate by adopting a target vibration frequency when the target audio is played; counting the time length for playing the target audio; and when the time length reaches a time length threshold value, controlling the motor to stop vibrating.
The time length for playing the target audio refers to a time length from a time when the target audio starts to be played to a current time. The duration threshold may be set according to the user's needs.
When the electronic equipment receives the call request, the target audio is played, and meanwhile, the motor is controlled to vibrate by adopting the target vibration frequency. When the time length for playing the target audio counted by the electronic equipment reaches the time length threshold, the fact that the time length for playing the target audio by the electronic equipment is long is indicated, the user may not be beside the electronic equipment, or the user is inconvenient to answer the audio, and the like, the motor can be controlled to stop vibrating, and processing resources of the electronic equipment can be saved.
In one embodiment, controlling the motor to vibrate with a target vibration frequency while playing the target audio includes: detecting the sound intensity of the target audio when the target audio is played; determining a target vibration intensity of the motor based on a sound intensity of the target audio; a target vibration intensity of the motor is inversely related to a sound intensity of the target audio; and controlling the motor to vibrate by adopting the target vibration frequency and the target vibration strength.
The sound intensity of the target audio refers to the sound level of the target audio during playing, and can be expressed in decibels, and the higher the decibel is, the stronger the sound intensity is, and the louder the target audio during playing is. The target vibration intensity refers to the intensity of the motor vibration. The stronger the target vibration intensity is, the more intense the motor vibration is, the more easily the user perceives the vibration of the motor.
It can be understood that, when the sound intensity of the target audio is stronger, the target vibration intensity of the motor is weaker, and the processing resources of the electronic device can be saved; when the sound intensity of the target audio is weaker, the target vibration intensity of the motor is stronger, and the user can be better reminded that the electronic equipment is in the state of playing the target audio. That is, the target vibration intensity of the motor is inversely related to the sound intensity of the target audio.
It should be understood that although the steps in the flowcharts of fig. 1,3 and 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1,3, and 4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least some of the sub-steps or stages of other steps.
Fig. 5 is a block diagram of an audio transmission according to an embodiment. As shown in fig. 5, there is provided an audio speed changing device 500 including: an original audio acquisition module 502, a beat detection module 504, a target beat frequency acquisition module 506, a speed range determination module 508, and a target speed range determination module 510. Wherein:
an original audio obtaining module 502 is configured to obtain original audio.
A beat detection module 504, configured to perform beat detection on the original audio to obtain an original beat frequency of the original audio.
A target beat frequency obtaining module 506, configured to obtain a beat frequency range and obtain a target beat frequency; audio corresponding to the beat frequency within the beat frequency range is fidelity during playing; .
A speed range determining module 508, configured to determine a speed range of the original audio based on the beat frequency range and the original beat frequency.
A target speed doubling determination module 510, configured to determine a target speed doubling of the original audio within the speed doubling range based on the original beat frequency and the target beat frequency.
The audio frequency speed changing device acquires original audio frequency; performing beat detection on the original audio to obtain the original beat frequency of the original audio; acquiring a beat frequency range and acquiring a target beat frequency; determining a speed multiplying range of the original audio based on the beat frequency range and the original beat frequency; the audio corresponding to the beat frequency in the beat frequency range is fidelity when being played, and the speed multiplying range is determined by the beat frequency range, so that the audio is also fidelity when being played at the speed multiplying range; based on the original beat frequency and the target beat frequency, the target speed doubling of the original audio is determined in the speed doubling range, so that the original audio is guaranteed not to be distorted, namely fidelity, when being played at the target speed doubling.
In one embodiment, the beat frequency range includes respective beat frequencies between an upper limit beat frequency and a lower limit beat frequency; the speed range determining module 508 is further configured to divide the upper limit beat frequency by the original beat frequency to obtain an upper limit speed; dividing the lower limit beat frequency by the original beat frequency to obtain a lower limit speed; generating a multiple speed range of the original audio based on the upper limit multiple speed and the lower limit multiple speed.
In one embodiment, the target speed-doubling determining module 510 is further configured to divide the target beat frequency by the original beat frequency to obtain a reference speed-doubling; matching the reference speed multiplication range with the speed multiplication range to obtain a matching result; determining a target multiple speed of the original audio from the multiple speed range based on the matching result.
In one embodiment, the multiple speed range includes individual multiple speeds between an upper limit multiple speed to a lower limit multiple speed; the above target multiple speed determining module 510 is further configured to use the reference multiple speed as a target multiple speed of the original audio when the reference multiple speed is within the multiple speed range; when the reference speed is larger than the upper limit speed of the speed range, taking the upper limit speed as the target speed of the original audio; and when the reference speed is lower than the lower limit speed of the speed range, taking the lower limit speed as the target speed of the original audio.
In an embodiment, the audio speed changing device 500 further includes a target audio playing module, configured to adjust the original audio by using the target multiple speed to obtain a target audio; and acquiring a playing instruction of the target audio, and playing the target audio according to the playing instruction.
In one embodiment, the audio transmission 500 further comprises a motor control module for determining a target vibration frequency of the motor based on the target beat frequency; and controlling the motor to vibrate by adopting the target vibration frequency when the target audio is played.
In one embodiment, the motor control module is further configured to play the target audio when receiving a call request, and execute a step of controlling the motor to vibrate at the target vibration frequency when playing the target audio; counting the time length for playing the target audio; and when the time length reaches a time length threshold value, controlling the motor to stop vibrating.
In one embodiment, the motor control module is further configured to detect a sound intensity of the target audio when the target audio is played; determining a target vibration intensity of the motor based on a sound intensity of the target audio; a target vibration intensity of the motor is inversely related to a sound intensity of the target audio; and controlling the motor to vibrate by adopting the target vibration frequency and the target vibration strength.
The division of the various modules in the audio speed changing device is merely for illustration, and in other embodiments, the audio speed changing device may be divided into different modules as needed to complete all or part of the functions of the audio speed changing device.
For the specific limitation of the audio speed changing device, reference may be made to the above limitation of the audio speed changing method, which is not described herein again. The various modules in the audio transmission described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 6 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 6, the electronic device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing an audio shifting method provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a Point of Sales (POS), a vehicle-mounted computer, and a wearable device.
The implementation of each module in the audio speed changing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. Program modules constituted by such computer programs may be stored on the memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the audio shifting method.
A computer program product containing instructions which, when run on a computer, cause the computer to perform an audio shifting method.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An audio shifting method, comprising:
acquiring original audio;
performing beat detection on the original audio to obtain the original beat frequency of the original audio;
acquiring a beat frequency range and acquiring a target beat frequency; audio corresponding to the beat frequency in the beat frequency range is fidelity during playing;
determining a speed doubling range of the original audio based on the beat frequency range and the original beat frequency;
and determining a target speed multiplication of the original audio within the speed multiplication range based on the original beat frequency and the target beat frequency.
2. The method according to claim 1, wherein the range of beat frequencies includes respective beat frequencies between an upper limit beat frequency and a lower limit beat frequency;
determining a speed range of the original audio based on the beat frequency range and the original beat frequency, including:
dividing the upper limit beat frequency by the original beat frequency to obtain an upper limit speed;
dividing the lower limit beat frequency by the original beat frequency to obtain a lower limit speed;
generating a multiple speed range of the original audio based on the upper limit multiple speed and the lower limit multiple speed.
3. The method of claim 1, wherein determining a target speed multiplier for the original audio within the speed multiplier range based on the original beat frequency and the target beat frequency comprises:
dividing the target beat frequency by the original beat frequency to obtain a reference speed;
matching the reference speed multiplication range with the speed multiplication range to obtain a matching result;
determining a target multiple speed of the original audio from the multiple speed range based on the matching result.
4. The method of claim 3, wherein the multiple speed range includes respective multiple speeds between an upper multiple speed to a lower multiple speed;
the determining a target multiple speed of the original audio from the multiple speed range based on the matching result comprises:
when the reference speed is within the speed range, taking the reference speed as a target speed of the original audio;
when the reference speed is larger than the upper limit speed of the speed range, taking the upper limit speed as the target speed of the original audio;
and when the reference speed is lower than the lower limit speed of the speed range, taking the lower limit speed as the target speed of the original audio.
5. The method according to any one of claims 1 to 4, further comprising:
adjusting the original audio frequency by adopting the target multiple speed to obtain a target audio frequency;
and acquiring a playing instruction of the target audio, and playing the target audio according to the playing instruction.
6. The method of claim 5, further comprising:
determining a target vibration frequency of a motor based on the target beat frequency;
and controlling the motor to vibrate by adopting the target vibration frequency when the target audio is played.
7. The method of claim 6, further comprising:
when a calling request is received, the target audio is played, and the step of controlling the motor to vibrate by adopting the target vibration frequency when the target audio is played is executed;
counting the time length for playing the target audio;
and when the time length reaches a time length threshold value, controlling the motor to stop vibrating.
8. An audio transmission, comprising:
the original audio acquisition module is used for acquiring original audio;
the beat detection module is used for carrying out beat detection on the original audio to obtain the original beat frequency of the original audio;
the target beat frequency acquisition module is used for acquiring a beat frequency range and acquiring a target beat frequency; audio corresponding to the beat frequency in the beat frequency range is fidelity during playing;
a speed range determining module, configured to determine a speed range of the original audio based on the beat frequency range and the original beat frequency;
and the target speed doubling determining module is used for determining the target speed doubling of the original audio within the speed doubling range based on the original beat frequency and the target beat frequency.
9. An electronic device comprising a memory and a processor, the memory having a computer program stored thereon, wherein the computer program, when executed by the processor, causes the processor to perform the steps of the audio shifting method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202010373241.6A 2020-05-06 2020-05-06 Audio frequency speed changing method, device, electronic equipment and computer readable storage medium Active CN111627412B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010373241.6A CN111627412B (en) 2020-05-06 2020-05-06 Audio frequency speed changing method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010373241.6A CN111627412B (en) 2020-05-06 2020-05-06 Audio frequency speed changing method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111627412A true CN111627412A (en) 2020-09-04
CN111627412B CN111627412B (en) 2023-05-05

Family

ID=72260041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010373241.6A Active CN111627412B (en) 2020-05-06 2020-05-06 Audio frequency speed changing method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111627412B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114639375A (en) * 2022-05-09 2022-06-17 杭州海康威视数字技术股份有限公司 Intelligent voice recognition security defense method and device based on audio slice adjustment

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000099097A (en) * 1998-09-24 2000-04-07 Sony Corp Signal reproducing device and method, voice signal reproducing device, and speed conversion method for voice signal
JP2001184066A (en) * 1999-10-14 2001-07-06 Sony Computer Entertainment Inc Entertainment system, entertainment device, recording medium and program
CN1700757A (en) * 2004-05-13 2005-11-23 美国博通公司 System and method for high-quality variable speed playback of audio-visual media
CN101055751A (en) * 2005-04-15 2007-10-17 索尼株式会社 Data processing device, data reproducing device, data processing method, and data processing program
CN101399035A (en) * 2007-09-27 2009-04-01 三星电子株式会社 Method and equipment for extracting beat from audio file
JP2010230992A (en) * 2009-03-27 2010-10-14 Denso It Laboratory Inc Device and method for reproducing speech data
CN102024481A (en) * 2009-09-14 2011-04-20 展讯通信(上海)有限公司 Method and device for extracting vibration information from audio file and vibrating device
US20120179077A1 (en) * 2011-01-10 2012-07-12 Tuck Cleve R Vibrator apparatus with audio and motor control features
CN105118517A (en) * 2015-06-29 2015-12-02 努比亚技术有限公司 Device and method for adjusting music rhythm
CN105208426A (en) * 2015-09-24 2015-12-30 福州瑞芯微电子股份有限公司 Method and system for achieving audio and video synchronous speed variation
CN105611038A (en) * 2015-07-31 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Audio resource playing method, audio resource playing system and terminal
CN107464572A (en) * 2017-08-16 2017-12-12 重庆科技学院 Multimodal interaction Music perception system and its control method
CN107731243A (en) * 2016-08-12 2018-02-23 电信科学技术研究院 A kind of real-time variable playback method and apparatus of voice
CN108735194A (en) * 2018-03-27 2018-11-02 维沃移动通信有限公司 The reminding method and device of beat
CN108777747A (en) * 2018-08-09 2018-11-09 瑞声科技(新加坡)有限公司 A kind of method for oscillating, mobile terminal and computer readable storage medium
CN109887528A (en) * 2019-02-15 2019-06-14 上海艾为电子技术股份有限公司 Motor is with the method and device of audio frequency vibration, storage medium and electronic equipment
CN110010151A (en) * 2018-12-31 2019-07-12 瑞声科技(新加坡)有限公司 A kind of acoustic signal processing method and equipment, storage medium
CN110198385A (en) * 2019-05-28 2019-09-03 Oppo广东移动通信有限公司 A kind of vibration frequency adjusting method, device, storage medium and electronic equipment

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000099097A (en) * 1998-09-24 2000-04-07 Sony Corp Signal reproducing device and method, voice signal reproducing device, and speed conversion method for voice signal
JP2001184066A (en) * 1999-10-14 2001-07-06 Sony Computer Entertainment Inc Entertainment system, entertainment device, recording medium and program
CN1700757A (en) * 2004-05-13 2005-11-23 美国博通公司 System and method for high-quality variable speed playback of audio-visual media
CN101055751A (en) * 2005-04-15 2007-10-17 索尼株式会社 Data processing device, data reproducing device, data processing method, and data processing program
CN101399035A (en) * 2007-09-27 2009-04-01 三星电子株式会社 Method and equipment for extracting beat from audio file
JP2010230992A (en) * 2009-03-27 2010-10-14 Denso It Laboratory Inc Device and method for reproducing speech data
CN102024481A (en) * 2009-09-14 2011-04-20 展讯通信(上海)有限公司 Method and device for extracting vibration information from audio file and vibrating device
US20120179077A1 (en) * 2011-01-10 2012-07-12 Tuck Cleve R Vibrator apparatus with audio and motor control features
CN105118517A (en) * 2015-06-29 2015-12-02 努比亚技术有限公司 Device and method for adjusting music rhythm
CN105611038A (en) * 2015-07-31 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Audio resource playing method, audio resource playing system and terminal
CN105208426A (en) * 2015-09-24 2015-12-30 福州瑞芯微电子股份有限公司 Method and system for achieving audio and video synchronous speed variation
CN107731243A (en) * 2016-08-12 2018-02-23 电信科学技术研究院 A kind of real-time variable playback method and apparatus of voice
CN107464572A (en) * 2017-08-16 2017-12-12 重庆科技学院 Multimodal interaction Music perception system and its control method
CN108735194A (en) * 2018-03-27 2018-11-02 维沃移动通信有限公司 The reminding method and device of beat
CN108777747A (en) * 2018-08-09 2018-11-09 瑞声科技(新加坡)有限公司 A kind of method for oscillating, mobile terminal and computer readable storage medium
CN110010151A (en) * 2018-12-31 2019-07-12 瑞声科技(新加坡)有限公司 A kind of acoustic signal processing method and equipment, storage medium
CN109887528A (en) * 2019-02-15 2019-06-14 上海艾为电子技术股份有限公司 Motor is with the method and device of audio frequency vibration, storage medium and electronic equipment
CN110198385A (en) * 2019-05-28 2019-09-03 Oppo广东移动通信有限公司 A kind of vibration frequency adjusting method, device, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
雷涛玮: "基于音乐要素驱动的振动触觉研究及应用" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114639375A (en) * 2022-05-09 2022-06-17 杭州海康威视数字技术股份有限公司 Intelligent voice recognition security defense method and device based on audio slice adjustment
CN114639375B (en) * 2022-05-09 2022-08-23 杭州海康威视数字技术股份有限公司 Intelligent voice recognition security defense method and device based on audio slice adjustment

Also Published As

Publication number Publication date
CN111627412B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN109686347B (en) Sound effect processing method, sound effect processing device, electronic equipment and readable medium
CN110265064B (en) Audio frequency crackle detection method, device and storage medium
EP1774517B1 (en) Audio signal dereverberation
US8331583B2 (en) Noise reducing apparatus and noise reducing method
CN105118522B (en) Noise detection method and device
CN104768049B (en) Method, system and computer readable storage medium for synchronizing audio data and video data
CN109410973B (en) Sound changing processing method, device and computer readable storage medium
CN113170260B (en) Audio processing method and device, storage medium and electronic equipment
CN111968662A (en) Audio signal processing method and device and storage medium
CN110688518A (en) Rhythm point determining method, device, equipment and storage medium
CN111128253A (en) Audio editing method and device
CN110491419B (en) Playing control method, system and terminal equipment
CN111627412A (en) Audio frequency speed changing method, device, electronic equipment and computer readable storage medium
US20220020348A1 (en) Video control device and video control method
CN113035223A (en) Audio processing method, device, equipment and storage medium
EP4084002B1 (en) Information processing method, electronic equipment, storage medium, and computer program product
CN112802453B (en) Fast adaptive prediction voice fitting method, system, terminal and storage medium
CN113936676A (en) Sound adjusting method and device and electronic equipment
CN110491366B (en) Audio smoothing method and device, computer equipment and storage medium
US10887709B1 (en) Aligned beam merger
CN111667842A (en) Audio signal processing method and device
CN113542863B (en) Sound processing method, storage medium and intelligent television
US11877128B2 (en) Audio signal processing method, apparatus, and program
CN111312297B (en) Audio processing method and device, storage medium and electronic equipment
CN105824428A (en) Audio reading method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant