CN111767022B - Audio adjusting method, device, electronic equipment and computer readable storage medium - Google Patents

Audio adjusting method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111767022B
CN111767022B CN202010623791.9A CN202010623791A CN111767022B CN 111767022 B CN111767022 B CN 111767022B CN 202010623791 A CN202010623791 A CN 202010623791A CN 111767022 B CN111767022 B CN 111767022B
Authority
CN
China
Prior art keywords
audio
amplitude
target
input
output
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
Application number
CN202010623791.9A
Other languages
Chinese (zh)
Other versions
CN111767022A (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.)
Chengdu Jimi Technology Co Ltd
Original Assignee
Chengdu Jimi 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 Chengdu Jimi Technology Co Ltd filed Critical Chengdu Jimi Technology Co Ltd
Priority to CN202010623791.9A priority Critical patent/CN111767022B/en
Publication of CN111767022A publication Critical patent/CN111767022A/en
Priority to PCT/CN2021/098103 priority patent/WO2022001569A1/en
Application granted granted Critical
Publication of CN111767022B publication Critical patent/CN111767022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • 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/361Recording/reproducing of accompaniment for use with an external source, e.g. karaoke systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The present disclosure relates to the field of audio processing technologies, and in particular, to an audio adjustment method, an apparatus, an electronic device, and a computer readable storage medium. The audio adjusting method provided by the embodiment of the application comprises the following steps: acquiring a first characteristic input amplitude of a first target audio; acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude; and adjusting the output amplitude of the audio data to be output in the first target audio according to the audio amplification coefficient. The audio adjusting method, the audio adjusting device, the electronic equipment and the computer readable storage medium can automatically adjust the first target audio volume, so that the adjusting process of the first target audio volume is simplified.

Description

Audio adjusting method, device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of audio processing technologies, and in particular, to an audio adjustment method, an apparatus, an electronic device, and a computer readable storage medium.
Background
At present, work, study and life rhythm become faster and faster, people always find some simple and easy decompression modes in leisure time, and K songs are certainly one of good choices, and under the promotion of potential demands, more and more K songs are applied.
The existing K song application can generally respond to the output amplitude setting operation triggered by the user to independently adjust the microphone volume and the accompanying sound volume, but because different songs have the difference of the tune, the accompanying sound volume is generally greatly different. Based on this, after each song switching, the user needs to synchronously adjust the sound volume of the song, so that the sound of different songs can be kept within a certain stable volume range, thereby ensuring the hearing comfort of the user.
Disclosure of Invention
An object of an embodiment of the present application is to provide an audio adjusting method, an apparatus, an electronic device, and a computer readable storage medium, so as to solve the above-mentioned problems.
In a first aspect, an audio adjustment method provided in an embodiment of the present application includes:
acquiring a first characteristic input amplitude of a first target audio;
acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude;
and adjusting the output amplitude of the audio data to be output in the first target audio according to the audio amplification coefficient.
According to the audio adjusting method, the first characteristic input amplitude of the first target audio can be obtained, the audio amplification coefficient is obtained according to the target output amplitude and the first characteristic input amplitude, and finally, the output amplitude of audio data to be output in the first target audio is adjusted according to the audio amplification coefficient, so that automatic adjustment of the volume of the first target audio is achieved, and therefore the adjusting process of the volume of the first target audio is effectively simplified. It can be understood that the first target audio may be the accompanying sound of the real song, so that the automatic adjustment of the accompanying sound volume after the real song is switched can be realized, and compared with the scheme in the prior art that the user needs to synchronously adjust the accompanying sound volume in the real song after each real song is switched, the method effectively simplifies the adjustment process of the accompanying sound volume.
With reference to the first aspect, the embodiments of the present application further provide a first optional implementation manner of the first aspect, acquiring a first feature input amplitude of the first target audio, including:
determining current input data of a first target audio, and acquiring a first input amplitude of the current input data;
judging whether the first input amplitude is larger than the maximum input amplitude of the first target audio in the historical input period;
If the first input amplitude is judged to be larger than the maximum input amplitude of the first target audio in the historical input period, the first input amplitude is used as a first characteristic input amplitude;
and if the first input amplitude is less than or equal to the maximum input amplitude of the first target audio in the historical input period, taking the maximum input amplitude as the first characteristic input amplitude.
In the above embodiment, the first characteristic input amplitude is the input amplitude with the largest selected value from the input amplitudes corresponding to all the input data of the first target audio, so that it can be ensured that the obtained audio amplification factor is not excessively large according to the target output amplitude and the first characteristic input amplitude, so that the finally obtained output amplitude is always smaller than or equal to the target output amplitude after the output amplitude of the audio data to be output is adjusted in the first target audio according to the audio amplification factor, that is, the audio to be output can be kept in a stable volume range, so as to ensure the hearing comfort of the user.
With reference to the first aspect or the first optional implementation manner of the first aspect, the embodiment of the present application further provides a second optional implementation manner of the first aspect, and before the obtaining the audio amplification factor according to the target output amplitude and the first feature input amplitude, the audio adjustment method further includes:
Judging whether a target output amplitude exists in the parameter storage library;
if the target output amplitude exists in the parameter storage library, executing the step of acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude;
if the target output amplitude does not exist in the parameter storage library, responding to the output amplitude setting operation, and generating the target output amplitude.
In the above embodiment, before the audio amplification factor is obtained according to the target output amplitude and the first characteristic input amplitude, it is further determined whether the target output amplitude exists in the parameter storage, if the target output amplitude exists in the parameter storage, the step of obtaining the audio amplification factor according to the target output amplitude and the first characteristic input amplitude is directly performed, and if the target output amplitude does not exist in the parameter storage, the step of responding to the output amplitude setting operation and generating the target output amplitude is performed, thereby improving the execution efficiency of the audio adjustment method.
With reference to the second optional implementation manner of the first aspect, the embodiment of the present application further provides a third optional implementation manner of the first aspect, determining whether the target output amplitude exists in the parameter storage includes:
In the process of obtaining the output of the first target audio, the audio characteristic information of the second target audio is obtained, and the second target audio is input through a microphone;
judging whether the parameter storage library has the output amplitude to be selected corresponding to the audio characteristic information;
if the parameter storage library has the output amplitude to be selected corresponding to the audio characteristic information, judging that the parameter storage library has the target output amplitude, and taking the output amplitude to be selected as the target output amplitude;
if the parameter storage library does not have the output amplitude to be selected corresponding to the audio characteristic information, judging that the parameter storage library does not have the target output amplitude.
In the above embodiment, determining whether the target output amplitude exists in the parameter storage includes: in the output process of the first target audio, the audio characteristic information of the second target audio is acquired, the second target audio is input through a microphone, then, whether the to-be-selected output amplitude corresponding to the audio characteristic information exists in a parameter storage library is judged, if the to-be-selected output amplitude corresponding to the audio characteristic information exists in the parameter storage library, the target output amplitude exists in the parameter storage library, the to-be-selected output amplitude is taken as the target output amplitude, and if the to-be-selected output amplitude corresponding to the audio characteristic information does not exist in the parameter storage library, the target output amplitude does not exist in the parameter storage library. Obviously, in the embodiment of the application, the parameter storage library can store the to-be-selected output amplitudes corresponding to the plurality of audio feature information, so that the method is applicable to a plurality of different users, and in addition, the corresponding relation between the to-be-selected output amplitudes is directly created through the audio feature information, so that the execution efficiency of the audio adjustment method can be further improved.
With reference to the second optional implementation manner of the first aspect, the embodiment of the present application further provides a fourth optional implementation manner of the first aspect, where the first target audio is an accompaniment of a real song, and generating the target output amplitude in response to the output amplitude setting operation includes:
acquiring a second characteristic input amplitude of a first reference audio, wherein the first reference audio is an accompanying sound of a target reference song;
responding to the output amplitude setting operation, and acquiring a reference amplification factor;
and obtaining a target output amplitude according to the second characteristic input amplitude and the reference amplification factor.
In the above embodiment, generating the target output amplitude in response to the output amplitude setting operation includes: the method comprises the steps of obtaining a second characteristic input amplitude of a first reference audio, wherein the first reference audio is an accompanying sound of a target reference song, responding to an output amplitude setting operation, obtaining a reference amplification factor, and obtaining a target output amplitude according to the second characteristic input amplitude and the reference amplification factor, wherein the output amplitude setting operation can be executed by a user, so that the obtained target output amplitude can meet individual requirements of the user according to the second characteristic input amplitude and the reference amplification factor, and further ensure hearing comfort of the user.
With reference to the fourth optional implementation manner of the first aspect, the embodiment of the present application further provides a fifth optional implementation manner of the first aspect, acquiring a second feature input amplitude of the first reference audio, including:
acquiring a second input amplitude of each piece of audio data in a plurality of pieces of audio data of the first reference audio to acquire a plurality of second input amplitudes;
and taking the second input amplitude with the largest value of the plurality of second input amplitudes as the second characteristic input amplitude.
In the above embodiment, acquiring the second characteristic input amplitude of the first reference audio includes: and acquiring a second input amplitude of each piece of audio data in the plurality of pieces of audio data of the first reference audio to acquire a plurality of second input amplitudes, and taking the second input amplitude with the largest value in the plurality of second input amplitudes as a second characteristic input amplitude. Based on the above, the reference amplification factor is obtained in response to the output amplitude setting operation, and the obtained target output amplitude is positioned within the acceptable range of the user according to the second characteristic input amplitude and the reference amplification factor, so that the hearing comfort of the user can be ensured.
With reference to the fourth optional implementation manner of the first aspect, the embodiment of the present application further provides a sixth optional implementation manner of the first aspect, according to an audio amplification factor, before adjusting an output amplitude of audio data to be output in the first target audio, an audio adjusting method further includes:
In the process of obtaining the output of the first reference audio, the third characteristic input amplitude of the second reference audio is obtained, and the second reference audio is input through a microphone;
in the process of obtaining the output of the first target audio, the fourth characteristic input amplitude of the second target audio is obtained, and the second target audio is input through a microphone;
and adjusting the audio amplification coefficient according to the third characteristic input amplitude and the fourth characteristic input amplitude.
In the above embodiment, before adjusting the output amplitude of the audio data to be output in the first target audio according to the audio amplification factor, the audio adjusting method further includes: in the process of obtaining the output of the first reference audio, the third characteristic input amplitude of the second reference audio is input through a microphone, in the process of obtaining the output of the first target audio, the fourth characteristic input amplitude of the second target audio is input through the microphone, and the second target audio adjusts the audio amplification coefficient according to the third characteristic input amplitude and the fourth characteristic input amplitude, so that the controllability of the audio adjusting method is enhanced.
In a second aspect, embodiments of the present application further provide an audio adjustment apparatus, including:
The first amplitude acquisition module is used for acquiring a first characteristic input amplitude of the first target audio;
the coefficient setting module is used for acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude;
and the output adjusting module is used for adjusting the output amplitude of the audio data to be output in the first target audio according to the audio amplification coefficient.
The audio adjusting apparatus provided in the embodiment of the present application has the same advantages as the audio adjusting method provided in the first aspect, or any optional implementation manner of the first aspect, and is not described herein.
In a third aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the audio adjustment method provided in the first aspect, or any optional implementation manner of the first aspect.
The electronic device provided in the embodiment of the present application has the same advantages as the audio adjustment method provided in the first aspect, or any optional implementation manner of the first aspect, and is not described herein.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program is executed to implement the audio adjustment method provided in the first aspect, or any optional implementation manner of the first aspect.
The computer readable storage medium provided in the embodiments of the present application has the same advantages as the audio adjustment method provided in the first aspect, or any optional implementation manner of the first aspect, and will not be described herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic block diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart of steps of an audio adjustment method according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a left-right channel separation process for accompaniment of a real song according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a process for separating left and right channels of sound accompaniment of a target reference song according to an embodiment of the present application.
Fig. 5 is a schematic block diagram of an audio adjusting apparatus according to an embodiment of the present application.
Reference numerals: 100-an electronic device; 110-a processor; 120-memory; 130-an audio codec; 140-microphones; 150-a player; 200-an audio conditioning apparatus; 210-a first amplitude acquisition module; 220-a coefficient setting module; 230-output adjustment module.
Detailed Description
For the purposes, technical solutions and advantages of the embodiments of the present application, the technical solutions of the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Furthermore, it should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Referring to fig. 1, a schematic block diagram of an electronic device 100 according to an embodiment of the present application is provided. In this embodiment of the present application, the electronic device 100 may be a terminal device, for example, a smart phone, a computer, a personal digital assistant (Personal Digital Assistant, PAD), a mobile internet device (Mobile Internet Device, MID), or a dedicated K song device, a conference audio/video device, or the like.
Structurally, the electronic device 100 may include a processor 110, a memory 120, an audio codec 130, a microphone 140, and a player 150, the memory 120 and the audio codec 130 being respectively connected to the processor 110, the microphone 140 and the player 150 being respectively connected to the audio codec 130.
It should be noted that, in the embodiment of the present application, the processor 110 is directly or indirectly electrically connected to the memory 120 and the audio codec 130 to implement data transmission or interaction, for example, these elements may be electrically connected to each other through one or more communication buses or signal lines, and the audio adjusting apparatus provided in the embodiment of the present application includes at least one software module that may be stored in the memory 120 or cured in an Operating System (OS) of the electronic device 100 in a form of software or Firmware. The processor 110 is configured to execute executable modules stored in the memory 120, such as software functional modules and computer programs included in the audio adjustment apparatus, to implement the audio adjustment method.
The processor 110 may execute the computer program after receiving the execution instructions. The processor 110 may be an integrated circuit chip with signal processing capability. The processor 110 may also be a general-purpose processor, such as a digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), discrete gate or transistor logic, discrete hardware components, may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application, and may be a microprocessor or any conventional processor.
The Memory 120 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), and an electrically erasable programmable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), the Memory 120 being for storing a program, the processor 110 executing the program upon receiving an execution instruction.
In addition, in the embodiment of the present application, the audio codec 130 is configured to encode audio data in an analog state (analog audio signal) into audio data in a digital state (digital audio signal), and decode the audio data in the digital state into audio data in an analog state, and the microphone 140 is a microphone, and is configured to convert a sound signal into audio data in an analog state, and send the audio data in the analog state to the audio codec 130, so that the audio codec 130 encodes the audio data in the analog state into the audio data in the digital state, and then sends the audio data in the digital state to the processor 110 for processing, for example, output amplitude adjustment and the like, after the processor 110 processes the audio data in the digital state, the audio codec 130 decodes the audio data in the digital state into the audio data in the analog state, and finally, the audio codec 130 plays the audio data in the analog state through the player 150.
It should be understood that the configuration shown in fig. 1 is merely illustrative, and the electronic device 100 provided in the embodiment of the present application may also have fewer or more components than those shown in fig. 1, or may have a different configuration than that shown in fig. 1. In addition, the components shown in fig. 1 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 2, a flowchart of an audio adjustment method according to an embodiment of the present application is shown, and the method is applied to the electronic device 100 shown in fig. 1. It should be noted that, the audio adjustment method provided in the embodiment of the present application may be independently applied to the electronic device 100 shown in fig. 1, or may be embedded in a computer program for implementing a K song application, and applied to the electronic device 100 shown in fig. 1, and it should be further noted that, the audio adjustment method provided in the embodiment of the present application is not limited by the order shown in fig. 2 and the following, and the specific flow and steps of the audio adjustment method are described below in connection with fig. 2.
Step S100, a first feature input amplitude of a first target audio is acquired.
In this embodiment of the present invention, the first target audio may be an accompanying sound of a real song in an actual K song process, and the accompanying sound of the real song is usually stereo, that is, multichannel sound, and the data format may be a pulse code modulation (Pulse Code Modulation, PCM) format, so in actual implementation, the accompanying sound of the real song may be integrally used as the first target audio, or the accompanying sound of the real song may be subjected to channel separation to obtain a plurality of first mono sounds, and thereafter, the plurality of first mono sounds are respectively used as the first target audio.
In this embodiment of the present application, the sound accompanying a real song may be an 8-bit binaural audio file, or may be a 16-bit binaural audio file, where the storage manner may be a Big-end (Big-Endian) mode, that is, the high-order bytes are arranged at the low address end of the memory, and the low-order bytes are arranged at the high address end of the memory, and meanwhile, the left-channel audio data and the right-channel audio data are stored in an interleaved manner, or may be a small-end mode (Little-Endian), that is, the low-order bytes are arranged at the low address end of the memory, and the high-order bytes are arranged at the high address end of the memory, and meanwhile, the left-channel audio data and the right-channel audio data are stored in an interleaved manner. Referring to fig. 3, taking the real song audio as an 8-bit binaural audio file, the storage mode is a Big-end (Big-Endian) mode, and the left and right channels of the audio can be separated by interleaving and reading to obtain a first left channel audio and a first right channel audio.
In addition, in order to keep the audio to be output in a stable volume range to ensure the hearing comfort of the user, for step S100, in this embodiment of the present application, as an optional implementation manner, it may include step S110, step S120, and step S130 or step S140.
Step S110, determining current input data of the first target audio, and acquiring a first input amplitude of the current input data.
Step S120, determining whether the first input amplitude is greater than the maximum input amplitude of the first target audio in the history input period.
In step S130, if the first input amplitude is greater than the maximum input amplitude of the first target audio in the historical input period, the first input amplitude is used as the first characteristic input amplitude.
In step S140, if the first input amplitude is less than or equal to the maximum input amplitude of the first target audio in the historical input period, the maximum input amplitude is used as the first characteristic input amplitude.
In the embodiment of the application, in the playing process of the first target audio, the audio data read from the audio file at the current moment can be used as the current input data, the first input amplitude of the current input data is obtained, and then whether the first input amplitude is larger than the maximum input amplitude of the first target audio in the historical input period is judged. It may be understood that, in the embodiment of the present application, the history input data with the largest input amplitude in the plurality of pieces of history input data with the reading time before the current time may be used as the largest history input data, and the input amplitude of the largest history input data is the largest input amplitude of the first target audio in the history input period. In addition, it should be noted that, if the current input data is the first input data in the first target audio playing process, the first input amplitude of the current input data may be directly obtained and used as the first characteristic input amplitude.
Taking the whole sound of the real song as a first target audio, taking the 8-bit double-channel audio file shown in fig. 3 as an example, if the current moment is t4 moment, acquiring a first target audio 4 read at t4 moment as current input data, acquiring the sum of input amplitudes of 0 sound channel (left) and 1 sound channel (right) in the first target audio 4 as first input amplitude, judging whether the first input amplitude is larger than the maximum input amplitude of the first target audio in a historical input period (t 1 moment, t2 moment and t3 moment), and assuming that the maximum input amplitude of the first target audio in the historical period is the input amplitude corresponding to t2 moment, namely, the sum of input amplitudes of 0 sound channel (left) and 1 sound channel (right) in the first target audio 2 is the first characteristic input amplitude if the first input amplitude is larger than the input amplitude corresponding to t2 moment, and taking the first input amplitude corresponding to t2 moment as the first characteristic input amplitude if the first input amplitude is smaller than or equal to the input amplitude corresponding to t2 moment.
Then taking the sound of the real song as an 8-bit double-channel audio file shown in fig. 3, carrying out left-right channel separation on the sound of the real song to obtain a first left channel sound shown in fig. 3 and a first right channel sound shown in fig. 3, taking the first left channel sound and the first right channel sound as first target audio as examples, taking the first target audio 41 read at the time of t41 as current input data if the current time is t41, taking the input amplitude of 0 channel (left) in the first target audio 41 as first input amplitude, judging whether the first input amplitude is larger than the maximum input amplitude of the first target audio in a historical input period (t 11 time, t21 time and t31 time), and taking the first target audio 21 as input amplitude of 0 channel (left) in the first target audio, taking the first target audio 21 as first input amplitude if the first input amplitude is larger than the time of t21, taking the first target audio 41 as the first input amplitude, taking the first input amplitude as the first input amplitude, and taking the first target audio 42 if the first input amplitude is larger than the first target audio 1 at the first time of t21 or the first target audio 42 in the historical input period (t 21 time and the first audio 42) as the first input amplitude which is larger than the first target audio 42 in the historical input period (t 21 time and the first audio 2) or the first target audio 2) respectively, assuming that the maximum input amplitude of the first target audio in the history period is the input amplitude corresponding to the time t22, that is, the input amplitude of 1 channel (right) in the first target audio 22, if the first input amplitude is greater than the input amplitude corresponding to the time t22, the first input amplitude is taken as the first characteristic input amplitude, and if the first input amplitude is less than or equal to the input amplitude corresponding to the time t22, the input amplitude corresponding to the time t22 is taken as the first characteristic input amplitude.
Through the arrangement, the first characteristic input amplitude is the input amplitude with the largest selected value from the input amplitudes corresponding to all the input data of the first target audio, so that the obtained audio amplification factor is not too large according to the target output amplitude and the first characteristic input amplitude, and the finally obtained output amplitude is always smaller than or equal to the target output amplitude after the output amplitude of the audio data to be output is regulated in the first target audio according to the audio amplification factor, namely, the audio to be output can be kept in a stable volume range, so that the hearing comfort of a user is ensured.
Step S200, obtaining an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude.
In this embodiment of the present application, the target output amplitude may be a preset fixed output amplitude, or may be an output amplitude that is set individually according to the hearing habit of the user. Taking the target output amplitude as an example according to the hearing habit of the user, the audio adjusting method provided in the embodiment of the application may further include step S010, step S020 and step S030 before executing step S200.
Step S010, judging whether the target output amplitude exists in the parameter storage library.
In this embodiment of the present invention, since the target output amplitude is an output amplitude that is set individually according to the hearing habit of the user, for a certain user, when the user uses the parameter storage library for the first time, the target output amplitude does not exist, or in other words, there is no candidate output amplitude corresponding to the user. For example, the current user is user a, but the parameter store may only have the amplitude to be output corresponding to user B. Based on this, for step S010, in the present embodiment, as an alternative implementation manner, it may include step S011, step S012, and step S013 or step S014.
Step S011, obtaining audio characteristic information of the second target audio in the output process of the first target audio, where the second target audio is input through the microphone.
Step S012, judging whether the candidate output amplitude corresponding to the audio characteristic information exists in the parameter storage library.
In step S013, if the parameter repository has the output amplitude to be selected corresponding to the audio feature information, it is determined that the parameter repository has the target output amplitude, and the output amplitude to be selected is used as the target output amplitude.
In step S014, if the candidate output amplitude corresponding to the audio feature information does not exist in the parameter repository, it is determined that the target output amplitude does not exist in the parameter repository.
In this embodiment of the present application, the second target audio may be audio information input by the user through the microphone during the output process of the first target audio, for example, lyrics of a real song, and the audio feature information of the second target audio may be a tone attribute of the second target audio. After the audio characteristic information of the second target audio is obtained in the output process of the first target audio, whether the to-be-selected output amplitude corresponding to the audio characteristic information exists in the parameter storage library can be judged, if so, the target output amplitude exists in the parameter storage library, the to-be-selected output amplitude is taken as the target output amplitude, and if not, the target output amplitude does not exist in the parameter storage library.
Through the above arrangement, it can be understood that in the embodiment of the present application, the parameter repository may store the output amplitudes to be selected corresponding to the plurality of audio feature information, so that the method is applicable to a plurality of different users, and in addition, the corresponding relationship between the output amplitudes to be selected and the audio feature information is directly created, so that the execution efficiency of the audio adjustment method can be further improved.
Step S020, if the target output amplitude exists in the parameter storage library, executing the step of obtaining the audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude.
In step S030, if the target output amplitude does not exist in the parameter repository, the target output amplitude is generated in response to the output amplitude setting operation.
For the response output amplitude setting operation included in step S030, the target output amplitude is generated, which may include step S031, step S032, and step S033 as an alternative implementation manner.
In step S031, the second characteristic input amplitude of the first reference audio is obtained, where the first reference audio is the accompanying sound of the target reference song.
In this embodiment of the present application, if the target output amplitude does not exist in the parameter repository, a user setting page may be displayed, where the user setting page is used to display a plurality of reference songs, and the plurality of reference songs may be a preset number of hot songs with top jukeboxes within a preset time period, where the preset time period may be, but is not limited to, one year, half a year, and two months, and the preset number may be, but is not limited to, 10, 20, and 30, and after the user setting page displays the plurality of reference songs, the user may select a target reference song from the plurality of reference songs to play, where the target reference song includes a first reference audio, and it may be understood that in this embodiment of the present application, the first reference audio is an accompanying sound of the target reference song.
Further, for step S031, in this embodiment of the present application, as an alternative implementation manner, it may include step S0311 and step S0312.
In step S0311, a second input amplitude of each piece of audio data in the pieces of audio data of the first reference audio is obtained to obtain a plurality of second input amplitudes.
In step S0312, the second input amplitude with the largest value among the plurality of second input amplitudes is used as the second characteristic input amplitude.
In step S100 of the present embodiment, if the whole sound of the real song is taken as the first target audio, in step S031 (step S0311 and step S0312) of the present embodiment, the whole sound of the target reference song may be taken as the first reference audio, in step S100 of the present embodiment, if the sound of the real song is separated to obtain a plurality of first mono sounds, and then, the plurality of first mono sounds are taken as the first target audio, in step S031 (step S0311 and step S0312) of the present embodiment, the sound of the target reference song may be separated to obtain a plurality of second mono sounds, and then, the plurality of second mono sounds are taken as the first reference audio.
Similarly, the accompanying sound of the target reference song can be an 8-bit double-channel audio file or a 16-bit double-channel audio file, and the storage mode can be a Big-end mode or a small-end mode (Little-end). Referring to fig. 4, taking an 8-bit binaural audio file as an example, where the audio of the target reference song is stored in a Big-end (Big-Endian) mode, if the entire audio of the target reference song is used as the first reference audio, the second input amplitude of each piece of audio data is obtained in the pieces of audio data of the first reference audio, so as to obtain a plurality of second input amplitudes, in this process, a 0 channel (left) and a 1 channel (right) belonging to the same byte can be used as the first audio data, and the sum of the input amplitudes of the 0 channel (left) and the 1 channel (right) in the audio data is obtained as the second input amplitude of the audio data, then, in a plurality of second input amplitudes, the second input amplitude with the largest value is used as the second characteristic input amplitude, if the audio of the target reference song can be subjected to channel separation to obtain a plurality of second mono sounds, then, respectively, in this process, the audio data can be used as the first reference audio, the left channel and the second audio amplitude of the target reference song can be subjected to interleaving read, and the second audio amplitude is also obtained as the second input amplitude, and the second audio amplitude is obtained in a plurality of the second audio tracks, and the second audio amplitude is obtained in the largest value (left-right) and the second audio amplitude is obtained as the second input amplitude of the second audio data, the input amplitude of each 1 sound channel (right) is used for obtaining a plurality of second input amplitudes, and the second input amplitude with the largest value in the plurality of second input amplitudes is used as the second characteristic input amplitude corresponding to the second right sound channel accompanying sound.
Furthermore, it should be noted that, in the embodiment S100 of the present application, the audio of the real song is subjected to channel separation to obtain a plurality of first monaural tones, and then the plurality of first monaural tones are respectively used as the first target audio, that is, the first left channel audio and the first right channel audio are respectively used as the first target audio, and meanwhile, in step S031 (step S0311 and step S0312) of the present application, the audio of the target reference song is subjected to channel separation to obtain a plurality of second monaural tones, and then the plurality of second monaural tones are respectively used as the first reference audio, that is, when the second left channel audio and the second right channel audio are respectively used as the first reference audio, the second left channel audio is used as the first reference audio corresponding to the first left channel audio, and the second right channel audio is used as the first reference audio corresponding to the first right channel audio.
Step S032, in response to the output amplitude setting operation, the reference amplification factor is acquired.
Step S033, obtaining a target output amplitude according to the second characteristic input amplitude and the reference amplification factor.
In the embodiment of the application, the user may trigger the output amplitude setting operation in the output process of the first reference audio, so that the electronic device may obtain the reference amplification factor in response to the output amplitude setting operation, and then obtain the target output amplitude according to the second characteristic input amplitude and the reference amplification factor. In this embodiment of the present application, the logic relationship between the second characteristic input amplitude, the reference amplification factor, and the target output amplitude may be expressed as:
S_out1=S_input1*S_Volume1
Wherein s_out1 is the target output amplitude, s_input1 is the second characteristic input amplitude, s_volme 1 is the reference amplification factor.
It can be understood that, because the reference amplification factor is the value obtained by triggering the output amplitude setting operation in the output process of the first reference audio frequency by the user, so that the electronic device responds to the output amplitude setting operation, the obtained target output amplitude is always matched with the hearing habit of the user according to the second characteristic input amplitude and the reference amplification factor, and the volume of outputting the first reference audio frequency with the target output amplitude is also understood to be within the acceptable range of the user, so that the personalized requirement of the user can be met, and the hearing comfort of the user is further ensured.
In this embodiment of the present application, after the target output amplitude is obtained, step S200 may be executed to obtain the audio amplification factor according to the target output amplitude and the first feature input amplitude.
In this embodiment of the present application, the logic relationship between the target output amplitude, the first feature input amplitude, and the audio amplification factor may be expressed as:
S_Volume2=S_out1/S_input_2
wherein s_volme 2 is the audio amplification factor, s_out1 is the target output amplitude, and s_input_2 is the first characteristic input amplitude.
Step S300, according to the audio amplification factor, the output amplitude of the audio data to be output in the first target audio is adjusted.
In this embodiment of the present application, after the reference amplification factor is obtained, the output amplitude of the audio data to be output in the first target audio may be adjusted according to the audio amplification factor, and finally, the logic relationship between the output amplitude of the audio data to be output, the input amplitude of the audio data to be output and the audio amplification factor may be expressed as:
S_out3=S_input3*S_Volume2
wherein s_out3 is the output amplitude of the audio data to be output, s_input3 is the input amplitude of the audio data to be output, and s_volme 2 is the audio amplification factor.
It can be understood that, based on the first characteristic input amplitude obtaining manner described in step S110, step S120, and step S130 or step S140, the input amplitude of the audio data to be output must be smaller than or equal to the first characteristic input amplitude, and therefore, the output amplitude of the audio data to be output must also be smaller than or equal to the target output amplitude, that is, the audio to be output can be kept within the stable volume range, and therefore, through the audio adjusting method provided by the embodiment of the present application, the hearing comfort of the user can be ensured.
Further, to enhance the controllability of the audio adjustment method, the audio adjustment method provided in the embodiment of the present application may further include step S040, step S050, and step S060 before performing step S300.
In step S040, in the process of obtaining the output of the first reference audio, the third characteristic input amplitude of the second reference audio is obtained, and the second reference audio is input through the microphone.
In this embodiment of the present application, the second reference audio may be audio information input by the user through the microphone in the output process of the first reference audio, for example, lyrics of the target reference song, and the obtaining manner of the third feature input amplitude may be: and acquiring a third input amplitude of each piece of audio data in the plurality of pieces of audio data of the second reference audio to acquire a plurality of third input amplitudes, and taking the third input amplitude with the largest numerical value in the plurality of third input amplitudes as a third characteristic input amplitude. The foregoing process may be implemented based on the inventive concept provided when the second characteristic input amplitude of the first reference audio is obtained in step S031, which is not described herein.
In step S050, in the process of obtaining the output of the first target audio, the fourth characteristic input amplitude of the second target audio is input, and the second target audio is input through the microphone.
In this embodiment of the present application, the second target audio may be audio information input by the user through the microphone in the output process of the first target audio, for example, lyrics of a real song, and the fourth feature input amplitude may be obtained by: determining current input data of the second target audio, acquiring fourth input amplitude of the current input data, judging whether the fourth input amplitude is larger than the maximum input amplitude of the second target audio in the historical input period, if so, taking the second input amplitude as fourth characteristic input amplitude, and if so, taking the maximum input amplitude as fourth characteristic input amplitude. The foregoing process may be implemented based on the inventive concept provided when the first feature input amplitude of the first target audio is obtained in step S100, which is not described herein.
And step S060, adjusting the audio amplification coefficient according to the third characteristic input amplitude and the fourth characteristic input amplitude.
In this embodiment of the present application, after the third feature input amplitude and the fourth feature input amplitude are obtained, an amplitude ratio of the third feature input amplitude to the fourth feature input amplitude may be further obtained, and the audio amplification factor may be adjusted according to the amplitude ratio. For example, if the ratio of the third feature input amplitude to the fourth feature input amplitude is 2, the audio amplification factor is doubled, and if the ratio of the third feature input amplitude to the fourth feature input amplitude is 0.5, the audio amplification factor is reduced by 50%.
Through the arrangement, if the sound signal input by the microphone is larger in the actual K song process of the user, the audio amplification factor can be correspondingly increased, and if the sound signal input by the microphone is smaller in the actual K song process of the user, the audio amplification factor can be correspondingly reduced, so that the sound volume of the real song is matched with the sound volume of the lyrics input by the microphone of the user, and finally, the controllability of the audio adjusting method is enhanced.
Based on the same inventive concept as the above-described audio adjusting method, the embodiment of the present application also provides an audio adjusting apparatus 200. Referring to fig. 5, an audio adjusting apparatus 200 provided in the embodiment of the present application includes a first amplitude obtaining module 210, a coefficient setting module 220, and an output adjusting module 230.
The first amplitude obtaining module 210 is configured to obtain a first feature input amplitude of the first target audio.
For a description of the first amplitude acquisition module 210, reference is specifically made to the detailed description of step S100 in the above-described related embodiments of the audio conditioning method, that is, step S100 may be performed by the first amplitude acquisition module 210.
The coefficient setting module 220 is configured to obtain an audio amplification coefficient according to the target output amplitude and the first feature input amplitude.
For the description of the coefficient setting module 220, reference is specifically made to the detailed description of step S200 in the above-described related embodiments of the audio adjustment method, that is, step S200 may be performed by the coefficient setting module 220.
The output adjusting module 230 is configured to adjust an output amplitude of audio data to be output in the first target audio according to the audio amplification factor.
For a description of the output adjustment module 230, reference is made specifically to the detailed description of step S300 in the above-described related embodiments of the audio adjustment method, that is, step S300 may be performed by the output adjustment module 230.
In the embodiment of the present application, the first amplitude acquisition module 210 may include a first unit, a second unit, a third unit, and a fourth unit.
And the first unit is used for determining the current input data of the first target audio and acquiring the first input amplitude of the current input data.
For the description of the first unit, reference is specifically made to the detailed description of step S110 in the above-described related embodiments of the audio conditioning method, that is, step S110 may be performed by the first unit.
And a second unit for judging whether the first input amplitude is larger than the maximum input amplitude of the first target audio in the history input period.
For the description of the second unit, reference is specifically made to the detailed description of step S120 in the above-described related embodiments of the audio conditioning method, that is, step S120 may be performed by the second unit.
And the third unit is used for taking the first input amplitude as the first characteristic input amplitude if judging that the first input amplitude is larger than the maximum input amplitude of the first target audio in the historical input period.
For the description of the third unit, reference is specifically made to the detailed description of step S130 in the above-described related embodiments of the audio conditioning method, that is, step S130 may be performed by the third unit.
And the fourth unit is used for taking the maximum input amplitude as the first characteristic input amplitude if judging that the first input amplitude is smaller than or equal to the maximum input amplitude of the first target audio in the historical input period.
For the description of the fourth unit, reference is specifically made to the detailed description of step S140 in the above-described related embodiments of the audio conditioning method, that is, step S140 may be performed by the fourth unit.
The audio adjusting apparatus 200 provided in the embodiment of the present application may further include a judging module, a skipping module, and a generating module.
And the judging module is used for judging whether the target output amplitude exists in the parameter storage library.
For the description of the judgment module, reference is made specifically to the detailed description of step S010 in the above-described related embodiment of the audio adjustment method, that is, step S010 may be executed by the judgment module.
And the jump module is used for executing the step of acquiring the audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude if the target output amplitude exists in the parameter storage library.
For a description of the skip module reference is made in particular to the detailed description of step S020 in the above-described embodiments related to the audio adjustment method, i.e. step S020 may be performed by the skip module.
And the generating module is used for responding to the output amplitude setting operation and generating the target output amplitude if the target output amplitude does not exist in the parameter storage library.
For a description of the generation module, reference is made specifically to the detailed description of step S030 in the above-described related embodiments of the audio conditioning method, that is, step S030 may be performed by the generation module.
In this embodiment of the present application, the judging module may include a fifth unit, a sixth unit, a seventh unit, and an eighth unit.
And a fifth unit, configured to obtain audio feature information of a second target audio in the output process of the first target audio, where the second target audio is input through the microphone.
For the description of the fifth unit, reference is specifically made to the detailed description about step S011 in the above-described related embodiments of the audio conditioning method, that is, step S011 may be performed by the fifth unit.
And a sixth unit, configured to determine whether there is a candidate output amplitude corresponding to the audio feature information in the parameter repository.
For the description of the sixth unit, reference is specifically made to the detailed description of step S012 in the above-described audio adjustment method related embodiments, that is, step S012 may be performed by the sixth unit.
And a seventh unit, configured to determine that the target output amplitude exists in the parameter storage if the candidate output amplitude corresponding to the audio feature information exists in the parameter storage, and take the candidate output amplitude as the target output amplitude.
For the description of the seventh unit, reference is specifically made to the detailed description of step S013 in the above-described audio adjustment method related embodiments, that is, step S013 may be performed by the seventh unit.
And an eighth unit, configured to determine that the parameter repository has no target output amplitude if the parameter repository has no candidate output amplitude corresponding to the audio feature information.
For the description of the eighth unit, reference is specifically made to the detailed description of step S014 in the above-described related embodiment of the audio adjustment method, that is, step S014 may be performed by the eighth unit.
The first target audio is an accompanying sound of a real song, and based on this, in the embodiment of the present application, the generating module may include a ninth unit, a tenth unit, and an eleventh unit.
And a ninth unit for acquiring a second characteristic input amplitude of the first reference audio, wherein the first reference audio is an accompanying sound of the target reference song.
For the description of the ninth unit, reference is specifically made to the detailed description of step S031 in the above-described related embodiments of the audio conditioning method, that is, step S031 may be performed by the ninth unit.
And a tenth unit that acquires the reference amplification factor in response to the output amplitude setting operation.
For the description of the tenth unit, reference is specifically made to the detailed description of step S032 in the above-described related embodiments of the audio conditioning method, that is, step S032 may be performed by the tenth unit.
And an eleventh unit for acquiring the target output amplitude according to the second characteristic input amplitude and the reference amplification factor.
For the description of the eleventh unit, reference is specifically made to the detailed description of step S033 in the above-described related embodiments of the audio conditioning method, that is, step S033 may be performed by the eleventh unit.
In the embodiment of the present application, the ninth unit may include a first subunit and a second subunit.
A first subunit, configured to obtain a second input amplitude of each piece of audio data in the plurality of pieces of audio data of the first reference audio, so as to obtain a plurality of second input amplitudes.
For a description of the first subunit, reference is made in particular to the detailed description of step S0311 in the above-described related embodiments of the audio conditioning method, i.e. step S0311 may be performed by the first subunit.
And the second subunit is used for taking the second input amplitude with the largest value of the plurality of second input amplitudes as the second characteristic input amplitude.
For a description of the second subunit reference is made in particular to the detailed description of step S0312 in the above-described related embodiments of the audio conditioning method, i.e. step S0312 may be performed by the second subunit.
The audio adjusting apparatus 200 provided in the embodiment of the present application may further include a second amplitude obtaining module, a third amplitude obtaining module, and a secondary adjusting module.
And the second amplitude acquisition module is used for acquiring the third characteristic input amplitude of the second reference audio in the output process of the first reference audio, and the second reference audio is input through the microphone.
For a description of the second amplitude acquisition module reference is made in particular to the detailed description of step S040 in the above-described related embodiments of the audio conditioning method, i.e. step S040 may be performed by the second amplitude acquisition module.
And the third amplitude acquisition module is used for acquiring fourth characteristic input amplitude of the second target audio in the output process of the first target audio, and the second target audio is input through the microphone.
For a description of the third amplitude acquisition module reference is made in particular to the detailed description of step S050 in the above-described related embodiments of the audio conditioning method, i.e. step S050 may be performed by the third amplitude acquisition module.
And the secondary adjusting module is used for adjusting the audio amplification coefficient according to the third characteristic input amplitude and the fourth characteristic input amplitude.
For a description of the secondary adjustment module reference is made in particular to the detailed description of step S060 in the above-described embodiments related to the audio adjustment method, i.e. step S060 may be performed by the secondary adjustment module.
In addition, the embodiment of the present application further provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed, the audio adjustment method provided in the embodiment of the method is implemented, specifically, the embodiment of the method may be referred to, which is not described in detail in the embodiment of the present application.
In summary, the audio adjustment method, the device, the electronic equipment and the computer readable storage medium provided by the embodiment of the application can obtain the first characteristic input amplitude of the first target audio, obtain the audio amplification factor according to the target output amplitude and the first characteristic input amplitude, and finally adjust the output amplitude of the audio data to be output in the first target audio according to the audio amplification factor so as to realize automatic adjustment of the volume of the first target audio, thereby effectively simplifying the adjustment process of the volume of the first target audio. It can be understood that when the audio adjustment method provided in the embodiment of the present application is nested in a computer program for implementing K song application, the first target audio may be the accompanying sound of the real song, so that automatic adjustment of the accompanying sound volume after switching the real song can be implemented.
In the several implementations provided in the examples of the present application, it may be understood that the disclosed methods and apparatuses may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, the functional modules in each embodiment of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
Furthermore, the functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
It should also be noted that relational terms such as "first," "second," "third," and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (8)

1. An audio conditioning method, comprising:
acquiring a first characteristic input amplitude of a first target audio;
acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude;
according to the audio amplification coefficient, adjusting the output amplitude of audio data to be output in the first target audio;
wherein, before the audio amplification factor is obtained according to the target output amplitude and the first characteristic input amplitude, the audio adjusting method further includes:
judging whether the target output amplitude exists in a parameter storage library; if the target output amplitude exists in the parameter storage library, executing the step of acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude; if the target output amplitude does not exist in the parameter storage library, responding to an output amplitude setting operation, and generating the target output amplitude;
the determining whether the target output amplitude exists in the parameter storage library includes:
acquiring audio characteristic information of second target audio in the output process of the first target audio, wherein the second target audio is input through a microphone;
Judging whether the output amplitude to be selected corresponding to the audio characteristic information exists in the parameter storage library;
if the parameter storage library has the output amplitude to be selected corresponding to the audio characteristic information, judging that the parameter storage library has the target output amplitude, and taking the output amplitude to be selected as the target output amplitude;
and if the candidate output amplitude corresponding to the audio feature information does not exist in the parameter storage library, judging that the target output amplitude does not exist in the parameter storage library.
2. The audio conditioning method of claim 1, wherein the obtaining a first characteristic input amplitude of the first target audio comprises:
determining current input data of the first target audio and acquiring a first input amplitude of the current input data;
judging whether the first input amplitude is larger than the maximum input amplitude of the first target audio in a historical input period;
if the first input amplitude is larger than the maximum input amplitude of the first target audio in the historical input period, taking the first input amplitude as the first characteristic input amplitude;
And if the first input amplitude is smaller than or equal to the maximum input amplitude of the first target audio in the historical input period, taking the maximum input amplitude as the first characteristic input amplitude.
3. The audio conditioning method of claim 1, wherein the first target audio is an accompaniment of a real song, the responsive output amplitude setting operation generating the target output amplitude comprising:
acquiring a second characteristic input amplitude of a first reference audio, wherein the first reference audio is an accompanying sound of a target reference song;
responding to the output amplitude setting operation, and acquiring a reference amplification factor;
and acquiring the target output amplitude according to the second characteristic input amplitude and the reference amplification factor.
4. The audio conditioning method of claim 3, wherein the obtaining the second characteristic input amplitude of the first reference audio includes:
acquiring a second input amplitude of each piece of audio data in the pieces of audio data of the first reference audio to acquire a plurality of second input amplitudes;
and taking the second input amplitude with the largest value of the plurality of second input amplitudes as the second characteristic input amplitude.
5. The audio conditioning method of claim 3, characterized in that the audio conditioning method further includes, before the audio data to be output is output in the first target audio, conditioning according to the audio amplification factor:
in the process of obtaining the output of the first reference audio, the third characteristic input amplitude of a second reference audio is obtained, and the second reference audio is input through a microphone;
in the process of obtaining the output of the first target audio, the fourth characteristic input amplitude of a second target audio is obtained, and the second target audio is input through the microphone;
and adjusting the audio amplification factor according to the third characteristic input amplitude and the fourth characteristic input amplitude.
6. An audio conditioning apparatus, comprising:
the first amplitude acquisition module is used for acquiring a first characteristic input amplitude of the first target audio;
the coefficient setting module is used for acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude; wherein before the audio amplification factor is obtained according to the target output amplitude and the first characteristic input amplitude, the method further comprises:
Judging whether the target output amplitude exists in a parameter storage library; if the target output amplitude exists in the parameter storage library, executing the step of acquiring an audio amplification coefficient according to the target output amplitude and the first characteristic input amplitude; if the target output amplitude does not exist in the parameter storage library, responding to an output amplitude setting operation, and generating the target output amplitude;
the determining whether the target output amplitude exists in the parameter storage library includes:
acquiring audio characteristic information of second target audio in the output process of the first target audio, wherein the second target audio is input through a microphone;
judging whether the output amplitude to be selected corresponding to the audio characteristic information exists in the parameter storage library;
if the parameter storage library has the output amplitude to be selected corresponding to the audio characteristic information, judging that the parameter storage library has the target output amplitude, and taking the output amplitude to be selected as the target output amplitude;
if the parameter storage library does not have the output amplitude to be selected corresponding to the audio feature information, judging that the parameter storage library does not have the target output amplitude;
And the output adjusting module is used for adjusting the output amplitude of the audio data to be output in the first target audio according to the audio amplification coefficient.
7. An electronic device comprising a processor and a memory, wherein the memory has a computer program stored thereon, and the processor is configured to execute the computer program to implement the audio conditioning method of any of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed, implements the audio conditioning method of any one of claims 1 to 5.
CN202010623791.9A 2020-06-30 2020-06-30 Audio adjusting method, device, electronic equipment and computer readable storage medium Active CN111767022B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010623791.9A CN111767022B (en) 2020-06-30 2020-06-30 Audio adjusting method, device, electronic equipment and computer readable storage medium
PCT/CN2021/098103 WO2022001569A1 (en) 2020-06-30 2021-06-03 Audio adjustment method and apparatus, and electronic device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010623791.9A CN111767022B (en) 2020-06-30 2020-06-30 Audio adjusting method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111767022A CN111767022A (en) 2020-10-13
CN111767022B true CN111767022B (en) 2023-08-08

Family

ID=72723234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010623791.9A Active CN111767022B (en) 2020-06-30 2020-06-30 Audio adjusting method, device, electronic equipment and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN111767022B (en)
WO (1) WO2022001569A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767022B (en) * 2020-06-30 2023-08-08 成都极米科技股份有限公司 Audio adjusting method, device, electronic equipment and computer readable storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305661A (en) * 1998-04-14 2001-07-25 听觉增强有限公司 User adjustable volume control that accommodates hearing
WO2007085267A2 (en) * 2006-01-25 2007-08-02 Tc Electronic A/S Auditory perception controlling device and method
CN101426112A (en) * 2008-11-05 2009-05-06 青岛海信电子产业控股股份有限公司 Method and apparatus for television sound signal regulation
CN101827236A (en) * 2010-04-07 2010-09-08 深圳创维-Rgb电子有限公司 Sound accompaniment output control method, sound equalizer and audio play equipment
US9048790B1 (en) * 2010-04-14 2015-06-02 Marvell International Ltd. Method and apparatus for power reduction
CN105578272A (en) * 2015-12-17 2016-05-11 青岛海信电器股份有限公司 Audio gain automatic adjustment method and apparatus
CN105828254A (en) * 2016-05-09 2016-08-03 青岛海信电器股份有限公司 Audio adjusting method and device
CN107172256A (en) * 2017-07-27 2017-09-15 广东欧珀移动通信有限公司 Earphone call self-adapting regulation method, device, mobile terminal and storage medium
CN107247574A (en) * 2017-07-17 2017-10-13 中科创达软件股份有限公司 A kind of audio output control method and device
CN107705778A (en) * 2017-08-23 2018-02-16 腾讯音乐娱乐(深圳)有限公司 Audio-frequency processing method, device, storage medium and terminal
CN108174031A (en) * 2017-12-26 2018-06-15 上海展扬通信技术有限公司 A kind of volume adjusting method, terminal device and computer readable storage medium
CN108711435A (en) * 2018-05-30 2018-10-26 中南大学 A kind of high efficiency audio control method towards loudness

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8352052B1 (en) * 2006-10-23 2013-01-08 Adobe Systems Incorporated Adjusting audio volume
US20160112799A1 (en) * 2014-10-17 2016-04-21 Yamaha Corporation Acoustic system, acoustic system control device, and acoustic system control method
US9525392B2 (en) * 2015-01-21 2016-12-20 Apple Inc. System and method for dynamically adapting playback device volume on an electronic device
US20160260445A1 (en) * 2015-03-05 2016-09-08 Adobe Systems Incorporated Audio Loudness Adjustment
US20180367935A1 (en) * 2017-06-15 2018-12-20 Htc Corporation Audio signal processing method, audio positional system and non-transitory computer-readable medium
CN110870201B (en) * 2017-08-18 2023-10-24 Oppo广东移动通信有限公司 Audio signal adjusting method, device, storage medium and terminal
CN111767022B (en) * 2020-06-30 2023-08-08 成都极米科技股份有限公司 Audio adjusting method, device, electronic equipment and computer readable storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305661A (en) * 1998-04-14 2001-07-25 听觉增强有限公司 User adjustable volume control that accommodates hearing
WO2007085267A2 (en) * 2006-01-25 2007-08-02 Tc Electronic A/S Auditory perception controlling device and method
CN101426112A (en) * 2008-11-05 2009-05-06 青岛海信电子产业控股股份有限公司 Method and apparatus for television sound signal regulation
CN101827236A (en) * 2010-04-07 2010-09-08 深圳创维-Rgb电子有限公司 Sound accompaniment output control method, sound equalizer and audio play equipment
US9048790B1 (en) * 2010-04-14 2015-06-02 Marvell International Ltd. Method and apparatus for power reduction
CN105578272A (en) * 2015-12-17 2016-05-11 青岛海信电器股份有限公司 Audio gain automatic adjustment method and apparatus
CN105828254A (en) * 2016-05-09 2016-08-03 青岛海信电器股份有限公司 Audio adjusting method and device
CN107247574A (en) * 2017-07-17 2017-10-13 中科创达软件股份有限公司 A kind of audio output control method and device
CN107172256A (en) * 2017-07-27 2017-09-15 广东欧珀移动通信有限公司 Earphone call self-adapting regulation method, device, mobile terminal and storage medium
CN107705778A (en) * 2017-08-23 2018-02-16 腾讯音乐娱乐(深圳)有限公司 Audio-frequency processing method, device, storage medium and terminal
CN108174031A (en) * 2017-12-26 2018-06-15 上海展扬通信技术有限公司 A kind of volume adjusting method, terminal device and computer readable storage medium
CN108711435A (en) * 2018-05-30 2018-10-26 中南大学 A kind of high efficiency audio control method towards loudness

Also Published As

Publication number Publication date
WO2022001569A1 (en) 2022-01-06
CN111767022A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN1964187B (en) A system, device and method to manage sound volume
CN101622805B (en) System and method for intelligent equalization
US20160225376A1 (en) Encoding device and method, decoding device and method, and program
CN110312146B (en) Audio processing method and device, electronic equipment and storage medium
KR101024924B1 (en) A method and an apparatus for processing an audio signal
CN1377567A (en) Producing and storing hearing profiles and customized audio data based
TW200921642A (en) Methods and apparatuses for encoding and decoding object-based audio signals
CN101345055A (en) Speech processor and communication terminal device
CN111767022B (en) Audio adjusting method, device, electronic equipment and computer readable storage medium
KR101207325B1 (en) Device and method for sound synthesis
Hockley et al. Programming hearing instruments to make live music more enjoyable
CN111179947B (en) Audio signal processing method and device
JP2010230972A (en) Voice signal processing device, method and program therefor, and reproduction device
US9411881B2 (en) System and method for high dynamic range audio distribution
CN111883090A (en) Method and device for making audio file based on mobile terminal
CN112307161A (en) Method and apparatus for playing audio
JP6686756B2 (en) Electronic musical instrument
JP6089651B2 (en) Sound processing apparatus, sound processing apparatus control method, and program
KR101206113B1 (en) Apparatus and method for alarming live bell in mobile terminal
JPH05204388A (en) Message output device
De Villiers Mastering Paradigms: A South African Perspective
CN114882856A (en) Singing sound optimization method, singing sound optimization device, singing sound optimization equipment and computer readable storage medium
KR101060546B1 (en) Method and apparatus for converting audio play file according to auditory capacity of individual user
JPS6232797B2 (en)
JP4792819B2 (en) Remote editing method and remote editing system

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