CN109508170A - Volume setting method, device, computer equipment and storage medium - Google Patents

Volume setting method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109508170A
CN109508170A CN201811537237.8A CN201811537237A CN109508170A CN 109508170 A CN109508170 A CN 109508170A CN 201811537237 A CN201811537237 A CN 201811537237A CN 109508170 A CN109508170 A CN 109508170A
Authority
CN
China
Prior art keywords
volume
volume value
played
audio data
value
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.)
Pending
Application number
CN201811537237.8A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811537237.8A priority Critical patent/CN109508170A/en
Publication of CN109508170A publication Critical patent/CN109508170A/en
Pending legal-status Critical Current

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

Landscapes

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

Abstract

The invention discloses a kind of volume setting method, device, computer equipment and storage mediums.Audio load request is obtained first, wherein the audio load request includes audio data to be played, the audio data to be played is handled again, obtain the corresponding original sound volume value of the audio data to be played, then the corresponding currently playing volume value of broadcast sound volume of playback equipment is obtained, subsequently calculate the volume value that the original sound volume value superposition of the currently playing volume value and the audio data to be played of the playback equipment generates, obtain expected superposition volume value, finally judge that the expection states superposition volume value whether in default volume threshold, if the expected superposition volume value is not in the default volume threshold, then according to the volume of the expected superposition volume value and the default volume threshold setting playback equipment.

Description

Volume setting method, device, computer equipment and storage medium
Technical field
The present invention relates to multimedia control field more particularly to a kind of volume setting method, device, computer equipment and deposit Storage media.
Background technique
With the continuous development of multimedia technology, user can play video or audio whenever and wherever possible.In player knot When the broadcasting of beam video or audio, the volume setting of the video or audio that are moved to end can be retained, that is to say, that user plays again When video or audio, player can remain last volume when playing, and due to user play again video or Often it is easy to ignore volume when last play when person's audio, so that sound when user plays video or audio again It measures excessively high, and adaptive adjustment can not be done according to the video or audio of different volumes, flexibility is not high.
Summary of the invention
The embodiment of the present invention provides a kind of volume setting method, device, computer equipment and storage medium, thus reach from The volume of the dynamic video for adapting to different volumes perhaps audio improve video or when audio plays playback equipment to volume control The effect of flexibility.
A kind of volume setting method, comprising:
Audio load request is obtained, wherein the audio load request includes audio data to be played;
The audio data to be played is handled, the corresponding original sound volume of the audio data to be played is obtained Value;
Obtain the corresponding currently playing volume value of broadcast sound volume of playback equipment;
The original sound volume value of the currently playing volume value and the audio data to be played that calculate the playback equipment is folded The volume value for adding generation obtains expected superposition volume value;
Judge that the expection states superposition volume value whether in default volume threshold;
If the expected superposition volume value is not in the default volume threshold, according to the expected superposition volume value and institute State the volume of default volume threshold setting playback equipment.
A kind of volume setting device, comprising:
Request module, for obtaining audio load request, wherein the audio load request includes sound to be played Frequency evidence;
Processing module obtains the audio data to be played for handling the audio data to be played Corresponding original sound volume value;
Volume value obtains module, the corresponding currently playing volume value of broadcast sound volume for obtaining playback equipment;
Computing module, for calculating the currently playing volume value and the audio data to be played of the playback equipment The volume value that the superposition of original sound volume value generates obtains expected superposition volume value;
Judgment module, for judging that the expection states superposition volume value whether in default volume threshold;
Setup module, if for the expected superposition volume value not in the default volume threshold, according to the expection It is superimposed the volume of volume value and the default volume threshold setting playback equipment.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize the step of above-mentioned volume setting method when executing the computer program Suddenly.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter The step of calculation machine program realizes above-mentioned volume setting method when being executed by processor.
Above-mentioned volume setting method, device, computer equipment and storage medium, by obtaining audio load request, wherein Audio load request includes audio data to be played, then handles audio data to be played, obtains sound to be played Then frequency obtains the corresponding currently playing volume value of broadcast sound volume of playback equipment, then again according to corresponding original sound volume value The volume value that the original sound volume value superposition of the currently playing volume value and audio data to be played of playback equipment generates is calculated, is obtained It is superimposed volume value to expected, expected superposition volume value of stating finally is judged whether in default volume threshold, if expected superposition volume value Not in default volume threshold, then according to the volume of expected superposition volume value and default volume threshold setting playback equipment, to reach Can be according to the difference of the original sound volume of source of sound come automatic adjusument, playback equipment is to volume when improving video or audio broadcasting The flexibility of control.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is an application environment schematic diagram of volume setting method in one embodiment of the invention;
Fig. 2 is an exemplary diagram of volume setting method in one embodiment of the invention;
Fig. 3 is an exemplary diagram of volume setting method in one embodiment of the invention;
Fig. 4 is an exemplary diagram of volume setting method in one embodiment of the invention;
Fig. 5 is an exemplary diagram of volume setting method in one embodiment of the invention;
Fig. 6 is an exemplary diagram of volume setting method in one embodiment of the invention;
Fig. 7 is an exemplary diagram of volume setting method in one embodiment of the invention;
Fig. 8 is a functional block diagram of volume setting device in one embodiment of the invention;
Fig. 9 is a functional block diagram of volume setting device in one embodiment of the invention;
Figure 10 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Volume setting method provided in an embodiment of the present invention, can be applicable in the application environment such as Fig. 1, wherein computer Equipment is communicated by network with server.Computer equipment is sending out the audio load including audio data to be played After request, server obtains the audio load request, and the operation such as audio data to be played is handled, calculated and judged Afterwards, the broadcast sound volume of playback equipment is set.Wherein, computer equipment can be, but not limited to various personal computers, notebook electricity Brain, smart phone, tablet computer and portable wearable device.Server can use the either multiple services of independent server The server cluster of device composition is realized.
In one embodiment, as shown in Fig. 2, providing a kind of volume setting method, the service in Fig. 1 is applied in this way It is illustrated, includes the following steps: for device
S10: audio load request is obtained, sound intermediate frequency load request includes audio data to be played.
Wherein, audio load request is user after the audio played or video are wanted in selection, click broadcasting by It is triggered after key, wherein carry user in audio load request and want the audio or video (audio to be played that play Data), after the triggering of audio load request, server obtains the audio load request.
Audio data to be played is that user clicks the audio for wanting to play or video.It is if video, then to be played Audio data is the source of sound (i.e. audio-frequency unit) in video.
Specifically, after user triggers audio load request, server obtains the sound including audio data to be played Frequency load request.
S20: handling audio data to be played, obtains the corresponding original sound volume value of audio data to be played.
Wherein, the corresponding original sound volume value of audio data to be played is an opposite percentage, is relative device sound For the maximum decibel value of amount.
Specifically, audio data to be played is decoded, and analyzes the average level of audio data in preset period of time, The corresponding original sound volume value of audio data is converted by average level again, wherein original sound volume value is collected when being production audio The sound size arrived, such as the sound size that sound pick-up outfit is recorded in recording.
S30: the corresponding currently playing volume value of broadcast sound volume of playback equipment is obtained.
Wherein, playback equipment is the equipment for playing audio, for example, in sound equipment, the earphone etc. of computer equipment.Playback equipment Broadcast sound volume refer to user using playback equipment come when playing audio playback equipment issue sound.
The corresponding currently playing volume value of the broadcast sound volume of playback equipment refers to that user's last time is played using playback equipment After complete a segment of audio, volume value corresponding to sound size set by playback equipment.For example, once using sound on user Happy playout software has played a first song, volume value 30 set by playback equipment, then the currently playing volume value got is also 30。
Specifically, the corresponding currently playing volume value of broadcast sound volume of playback equipment is obtained.
S40: the original sound volume value superposition for calculating the currently playing volume value and audio data to be played of playback equipment produces Raw volume value obtains expected superposition volume value.
Wherein, it is contemplated that superposition volume value is the sound of the currently playing volume value superposition generation of original sound volume value and playback equipment Magnitude, and the volume value is considered as the volume really heard that human ear is heard.
It is expected that the calculation formula of superposition volume value are as follows: V=aVs+bVp)-E;
Wherein, V is expected superposition volume value;A is currently playing volume weight;VsFor the currently playing volume of playback equipment Value;B is original sound volume weight;VpFor the original sound volume value of audio data to be played;E is environmental coefficient.
Wherein, a and b is variable, and server-side can determine expected superposition volume value by adjusting a or b, between a and b Relationship are as follows: a+b=1.
Specifically, summation first is weighted to currently playing volume value and original sound volume value, then calculates summed result and ring Difference between the coefficient of border can obtain expected superposition volume value.Wherein, environmental coefficient is that the environment according to locating for user has It closes.
S50: judge expected superposition volume value whether in default volume threshold.
Wherein, the adjusting range that volume threshold refers to volume is preset, which is the best volume range that human ear is heard. Wherein, presetting volume threshold includes the first preset threshold and the second preset threshold;First preset threshold is in the adjusting range of volume Maximum value, the second preset threshold be volume adjusting range in minimum value.
Specifically, judge whether expected superposition volume value is greater than the first preset threshold or expected superposition of default volume threshold Whether volume value is less than the second preset threshold of default volume threshold.
S60: if expected superposition volume value is superimposed volume value and default volume threshold not in default volume threshold, according to expected The volume of playback equipment is set.
Specifically, if expected superposition volume value is not in default volume threshold, illustrate that human ear is heard true gives great volume Therefore it to be superimposed volume value according to the phase and the setting of default volume threshold is played in or less than the best volume range heard of human ear The volume of equipment, so that the volume of playback equipment output is the best volume that human ear is heard.
In this embodiment, by obtaining audio load request, sound intermediate frequency load request includes audio number to be played According to, then audio data to be played is handled, the corresponding original sound volume value of audio data to be played is obtained, is then obtained The corresponding currently playing volume value of the broadcast sound volume of playback equipment calculates the currently playing volume value of playback equipment and wait broadcast later The volume value that the original sound volume value superposition for the audio data put generates obtains expected superposition volume value, the expected superposition of finally judgement Volume value the volume of playback equipment is arranged according to judging result, according to the original of source of sound to be played whether in default volume threshold Best volume that the volume and human ear that beginning volume and equipment last time save are heard adjusts device voice volume, can be according to difference The original sound volume value of audio to carry out automatic adjusument to the volume of playback equipment, when improving audio broadcasting, to playback equipment The flexibility of volume control.
In one embodiment, as shown in figure 3, in step S20, i.e., audio data to be played is handled, obtain to The corresponding original sound volume value of the audio data of broadcasting, includes the following steps:
S21: being decoded audio data, obtains the waveform of audio data to be played.
Wherein, it is because in PC World that audio data, which is decoded, and sound is only after coded treatment, by original The speech simulation signal of this consecutive variations becomes a string and is therefore only passed through by binary source of sound code character that 0 and 1 form The waveform of audio data could be obtained by crossing decoding.
Decoding is exactly to parse to binary source of sound code character, obtains the sound for being able to reflect time and quantization level The waveform of frequency evidence.
Specifically, it is decoded using pulse code modulation to audio data, obtains the wave of audio data to be played Shape.
S22: the average level of the waveform of audio data to be played in analysis preset period of time.
Wherein, preset period of time refers to a period of time in the play time of video or audio.Preset period of time can be audio Preceding N seconds, rear N seconds or intermediate N second in play time.Specific preset period of time takes the preceding N in video or audio presentation time Second, it is rear N second or centre the N second can according to actual needs depending on.For example, the play time length of one section of video or audio is 120 seconds, then preset period of time can be 1 second of the centre in this 120 seconds.
Specifically, the level of the waveform of the audio data to be played in preset period of time is analyzed, then the wave come will be analyzed The level value of shape is averaged, and obtains an average level.
S23: audio number to be played is converted by the average level of the waveform for the audio data to be played that analysis obtains According to corresponding original sound volume value.
Specifically, the preloading volume of source of sound is calculated according to average level, mainly using between level and decibel value Conversion formula average level is converted into decibel value, then using the conversion formula between decibel value and volume value, by decibel value The corresponding original sound volume value of audio data to be played is converted to, the corresponding original sound volume value of audio data to be played is obtained.
In the present embodiment, by being decoded to audio data, the waveform of audio data to be played is obtained, then analyze The average level of the waveform of audio data to be played in preset period of time can accurately obtain the original of a reflection audio data Volume;It is corresponding that audio data to be played is converted by the average level of the waveform for the audio data to be played that analysis obtains Original sound volume value, can convert the original sound volume of audio data to volume value identical with device voice volume value unit, it is convenient into The subsequent calculating of row improves the subsequent accuracy rate for calculating step.
In one embodiment, as shown in figure 4, in step S23, i.e., the waveform of the audio data to be played obtained analysis Average level be converted into the corresponding original sound volume value of audio data to be played, include the following steps:
S231: using the conversion formula between level and decibel value, the wave for the audio data to be played that analysis is obtained The average level of shape is converted to decibel value.
Wherein, the conversion formula between level and decibel value can convert reflection for the average level of the waveform of audio data The decibel value of the audio data of sound size.
Conversion formula between level and decibel value are as follows:
Wherein, Lp is the decibel value of audio data to be played;Vrms is average level;Vref is maximum level, maximum The sampling resolution when coding of level and sound is related, for example, being sampled using 8, then maximum level is 28-1。
Specifically, it usesFormula, the waveform for the audio data to be played that analysis is obtained Average level is converted to decibel value.
S232: using the conversion formula between decibel value and volume value, decibel value is converted into audio data pair to be played The original sound volume value answered.
Wherein, the corresponding original sound volume value of playing audio-fequency data be an opposite percentage, be relative device volume most For big decibel value.
Conversion formula between decibel value and volume value:
Wherein, VPFor the corresponding original sound volume value of audio data to be played;Lp is the decibel value of audio data to be played; LmFor maximum decibel value, wherein maximum decibel value is 0dB.
In this embodiment, using the conversion formula between level and decibel value, the audio to be played that analysis is obtained The average level of the waveform of data is converted to decibel value, and using the conversion formula between decibel value and volume value, decibel value is turned It is changed to the corresponding original sound volume value of audio data to be played.The corresponding original sound volume of audio data to be played is calculated using formula Value, can be quick calculate the original sound volume value of sound source data, reduce the response time of volume setting method.
In one embodiment, as shown in figure 5, in step s 40, i.e., the currently playing volume value of calculating playback equipment and to The volume value that the original sound volume value superposition of the audio data of broadcasting generates obtains expected superposition volume value, the volume setting method Further include following steps:
S41: the original sound volume value of the currently playing volume value of playback equipment and audio data to be played is weighted Summation operation obtains summation superposition value.
Specifically, the original sound volume value of the currently playing volume value of playback equipment and audio data to be played is multiplied respectively It with corresponding weight, then is added, obtains summation superposition value.
S42: calculating the difference between summation superposition value and environmental coefficient, obtains expected superposition volume value, wherein environment system Depending on several sizes is the noise level of the environment locating for the playback equipment.
Wherein, environmental coefficient be the environment locating for the equipment noise level depending on.Environment locating for playback equipment Noise it is big, then environmental coefficient is big;The noise of environment locating for playback equipment is small, then environmental coefficient is also small.
Specifically, environmental coefficient is subtracted with summation superposition value, obtains expected superposition volume value.
In this embodiment, by the original sound volume value of the currently playing volume value of playback equipment and audio data to be played Summation operation is carried out, summation superposition value is obtained;The difference between summation superposition value and environmental coefficient is calculated, expected superposition sound is obtained Magnitude calculates expected folded according to the currently playing volume value of playback equipment, the original sound volume value of audio data and environmental coefficient Summation tone magnitude can reduce the influence for the volume that environmental noise hears human ear, obtain a more suitable volume value.
In one embodiment, as shown in fig. 6, in step S60, superposition volume value is even expected not in default volume threshold, The volume that default volume threshold setting playback equipment is then stated according to expected superposition volume value, includes the following steps:
S61: if expected superposition volume value is greater than the first preset threshold of default volume threshold, the broadcasting of playback equipment is reduced Volume.
Wherein, the first preset threshold is the maximum value of default volume threshold.
Specifically, if expected superposition volume value is greater than the first preset threshold of default volume threshold, expected superposition is illustrated Volume value is excessive, therefore the playback equipment that can reduce on the basis of the broadcast sound volume of playback equipment corresponding current volume value Volume value so that broadcast sound volume lower than the first preset threshold and be higher than the second preset threshold.
S62: if expected superposition volume value is less than the second preset threshold of default volume threshold, the broadcasting of playback equipment is improved Volume.
Wherein, the second preset threshold is the minimum value of default volume threshold.
Specifically, if expected superposition volume value is less than the second preset threshold of default volume threshold, expected superposition is illustrated Volume value is too small, therefore the playback equipment that can increase on the basis of the broadcast sound volume of playback equipment corresponding current volume value Volume value so that broadcast sound volume lower than the first preset threshold and be higher than the second preset threshold.
In some embodiments, if expected superposition volume value be greater than or equal to the first preset threshold of default volume threshold and Less than or equal to the second preset threshold of default volume threshold, then the broadcast sound volume of playback equipment is kept.
In the present embodiment, if expected superposition volume value is greater than the first preset threshold of default volume threshold, broadcasting is reduced The broadcast sound volume of equipment;If improving playback equipment it is expected that superposition volume value is less than the second preset threshold of default volume threshold Broadcast sound volume can play reduction according to expected superposition volume value different size situation come the broadcast sound volume of facility playback equipment To the effect of surrounding environment influence, further, moreover it is possible to improve the experience sense of user.
In one embodiment, as shown in fig. 7, after step S60, if that is, in expected superposition volume value not in default volume In threshold, then according to after the volume of expected superposition volume value and default volume threshold setting playback equipment, the volume setting method is also The following steps are included:
S70: the volume adjustment instruction to playback equipment of user's input is obtained.
Wherein, the volume adjustment instruction of the playback equipment is the volume value that user needs to reset.
Specifically, after the volume value for needing to adjust is had input in user, the sound to playback equipment of user's input is obtained Measure regulating command.
S80: the volume value of playback equipment is arranged in the volume adjustment instruction to playback equipment inputted according to user.
Specifically, the volume value of playback equipment is arranged the volume adjustment instruction to playback equipment inputted according to user For the volume value of user's input needed to reset.
In this embodiment, the volume adjustment instruction to playback equipment for obtaining user's input, pair inputted according to user The volume value of playback equipment is arranged in the volume adjustment instruction of playback equipment, can be configured according to the demand of user, increases and uses The experience sense at family.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of volume setting device is provided, volume setting device is set with volume in above-described embodiment Set method one-to-one correspondence.As shown in figure 8, volume setting device includes obtaining module 10, processing module 20, volume value to obtain mould Block 30, computing module 40, judgment module 50 and setup module 60.
Detailed description are as follows for each functional module:
Request module 10, for obtaining audio load request, sound intermediate frequency load request includes audio to be played Data;
It is corresponding to obtain audio data to be played for handling audio data to be played for processing module 20 Original sound volume value;
Volume value obtains module 30, the corresponding currently playing volume value of broadcast sound volume for obtaining playback equipment;
Computing module 40, for calculating the currently playing volume value of playback equipment and the original sound of audio data to be played The volume value that magnitude superposition generates obtains expected superposition volume value;
Judgment module 50, for judging expected superposition volume value of stating whether in default volume threshold;
Setup module 60, if being superimposed volume value according to expected for expected superposition volume value not in default volume threshold With the volume of default volume threshold setting playback equipment.
Preferably, as described in Figure 9, processing module 20 further include: decoding unit 21, analytical unit 22 and conversion unit 23。
Decoding unit 21 obtains the waveform of audio data to be played for being decoded to audio data;
Analytical unit 22, the average level of the waveform for analyzing audio data to be played in preset period of time;
The average level of conversion unit 23, the waveform of the audio data to be played for obtaining analysis is converted into wait broadcast The corresponding original sound volume value of the audio data put.
Optionally, this conversion unit 23 further includes level conversion subelement and decibel conversion subunit.
Level conversion subelement, for analysis being obtained to be played using the conversion formula between level and decibel value The average level of waveform of audio data be converted to decibel value.
Decibel conversion subunit, for using the conversion formula between decibel value and volume value, by decibel value be converted to The corresponding original sound volume value of playing audio-fequency data.
Optionally, this computing module 40 further includes summation unit and difference unit.
Summation unit, for by the original sound volume value of the currently playing volume value of playback equipment and audio data to be played It is weighted summation operation, obtains summation superposition value.
Difference unit obtains expected superposition volume value for calculating the difference between summation superposition value and environmental coefficient, Depending on the size of middle environmental coefficient is the noise level of the environment locating for the equipment.
Optionally, this setup module 60 further includes reducing unit, improving unit and holding unit.
Unit is reduced, if being greater than the first preset threshold of default volume threshold for expected superposition volume value, reduces broadcasting The broadcast sound volume of equipment;
Unit is improved, if being less than the second preset threshold of default volume threshold for expected superposition volume value, improves broadcasting The broadcast sound volume of equipment;
In one embodiment, in setup module 60, further include instruction acquisition module and reset module.
Instruction acquisition module, for obtaining the volume adjustment instruction to playback equipment of user's input;
Module is reseted, the sound of playback equipment is arranged in the volume adjustment instruction to playback equipment for inputting according to user Magnitude.
Specific about volume setting device limits the restriction that may refer to that installation method is arranged above for volume, This is repeated no more.Modules in above-mentioned volume setting device can come real fully or partially through software, hardware and combinations thereof It is existing.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with software shape Formula is stored in the memory in computer equipment, executes the corresponding operation of the above modules in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 10.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is for storing data required for volume setting method.The network interface of the computer equipment be used for it is outer The terminal in portion passes through network connection communication.To realize a kind of volume setting method when the computer program is executed by processor.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor perform the steps of when executing computer program
Audio load request is obtained, sound intermediate frequency load request includes audio data to be played;
Audio data to be played is handled, the corresponding original sound volume value of audio data to be played is obtained;
Obtain the corresponding currently playing volume value of broadcast sound volume of playback equipment;
Calculate the original sound volume value superposition generation of the currently playing volume value and audio data to be played of playback equipment Volume value obtains expected superposition volume value;
Judge expected superposition volume value of stating whether in default volume threshold;
If it is expected that superposition volume value is arranged not in default volume threshold according to expected superposition volume value and default volume threshold The volume of playback equipment.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Audio load request is obtained, sound intermediate frequency load request includes audio data to be played;
Audio data to be played is handled, the corresponding original sound volume value of audio data to be played is obtained;
Obtain the corresponding currently playing volume value of broadcast sound volume of playback equipment;
Calculate the original sound volume value superposition generation of the currently playing volume value and audio data to be played of playback equipment Volume value obtains expected superposition volume value;
Judge expected superposition volume value of stating whether in default volume threshold;
If it is expected that superposition volume value is arranged not in default volume threshold according to expected superposition volume value and default volume threshold The volume of playback equipment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of volume setting method characterized by comprising
Audio load request is obtained, wherein the audio load request includes audio data to be played;
The audio data to be played is handled, the corresponding original sound volume value of the audio data to be played is obtained;
Obtain the corresponding currently playing volume value of broadcast sound volume of playback equipment;
The original sound volume value superposition for calculating the currently playing volume value and the audio data to be played of the playback equipment produces Raw volume value obtains expected superposition volume value;
Judge the expected superposition volume value whether in default volume threshold;
If the expected superposition volume value not in the default volume threshold, according to the expected superposition volume value and described pre- If the volume of volume threshold setting playback equipment.
2. volume setting method as described in claim 1, which is characterized in that it is described that the audio data is handled, it obtains To the volume value of the audio data, comprising:
The audio data is decoded, the waveform of the audio data to be played is obtained;
Analyze the average level of the waveform of the audio data to be played in preset period of time;
The audio number to be played is converted by the average level of the waveform for the audio data to be played that analysis obtains According to corresponding original sound volume value.
3. volume setting method as claimed in claim 2, which is characterized in that the sound to be played for obtaining analysis The average level of the waveform of frequency evidence is converted into the corresponding original sound volume value of the audio data to be played, comprising:
Using the conversion formula between level and decibel value, by the waveform of the audio data to be played analyzed and obtained Average level be converted to decibel value;
Using the conversion formula between decibel value and volume value, it is corresponding that the decibel value is converted into the audio data to be played Original sound volume value.
4. volume setting method as described in claim 1, which is characterized in that described to calculate the currently playing of the playback equipment The volume value that the superposition of the original sound volume value of volume value and the audio data to be played generates obtains expected superposition volume value, Include:
The original sound volume value of the currently playing volume value of the playback equipment and the audio data to be played is weighted Summation operation obtains summation superposition value;
The difference between the summation superposition value and environmental coefficient is calculated, the expected superposition volume value is obtained, wherein the ring Depending on the size of border coefficient is the noise level of the environment locating for the playback equipment.
5. volume setting method as described in claim 1, which is characterized in that if the expected superposition volume value is not in institute It states in default volume threshold, then according to the volume of the expected superposition volume value and the default volume threshold setting playback equipment, packet It includes:
If the expected superposition volume value is greater than the first preset threshold of the default volume threshold, the playback equipment is reduced Broadcast sound volume;
If the expected superposition volume value is less than the second preset threshold of the default volume threshold, the playback equipment is improved Broadcast sound volume.
6. volume setting method as described in claim 1, which is characterized in that if the expected superposition volume value is not in institute State in default volume threshold, then according to the volume of the expected superposition volume value and the default volume threshold setting playback equipment it Afterwards, the volume setting method further include:
Obtain the volume adjustment instruction to the playback equipment of user's input;
According to the volume adjustment instruction to the playback equipment that the user inputs, the volume value of the playback equipment is set.
7. device is arranged in a kind of volume characterized by comprising
Request module, for obtaining audio load request, wherein the audio load request includes audio number to be played According to;
It is corresponding to obtain the audio data to be played for handling the audio data to be played for processing module Original sound volume value;
Volume value obtains module, the corresponding currently playing volume value of broadcast sound volume for obtaining playback equipment;
Computing module, for calculate the playback equipment currently playing volume value and the audio data to be played it is original The volume value that volume value superposition generates obtains expected superposition volume value;
Judgment module, for judging that the expection states superposition volume value whether in default volume threshold;
Setup module, if for the expected superposition volume value not in the default volume threshold, according to the expected superposition The volume of volume value and the default volume threshold setting playback equipment.
8. device is arranged in volume as claimed in claim 7, which is characterized in that the processing module, comprising:
Decoding unit obtains the waveform of the audio data to be played for being decoded to the audio data;
Analytical unit, for analyzing the average level of the waveform of the audio data to be played in preset period of time;
Conversion unit, the average level of the waveform of the audio data to be played for obtaining analysis be converted into it is described to The corresponding original sound volume value of the audio data of broadcasting.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to 6 described in any item volume setting methods.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realization such as volume setting method as claimed in any one of claims 1 to 6 when the computer program is executed by processor.
CN201811537237.8A 2018-12-15 2018-12-15 Volume setting method, device, computer equipment and storage medium Pending CN109508170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811537237.8A CN109508170A (en) 2018-12-15 2018-12-15 Volume setting method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811537237.8A CN109508170A (en) 2018-12-15 2018-12-15 Volume setting method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109508170A true CN109508170A (en) 2019-03-22

Family

ID=65752591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811537237.8A Pending CN109508170A (en) 2018-12-15 2018-12-15 Volume setting method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109508170A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110012391A (en) * 2019-05-14 2019-07-12 临沂市中心医院 A kind of operation consultation system and operating room audio collection method
CN110312146A (en) * 2019-06-06 2019-10-08 百度在线网络技术(北京)有限公司 Audio-frequency processing method, device, electronic equipment and storage medium
CN110493636A (en) * 2019-08-30 2019-11-22 母国标 Audio-video adjusting method, device, terminal device and storage medium
CN111031445A (en) * 2019-11-29 2020-04-17 深圳普罗声声学科技有限公司 Volume compensation method and device, computer equipment and storage medium
CN111918174A (en) * 2019-05-08 2020-11-10 阿里巴巴集团控股有限公司 Method and device for balancing volume gain, electronic device and vehicle
CN112185414A (en) * 2020-09-22 2021-01-05 苏州科达科技股份有限公司 Method and device for adjusting audio playing volume and storage medium
CN113360128A (en) * 2021-05-27 2021-09-07 斑马网络技术有限公司 Method, equipment and electronic device for automatically adjusting media playing volume
CN115497438A (en) * 2022-11-14 2022-12-20 厦门视诚科技有限公司 Device and method for rapidly solving digital volume approximate value in audio recording or playing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111918174A (en) * 2019-05-08 2020-11-10 阿里巴巴集团控股有限公司 Method and device for balancing volume gain, electronic device and vehicle
CN111918174B (en) * 2019-05-08 2022-04-01 阿里巴巴集团控股有限公司 Method and device for balancing volume gain, electronic device and vehicle
CN110012391A (en) * 2019-05-14 2019-07-12 临沂市中心医院 A kind of operation consultation system and operating room audio collection method
US11137974B2 (en) 2019-06-06 2021-10-05 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for audio processing, electronic device and storage medium
CN110312146A (en) * 2019-06-06 2019-10-08 百度在线网络技术(北京)有限公司 Audio-frequency processing method, device, electronic equipment and storage medium
CN110312146B (en) * 2019-06-06 2021-11-09 百度在线网络技术(北京)有限公司 Audio processing method and device, electronic equipment and storage medium
CN110493636A (en) * 2019-08-30 2019-11-22 母国标 Audio-video adjusting method, device, terminal device and storage medium
CN111031445A (en) * 2019-11-29 2020-04-17 深圳普罗声声学科技有限公司 Volume compensation method and device, computer equipment and storage medium
CN111031445B (en) * 2019-11-29 2021-06-29 深圳普罗声声学科技有限公司 Volume compensation method and device, computer equipment and storage medium
CN112185414A (en) * 2020-09-22 2021-01-05 苏州科达科技股份有限公司 Method and device for adjusting audio playing volume and storage medium
CN113360128A (en) * 2021-05-27 2021-09-07 斑马网络技术有限公司 Method, equipment and electronic device for automatically adjusting media playing volume
CN115497438A (en) * 2022-11-14 2022-12-20 厦门视诚科技有限公司 Device and method for rapidly solving digital volume approximate value in audio recording or playing
CN115497438B (en) * 2022-11-14 2023-02-17 厦门视诚科技有限公司 Device and method for rapidly solving digital volume approximate value in audio recording or playing

Similar Documents

Publication Publication Date Title
CN109508170A (en) Volume setting method, device, computer equipment and storage medium
EP3252767B1 (en) Voice signal processing method, related apparatus, and system
JP6999631B2 (en) Audio processing methods, devices, electronic devices and storage media
US20070245028A1 (en) Configuring content in an interactive media system
EP2955713A1 (en) Synchronous audio playback method, apparatus and system
US20070233693A1 (en) Configuring a communication protocol of an interactive media system
US20070234327A1 (en) Configuring media applications based on performance characteristics
KR102641952B1 (en) Time-domain stereo coding and decoding method, and related product
WO2020108045A1 (en) Video playback method and apparatus and multimedia data playback method
CN104464743B (en) Method for playing background music in voice chat room and mobile terminal
CN112164407A (en) Tone conversion method and device
CN109511041A (en) A kind of method, apparatus and earphone of the booting setting of earphone
US20070233694A1 (en) Configuring interactive media systems based on performance metrics
CN103871439A (en) Method, device and system for audio playing
CN106454519A (en) Volume adjustment method and device for smart television device
WO2024027295A1 (en) Speech enhancement model training method and apparatus, enhancement method, electronic device, storage medium, and program product
CN110299130A (en) A kind of speech playing method and equipment based on boarding application
KR101370897B1 (en) Method for controlling image, and terminal therefor
CN113299269B (en) Training method and device for voice synthesis system, computer equipment and storage medium
CN105869614B (en) Audio file deriving method and device
KR20060082702A (en) Apparatus for adjusting music file in mobile telecommunication terminal equipment
CN111048063A (en) Audio synthesis method and device
US9411881B2 (en) System and method for high dynamic range audio distribution
CN115273808A (en) Sound processing method, storage medium and electronic device
KR102632523B1 (en) Coding method for time-domain stereo parameter, and related product

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