Volume adjustment method, system, electronic device, and storage medium

By acquiring the amplitude of the audio file and adjusting the player volume, the problem of sudden volume changes when switching audio files in the vehicle control system was solved, achieving automatic adjustment and improving user experience and driving safety.

CN119088332BActive Publication Date: 2025-11-04ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411099660.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-11-04
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

The vehicle control system experiences sudden volume changes when switching audio files, which affects the user experience and increases operational complexity by requiring manual adjustment, thus distracting the driver.

Method used

By acquiring the amplitude of the audio file to be played, the player's control volume is determined and adjusted to keep the playback volume within a comfortable range for human ears, avoiding sudden increases or decreases in volume.

Benefits of technology

It effectively improves user experience, enhances driving safety, maintains a comfortable listening experience by automatically adjusting the volume, and reduces interference from manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088332B_ABST
    Figure CN119088332B_ABST
Patent Text Reader

Abstract

The application provides a volume adjustment method, system, electronic equipment and storage medium, and relates to the technical field of vehicle-mounted media playing. The volume adjustment method comprises the following steps: obtaining an audio file to be played; analyzing the audio file to be played, and extracting the amplitude of the audio file to be played; determining whether the amplitude of the audio file to be played and the current volume of the player both satisfy adjustment conditions; if yes, adjusting the control volume of the player; and playing the audio file to be played based on the adjusted player. According to the volume adjustment method, if the amplitude of the audio file to be played and the current volume of the player both satisfy the adjustment conditions, the control volume of the player is adjusted, so that the playing volume of the player is always in the comfortable hearing feeling interval of human ears, and the user experience can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicle media playing, and in particular to a volume adjusting method and system, an electronic device, and a storage medium. BACKGROUND

[0002] At present, a vehicle itself has a vehicle entertainment system, and audio of the vehicle entertainment system can be played through a vehicle player. With the continuous development of vehicle entertainment and intelligence, various ways can be used to meet the diverse audio-visual needs of users, such as connecting a mobile phone or other external terminal to a vehicle control system and outputting audio on the external terminal through the vehicle player to meet the audio-visual needs of the user. However, when the audio on the external terminal is output through the vehicle player, the volume of the audio is usually jointly affected by the volume of the vehicle control terminal and the external terminal. For example, when the volume of the mobile phone side is moderate, the user feels comfortable, but when the mobile phone is connected to the vehicle control system through Bluetooth and the audio is played on the vehicle player according to the volume of the mobile phone side, the sound will become lower. When the user adjusts the volume and inadvertently switches to other audio files, the sound will suddenly become louder, and the experience is very poor. In addition, the current volume adjusting method usually needs to be manually adjusted by the user, which not only increases the complexity of the operation, but also may distract the user's attention during driving, affecting driving safety. SUMMARY

[0003] The present application aims to provide a volume adjusting method, system, electronic device, and storage medium to solve the technical problem of volume mutation when the vehicle control system switches audio files, affecting the user experience.

[0004] To achieve the above object and other related objects, in a first aspect, the present application provides a volume adjusting method, comprising:

[0005] obtaining an audio file to be played;

[0006] analyzing the audio file to be played and extracting the amplitude of the audio file to be played;

[0007] determining whether the amplitude of the audio file to be played and the current volume of the player both satisfy an adjusting condition;

[0008] if so, adjusting the control volume of the player;

[0009] playing the audio file to be played based on the adjusted player.

[0010] In an example of the present application, the amplitude is an audio amplitude, and analyzing the audio file to be played and extracting the amplitude of the audio file to be played comprises:

[0011] cutting a plurality of audio segments of the audio file to be played;

[0012] obtaining frequency domain information of the plurality of audio segments;

[0013] taking an amplitude corresponding to each frequency in the frequency domain information as an audio amplitude of the audio file to be played, to form an amplitude set.

[0014] In an example of the present application, determining whether the amplitude of the audio file to be played and the current volume of the player both satisfy an adjustment condition comprises:

[0015] calculating an average value of the amplitude set and comparing the average value of the amplitude set with a preset first amplitude;

[0016] determining whether the average value of the amplitude set is greater than the first amplitude and whether the current volume of the player is greater than a preset first playback volume;

[0017] if so, the control volume of the player needs to be adjusted;

[0018] if not, determining whether the control volume of the player needs to be adjusted based on a preset second amplitude and a preset second playback volume.

[0019] In an example of the present application, determining whether the control volume of the player needs to be adjusted based on the preset second amplitude and the preset second playback volume comprises:

[0020] determining whether the average value of the amplitude set is less than the second amplitude and whether the current volume of the player is less than the second playback volume;

[0021] if so, the control volume of the player needs to be adjusted;

[0022] if not, keeping the control volume of the player unchanged.

[0023] In an example of the present application, the volume adjustment method further comprises: when it is determined that the amplitude of the audio file to be played and the current volume of the player do not both satisfy the adjustment condition, playing the audio file to be played based on the player.

[0024] In an example of the present application, adjusting the control volume of the player comprises:

[0025] for each audio amplitude in the amplitude set: comparing the current audio amplitude with a preset third amplitude to obtain a comparison result of the current audio amplitude and the third amplitude; wherein the comparison result comprises that the current audio amplitude is greater than, less than or equal to the third amplitude;

[0026] The comparison results of the audio amplitudes are counted, and the control volume of the player is correspondingly adjusted based on the comparison results.

[0027] In an example of the present application, the comparison results of the audio amplitudes are counted, and the control volume of the player is correspondingly adjusted based on the comparison results, including:

[0028] The number of audio amplitudes greater than the third amplitude in the amplitude set is taken as a first number, and the number of audio amplitudes less than the third amplitude is taken as a second number;

[0029] It is judged whether the first number is greater than the second number;

[0030] If yes, the control volume of the player is decreased by a first preset ratio;

[0031] If no, the control volume of the player is increased by a second preset ratio.

[0032] In a second aspect, the present application provides a volume adjustment system, including:

[0033] An acquisition module is configured to acquire a to-be-played audio file;

[0034] An analysis module is configured to analyze the to-be-played audio file and extract amplitudes of the to-be-played audio file;

[0035] A judgment module is configured to judge whether the amplitudes of the to-be-played audio file and a current volume of a player both satisfy an adjustment condition;

[0036] An adjustment module is configured to adjust a control volume of the player;

[0037] A playing module is configured to play the to-be-played audio file based on the adjusted player.

[0038] In a third aspect, the present application provides an electronic device, including:

[0039] At least one processor; and

[0040] A memory in communication connection with the at least one processor;

[0041] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the steps of the above-mentioned volume adjustment method.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program executable by a processor to implement the steps of the above-mentioned volume adjustment method.

[0043] The present application provides a volume adjustment method, system, electronic device and storage medium, the volume adjustment method first analyzes the amplitude of the acquired audio file to be played, judges whether the amplitude of the audio file to be played and the current volume of the player meet the adjustment condition, judges whether the control volume of the player needs to be adjusted, adjusts the control volume of the player if they meet the adjustment condition, and plays the audio file to be played based on the adjusted player, prevents the playback volume of the player from suddenly increasing or decreasing when the vehicle control system switches the audio file, so that the playback volume of the player is always maintained in the comfortable listening range suitable for human ears, thereby effectively improving the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0044] The features and advantages of the present application will be more clearly understood through reference to the following drawings, which are presented as illustrative and not restrictive, in which:

[0045] Figure 1 It is a step flowchart of the volume adjustment method in an embodiment of the present application;

[0046] Figure 2 It is a flowchart of step S2 in an embodiment of the present application;

[0047] Figure 3 It is a flowchart of step S3 in an embodiment of the present application;

[0048] Figure 4 It is a flowchart of step S34 in an embodiment of the present application;

[0049] Figure 5 It is a flowchart of step S4 in an embodiment of the present application;

[0050] Figure 6 It is a flowchart of step S42 in an embodiment of the present application;

[0051] Figure 7 It is a block diagram of the volume adjustment system in an embodiment of the present application;

[0052] Figure 8 It is a device structure diagram of the hardware running environment involved in the volume adjustment method in an embodiment of the present application.

[0053] Element number explanation:

[0054] 100, volume adjustment system; 110, acquisition module; 120, analysis module; 130, judgment module; 140, adjustment module; 150, playing module. DETAILED DESCRIPTION

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] It should be noted that the illustrations provided in this embodiment are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0057] With the increasing prevalence of intelligent vehicles, the acoustic boundaries within car cabins are rapidly changing. Most cars are equipped with multimedia systems, including speakers and displays, allowing users to listen to music and watch videos, greatly enhancing the user experience. However, when switching between playback content within the car cabin, the different audio files have varying amplitudes, leading to sudden increases or decreases in volume, severely impacting the user experience. Furthermore, current adjustment methods typically involve manual volume control, such as knobs or touchscreens, which can distract the user and affect driving safety.

[0058] To address the aforementioned technical problems, this invention provides a volume adjustment method. When it is necessary to adjust the playback volume of a player, the control volume of the player is adjusted accordingly. This avoids sudden increases or decreases in the playback volume of the player when switching audio files, ensuring that the playback volume of the player is always kept within a comfortable listening range for the human ear. This effectively improves the user experience and enhances driving safety.

[0059] Figure 1 The flowchart illustrates a volume adjustment method in an exemplary embodiment of the present invention. The method is applied to a vehicle control system, which executes the volume adjustment method to adjust the control volume of the player so that the playback volume of the player is always within the comfortable listening range of the human ear.

[0060] Please see Figure 1 The volume adjustment method includes the following steps:

[0061] S1. Obtain the audio file to be played;

[0062] S2. Parse the audio file to be played and extract the amplitude of the audio file to be played.

[0063] S3, judging whether the amplitude of the audio file to be played and the current volume of the player both satisfy the adjustment condition;

[0064] S4, if yes, adjusting the control volume of the player;

[0065] S5, playing the audio file to be played based on the adjusted player.

[0066] In step S1, the audio file to be played is an audio file to be switched, which can be an audio file sent by an external terminal (e.g., a mobile phone, a tablet computer, etc.) to a vehicle control system, or an audio file sent by a user to the vehicle control system by touching a touch screen of the vehicle control system with a hand. The connection mode between the external terminal and the vehicle control system includes, but is not limited to, Bluetooth, USB, AUX, and HDMI interfaces. The audio file to be played can be sent by an entertainment application (Applacation, App), such as music software, video software, game software, and radio software, or can be sent by a non-entertainment application, such as system software and navigation software. Here, the types of the entertainment application and the non-entertainment application are not limited. Exemplarily, the audio file to be played is a song.

[0067] Please refer to Figure 2 In some embodiments, the amplitude is an audio amplitude, and in step S2, the audio file to be played is analyzed to extract the amplitude of the audio file to be played, including the following steps:

[0068] S21, intercepting a plurality of audio segments of the audio file to be played;

[0069] In some embodiments, the audio processing library is used to read the audio file to be played first. Exemplarily, the audio processing library is AudioTrack&AudioRecord, MediaRecorder&MediaPlayer, etc. Specifically, a plurality of audio segments of the audio file to be played are intercepted at a certain time interval, and the interval time of each sampling and the amount of data of each sampling are adaptively adjusted according to actual needs. Exemplarily, the time interval of each sampling is 10 ms, and the total duration of the plurality of audio segments is 150 ms.

[0070] S22, obtaining frequency domain information of the plurality of audio segments;

[0071] In some embodiments, the time-domain signals of the plurality of audio files can be converted into frequency-domain signals by fast Fourier transform, short-time Fourier transform, etc., to obtain frequency-domain information of the plurality of audio files; or the frequency-domain information of the plurality of audio files can be obtained by wavelet transform or Hilbert-Huang transform. In this embodiment, fast Fourier transform is used to convert the time-domain information of the plurality of audio files into frequency-domain information. Further, in order to reduce the spectral leakage effect, a window function such as Hamming window or Hanning window is applied to the plurality of audio files before fast Fourier transform. Exemplarily, the plurality of audio files processed by the window function are subjected to fast Fourier transform by using an audio visualization tool, to complete the conversion of the audio information from time domain to frequency domain, and to calculate the amplitude corresponding to each frequency based on the frequency-domain information obtained by the transform. For example, the audio visualization tool includes AudioVisualizeView, Visualizer class, etc.

[0072] S23. The amplitude corresponding to each frequency in the frequency-domain information is taken as an audio amplitude of the audio file to be played, to form an amplitude set.

[0073] In some embodiments, all the audio amplitudes in the amplitude set are arranged in a certain order, for example, in the order of frequency from low to high.

[0074] Referring to Figure 3 In step S3, it is judged whether the amplitude of the audio file to be played and the current volume of the player both satisfy the adjustment condition, including the following steps.

[0075] S31. The average value of the amplitude set is calculated, and the average value of the amplitude set is compared with the preset first amplitude.

[0076] S32. It is judged whether the average value of the amplitude set is greater than the first amplitude, and whether the current volume of the player is greater than the preset first playing volume.

[0077] S33. If yes, the control volume of the player needs to be adjusted.

[0078] S34. If no, it is judged whether the control volume of the player needs to be adjusted based on the preset second amplitude and the preset second playing volume.

[0079] Referring to Figure 4 In some embodiments, in step S34, it is judged whether the control volume of the player needs to be adjusted based on the preset second amplitude and the preset second playing volume, including the following steps.

[0080] S341. It is judged whether the average value of the amplitude set is less than the second amplitude, and whether the current volume of the player is less than the second playing volume.

[0081] S342, if yes, the control volume of the player needs to be adjusted;

[0082] S343, if no, the control volume of the player remains unchanged.

[0083] The current volume of the player is the playing volume of the audio file played by the current player into the vehicle. If the average value of the amplitude set and the current volume of the player both satisfy the adjustment condition, the control volume of the player needs to be adjusted, and if either of the average value of the amplitude set and the current volume of the player does not satisfy the adjustment condition, the control volume of the player does not need to be adjusted. For example, the average value of the amplitude set is greater than the first amplitude, but the current volume of the player is between the first playing volume and the second playing volume, and the control volume of the player does not need to be adjusted. In the present application, the first amplitude, the second amplitude, the first playing volume and the second playing volume are adaptively adjusted according to actual needs.

[0084] In the present application, the player can be any type of audio media player controlled by the vehicle control system on the vehicle, for example, can be a Moving Picture Experts Group Audio Layer 3 (MP3) player, or other media player configured to play back audio recordings such as, for example, musical works.

[0085] Referring to Figure 5 In some embodiments, in step S4, the control volume of the player is adjusted, including the following steps:

[0086] S41, for each audio amplitude in the amplitude set: comparing the current audio amplitude with a preset third amplitude to obtain a comparison result of the current audio amplitude and the third amplitude; wherein the comparison result includes that the current audio amplitude is greater than, less than or equal to the third amplitude;

[0087] S42, counting the comparison results of the audio amplitudes, and adjusting the control volume of the player based on the comparison results.

[0088] Referring to Figure 6 In some embodiments, in step S42, counting the comparison results of the audio amplitudes, and adjusting the control volume of the player based on the comparison results includes the following steps:

[0089] S421, taking the number of audio amplitudes greater than the third amplitude in the amplitude set as a first number, and taking the number of audio amplitudes less than the third amplitude as a second number;

[0090] S422, determining whether the first number is greater than the second number;

[0091] S423, if yes, decreasing the control volume of the player by a first preset ratio;

[0092] The first preset proportion is adaptively adjusted according to actual needs. For example, the first preset proportion is 30% of the maximum control volume of the player. For example, if the current control volume of the player is 70% of the maximum control volume, the control volume is reduced to 40% of the maximum control volume.

[0093] S424, if not, the control volume of the player is increased by a second preset proportion.

[0094] The second preset proportion is adaptively adjusted according to actual needs. The second preset proportion can be equal to or different from the first preset proportion. In some embodiments, the second preset proportion is equal to the first preset proportion. For example, the second preset proportion is 30% of the maximum control volume of the player. If the current control volume of the player is 30% of the maximum control volume, the control volume is increased to 60% of the maximum control volume.

[0095] In step S5, if the control volume of the player is adjusted, the adjusted player plays the to-be-played audio file based on the adjusted control volume. For example, if the current control volume of the player is 40% of the maximum control volume, and the control volume is increased to 70% of the maximum control volume based on the comparison result of the audio amplitude of the to-be-played audio file and the third amplitude, the to-be-played audio file is played based on the control volume of 70% of the maximum control volume.

[0096] In some embodiments, the volume adjustment further comprises: S6, when the adjustment condition is satisfied when the amplitude of the to-be-played audio file and the current volume of the player are different, the to-be-played audio file is played based on the player. For example, if the current control volume of the player is 40% of the maximum control volume, and the adjustment condition is not satisfied when the amplitude of the to-be-played audio file and the current volume of the player are different, the to-be-played audio file is played based on the maximum control volume of 40%.

[0097] In some embodiments, the volume adjusting step further comprises a volume initialization step for the control volume of the player when the vehicle control system is restarted. The volume initialization step comprises adjusting the control volume of the player to a preset initial volume range, preventing the self-sound from being too large or too small when the vehicle control system is restarted, and affecting the user experience. The initial volume range is set based on the control volume, and the specific setting rules can be adaptively set based on actual needs. For example, the initial volume range is 5% to 20% of the maximum control volume. Illustratively, the vehicle control system automatically caches the current control volume when it is turned off, and reads the cached control volume when it is restarted to determine whether it needs to be adjusted. If the control volume is within the preset initial volume range, it does not need to be adjusted. If the control volume is not within the preset initial volume range, it needs to be adjusted. Illustratively, if the current control volume is within 5% to 20% of the maximum value when the vehicle control system is restarted, it does not need to be adjusted. If the current control volume is less than 5% of the maximum value when the vehicle control system is restarted, it is increased to 5% of the maximum value. If the current control volume is greater than 20% of the maximum value when the vehicle control system is restarted, it is reduced to 20% of the maximum value.

[0098] Referring to Figure 7 In some embodiments, the present application provides a volume adjusting system 100 corresponding to the volume adjusting method described above. The volume adjusting system 100 comprises an acquisition module 110, an analysis module 120, a judgment module 130, an adjusting module 140, and a playing module 150. The functions of each module are described in detail as follows:

[0099] The acquisition module 110 is configured to acquire a to-be-played audio file.

[0100] The analysis module 120 is configured to analyze the to-be-played audio file and extract the amplitude of the to-be-played audio file.

[0101] The judgment module 130 is configured to determine whether the amplitude of the to-be-played audio file and the current volume of the player both satisfy the adjusting condition.

[0102] The adjusting module 140 is configured to adjust the control volume of the player.

[0103] The playing module 150 is configured to play the to-be-played audio file based on the adjusted player.

[0104] In some embodiments, the analysis module 120 is specifically configured to:

[0105] extract a plurality of audio segments from the to-be-played audio file;

[0106] acquire frequency domain information of the plurality of audio segments;

[0107] The amplitude corresponding to each frequency in the frequency domain information is taken as an audio amplitude of the audio to be played, to form an amplitude set.

[0108] In some embodiments, the determining module 130 is specifically configured to:

[0109] calculate the average value of the amplitude set, and compare the average value of the amplitude set with a preset first amplitude;

[0110] determine whether the average value of the amplitude set is greater than the first amplitude and whether the current volume of the player is greater than a preset first playing volume;

[0111] If yes, the control volume of the player needs to be adjusted;

[0112] If no, it is determined whether the control volume of the player needs to be adjusted based on a preset second amplitude and a preset second playing volume.

[0113] In some embodiments, the determining module 130 is further configured to:

[0114] determine whether the average value of the amplitude set is less than the second amplitude and whether the current volume of the player is less than the second playing volume;

[0115] If yes, the control volume of the player needs to be adjusted;

[0116] If no, the control volume of the player remains unchanged.

[0117] In an embodiment, the adjusting module 140 is specifically configured to:

[0118] for each audio amplitude in the amplitude set: compare the current audio amplitude with a third amplitude to obtain a comparison result of the current audio amplitude and the third amplitude; wherein the comparison result includes that the current audio amplitude is greater than, less than or equal to the third amplitude;

[0119] count the comparison results of the audio amplitudes, and adjust the control volume of the player based on the comparison results.

[0120] In an embodiment, the adjusting module 140 is specifically configured to:

[0121] take the number of audio amplitudes greater than the third amplitude in the amplitude set as a first number, and take the number of audio amplitudes less than the third amplitude as a second number;

[0122] determine whether the first number is greater than the second number;

[0123] If yes, decrease the control volume of the player by a first preset ratio;

[0124] If not, the control volume of the player is increased by a second preset ratio.

[0125] Referring to Figure 8 In some embodiments, the electronic device can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcasting receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a car terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. Figure 6 The illustrated electronic device is merely an example and should not impose any limitation on the function and use range of the embodiments of the present disclosure.

[0126] Referring to Figure 8 The electronic device can include a processing device (e.g., a central processing unit, a graphic processing unit, or the like) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded into a random access memory (RAM) from a storage device. In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.

[0127] In general, the following systems can be connected to the I / O interface: input devices including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, and the like; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices including, for example, a magnetic tape, a hard disk, and the like; and communication devices. The communication devices can allow the electronic device to communicate with other devices wirelessly or wired to exchange data. Although the electronic device having various systems is illustrated in the drawing, it should be understood that all of the illustrated systems are not required to be implemented or provided. More or less systems can be alternatively implemented or provided.

[0128] The computer readable storage medium encoded with computer program instructions stores the computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0129] In some embodiments, the present application provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0130] Obtaining an audio file to be played;

[0131] Analyzing the audio file to be played, and extracting an amplitude of the audio file to be played;

[0132] Determining whether the amplitude of the audio file to be played and a current volume of the player both satisfy an adjustment condition;

[0133] If yes, adjusting the control volume of the player;

[0134] Playing the audio file to be played based on the adjusted player.

[0135] It should be noted that the functions or steps that the computer readable storage medium or the computer device can implement correspond to the descriptions of the server side and the client side in the foregoing method embodiments, and thus will not be described herein again to avoid repetition.

[0136] The computer readable storage medium of the present application can employ any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable signal medium can include a data signal propagated in a baseband or as a carrier wave in a propagated data signal, in which the computer readable computer program is carried. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium that can send, propagate, or transmit the program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination of the above.

[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.

[0138] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A volume adjustment method, characterized in that, include: Get the audio file to be played; The audio file to be played is parsed to extract the amplitude of the audio file to be played; Determine whether the amplitude of the audio file to be played and the current volume of the player both meet the adjustment conditions; If so, adjust the volume control of the player; The player, after adjustment, plays the audio file to be played. The amplitude is an audio amplitude. Parsing the audio file to be played and extracting the amplitude of the audio file to be played includes: extracting multiple audio segments from the audio file to be played; obtaining the frequency domain information of the multiple audio segments; and taking the amplitude corresponding to each frequency in the frequency domain information as an audio amplitude of the audio file to be played, forming an amplitude set. Adjusting the control volume of the player includes: statistically analyzing the comparison results of each audio amplitude, and adjusting the control volume of the player accordingly based on the comparison results; The comparison results of each audio amplitude are statistically analyzed, and the control volume of the player is adjusted accordingly based on the comparison results. This includes: taking the number of audio amplitudes greater than a preset third amplitude in the amplitude set as a first quantity, and the number of audio amplitudes less than the third amplitude as a second quantity; determining whether the first quantity is greater than the second quantity; if so, decreasing the control volume of the player by a first preset ratio; if not, increasing the control volume of the player by a second preset ratio.

2. The volume adjustment method according to claim 1, characterized in that, Determining whether the amplitude of the audio file to be played and the current volume of the player both meet the adjustment conditions includes: Calculate the average value of the amplitude set and compare the average value of the amplitude set with a preset first amplitude; Determine whether the average value of the amplitude set is greater than the first amplitude, and whether the current volume of the player is greater than the preset first playback volume; If so, the volume control of the player needs to be adjusted; If not, then based on the preset second amplitude and the preset second playback volume, it is determined whether the control volume of the player needs to be adjusted.

3. The volume adjustment method according to claim 2, characterized in that, Based on a preset second amplitude and a preset second playback volume, determine whether the player's control volume needs to be adjusted, including: Determine whether the average value of the amplitude set is less than the second amplitude, and whether the current volume of the player is less than the second playback volume; If so, the volume control of the player needs to be adjusted; If not, then keep the player's control volume unchanged.

4. The volume adjustment method according to claim 1, characterized in that, Also includes: When the amplitude of the audio file to be played is different from the current volume of the player, and the adjustment condition is met, the audio file to be played is played based on the player.

5. The volume adjustment method according to claim 1, characterized in that, Adjusting the volume control of the player includes: For each audio amplitude in the set of amplitudes: The current audio amplitude is compared with the third amplitude to obtain a comparison result between the current audio amplitude and the third amplitude; wherein the comparison result includes whether the current audio amplitude is greater than, less than or equal to the third amplitude.

6. A volume control system, characterized in that, include: The acquisition module is used to acquire the audio file to be played. The parsing module is used to parse the audio file to be played and extract the amplitude of the audio file to be played. The judgment module is used to determine whether the amplitude of the audio file to be played and the current volume of the player both meet the adjustment conditions; The adjustment module is used to adjust the control volume of the player; The playback module is used to play the audio file to be played based on the adjusted player; The amplitude is an audio amplitude. Parsing the audio file to be played and extracting the amplitude of the audio file to be played includes: extracting multiple audio segments from the audio file to be played; obtaining the frequency domain information of the multiple audio segments; and taking the amplitude corresponding to each frequency in the frequency domain information as an audio amplitude of the audio file to be played, forming an amplitude set. Adjusting the control volume of the player includes: statistically analyzing the comparison results of each audio amplitude, and adjusting the control volume of the player accordingly based on the comparison results; The comparison results of each audio amplitude are statistically analyzed, and the control volume of the player is adjusted accordingly based on the comparison results. This includes: taking the number of audio amplitudes greater than a preset third amplitude in the amplitude set as a first quantity, and the number of audio amplitudes less than the third amplitude as a second quantity; determining whether the first quantity is greater than the second quantity; if so, decreasing the control volume of the player by a first preset ratio; if not, increasing the control volume of the player by a second preset ratio.

7. An electronic device, characterized in that, include; At least one processor; as well as, A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the steps of the volume adjustment method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the volume adjustment method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Volume adjustment method and device, terminal device, and storage medium

    CN107566618A