CN115904299A - Method and device for adjusting audio playing volume and audio playing system - Google Patents

Method and device for adjusting audio playing volume and audio playing system Download PDF

Info

Publication number
CN115904299A
CN115904299A CN202111161260.3A CN202111161260A CN115904299A CN 115904299 A CN115904299 A CN 115904299A CN 202111161260 A CN202111161260 A CN 202111161260A CN 115904299 A CN115904299 A CN 115904299A
Authority
CN
China
Prior art keywords
audio
playing
environment
volume
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
CN202111161260.3A
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.)
Volkswagen Mobvoi Beijing Information Technology Co Ltd
Original Assignee
Volkswagen Mobvoi Beijing Information 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 Volkswagen Mobvoi Beijing Information Technology Co Ltd filed Critical Volkswagen Mobvoi Beijing Information Technology Co Ltd
Priority to CN202111161260.3A priority Critical patent/CN115904299A/en
Publication of CN115904299A publication Critical patent/CN115904299A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Circuit For Audible Band Transducer (AREA)
  • Control Of Amplification And Gain Control (AREA)

Abstract

The application relates to a method and a device for adjusting audio playing volume, an audio playing system and a storage medium. The method comprises the following steps: receiving an input audio playing grade; acquiring environmental noise data from a current playing environment; and determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value. By adopting the method, the playing volume of the audio to be played can be dynamically adjusted according to the change of the noise in the current playing environment, the noise volume in the playing environment can be dynamically matched even in the playing environment with unstable noise, the automatic adjustment of the audio playing volume is realized, and the environmental adaptability of the audio playing volume is improved.

Description

Method and device for adjusting audio playing volume and audio playing system
Technical Field
The present application relates to the field of audio playing technologies, and in particular, to a method and an apparatus for adjusting audio playing volume, an audio playing system, and a storage medium.
Background
With the development of audio playing technology, many audio playing systems have appeared, and the conventional audio playing systems can only output audio data according to a preset fixed volume value.
However, the noise in the playing environment is unstable, and when the noise in the playing environment becomes large, the sound receiving party will be interfered by the noise in the playing environment, and cannot accurately receive the effective information carried in the sound data transmitted by the sound outputting party. On the contrary, when the noise in the playing environment becomes large, the playing volume far exceeds the limit recognizable by the sound receiver, resulting in a certain waste of resources and energy.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an audio playing volume adjusting method, an audio playing volume adjusting device, an audio playing system, and a storage medium, which can dynamically match the audio playing volume to the current playing environment.
A method for adjusting audio playback volume, the method comprising:
receiving an input audio playing grade;
acquiring environmental noise data from a current playing environment;
and determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value.
In one embodiment, obtaining ambient noise data from a current playback environment includes: ambient noise data is periodically collected from the current playback environment.
In one embodiment, obtaining ambient noise data from a current playback environment includes: ambient noise data is collected from the current playing environment in real time.
In one embodiment, obtaining ambient noise data from a current playback environment includes: and collecting environmental noise data from the current playing environment within a certain time period before the audio to be played is played.
In one embodiment, determining a target volume value of audio to be played based on the ambient noise data and the audio playback level comprises: calculating a noise decibel value corresponding to noise in the environmental noise data; and determining the audio decibel value of the audio to be played according to the noise decibel value and the audio playing level, and taking the audio decibel value as a target volume value.
In one embodiment, determining a target volume value of audio to be played based on the ambient noise data and the audio playback level comprises: calculating a noise energy value corresponding to noise in the environmental noise data; and determining the audio energy value of the audio to be played according to the noise energy value and the audio playing level, and taking the audio energy value as a target volume value.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value includes: and adjusting the audio energy of the audio to be played according to the target volume value.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value comprises: and adjusting the audio amplitude of the audio to be played according to the target volume value.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value includes: and setting the output volume of the audio output device according to the target volume value.
In one embodiment, the method for dividing the audio playing grade comprises the following steps: and dividing the audio playing grade according to the ratio of the normal sound signal to the noise signal expected to be generated during audio playing.
In one embodiment, the current playback environment includes at least one of an indoor sound environment, an outdoor sound environment, an in-vehicle sound environment while a vehicle is in motion, and a sound environment on the opposite side of a telephone or intercom interaction.
In one embodiment, the method further comprises: the method comprises the steps of collecting environment information, determining a current playing environment corresponding to the environment information according to the environment information, and setting or adjusting an audio playing grade according to the current playing environment.
In one embodiment, the method further comprises: analyzing the environmental noise data, calculating the volume value of the noise in the environmental noise data, and setting or adjusting the audio playing level according to the calculated volume value of the noise.
In one embodiment, the method further comprises: and when the calculated volume value of the noise exceeds a preset threshold value, adjusting the audio playing level to be a protection level. An apparatus for adjusting the volume of an audio player, the apparatus comprising:
the grade receiving module is used for receiving the input audio playing grade;
the noise acquisition module is used for acquiring environmental noise data from the current playing environment;
and the volume adjusting module is used for determining a target volume value of the audio to be played according to the environmental noise data and the audio playing level and adjusting the playing volume of the audio to be played according to the target volume value.
An audio playback system, the system comprising:
the input device is used for inputting the audio playing grade;
the audio acquisition device is used for acquiring environmental noise data from the current playing environment;
the processor is used for receiving the audio playing grade input by the input device, acquiring environmental noise data acquired by the audio acquisition device, determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value;
and the audio output device plays the audio to be played according to the playing volume adjusted by the processor.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned method for adjusting the audio playback volume.
According to the method and the device for adjusting the audio playing volume, the audio playing system and the storage medium, the audio playing level and the environmental noise data in the current playing environment are obtained, and the playing volume of the audio to be played is dynamically adjusted according to the environmental noise data and the audio playing level, so that the playing volume of the audio to be played can be dynamically and adaptively adjusted according to the noise change in the current playing environment, the noise volume in the playing environment can be dynamically matched even in the playing environment with unstable noise, the automatic adjustment of the audio playing volume is realized, and the environmental adaptability of the audio playing volume is improved.
Drawings
FIG. 1 is a flow chart illustrating a method for adjusting audio playback volume according to an embodiment;
FIG. 2 is a block diagram of an embodiment of an apparatus for adjusting the volume of an audio player;
FIG. 3 is a block diagram of an audio playback system in one embodiment;
FIG. 4 is a diagram illustrating an exemplary embodiment of adjusting the volume of an audio playback based on an audio playback system;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The method for adjusting the audio playing volume can be applied to various terminal devices. Specifically, the terminal device receives an input audio playing level, acquires environmental noise data from a current playing environment, determines a target volume value of the audio to be played according to the environmental noise data and the audio playing level, and adjusts the playing volume of the audio to be played according to the target volume value. The terminal device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, smart headsets, smart walkie-talkies, smart headsets, vehicle-mounted terminals, and the like.
In an embodiment, as shown in fig. 1, a method for adjusting an audio playing volume is provided, and the following description takes an example that the method for adjusting an audio playing volume is applied to a terminal device, and may include the following steps:
step S102: an input audio playback level is received.
The audio playing level is a level representing the volume of the audio output, and the audio playing level can also represent the proportional relation between the expected audio playing volume and the noise volume in the current playing environment. For example, the audio playback level may be a level that characterizes the signal-to-noise ratio, or a level that characterizes the volume of the output audio. Under the playing environment with the same noise, the set audio playing levels are different, and the volume of the output audio is also different. Generally, the audio playing volume is in inverse proportion to the signal-to-noise ratio, that is, the larger the audio playing volume is, the smaller the signal-to-noise ratio should be set correspondingly. For example, the audio playing level may be characterized by a high level, a medium level, a low level, or the like, or may be characterized by A, B, C, or may be characterized by 1, 2, 3, or the like, that is, the level representing manner of the audio playing level is not limited, the number of level divisions of the audio playing level is also not limited, and the audio playing level may be adaptively adjusted according to the service requirement.
In one embodiment, the manner of dividing the playing level includes: the audio playing grade is divided according to the ratio of the normal sound signal to the noise signal expected to be generated during audio playing, that is, the grade division of the audio playing grade can be determined according to the signal-to-noise ratio.
Specifically, the terminal equipment receives the audio playing level selected by the user through the input device. Illustratively, the user may select a desired audio playing level through a display interface of the terminal device, through a touch screen on the display interface, or through mouse click, keyboard click, or the like. The audio playing grade can also be adjusted and selected by rotating the knob device to different gears through the knob device arranged on the terminal equipment. And different audio playing levels can be triggered and selected in a mode of pressing different keys through keys arranged on the terminal equipment.
Step S104: ambient noise data is obtained from the current playback environment.
The current playing environment refers to a sound environment where the audio to be played is expected to be played currently. The current playing environment is different according to different application scenes. The current playback environment may be an indoor sound environment, for example, a sound environment of an office; or outdoor sound environment, for example, sound environment of people stream gathering place such as square, mall, etc.; it may be a sound environment in a particular weather, location, time, for example, an in-vehicle sound environment of a running vehicle, a sound environment on an interactive side of a telephone or an intercom, a sound environment on a rainy day, a sound environment at a very quiet night, or the like.
Specifically, the terminal device may collect audio data from the current playing environment through the audio collecting device, for example, collect audio data from the current playing environment in a manner of recording audio, and use the collected audio data as environmental noise data.
In one embodiment, obtaining ambient noise data from a current playback environment includes: ambient noise data is periodically collected from the current playback environment.
In this embodiment, the audio collecting apparatus may periodically collect the environmental noise data from the current playing environment at regular time intervals, and periodically transmit the collected environmental noise data to the terminal device for analysis. The environmental noise data are periodically collected from the current playing environment, the change of the current playing environment can be periodically monitored, so that the change of the noise in the playing environment can be timely detected, and particularly, the audio playing volume can be timely adaptively adjusted under the condition that the noise change in the playing environment has a certain periodic rule.
In one embodiment, obtaining ambient noise data from a current playback environment includes: ambient noise data is collected from the current playing environment in real time.
In this embodiment, the terminal device can acquire the environmental noise data in real time from the current playing environment through the audio acquisition device, and can improve the accuracy of audio playing volume adjustment through real-time acquisition and real-time analysis, and especially can perform adaptive adjustment on the audio volume more accurately when the noise change frequency in the playing environment is higher.
In one embodiment, obtaining ambient noise data from a current playback environment comprises: and collecting environmental noise data from the current playing environment within a certain time period before the audio to be played is played.
In this embodiment, the terminal device may control the audio collection device to collect the ambient noise data from the current playing environment within a certain time period before the playing start time point of the audio to be played. For example, it may be 30 seconds, 10 seconds, or a smaller period of time, such as 100 milliseconds, etc. By collecting the ambient noise data before the audio is played, an appropriate playing volume can be determined before the audio to be played is played, so that the audio can be played quickly and accurately according to the determined playing volume when the playing start time point is reached.
Step S106: and determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value.
The audio to be played refers to the audio to be played currently or the part of the currently played audio that is not played yet. The target volume value refers to a determined parameter value for controlling the playing volume of the audio to be played, and may include at least one of a decibel value (loudness value), an energy value (intensity value), and an amplitude value.
Specifically, the terminal device analyzes the acquired environmental noise data according to the environmental noise data, and calculates a volume value of noise in the environmental noise data, for example, a decibel value, an energy value, an amplitude value, or the like of the noise may be calculated. That is, a parameter value that can reflect the magnitude of the noise volume in the environmental noise data is calculated. Further, the playing volume of the audio to be played can be adjusted according to the received audio playing level input by the user and the calculated volume value of the noise.
Illustratively, the calculation of the target volume value may be performed using the following formula:
A=N*Z
where a denotes a target volume value of an audio to be played, N denotes an audio playing level, and Z denotes a volume value of noise in environmental noise data acquired from a current playing environment.
In one embodiment, determining the target volume value of the audio to be played according to the ambient noise data and the audio playing level may include: calculating a noise decibel value corresponding to noise in the environmental noise data; and determining the audio decibel value of the audio to be played according to the noise decibel value and the audio playing level, and taking the audio decibel value as a target volume value.
In one embodiment, determining the target volume value of the audio to be played according to the ambient noise data and the audio playing level may include: calculating a noise energy value corresponding to noise in the environmental noise data; and determining the audio energy value of the audio to be played according to the noise energy value and the audio playing level, and taking the audio energy value as a target volume value.
In the two embodiments, the accuracy of audio playing volume calculation can be improved by respectively using the decibel value and the energy value as the parameter values representing the volume.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value may include: and adjusting the audio energy of the audio to be played according to the target volume value.
In this embodiment, a noise energy value corresponding to noise in the environmental noise data may be calculated, an audio energy value of the audio to be played may be determined according to the noise energy value and the audio playing level, the audio energy value may be used as a target volume value, and the audio energy of the audio to be played may be amplified or reduced according to the target volume value, so as to adjust the playing volume.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value may include: and adjusting the audio amplitude of the audio to be played according to the target volume value.
In this embodiment, a noise energy value corresponding to noise in the environmental noise data may be calculated, an audio energy value of the audio to be played may be determined according to the noise energy value and the audio playing level, the audio energy value may be used as a target volume value, and an audio amplitude of the audio to be played may be amplified or reduced according to the audio energy value, so as to adjust the playing volume.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value includes: and setting the output volume of the audio output device according to the target volume value.
In this embodiment, according to the calculated target volume value, for example, according to the calculated decibel value of the audio, the output volume of the audio output device can be directly set to a value corresponding to the decibel value of the audio, or the output volume of the audio output device can be adjusted to be increased or decreased, so that the audio output device can output the playing audio according to the output volume that is set or adjusted again.
In one embodiment, the current playback environment includes at least one of an indoor sound environment, an outdoor sound environment, an in-vehicle sound environment while a vehicle is in motion, and a sound environment on the opposite side of a telephone or intercom interaction.
In this embodiment, the current playing environment may be different according to different application scenarios. Illustratively, the current playback environment may be an indoor sound environment, e.g., a sound environment of an office; or outdoor sound environment, such as sound environment of people gathering places like squares and malls; it may be a sound environment in a particular weather, location, time, for example, an in-vehicle sound environment of a running vehicle, a sound environment on an interactive side of a telephone or an intercom, a sound environment on a rainy day, a sound environment at a very quiet night, or the like.
In one embodiment, the method further comprises: the method comprises the steps of collecting environment information, determining a current playing environment corresponding to the environment information according to the environment information, and setting or adjusting an audio playing grade according to the current playing environment.
In this embodiment, the audio playing level may change with different current playing environments. And setting the audio playing grade corresponding to the current playing environment according to the determined different playing environments. Among them, the current playback environment may be various, for example, an environment in which the vehicle travels at a low speed when the window is closed, an environment in which the vehicle travels at a high speed when the window is closed, an environment in which the vehicle travels at a low speed when the window is opened, an environment in which the vehicle travels at a high speed when the window is opened, an indoor parking lot environment, an outdoor parking lot environment, a square environment, an office environment, a silent night environment, an outdoor environment in rainy days, and the like. The environment information is information that can be used to determine which preset playback environment the current playback environment belongs to. For example, the environmental information may include at least one of window state information, vehicle driving state data, current position information, current time information, current weather information, and opening and closing state information of the sound-emitting device in the environment.
For example, the environmental information may include window state information, vehicle driving state information, and the like. The determination of the current playing environment may include: and analyzing the acquired environment information, and determining that the current playing environment is the playing environment under the condition that the vehicle window is closed when the vehicle window runs at a high speed when the acquired vehicle window state information is information representing that the vehicle window is closed and the acquired vehicle running state information is information representing that the vehicle runs at a high speed.
For example, the environment information may include current location information, and the determination of the current playing environment may include: and according to the collected current position information, when the current position is judged to be in the indoor parking lot, determining the current playing environment as the playing environment in the indoor parking lot.
For example, the environment information may include current time information, on-off state information of the sound-emitting device in the environment, and the like, and the determination manner of the current playing environment may include: judging the current time according to the collected current time information, judging whether the current sound emitting equipment such as a radio, a musical instrument and the like is opened or not according to the opening and closing state information of the sound emitting equipment in the environment, and if the current time is at night and the sound emitting equipment is in a closed state, determining that the current playing environment is the playing environment at a silent night.
In different service scenarios, different environment information may be set as detection objects to determine different current playing environments, and different audio playing levels are set according to different current playing environments, which are not listed one by one, but it should be noted that all design manners capable of reflecting the inventive concept of this embodiment should be included in the protection scope of this application.
In one embodiment, the method further comprises: analyzing the environmental noise data, calculating the volume value of the noise in the environmental noise data, and setting or adjusting the audio playing level according to the calculated volume value of the noise.
In this embodiment, the audio playing level may also be changed according to the different noise volumes in the acquired environmental noise data. Specifically, the volume level or volume level of the noise in the ambient noise data may be calculated by analyzing the ambient noise data, and the current audio playback level may be adjusted to a level corresponding to the volume level or volume level of the noise.
Illustratively, the audio playing level can be divided into 5 different levels of 1/2/3/4/5, the set audio playing level is increased gradually, namely the volume of the played audio is increased, the energy of the played audio is Ps, the noise energy is Pn, and the playing level N = Ps/Pn, (wherein, the 1 level is 1.8 to 2.5,2, 1.67 to 1.8,3, 143 to 1.67,4, 1.43 to 1.17,5, 1.17 to 1.05).
If the current playing environment is a relatively quiet environment (the noise volume value is below 40 decibels) obtained by analyzing the environmental noise data, such as the playing environment at a quiet night, the audio playing level can be adaptively set to be 1 level; if the current playing environment is a relatively quiet environment (the noise volume value is 40 db to 60 db) by analyzing the environmental noise data, such as a small voice conversation or a playing environment in an outdoor parking lot, the audio playing level can be adaptively set to 2 level; if the environment that the current playing environment is normal life sound (the noise volume value is 60-70 decibels) is obtained by analyzing the environmental noise data, such as the playing environment when a shopping mall shops or a low-speed window is closed and opened, the audio playing grade can be set to be 3 grade in an adaptive manner; if the current playing environment is a noisy environment (the noise volume value is 70-85 decibels) obtained by analyzing the environmental noise data, such as the playing environment in window opening driving and shopping in the vegetable market, the audio playing level can be set to be 4 levels adaptively; if the current playing environment is a noisy environment (the noise volume value is 85-100 decibels) obtained by analyzing the environmental noise data, such as the playing environment under high-speed windowing driving and motorcycle starting, the audio playing grade can be set to 5 levels adaptively.
In one embodiment, the method further comprises: and when the calculated volume value of the noise exceeds a preset threshold value, adjusting the audio playing level to be a protection level.
In this embodiment, a protection level may be further set, and when the volume value of the detected noise exceeds a preset threshold, for example, if the current playing environment is an extremely noisy environment (noise greater than 100 db) obtained by analyzing the environmental noise data, such as when the playing environment under electric drilling, airplane takeoff, and firecracker is decorated, the audio playing level may be adaptively set as the protection level. In this embodiment, when the noise volume is too large, the audio playing level is adjusted to the protection level, so that damage to the audio playing device caused by the too large volume of the audio output can be avoided, and discomfort of a sound receiver can also be avoided.
According to the method for adjusting the audio playing volume, the audio playing level and the environmental noise data in the current playing environment are obtained, and the playing volume of the audio to be played is dynamically adjusted according to the environmental noise data and the audio playing level, so that the playing volume of the audio to be played can be dynamically and adaptively adjusted according to the change of noise in the current playing environment, the noise volume in the playing environment can be dynamically matched even in the playing environment with unstable noise, the automatic adjustment of the audio playing volume is realized, and the environmental adaptability of the audio playing volume is improved.
The following describes specific contents and advantageous effects of the method for adjusting audio playing volume according to the present application in further detail with reference to several practical application scenarios.
The application relates to an application of an audio playing volume adjusting method in an automatic test of a voice interaction system. The test of the current voice interaction system is basically carried out under the condition of noise interference, and the voice recognition engine of the voice interaction system can carry out voice recognition more accurately after carrying out noise reduction processing on the captured audio. However, the noise is not constant, and the noise may be unstable, large or small depending on the change of the playing environment, the change of time, and the like. In reality, however, with the change of noise, the person can correspondingly increase or decrease his/her own voice to some extent, and it is ensured that the voice interactive system can recognize his/her own voice to some extent. Therefore, by using the conventional playing method of the test audio, the counted test result is inconsistent with the result shown in the later actual use scene, which will also affect the accuracy of the automatic test result.
The method for adjusting the audio playing volume can be used for automatically testing the voice interaction system. Specifically, an audio playing system receives an audio playing grade input by a user, and obtains environmental noise data from a current testing environment for testing a voice interaction system; and determining a target volume value of the test audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the test audio to be played according to the target volume value. By adopting the method for adjusting the audio playing volume, the playing volume of the tested audio can be dynamically adjusted in the testing environment with unstable noise, so that the testing scene is closer to the real life scene, the authenticity, reliability and accuracy of the automatic testing result of the voice interaction system are improved, the invalid result caused by invalid input is reduced, the testing time is saved, and the testing efficiency is improved.
The application of the audio playing volume adjusting method in the intelligent customer service system is provided. Specifically, when a complaint or a consultation call of a client is received, the ambient noise data of the current client side is collected through a microphone of the telephone client side, and the playing volume of the reply audio in the intelligent customer service system is determined according to the audio playing level input in advance and the collected ambient noise data of the client side. Therefore, the client can not feel dislike or uncomfortable due to the fact that the volume of the reply audio of the intelligent customer service is too large or too small, the situation that the client is not full of emotion is prevented from being aggravated, and the intelligent customer service can communicate with the client more quickly and effectively.
The application relates to an application of an audio playing volume adjusting method in a music player. When music is played, if the noise in the playing environment is too large when the music is played, the music sound is covered by the noise and cannot be heard clearly; otherwise, a disturbing phenomenon may occur. By using the method for adjusting the audio playing volume, the noise in the surrounding environment can be acquired in real time, the noise is dynamically analyzed, and the volume of the audio played by the music player is controlled, so that the problems can be effectively prevented.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 2, there is provided an audio playing volume adjusting device, including: a level receiving module 210, a noise obtaining module 220, and a volume adjusting module 230, wherein:
a level receiving module 210, configured to receive an input audio playing level;
a noise obtaining module 220, configured to obtain environmental noise data from a current playing environment;
the volume adjusting module 230 is configured to determine a target volume value of the audio to be played according to the environmental noise data and the audio playing level, and adjust the playing volume of the audio to be played according to the target volume value.
In one embodiment, the noise acquisition module 220 periodically collects ambient noise data from the current playback environment.
In one embodiment, the noise acquisition module 220 collects ambient noise data from the current playback environment in real-time.
In one embodiment, the noise acquisition module 220 collects ambient noise data from the current playback environment within a certain time period before the audio to be played is played back.
In one embodiment, the volume adjustment module 230 calculates a noise decibel value corresponding to noise in the ambient noise data; and determining the audio decibel value of the audio to be played according to the noise decibel value and the audio playing level, and taking the audio decibel value as a target volume value.
In one embodiment, the volume adjustment module 230 calculates a noise energy value corresponding to noise in the ambient noise data; and determining the audio energy value of the audio to be played according to the noise energy value and the audio playing level, and taking the audio energy value as a target volume value.
In one embodiment, the volume adjustment module 230 adjusts the audio energy of the audio to be played according to the target volume value.
In one embodiment, the volume adjustment module 230 adjusts the audio amplitude of the audio to be played according to the target volume value.
In one embodiment, the volume adjustment module 230 sets the output volume of the audio output device according to the target volume value.
In one embodiment, the level receiving module 210 is further configured to divide an audio playing level, and the level receiving module 210 divides the audio playing level according to a ratio of a normal sound signal to a noise signal expected to be generated during audio playing.
In an embodiment, the level receiving module 210 is further configured to collect environment information, determine a current playing environment corresponding to the environment information according to the environment information, and set or adjust an audio playing level according to the current playing environment.
In one embodiment, the level receiving module 210 is further configured to analyze the ambient noise data, calculate a volume value of noise in the ambient noise data, and set or adjust the audio playing level according to the calculated volume value of the noise.
In one embodiment, the level receiving module 210 is further configured to adjust the audio playing level to the protection level when the calculated volume value of the noise exceeds a preset threshold.
For the specific limitation of the audio playing volume adjusting device, reference may be made to the above limitation on the audio playing volume adjusting method, and details are not described herein again. All or part of the modules in the audio playing volume adjusting device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The present application further provides an audio playing system 300, as shown in fig. 3, the audio playing system 300 includes: an input device 310, an audio acquisition device 320, a processor 330 and an audio output device 340; wherein, the first and the second end of the pipe are connected with each other,
an input device 310 for inputting an audio playback level; an audio collection device 320 for collecting ambient noise data from the current playing environment; the processor 330 is configured to receive the audio playing level input through the input device 310, acquire environmental noise data acquired through the audio acquisition device 320, determine a target volume value of an audio to be played according to the environmental noise data and the audio playing level, and adjust the playing volume of the audio to be played according to the target volume value; the audio output device 340 plays the audio to be played at the playing volume adjusted by the processor 330. For specific limitations of each step implemented by the processor of the audio playing system executing the computer program, reference may be made to the above limitations on the method for adjusting the audio playing volume, which is not described herein again.
In the following, the steps of adjusting the audio playing volume by using the audio playing system provided by the present application will be further described in detail with reference to an application example. Referring to fig. 4, fig. 4 is a schematic diagram illustrating an application example for adjusting the audio playing volume based on an audio playing system. The method specifically comprises the following steps:
step 1: and setting an audio playing grade. Setting the audio playing level means setting a level of audio output size, which may be a high level, a middle level, a low level, or a A, B, C level division, or a level of 1, 2, 3, etc., to define a level of playing volume size. When the program is running, the playing level is selected and set, and if the program is implemented on hardware equipment, the playing level can be set by a knob, a key and the like. The level identifies the relation between the volume of the played audio and the ratio of the real-time noise, and under the same noise scene, the set playing levels are different, and the volume of the played and output audio is also different.
Step 2: and capturing real-time noise. Recording noise (including office scenes, square scenes with large pedestrian volume, scene noise in a driving car of an automobile, rainy day scenes, scene noise such as bird-language cicada water flow and the like or extremely quiet night scenes) in a period of time (30 seconds, 10 seconds or smaller time intervals such as 100ms and the like, or a period of time with random indefinite duration) before playing the current audio in real time, recording the noise in a certain period of time, and transmitting the recorded noise audio clip (environmental noise data) to a playing audio system for noise analysis at intervals. Or the captured noise audio fragments can be recorded and uploaded in real time for analysis.
And 3, step 3: and calculating audio volume. According to the noise audio clip captured before or the noise collected in real time, the noise in the current environment is analyzed and calculated, and then according to the value of the playing audio level set currently, the volume of the currently optimal playing audio is calculated, wherein A = N x Z (namely N = A/Z). For the collected noise audio, the energy value of the audio to be played can be calculated according to the energy value of the noise and the set audio playing level, so that the proper audio energy value can be determined.
And 4, step 4: and setting and playing the volume of the audio. According to the result value of the volume calculation, the size of the output value of the audio output by the audio playing system is set, or according to the calculated target volume value, the audio energy of the audio to be played is amplified and reduced, or the amplitude of the audio is amplified and reduced, so that the audio playing system can play the audio with the proper volume which is matched with the noise volume in the current playing environment.
The application example can dynamically adjust the volume of the played audio according to the noise in the current playing environment and the set audio playing grade, can output the audio with proper volume in real time under the unstable noise condition, reduces the probability of non-response or false response events of the voice interaction system under the influence of noise change, and improves the authenticity and reliability of the automatic test result of the voice interaction system.
In one embodiment, the method for adjusting the audio playing volume provided by the present application may be applied to a computer device, where the computer device may be a terminal, and the internal structure diagram of the computer device may be as shown in fig. 5.
The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities.
The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of adjusting the volume of an audio playback. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving an input audio playing grade; acquiring environmental noise data from a current playing environment; and determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value.
In one embodiment, the computer program when executed by the processor for implementing the method for obtaining ambient noise data from a current playback environment specifically performs the following steps: ambient noise data is periodically collected from the current playback environment.
In one embodiment, the computer program when executed by the processor is for obtaining the ambient noise data from the current playing environment, and specifically performs the following steps: ambient noise data is collected from the current playing environment in real time.
In one embodiment, the computer program when executed by the processor for implementing the method for obtaining ambient noise data from a current playback environment specifically performs the following steps: and collecting environmental noise data from the current playing environment within a certain time period before the audio to be played is played.
In one embodiment, when the computer program is executed by the processor to determine the target volume value of the audio to be played according to the ambient noise data and the audio playing level, the following steps are specifically performed: calculating a noise decibel value corresponding to noise in the environmental noise data; and determining the audio decibel value of the audio to be played according to the noise decibel value and the audio playing level, and taking the audio decibel value as a target volume value.
In one embodiment, when the computer program is executed by the processor to determine the target volume value of the audio to be played according to the ambient noise data and the audio playing level, the following steps are specifically performed: calculating a noise energy value corresponding to noise in the environmental noise data; and determining the audio energy value of the audio to be played according to the noise energy value and the audio playing level, and taking the audio energy value as a target volume value.
In one embodiment, adjusting the playing volume of the audio to be played according to the target volume value comprises: and adjusting the audio energy of the audio to be played according to the target volume value.
In one embodiment, when the computer program is executed by the processor to adjust the playing volume of the audio to be played according to the target volume value, the following steps are specifically executed: and adjusting the audio amplitude of the audio to be played according to the target volume value.
In one embodiment, when the computer program is executed by the processor to adjust the playing volume of the audio to be played according to the target volume value, the following steps are specifically performed: and setting the output volume of the audio output device according to the target volume value.
In one embodiment, when the computer program is executed by the processor to implement the division of the audio playing level, the following steps are specifically executed: and dividing the audio playing grade according to the ratio of the normal sound signal to the noise signal expected to be generated during audio playing.
In one embodiment, the computer program when executed by the processor further performs the steps of: the method comprises the steps of collecting environment information, determining a current playing environment corresponding to the environment information according to the environment information, and setting or adjusting an audio playing grade according to the current playing environment.
In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing the environmental noise data, calculating the volume value of the noise in the environmental noise data, and setting or adjusting the audio playing level according to the calculated volume value of the noise.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the calculated volume value of the noise exceeds a preset threshold value, adjusting the audio playing level to a protection level.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (13)

1. A method of adjusting audio playback volume, the method comprising:
receiving an input audio playing grade;
acquiring environmental noise data from a current playing environment;
and determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value.
2. The method of claim 1, wherein the obtaining the ambient noise data from the current playing environment comprises:
periodically collecting ambient noise data from the current playback environment; or the like, or, alternatively,
collecting environmental noise data from the current playing environment in real time; or the like, or, alternatively,
and collecting the environmental noise data from the current playing environment within a certain time period before the audio to be played is played.
3. The method of claim 1, wherein determining a target volume value for audio to be played based on the ambient noise data and the audio playback level comprises:
calculating a noise decibel value corresponding to noise in the environmental noise data;
and determining the audio decibel value of the audio to be played according to the noise decibel value and the audio playing level, and taking the audio decibel value as the target volume value.
4. The method of claim 1, wherein determining a target volume value for audio to be played based on the ambient noise data and the audio playback level comprises:
calculating a noise energy value corresponding to noise in the environmental noise data;
and determining the audio energy value of the audio to be played according to the noise energy value and the audio playing level, and taking the audio energy value as the target volume value.
5. The method of claim 1, wherein the adjusting the playing volume of the audio to be played according to the target volume value comprises:
adjusting the audio energy of the audio to be played according to the target volume value; or the like, or a combination thereof,
adjusting the audio amplitude of the audio to be played according to the target volume value; or the like, or, alternatively,
and setting the output volume of the audio output device according to the target volume value.
6. The method according to any one of claims 1 to 5, wherein the audio playing level dividing method comprises:
and dividing the audio playing grade according to the ratio of the normal sound signal to the noise signal expected to be generated during audio playing.
7. The method of any one of claims 1 to 5, wherein the current playback environment comprises at least one of an indoor sound environment, an outdoor sound environment, an in-vehicle sound environment while a vehicle is in motion, and a sound environment on the opposite side of a telephone or intercom interaction.
8. The method according to any one of claims 1 to 5, further comprising:
collecting environment information, determining the current playing environment corresponding to the environment information according to the environment information, and setting or adjusting the audio playing grade according to the current playing environment.
9. The method of any of claims 1 to 5, further comprising:
analyzing the environmental noise data, calculating the volume value of the noise in the environmental noise data, and setting or adjusting the audio playing level according to the calculated volume value of the noise.
10. The method of claim 9, further comprising:
and when the calculated volume value of the noise exceeds a preset threshold value, adjusting the audio playing level to a protection level.
11. An apparatus for adjusting the volume of an audio player, the apparatus comprising:
the grade receiving module is used for receiving the input audio playing grade;
the noise acquisition module is used for acquiring environmental noise data from the current playing environment;
and the volume adjusting module is used for determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade and adjusting the playing volume of the audio to be played according to the target volume value.
12. An audio playback system, the system comprising:
input means for inputting an audio playback level;
the audio acquisition device is used for acquiring environmental noise data from the current playing environment;
the processor is used for receiving the audio playing grade input by the input device, acquiring the environmental noise data acquired by the audio acquisition device, determining a target volume value of the audio to be played according to the environmental noise data and the audio playing grade, and adjusting the playing volume of the audio to be played according to the target volume value;
and the audio output device plays the audio to be played according to the playing volume adjusted by the processor.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
CN202111161260.3A 2021-09-30 2021-09-30 Method and device for adjusting audio playing volume and audio playing system Pending CN115904299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111161260.3A CN115904299A (en) 2021-09-30 2021-09-30 Method and device for adjusting audio playing volume and audio playing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111161260.3A CN115904299A (en) 2021-09-30 2021-09-30 Method and device for adjusting audio playing volume and audio playing system

Publications (1)

Publication Number Publication Date
CN115904299A true CN115904299A (en) 2023-04-04

Family

ID=86482816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111161260.3A Pending CN115904299A (en) 2021-09-30 2021-09-30 Method and device for adjusting audio playing volume and audio playing system

Country Status (1)

Country Link
CN (1) CN115904299A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221764A (en) * 2023-11-07 2023-12-12 广州宇洪科技股份有限公司 Wireless terminal intercom system and intelligent intercom method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221764A (en) * 2023-11-07 2023-12-12 广州宇洪科技股份有限公司 Wireless terminal intercom system and intelligent intercom method
CN117221764B (en) * 2023-11-07 2024-02-02 广州宇洪科技股份有限公司 Wireless terminal intercom system and intelligent intercom method

Similar Documents

Publication Publication Date Title
CN109686347B (en) Sound effect processing method, sound effect processing device, electronic equipment and readable medium
Santini et al. On the use of sensor nodes and mobile phones for the assessment of noise pollution levels in urban environments
EP3547712A1 (en) Method for processing signals, terminal device, and non-transitory readable storage medium
CN111489760B (en) Speech signal dereverberation processing method, device, computer equipment and storage medium
KR101615421B1 (en) Method and apparatus for identifying mobile devices in similar sound environment
US11069366B2 (en) Method and device for evaluating performance of speech enhancement algorithm, and computer-readable storage medium
CN108449493B (en) Voice call data processing method and device, storage medium and mobile terminal
JP3878482B2 (en) Voice detection apparatus and voice detection method
WO2019033438A1 (en) Audio signal adjustment method and device, storage medium, and terminal
CN108449503B (en) Voice call data processing method and device, storage medium and mobile terminal
CN112087701B (en) Speaker emulation of microphone for wind detection
CN111128253B (en) Audio editing method and device
CN111554317B (en) Voice broadcasting method, equipment, computer storage medium and system
CN111462764B (en) Audio encoding method, apparatus, computer-readable storage medium and device
CN110599989B (en) Audio processing method, device and storage medium
CN110675848B (en) Audio processing method, device and storage medium
CN113949955B (en) Noise reduction processing method and device, electronic equipment, earphone and storage medium
CN112911441A (en) Noise reduction method, apparatus, audio device, and computer-readable storage medium
CN108172237A (en) Voice communication data processing method, device, storage medium and mobile terminal
CN115904299A (en) Method and device for adjusting audio playing volume and audio playing system
CN111081275B (en) Terminal processing method and device based on sound analysis, storage medium and terminal
CN112017636B (en) User pronunciation simulation method, system, equipment and storage medium based on vehicle
CN107564534B (en) Audio quality identification method and device
CN113259826B (en) Method and device for realizing hearing aid in electronic terminal
CN111739496B (en) Audio processing method, device and storage medium

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