Audio processing method, device, equipment and readable storage medium
By applying multiple loudness processing algorithms to the initial audio file, generating and selecting audio files to be selected with excellent audio characteristic parameters, the problem of inappropriate loudness of the audio file is solved, and the audio file quality improvement and user experience improvement is achieved.
Patent Information
- Application Number
- CN202310524986.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2043-05-10
AI Technical Summary
In the process of audio file distribution, it is difficult to effectively adjust the loudness of the audio file, resulting in users encountering problems such as excessive or too small sound when playing multiple audio files, which affects the user experience.
By acquiring the initial audio file, using multiple loudness processing algorithms to perform audio processing, multiple audio files to be selected are generated, and the target audio file is determined based on the audio characteristic parameters of these audio files, and the target audio file is distributed to the terminal device.
Effectively adjust the loudness of audio files, reduce the harshness of audio, improve the quality of audio files, reduce user complaints, and improve user experience.
Smart Images

Figure CN117727334B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to an audio processing method, device, equipment and readable storage medium. Background Art
[0002] In a variety of scenarios, audio files are sent, and users can play the audio files after the audio files are sent. Because in the process of audio acquisition, for example, the uploading user of each audio file can set the background sound and the volume of the background sound according to the needs, or there may be noise in the process of audio recording or collection, or due to the performance problem of the audio recording device, the audio effect of the acquired audio file may be unsatisfactory. If these audio files are sent directly, when the same user plays a plurality of different audio files in sequence, some audio files may have a loud sound, and the user will feel harsh when playing the audio file, and some audio files have a small sound, and it is difficult for the user to hear clearly, which reduces the user experience. The current method is generally to directly send the audio file, so the effect of the audio file sent in this way is unsatisfactory, which is easy to cause user complaints about the relevant audio, and the user experience is poor. Summary of the invention
[0003] The embodiments of the present application provide an audio processing method, apparatus, device, and readable storage medium, which can improve the quality of audio files, reduce audio harshness, reduce user complaints, and thus improve user experience.
[0004] In a first aspect, the present application provides an audio processing method, comprising:
[0005] Obtain an initial audio file, and respectively use N loudness processing algorithms in the algorithm set to perform audio processing on the initial audio file to obtain N audio files to be selected; one loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer;
[0006] Acquire audio feature parameters of the N audio files to be selected respectively; the audio feature parameters are used to indicate the audio quality of the audio files to be selected;
[0007] A target audio file is determined from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected, and the target audio file is sent to the terminal device.
[0008] In a second aspect, the present application provides an audio processing device, characterized in that the device comprises:
[0009] The audio processing unit is used to obtain an initial audio file, and respectively use N loudness processing algorithms in the algorithm set to perform audio processing on the initial audio file to obtain N audio files to be selected; one loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer;
[0010] A parameter acquisition unit, used to respectively acquire audio feature parameters of the N audio files to be selected; the audio feature parameters are used to indicate the audio quality of the audio files to be selected;
[0011] The file determination unit is used to determine a target audio file from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected, and send the target audio file to the terminal device.
[0012] In a third aspect, the present application provides a computer device, including: a processor, a memory, and a network interface;
[0013] The processor is connected to a memory and a network interface, wherein the network interface is used to provide a data communication function, the memory is used to store computer program codes, and the processor is used to call the computer program codes so that a computer device including the processor executes the audio processing method.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor performs the above-mentioned audio processing method.
[0015] In a fifth aspect, the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the audio processing method provided in various optional manners in the first aspect of the present application.
[0016] In the embodiment of the present application, multiple audio files to be selected are obtained by performing audio processing on the initial audio file using multiple loudness processing algorithms; then, the target audio file can be determined from the multiple audio files to be selected or the initial audio file based on the audio feature parameters of the multiple audio files to be selected, and the target audio file can be sent to the terminal device. The loudness of the audio file can be adjusted to a suitable range by the loudness processing algorithm. Since the effect of the audio files to be selected corresponding to the multiple loudness processing algorithms is evaluated, the effect of each audio file to be selected can be determined, so that the audio file with better effect can be selected for sending, which is equivalent to improving the quality of the audio file on the basis of the initial audio file, which can reduce the situation of audio harshness, thereby reducing damage to the human ear, reducing user complaints, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 is a network architecture diagram of an audio processing system provided in an embodiment of the present application;
[0019] Figure 2 It is a flowchart of an audio processing method provided in an embodiment of the present application;
[0020] Figure 3 is a flowchart of another audio processing method provided in an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of the structure of an audio processing device provided in an embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of the composition structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] The technical solution of the present application can be applied to scenarios where audio files are sent, for example, it can be applied to the sending of audio files in scenarios such as on-demand and live broadcast. By performing audio processing on the initial audio file and performing parameter analysis on the processed audio file, the effect of the processed audio file is determined, and then the audio file with better effect is selected for sending, which is equivalent to improving the quality of the audio file on the basis of the initial audio file, which can reduce the situation of audio harshness and damage to the human ear, thereby reducing user complaints and improving user experience. The technical solution of the present application can also be applied to the field of audio loudness control technology in multimedia short video platforms, and can also be used in call scenarios, which is not limited in the embodiments of the present application.
[0025] Please refer to Figure 1 , Figure 1 is a network architecture diagram of an audio processing system provided in an embodiment of the present application, such as Figure 1As shown, the computer device can exchange data with the terminal device, and the number of the terminal devices can be one or at least two. For example, when the number of the terminal devices is multiple, the terminal device may include Figure 1 The terminal device 101a, the terminal device 101b and the terminal device 101c in the embodiment of the present invention are as follows. Taking the terminal device 101a as an example, the computer device 102 can obtain the initial audio file, and use a plurality of loudness processing algorithms to perform audio processing on the initial audio file to obtain a plurality of audio files to be selected; further, the computer device 102 can determine the target audio file from the plurality of audio files to be selected or the initial audio file based on the audio feature parameters of the plurality of audio files to be selected. Further, the computer device 102 can also send the target audio file to the terminal device 101a, and the user can play the target audio file through the terminal device 101a. Since the initial audio file is processed by a plurality of loudness processing algorithms, an audio file with a better effect is selected from the processed audio file for sending, which is equivalent to improving the quality of the audio file on the basis of the initial audio file, which can reduce the situation of audio harshness and reduce the damage to the human ear, thereby reducing user complaints and improving the user experience.
[0026] The computer device mentioned in the embodiment of the present application may refer to a server or a terminal device, or may also be a system composed of a server and a terminal device, which is not limited in the embodiment of the present application. The terminal device may be an electronic device, including but not limited to a mobile phone, a tablet computer, a laptop computer, a vehicle-mounted device, etc. The server mentioned above may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, vehicle-road collaboration, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. When the server is an independent physical server, the server can perform audio processing independently. When the server is multiple physical servers, multiple physical servers can collaborate to perform audio processing.
[0027] For further information, see Figure 2 , Figure 2 is a flowchart of an audio processing method provided in an embodiment of the present application; Figure 2 As shown, the audio processing method can be applied to a computer device, and the audio processing method includes but is not limited to the following steps:
[0028] S101, obtaining an initial audio file, and respectively using N loudness processing algorithms in an algorithm set to perform audio processing on the initial audio file to obtain N audio files to be selected.
[0029] In the embodiment of the present application, the initial audio file can be obtained by real-time recording through a sound recording device, or by uploading the initial audio file through a terminal device used by the user, or by obtaining the initial audio file in the local storage, or by obtaining the initial audio file sent by other computer devices. The embodiment of the present application does not limit the method of obtaining the initial audio file. The initial audio file may refer to an audio file obtained by recording the voice of the user speaking, or an audio file obtained by recording the voice of singing, or an audio file obtained by recording the sounds emitted by other organisms in nature, or an audio file obtained by transcribing an audio file, and so on. The audio file to be selected in the embodiment of the present application may also refer to an audio file in a video, such as an audio file in a short video, and so on.
[0030] Optionally, the transmitted audio stream can be obtained, the audio stream can be framed to obtain audio data for each frame, and each frame of audio data can be further converted to convert the time domain audio signal into a frequency domain audio signal. The frequency domain audio signal can then be analyzed to determine the effect of the audio file.
[0031] In the embodiment of the present application, in the process of audio acquisition, for example, the uploading user of each audio file can set the background sound and the volume of the background sound according to the demand, or there may be noise in the process of audio recording or collection, or due to the performance problem of the audio recording device, the audio effect of the acquired audio file may be unsatisfactory. If these audio files are directly sent down, when the same user plays multiple different audio files in sequence, some audio files may have louder sounds and some audio files may have smaller sounds. If the audio file is directly sent down, it may cause the user to feel harsh when playing the audio file, increase the damage to the human ear, and easily cause users to complain about the relevant audio and the relevant platform.
[0032] Therefore, in the embodiment of the present application, a loudness processing algorithm can be used to perform audio processing on the initial audio file. For multiple different initial audio files, that is, the original audio files uploaded by the user, the loudness in the multiple initial audio files can be adjusted to a certain range as much as possible, so that when the user plays multiple adjusted audio files in sequence, there will not be a situation where the sound in some audio files is very loud and some sounds are very small, which can reduce the situation of audio harshness and thus reduce damage to the human ear. In the embodiment of the present application, for each of the multiple initial audio files, multiple loudness processing algorithms are used for processing, and the processing methods of each initial audio file do not affect each other. In the embodiment of the present application, the description is made for an initial audio file, and the processing method for other audio files in the multiple initial audio files can refer to the processing method of the audio file. Specifically, in the embodiment of the present application, N kinds of loudness processing algorithms can be used to perform audio processing on the initial audio file, and N audio files to be selected can be obtained. One loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer. That is to say, after the initial audio file is processed by using a plurality of loudness processing algorithms to obtain a plurality of audio files to be selected, the effects of the plurality of audio files to be selected corresponding to each audio file can be evaluated respectively to determine the audio effect of each audio file to be selected, thereby selecting an audio file with better effect from the plurality of audio files to be selected and sending it to the user, thereby reducing damage to the human ear and reducing user complaints.
[0033] Among them, the algorithm set may include N different loudness processing algorithms, and the loudness processing algorithms may include but are not limited to loudness equalization algorithms and other algorithms that can improve the loudness or other effects of audio files. Among them, the loudness equalization algorithm may include multiple, and the calculation parameters of each loudness equalization algorithm may be different. The loudness equalization algorithm can count the gains of parameters in the audio file processing process, so as to evaluate the effect of the processed audio file. The loudness equalization algorithm may refer to a method currently used by multiple companies to process audio files. The loudness equalization algorithms of different companies have different effects on audio file processing. Some companies have proposed a variety of new loudness equalization algorithms based on the insufficient effect of the loudness equalization algorithm. However, the audio files processed by these loudness equalization algorithms have various deficiencies in effect. For example, some audio files may have excessive noise amplification, and some audio files may have problems such as the sound being loud and soft.
[0034] In one embodiment, the initial audio file may be processed by frame division to obtain M frames of audio data corresponding to the initial audio file. When N loudness processing algorithms are used to process the initial audio file, the M frames of audio data corresponding to the initial audio file may be processed by the N loudness processing algorithms respectively to obtain processing results of each loudness processing algorithm on the M frames of audio data, thereby evaluating the effect of the selected audio file corresponding to each algorithm according to the processing results of each loudness processing algorithm on the M frames of audio data. M is a positive integer.
[0035] By performing frame processing on the initial audio file, multiple frames of audio data can be obtained, and then a loudness processing algorithm can be used to process each frame of audio data, which can improve the accuracy of parameter determination when subsequently determining the characteristic parameters of the audio file to be selected.
[0036] In another embodiment, the initial audio file may include M frames of audio data. For example, when the initial audio file is obtained, the initial audio file may be pre-framed to obtain M frames of audio data and store them in a local database. Then, the M frames of audio data included in the initial audio file in the local database may be directly obtained, and each algorithm may be used to perform audio processing on the M frames of audio data.
[0037] Optionally, in order to reduce the pressure on the server, the recording device associated with the terminal device can perform frame processing on the initial audio file when the initial audio file is obtained, and obtain M frames of audio data corresponding to the initial audio file. When uploading the initial audio file, the M frames of audio data can be directly uploaded to the computer device, and N loudness processing algorithms can be used to process the M frames of audio data respectively, and then subsequent effect evaluation can be performed based on the processing results. If the terminal device executes the process of framing the initial audio file, the server does not need to perform frame processing on the initial audio file, which can reduce the server pressure to a certain extent and improve the server processing efficiency. The embodiment of the present application does not limit the method of obtaining M frames of audio data.
[0038] In a possible case, if N is 1, that is, the algorithm set includes a loudness processing algorithm, then the loudness processing algorithm can be used to process the initial audio file to obtain a selected audio file. Subsequently, the effect of the selected audio file can be further evaluated. If the evaluation result indicates that the selected audio file meets the requirements, the selected audio file can be sent to the terminal device. If the evaluation result indicates that the selected audio file does not meet the requirements, it means that there are serious problems in the selected audio file processed by the loudness processing algorithm, that is, the effect of the audio file processed by the algorithm is worse than that of the initial audio file, and the initial audio file can be sent to the terminal device.
[0039] In a possible implementation, multiple loudness processing algorithms in the algorithm set may be used to process the initial audio file in sequence, and the effect of the processed audio file to be selected may be analyzed. When the initial audio file is processed using a certain loudness processing algorithm and the effect of the selected audio file is good, the selected audio file may be determined as the target audio file and sent to the terminal device. There is no need to use the remaining loudness processing algorithms in the algorithm set to process the initial audio file, which can improve the audio processing efficiency.
[0040] In another possible implementation, a loudness processing algorithm matching the historical loudness processing algorithm can be obtained from the algorithm set, and the loudness processing algorithm is used to process the initial audio file to obtain a selected audio file, and the effect of the selected audio file is evaluated. If the effect is good, the selected audio file is determined as the target audio file and sent to the terminal device. The historical loudness processing algorithm may refer to a method in which multiple algorithms in the algorithm set are used to process the audio file in the historical time period before the initial audio file is obtained, and the algorithm whose algorithm effect is higher than the effect threshold is evaluated. Then, the historical loudness processing algorithm can be directly used to process the initial audio file to reduce the amount of data. It is understandable that if the loudness processing algorithm matching the historical loudness processing algorithm is used to process the initial audio file, and the effect of the selected audio file obtained is poor, other algorithms in the algorithm set can also be used to process the initial audio file to obtain an audio file processed by an algorithm with a better effect, and send it to the terminal device.
[0041] S102, respectively obtaining audio feature parameters of N audio files to be selected.
[0042] In the embodiment of the present application, since N kinds of loudness processing algorithms are used to process the initial audio file respectively, N audio files to be selected are obtained, the audio feature parameters of the N audio files to be selected can be obtained respectively, so that the audio effect of the audio files to be selected can be evaluated based on the audio feature parameters. Among them, the audio feature parameters are used to indicate the audio quality of the audio files to be selected. The audio feature parameters may include but are not limited to the maximum gain value of the audio file to be selected, the gain value change rate of the audio file to be selected, the gain peak number of the audio file to be selected, the gain variance of the audio file to be selected, the gain peak value of the audio file to be selected, the loudness value of the audio file to be selected, and one or more of the dynamic range of the audio file to be selected. The embodiment of the present application does not limit the number and type of audio feature parameters of the audio file to be selected, that is, the audio feature parameters may include one of the above-mentioned ones, or a combination of multiple feature parameters, and may also include other more parameter types. When subsequently determining the target audio file from N candidate audio files or the initial audio file based on the audio feature parameters of the N candidate audio files, the target audio file can be determined based on any one of the audio feature parameters mentioned above, or based on a combination of multiple feature parameters mentioned above, or based on more feature parameters and combinations of parameters, and the embodiments of the present application are not limited to this.
[0043] In one embodiment, each loudness processing algorithm among N loudness processing algorithms may be used to process M frames of audio data in the initial audio file, and obtain gain values of the M frames of audio data corresponding to each loudness processing algorithm; N audio files to be selected are determined based on the gain values of the M frames of audio data corresponding to the N loudness processing algorithms; and audio feature parameters of the N audio files to be selected may be determined based on the gain values of the M frames of audio data corresponding to the N loudness processing algorithms. One frame of audio data corresponds to one gain value, and the gain value of the audio data is used to reflect the volume of the audio data.
[0044] Among them, when the loudness equalization algorithm processes the M frames of audio data in the initial audio file, it actually adjusts the amplitude of each frame of audio data (i.e., audio signal) or each sampling point by multiplying the gain, so as to obtain the selected audio file after the algorithm processing. After the amplitude of each frame of audio signal is adjusted, the gain value of each frame of audio data can be obtained. Since a loudness processing algorithm is used to process a frame of audio data, the gain value corresponding to the frame of audio data can be obtained, so the loudness processing algorithm is used to process M frames of audio data, and the gain values corresponding to the M frames of audio data can be obtained, that is, M gain values. When there are multiple loudness processing algorithms, each loudness processing algorithm can obtain the gain values corresponding to the M frames of audio data after processing, that is, after N loudness processing algorithms perform audio processing on M frames of audio data, M*N gain values can be obtained.
[0045] In the embodiment of the present application, by calculating the gain values of M frames of audio data corresponding to N kinds of loudness processing algorithms, the audio feature parameters of N audio files to be selected can be determined respectively. For example, for any audio file to be selected among the N audio files to be selected, if the audio feature parameters of the audio file to be selected include the maximum gain value of the audio file to be selected, the gain value of the M frames of audio data corresponding to each audio file to be selected can be compared, so that the maximum gain value in the gain values of the M frames of audio data is determined as the maximum gain value of the audio file to be selected. If the audio feature parameters of the audio file to be selected include the gain value change rate of the audio file to be selected, the gain value change rate of the audio file to be selected can be determined by comparing the gain value of any frame of audio data with the gain value of a frame of audio data adjacent to the audio file to be selected. In this way, the gain value change rate of every two frames of audio data in the M frames of audio data can be determined, and the multiple gain value change rates included in the audio file to be selected can be determined. If the audio feature parameters of the audio file to be selected include the gain peak number of the audio file to be selected, for example, the number of gain values greater than a set threshold in the M frames of audio data can be counted as the gain peak number of the audio file to be selected. If the audio feature parameters of the audio file to be selected include the gain variance of the audio file to be selected, then the average value of the M frames of audio data can be calculated based on the gain value of the M frames of audio data, and then the gain variance of the audio file to be selected can be calculated based on the average value of the M frames of audio data and the gain value of the M frames of audio data. If the audio feature parameters of the audio file to be selected include the gain peak value of the audio file to be selected, for example, the gain value greater than the set threshold in the M frames of audio data can be determined as the gain peak value of the audio file to be selected, and the number of gain peak values of the audio file to be selected can be multiple. If the audio feature parameters of the audio file to be selected include the loudness value of the audio file to be selected, the loudness value corresponding to each frame of audio data can be obtained respectively, so as to obtain the loudness value of the audio file to be selected. If the audio feature parameters of the audio file to be selected include the dynamic range of the audio file to be selected, the dynamic range of the audio file to be selected can be determined by statistically analyzing the loudness values of the M frames of audio data. It can be understood that in the embodiment of the present application, the audio feature parameters in the audio file can also be obtained respectively by other methods, and the method of obtaining the audio feature parameters in the embodiment of the present application is not limited.
[0046] Optionally, in the embodiment of the present application, multiple initial audio files can be processed, and each initial audio file can be processed in the same way. Since the audio length of each initial audio file may not be equal, when calculating the gain mean value and gain variance of the audio file to be selected, the gain mean value and gain variance of the audio file to be selected can be statistically calculated in the form of a histogram. When the histogram is used for feature statistics, since the data in the histogram is segmented, a period of time corresponds to a section of data. Therefore, each section of data in the audio file to be selected can be obtained, so that the gain mean value and gain variance of the audio file to be selected can be calculated. For each frame of audio data in the audio file to be selected, the gain value of the current frame of audio data can be calculated by a loudness equalization algorithm, so that the change rate of the current frame of audio data and the previous frame of audio data can be counted. Further, the current frame gain value can be compared with the historical frame gain value in turn to find the maximum gain value in the audio file to be selected, and the maximum gain value can also be stored for use when the audio file is subsequently subjected to effect analysis. In addition, the current frame gain value can also be stored in the histogram to determine whether the current frame gain value exceeds the gain change rate. In the above manner, the audio feature parameters of each of the multiple audio files to be selected can be counted. The gain peak number can be equal to the number of gains exceeding the gain average value, or an absolute value can be set to measure the number of gains exceeding the absolute value. By obtaining these statistical values, such as audio feature parameters, the statistical values can be evaluated for their effects, thereby determining the pros and cons of each loudness processing algorithm and the effect of each audio file to be selected.
[0047] S103: determining a target audio file from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected, and sending the target audio file to the terminal device.
[0048] In the embodiment of the present application, by analyzing the audio feature parameters of N audio files to be selected, the effects of the N audio files to be selected can be determined respectively. If there is an audio file with better effect among the N audio files to be selected, the audio file to be selected can be used as the target audio file and the target audio file can be sent to the terminal device. If the effects of the N audio files to be selected are not good, the initial audio file can be used as the target audio file and the target audio file can be sent to the terminal device. Among them, the poor effect of the audio file can include the background noise in the audio being over-amplified, the noise fluctuating, the sound fluctuating, the existence of clipping distortion, the loudness not meeting the output requirements, the dynamic range of the loudness is too large, and so on. Among them, the background noise refers to a series of background noises that are irrelevant to the subject being recorded during the recording process. For example, the background noise can refer to the noise generated by the recording device itself during the signal conversion and transmission process. For example, the background noise can come from a microphone, a microphone amplifier, a sound card, a computer, an audio cable, and so on.
[0049] In one embodiment, the N audio files to be selected may be graded, so that the audio files are sent to the client according to the grades of the N audio files to be selected. Specifically, a target strategy may be obtained, and the audio grades of the N audio files to be selected may be determined based on the target strategy and the audio feature parameters of the N audio files to be selected; and a target audio file may be determined from the N audio files to be selected or the initial audio file based on the audio grades of the N audio files to be selected.
[0050] Wherein, the target strategy may include a parameter threshold value corresponding to the audio feature parameter of the audio file to be selected, the audio level is used to reflect the audio quality of the audio file to be selected, and the target audio file is one of the N audio files to be selected and the initial audio file. If the audio feature parameter meets the parameter threshold value in the target strategy, the audio level of the audio file to be selected is greater than the level threshold value, indicating that the effect of the audio file to be selected is better. If the audio feature parameter does not meet the parameter threshold value in the target strategy, the audio level of the audio file to be selected is less than or equal to the level threshold value, indicating that the effect of the audio file to be selected is poor.
[0051] Optionally, if the target strategy includes a parameter threshold corresponding to an audio feature parameter, when the audio feature parameter of the selected audio file meets the parameter threshold, the audio level of the selected audio file is greater than the level threshold. When the audio feature parameter of the selected audio file does not meet the parameter threshold, the audio level of the selected audio file is less than or equal to the level threshold.
[0052] Optionally, if the target strategy includes parameter thresholds corresponding to multiple audio feature parameters, when each of the multiple audio feature parameters in the audio file to be selected satisfies the parameter threshold corresponding to the audio feature parameter in the target strategy, the audio level of the audio file to be selected is greater than the level threshold. When each of the multiple audio feature parameters in the audio file to be selected does not satisfy the corresponding parameter threshold in the target strategy, the audio level of the audio file to be selected is less than the level threshold. When some of the multiple audio feature parameters satisfy the corresponding parameter threshold, the audio level of the audio file to be selected can be further determined.
[0053] In one embodiment, the target strategy may include a parameter threshold corresponding to any one of at least one audio feature parameter, for example, the parameter threshold corresponding to any one of the maximum gain value Gmax, gain value change rate RGmax, gain peak number NGmax, gain variance SA, gain peak TP, loudness value I, and dynamic range LRA of the audio file. When the audio feature parameter included in the selected audio file meets the parameter threshold corresponding to the audio feature parameter in the target strategy, it means that the audio level of the selected audio file is greater than the level threshold, and the selected audio file can be determined as the target audio file, and then the target audio file can be sent to the client later.
[0054] In another embodiment, the target strategy may include parameter thresholds corresponding to a plurality of audio feature parameters, for example, the plurality of audio feature parameters may include the maximum gain value, gain value change rate, gain peak number, gain variance, gain peak, loudness value, and dynamic range of the audio file, and the target strategy may include, for example, the parameter threshold corresponding to the maximum gain value of the audio file, the parameter threshold corresponding to the gain value change rate, the parameter threshold corresponding to the gain peak number, the parameter threshold corresponding to the gain variance, the parameter threshold corresponding to the gain peak, the parameter threshold corresponding to the loudness value, and the parameter threshold corresponding to the dynamic range. Among them, the parameter threshold corresponding to the maximum gain value may be the first threshold, the parameter threshold corresponding to the gain value change rate may be the second threshold, the parameter threshold corresponding to the gain peak number may be the third threshold, the parameter threshold corresponding to the gain variance may be the fourth threshold, the parameter threshold corresponding to the gain peak may be the fifth threshold, the parameter threshold corresponding to the loudness value may be the sixth threshold, and the parameter threshold corresponding to the dynamic range may be the seventh threshold. The seventh threshold may refer to a threshold range, that is, it represents a range, and the range represented by the seventh threshold may indicate that the loudness value is in the range of the comfort zone. When the loudness of the selected audio file is within the range, the human ear will not feel harsh when mentioning the audio file.
[0055] That is to say, when there is any audio file whose maximum gain value satisfies the first threshold, the gain value change rate of any audio file satisfies the second threshold, the gain peak number of any audio file satisfies the third threshold, the gain variance of any audio file satisfies the fourth threshold, the gain peak of any audio file satisfies the fifth threshold, the loudness value of any audio file satisfies the sixth threshold, and the dynamic range of any audio file satisfies the seventh threshold, the audio level of any audio file is greater than the level threshold, which indicates that the effect of any audio file is good. For example, if there is no excessive amplification of the background noise, the noise fluctuates, the sound fluctuates, there is clipping distortion, the loudness does not meet the output requirements, and the dynamic range of the loudness is too large, then any audio file can be determined as the target audio file and then sent to the terminal device first to improve the user experience.
[0056] Optionally, a target strategy can be obtained, and the audio feature parameters of N audio files to be selected are judged based on the target strategy to obtain a parameter judgment result, and the audio levels of the N audio files to be selected are determined based on the parameter judgment result. Wherein, judging the audio feature parameters of the N audio files to be selected based on the target strategy can refer to judging whether the audio feature parameters of the audio files to be selected meet the parameter thresholds corresponding to the audio feature parameters included in the target strategy. The parameter judgment result can be used to indicate whether the audio feature parameters of the audio files to be selected meet the parameter thresholds corresponding to the audio feature parameters included in the target strategy. If the parameter judgment result is used to indicate that the parameter threshold corresponding to the target strategy is met, the audio level of the audio files to be selected is higher than the quality threshold. If the parameter judgment result is used to indicate that the parameter threshold corresponding to the target strategy is met, the audio level of the audio files to be selected is lower than the quality threshold. For example, when the target strategy includes a first threshold corresponding to the maximum gain value of an audio file, a second threshold corresponding to the gain value change rate, a third threshold corresponding to the gain peak number, and a fourth threshold corresponding to the gain variance, if the maximum gain value of the selected audio file is greater than the first threshold, the gain value change rate of the selected audio file is greater than the second threshold, the gain peak number of the selected audio file is greater than the third threshold, and the gain variance of the selected audio file is greater than the fourth threshold, the parameter judgment result can be used to indicate that the audio feature parameters of the selected audio file meet the parameter thresholds corresponding to the audio feature parameters included in the target strategy.
[0057] In an embodiment of the present application, the target strategy may include parameter thresholds corresponding to any several audio feature parameters among the multiple audio feature parameters. The number of parameter thresholds corresponding to the audio feature parameters in the target strategy can be set according to specific needs. When the audio feature parameters of the audio file to be selected are subsequently determined based on the target strategy, the judgment order of the multiple audio feature parameters is not limited, that is, first determine which audio feature parameters in the audio file to be selected and then determine which audio feature parameters will not affect the final audio effect.
[0058] It is understandable that the audio effect analysis is performed on the audio files processed by each loudness processing algorithm, that is, each loudness processing algorithm is analyzed. When it is determined that the effect of the selected audio file processed by a certain loudness processing algorithm is better, it means that the loudness processing algorithm is better, and this loudness processing algorithm can be selected. Furthermore, when the audio file is subsequently processed, this loudness processing algorithm can be preferentially selected for audio processing. The technical solution of the present application is mainly to reduce the damage to the human ear by using the loudness processing algorithm to make the loudness of the selected audio file reach a certain range. Since the loudness equalization algorithm itself will generate more bad cases (bad cases, such as problems), each loudness equalization algorithm is evaluated to reduce the generation of bad cases, so that after the audio file is sent, the user experience is improved and user complaints are reduced.
[0059] In one embodiment, when sending the target audio file to the terminal device, the target audio file can be sent to the terminal device when the audio acquisition request sent by the terminal device is received. Alternatively, the user tag associated with the terminal device can also be obtained, and the audio tag of the target audio file can be obtained. If the user tag associated with the terminal device matches the audio tag of the target audio file, the target audio file is sent to the terminal device. Among them, the user tag can be used to reflect the user's preference. The user here can be the user of the terminal device. The audio tag can be used to reflect the category of the target audio file, for example, it can include but not limited to education category, sports category, music category, game category, movie category, etc. By obtaining the user tag, the user's preference can be understood, so as to determine which categories of audio files the user is more interested in, so that the audio file can be sent in a targeted manner to improve the user experience. Optionally, the category of the historical audio file obtained by the terminal device in the historical time period can also be obtained. If the category of the historical audio file is the category of the target audio file, the target audio file is sent to the terminal device. Since the audio file obtained by the terminal device in the historical time period matches the category of the target audio file, it can be indicated that the user of the terminal device is interested in the audio file of this category, and the target audio file can be sent to the terminal device to improve the user experience.
[0060] It is understandable that when the embodiments of the present application involve data related to user information (such as user tags), when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0061] In the embodiment of the present application, multiple audio files to be selected are obtained by performing audio processing on the initial audio file using multiple loudness processing algorithms; then, the target audio file can be determined from the multiple audio files to be selected or the initial audio file based on the audio feature parameters of the multiple audio files to be selected, and the target audio file can be sent to the terminal device. The loudness of the audio file can be adjusted to a suitable range by the loudness processing algorithm. Since the effect of the audio files to be selected corresponding to the multiple loudness processing algorithms is evaluated, the effect of each audio file to be selected can be determined, so that the audio file with better effect can be selected for sending, which is equivalent to improving the quality of the audio file on the basis of the initial audio file, which can reduce the situation of audio harshness, thereby reducing damage to the human ear, reducing user complaints, and improving the user experience.
[0062] For further information, see Figure 3 , Figure 3 is a flowchart of another audio processing method provided in an embodiment of the present application; Figure 3As shown, the audio processing method can be applied to a computer device, and the audio processing method includes but is not limited to the following steps:
[0063] S201, obtaining an initial audio file, and performing audio processing on the initial audio file using a loudness processing algorithm to obtain an audio file to be selected.
[0064] In the embodiment of the present application, after the initial audio file is obtained, the initial audio file can be further processed by frame division to obtain multiple frames of audio data. The use of a loudness processing algorithm to perform audio processing on the initial audio data refers to the use of a loudness processing algorithm to process multiple frames of audio data, so that the gain value of each frame of audio data can be obtained. Then, the audio feature parameters of the selected audio file can be obtained, for example, the audio feature parameters of the selected audio file can include but are not limited to the maximum gain value, gain value change rate, gain peak number, gain variance, gain peak, loudness value, and dynamic range of the selected audio file.
[0065] The embodiment of the present application is described by taking the example of using a loudness processing algorithm to process the initial audio file to obtain a selected audio file, and then performing effect analysis on the selected audio file. When there are multiple loudness processing algorithms, each loudness processing algorithm is used to process the initial audio file respectively to obtain the selected audio file corresponding to each loudness processing algorithm, and then performing effect analysis on each selected audio file, and one loudness processing algorithm corresponds to one selected audio file. For the method of using multiple loudness processing algorithms to process the initial audio file and perform effect analysis on the initial audio file, reference can be made to the method of using the loudness processing algorithm to process the initial audio file and perform effect analysis on the initial audio file, and the embodiment of the present application will not explain this in detail.
[0066] S202, obtaining a maximum gain value, a gain value change rate, a gain peak number, a gain variance, a gain peak value, a loudness value, and a dynamic range of a to-be-selected audio file.
[0067] The audio file to be selected in the embodiment of the present application may be any one of the N audio files to be selected. The method for obtaining the maximum gain value, gain value change rate, gain peak number, gain variance, gain peak value, loudness value, and dynamic range of the audio file to be selected can refer to the description in the above step S102, which will not be repeated here.
[0068] S203: Determine whether the maximum gain value is greater than a first threshold.
[0069] In one case, if the maximum gain value of the audio file to be selected is greater than the first threshold value, it means that there is a problem of excessive amplification of the background noise in the audio file to be selected, which can indicate that the effect of the audio file to be selected is not good, and the audio file to be selected may not be subsequently processed, that is, the audio file to be selected is not sent to the terminal device. Furthermore, if the maximum gain value of the audio file to be selected is greater than the first threshold value, step S210 can also be performed to determine the audio level of the audio file to be selected. For example, it can be determined that the audio level of the audio file to be selected is the fifth level, and the audio quality of the audio file to be selected corresponding to the fifth level is lower than the quality threshold. In other words, when the audio level of the audio file to be selected is the fifth level, it means that such a problem as excessive amplification of the background noise is intolerable, that is, such a problem exists in the audio file to be selected, and the audio file to be selected is not sent to the terminal device.
[0070] In another case, if the maximum gain value of the selected audio file is less than or equal to the first threshold, step S204 is executed to determine whether the gain value change rate is greater than the second threshold. If the maximum gain value of the selected audio file is less than or equal to the first threshold, it means that there is no problem of excessive background noise amplification in the selected audio file, and other audio feature parameters of the selected audio file can be further determined to determine whether there are other problems in the selected audio file, and further determine whether to send the selected audio file to the terminal device.
[0071] S204, determining whether the gain value change rate is greater than a second threshold.
[0072] In one case, if the gain value change rate of the audio file to be selected is greater than the second threshold value, it means that there is a problem of the sound being louder and softer in the audio file to be selected, which can indicate that the effect of the audio file to be selected is not good, and the audio file to be selected may not be subsequently processed, that is, the audio file to be selected may not be sent to the terminal device. Further, if the gain value change rate of the audio file to be selected is greater than the second threshold value, step S210 may be performed to determine the audio level of the audio file to be selected. For example, the audio level of the audio file to be selected may be determined to be the fifth level. In other words, it indicates that the problem of the sound being louder and softer in the audio file to be selected is intolerable, that is, the audio file to be selected has such a problem, and the audio file to be selected is not sent to the terminal device.
[0073] In another case, if the gain value change rate of the selected audio file is less than or equal to the second threshold, step S205 is executed to determine whether the gain peak value is greater than the third threshold. If the gain value change rate of the selected audio file is less than or equal to the second threshold, it means that there is no problem of fluctuating sound in the selected audio file, and other audio feature parameters of the selected audio file can be further determined to further determine whether to send the selected audio file to the terminal device.
[0074] S205: Determine whether the gain peak value is greater than a third threshold.
[0075] In one case, if the gain peak number of the audio file to be selected is greater than the third threshold, it means that there is a problem of fluctuating sound in the audio file to be selected, for example, there is a problem of fluctuating background noise, which can indicate that the effect of the audio file to be selected is not good, and the audio file to be selected may not be subsequently processed, that is, the audio file to be selected is not sent to the terminal device. Furthermore, if the gain peak number of the audio file to be selected is greater than the third threshold, step S210 can also be executed to determine the audio level of the audio file to be selected. For example, it can be determined that the audio level of the audio file to be selected is the fifth level. In other words, it means that the problem of fluctuating background noise in the audio file to be selected is intolerable, that is, such a problem exists in the audio file to be selected, and the audio file to be selected is not sent to the terminal device.
[0076] In another case, if the gain peak number of the selected audio file is less than or equal to the third threshold, step S206 is executed to determine whether the gain variance is greater than a fourth threshold. If the gain peak number of the selected audio file is less than or equal to the third threshold, it means that there is no problem of fluctuating sound in the selected audio file, such as no problem of fluctuating background noise, and other audio feature parameters of the selected audio file can be further determined to further determine whether to send the selected audio file to the terminal device.
[0077] S206: Determine whether the gain variance is greater than a fourth threshold.
[0078] In one case, if the gain variance of the audio file to be selected is greater than the fourth threshold value, it means that there is a problem of the sound being louder and softer in the audio file to be selected, which may indicate that the effect of the audio file to be selected is not good, and the audio file to be selected may not be subsequently processed, that is, the audio file to be selected may not be sent to the terminal device. Further, if the gain variance of the audio file to be selected is greater than the fourth threshold value, step S210 may be further performed to determine the audio level of the audio file to be selected. For example, the audio level of the audio file to be selected may be determined to be the fifth level. In other words, it indicates that the problem of the sound being louder and softer in the audio file to be selected is intolerable, that is, such a problem exists in the audio file to be selected, and the audio file to be selected is not sent to the terminal device.
[0079] In another case, if the gain variance of the selected audio file is less than or equal to the fourth threshold, step S207 is executed to determine whether the gain peak is greater than the fifth threshold. If the gain variance of the selected audio file is less than or equal to the fourth threshold, it means that there is no problem of fluctuating sound in the selected audio file, and other audio feature parameters of the selected audio file can be further determined to further determine whether to send the selected audio file to the terminal device.
[0080] Optionally, the gain average value and gain variance may be further combined to determine whether there is a problem of fluctuating sound. For example, when the gain average value is greater than the average threshold and the gain variance is less than the fourth threshold, there may not be a problem of fluctuating sound. When the gain average value is less than or equal to the average threshold and the gain variance is greater than the fourth threshold, it indicates that there is a problem of fluctuating sound.
[0081] S207, determining whether the gain peak value is greater than a fifth threshold.
[0082] In one case, if the gain peak value of the audio file to be selected is greater than the fifth threshold value, it means that there is a problem of clipping distortion in the audio file to be selected, but there is no problem of excessive amplification of the background noise, the sound fluctuates, and the background noise fluctuates. Clipping distortion can refer to that when the signal amplitude of the audio is too large, clipping will occur at the peak point. It means that the problem of clipping distortion can be further judged whether it is tolerable, and then the audio file to be selected can be further judged to determine whether to send it to the terminal device. Further, if the gain peak value of the audio file to be selected is greater than the fifth threshold value, step S210 can also be executed to determine the audio level of the audio file to be selected. For example, it can be determined that the audio level of the audio file to be selected is the fourth level. The audio quality of the fourth level is higher than the quality threshold, and it can be determined whether to send the audio file to the terminal device according to demand later.
[0083] In another case, if the gain peak value of the selected audio file is less than or equal to the fifth threshold, step S208 is executed to determine whether the gain loudness value belongs to the sixth threshold. If the gain peak value of the selected audio file is less than or equal to the fifth threshold, it means that there is no clipping distortion problem in the selected audio file, and other audio feature parameters of the selected audio file can be further determined to determine whether there are other problems, and further determine whether to send the selected audio file to the terminal device.
[0084] S208: Determine whether the loudness value falls within a sixth threshold.
[0085] In one case, if the loudness value of the audio file to be selected does not belong to the sixth threshold, it means that there is a problem that the loudness does not meet the output requirements in the audio file to be selected, but there is no problem of clipping distortion, excessive amplification of the background noise, fluctuating sound, and fluctuating background noise. It means that the problem that the loudness does not meet the output requirements can be further judged whether it is tolerable, and the audio file to be selected can be further judged to determine whether to send it to the terminal device. Further, if the loudness value of the audio file to be selected does not belong to the sixth threshold, step S210 can also be performed to determine the audio level of the audio file to be selected. For example, it can be determined that the audio level of the audio file to be selected is the third level. The third level is higher than the fourth level, and it can be determined whether to send the audio file to the terminal device according to the needs later. Among them, the sixth threshold can refer to a range threshold, that is, the sixth threshold refers to a range. If the loudness value belongs to the sixth threshold, it means that the loudness meets the output requirements, and the loudness range is further judged. If the loudness value does not belong to the sixth threshold, it means that the loudness does not meet the output requirements, which means that the audio file to be selected has a problem that the loudness does not meet the output requirements, and it can be determined to be the third level.
[0086] In another case, if the loudness value of the audio file to be selected belongs to the sixth threshold, step S209 is executed to determine whether the dynamic range is greater than the seventh threshold. If the loudness value of the audio file to be selected belongs to the sixth threshold, it means that there is no problem that the loudness of the audio file to be selected does not meet the output requirements, that is, the loudness of the audio file meets the output requirements, and then other audio feature parameters of the audio file to be selected can be further determined to determine whether there are other problems, and further determine whether to send the audio file to the terminal device.
[0087] S209: Determine whether the dynamic range is greater than a seventh threshold.
[0088] In one case, if the dynamic range of the audio file to be selected is greater than the seventh threshold, it means that there is a problem of too large dynamic range in the audio file to be selected, but there is no problem that the loudness does not meet the output requirements, the clipping distortion, the background noise is over-amplified, the sound is sometimes louder and sometimes smaller, and the background noise is sometimes louder and sometimes smaller. The seventh threshold may refer to a range threshold, that is, the seventh threshold may represent a range. It means that the problem of too large dynamic range can be further judged whether it is tolerable, and then the audio file to be selected can be further judged to determine whether to send it to the terminal device. Further, if the dynamic range of the audio file to be selected is greater than the seventh threshold, step S210 can also be performed to determine the audio level of the audio file to be selected. If the dynamic range of the audio file to be selected is greater than the seventh threshold, it can be determined that the audio level of the audio file to be selected is the second level. The second level is higher than the third level, and it can be determined whether to send the audio file to the terminal device according to demand later.
[0089] In another case, if the dynamic range of the audio file to be selected is less than or equal to the seventh threshold, step S210 is executed to determine the audio level of the audio file to be selected. Among them, since the aforementioned steps are used to gradually determine whether there are problems such as excessive dynamic range, loudness not meeting output requirements, clipping distortion, excessive amplification of background noise, fluctuating sound, and fluctuating background noise in the audio file to be selected, when the dynamic range is greater than the seventh threshold, it means that none of the above problems exist in the audio file to be selected, which means that the effect of the audio file to be selected is good, and the audio file to be selected can be sent to the terminal device. Furthermore, if the dynamic range of the audio file to be selected is less than or equal to the seventh threshold, it can be determined that the audio level of the audio file to be selected is the first level, and the first level is higher than the second level.
[0090] S210: Determine the audio level of the audio file to be selected.
[0091] Here, the audio level can be used to reflect the audio quality of the audio file to be selected. The higher the audio level, the higher the audio quality of the corresponding audio file to be selected. The lower the audio level, the lower the audio quality of the corresponding audio file to be selected.
[0092] S211: If the audio level of the audio file to be selected is the first level, the audio file to be selected is determined as a target audio file, and the target audio file is sent to the terminal device.
[0093] Among them, when the audio level of the selected audio file is the first level, it means that the above-mentioned problem does not exist in the selected audio file, which means that the effect of the selected audio file is better. Then, the selected audio file can be determined as the target audio file and sent to the terminal device.
[0094] S212: If the audio level of the audio file to be selected is any one of the second level, the third level, and the fourth level, then the demand data is obtained, a target audio file is determined based on the demand data, and the target audio file is sent to the terminal device.
[0095] Among them, when the audio level of the audio file to be selected is higher than the quality threshold, it can be indicated that there are some problems in the audio file to be selected, and then it can be further determined whether to send the audio file to be selected based on the demand data. Among them, the demand data can be used to indicate the tolerance for various problems. If the tolerance is greater than the tolerance threshold, it means that the problem is tolerable. If the tolerance is less than or equal to the tolerance threshold, it means that the problem is not tolerable. For example, when the audio level of the audio file to be selected is the second level, the demand data is used to indicate that the tolerance for the problem of excessive dynamic range in the audio file to be selected is greater than the tolerance threshold, and then the audio file to be selected can be determined as the target audio file.
[0096] In one embodiment, the N audio files to be selected include audio files to be selected at multiple levels; the target audio file can be determined in combination with the demand data. Specifically, if the N audio files to be selected do not include the audio files to be selected at the first level, the demand data is obtained; based on the demand data, the audio files to be selected that match the demand data are selected from the audio files to be selected at multiple levels; and the audio files to be selected that match the demand data are determined as the target audio files.
[0097] Among them, the demand data can also be used to reflect the attention paid to various audio feature parameters of the audio file. If the attention is greater than the attention threshold, it means that the problem cannot be tolerated. If such a problem occurs, the selected audio file containing the problem will not be determined as the target audio file. If the attention is less than or equal to the attention threshold, it means that the problem can be tolerated. If such a problem occurs, the selected audio file containing the problem can be determined as the target audio file. The selected audio file that matches the demand data may refer to a selected audio file whose attention is less than the attention threshold, that is, a selected audio file that does not contain the problem corresponding to the demand data. For example, the demand data is used to reflect that the attention paid to the dynamic range of the audio file is greater than the attention threshold, indicating that the dynamic range in the selected audio file is too large. The selected audio file that matches the demand data may refer to a selected audio file that does not contain a dynamic range that is too large, and the selected audio file that matches the demand data may refer to a selected audio file that does not contain a dynamic range that is too large, and the selected audio file will not be determined as the target audio file.
[0098] It is understandable that the N audio files to be selected do not include the audio files to be selected of the fifth level. If the N audio files to be selected include the audio files to be selected of the fifth level, it means that the audio quality of the audio files to be selected is lower than the quality threshold, and the audio files to be selected are not determined as the target audio files, and the audio files to be selected other than the fifth level in the N audio files to be selected are subsequently processed, for example, based on the demand data, the audio files to be selected that match the demand data are selected from the audio files to be selected of multiple levels. If the N audio files to be selected include the audio files to be selected of the first level, it means that the quality of the audio files is higher, and the audio files to be selected of the first level can be directly determined as the target audio files, and there is no need to perform subsequent processing on the other audio files in the N audio files to be selected.
[0099] S213: If the audio level of the audio file to be selected is the fifth level, the initial audio file is determined as the target audio file, and the target audio file is sent to the terminal device.
[0100] When the audio level of the audio file to be selected is lower than the quality threshold, it means that there are many problems in the audio file to be selected, so the audio file to be selected may not be sent to the terminal device, and the initial audio file may be sent to the terminal device.
[0101] That is to say, the embodiment of the present application measures the effect of the loudness processing algorithm. If no serious effect problem occurs, the processed audio file can be sent down. If it is predicted that a serious effect problem occurs, other alternative loudness processing algorithms are used for processing and then sent down. Loudness processing algorithms such as loudness equalization algorithms also adjust the amplitude of each frame of audio signal (audio data) or each sampling point by multiplying the gain during the audio processing process. The characteristic value of the audio signal, such as the audio characteristic parameter statistics link, is an important link in inferring the loudness equalization effect. By using the loudness equalization algorithm to statistically evaluate the effect of the parameter gain in the signal processing process, the effect of each algorithm can be determined, thereby determining the audio file sent down to the terminal device.
[0102] In one embodiment, for any audio file to be selected among the N audio files to be selected, the audio feature parameters of the audio file to be selected include a maximum gain value, a gain value change rate, a gain peak number, a gain variance, a gain peak value, a loudness value, and a dynamic range of the audio file to be selected; if the maximum gain value of any audio file to be selected is less than or equal to a first threshold, the gain change rate of any audio file to be selected is less than or equal to a second threshold, the gain peak number of any audio file to be selected is less than or equal to a third threshold, the gain variance of any audio file to be selected is less than or equal to a fourth threshold, the gain peak value of any audio file to be selected is less than or equal to a fifth threshold, the loudness value of any audio file to be selected does not fall within a sixth threshold, and the dynamic range of any audio file to be selected is less than or equal to a seventh threshold, then it is determined that the audio level of the audio file to be selected belongs to the first level; and the audio file to be selected is determined as the target audio file.
[0103] In one embodiment, for any audio file to be selected among the N audio files to be selected, the audio feature parameters of the audio file to be selected include a maximum gain value, a gain value change rate, a gain peak number, a gain variance, a gain peak value, a loudness value, and a dynamic range of the audio file to be selected; if the maximum gain value of the audio file to be selected is less than or equal to the first threshold, the gain change rate of the audio file to be selected is less than or equal to the second threshold, the gain peak number of the audio file to be selected is less than or equal to the third threshold, the gain variance of the audio file to be selected is less than or equal to the fourth threshold, the gain peak value of the audio file to be selected is less than or equal to the fifth threshold, the loudness value of the audio file to be selected does not belong to the sixth threshold, and the dynamic range of the audio file to be selected is greater than the seventh threshold, then it is determined that the audio level of the audio file to be selected is the second level; and the audio file to be selected is determined as the target audio file.
[0104] In one embodiment, for any audio file to be selected among the N audio files to be selected, the audio feature parameters of the audio file to be selected include a maximum gain value, a gain value change rate, a gain peak number, a gain variance, a gain peak value, and a loudness value of the audio file to be selected; if the maximum gain value of the audio file to be selected is less than or equal to the first threshold, the gain change rate of the audio file to be selected is less than or equal to the second threshold, the gain peak number of the audio file to be selected is less than or equal to the third threshold, the gain variance of the audio file to be selected is less than or equal to the fourth threshold, the gain peak value of the audio file to be selected is less than or equal to the fifth threshold, and the loudness value of the audio file to be selected belongs to the sixth threshold, then it is determined that the audio level of the audio file to be selected is the third level; the audio quality of the audio file to be selected corresponding to the third level is lower than that of the audio file to be selected corresponding to the first level; and the audio file to be selected is determined as the target audio file.
[0105] In one embodiment, for any audio file to be selected among the N audio files to be selected, the audio feature parameters of the audio file to be selected include the maximum gain value, gain value change rate, gain peak number, gain variance, and gain peak value of the audio file to be selected; if the maximum gain value of the audio file to be selected is less than or equal to the first threshold, the gain change rate of the audio file to be selected is less than or equal to the second threshold, the gain peak number of the audio file to be selected is less than or equal to the third threshold, the gain variance of the audio file to be selected is less than or equal to the fourth threshold, and the gain peak value of the audio file to be selected is greater than the fifth threshold, then the audio level of the audio file to be selected is determined to be the fourth level; and the audio file to be selected is determined as the target audio file.
[0106] In one embodiment, for any audio file to be selected among the N audio files to be selected, the audio feature parameters of the audio file to be selected include the maximum gain value, gain value change rate, gain peak number, and gain variance of the audio file to be selected; if the maximum gain value of the audio file to be selected is less than or equal to the first threshold, the gain change rate of the audio file to be selected is less than or equal to the second threshold, the gain peak number of the audio file to be selected is less than or equal to the third threshold, and the gain variance of the audio file to be selected is greater than the fourth threshold, then the audio level of the audio file to be selected is determined to be the fifth level.
[0107] In one embodiment, if the maximum gain value of any audio file to be selected is less than or equal to the first threshold, the gain change rate of any audio file to be selected is less than or equal to the second threshold, and the gain peak number of any audio file to be selected is greater than the third threshold, then the audio level of any audio file to be selected is determined to be the fifth level.
[0108] In one embodiment, if the maximum gain value of any audio file to be selected is less than or equal to the first threshold, and the gain change rate of any audio file to be selected is greater than a second threshold, the audio level of any audio file to be selected is determined to be the fifth level.
[0109] In one embodiment, if the maximum gain value of any audio file to be selected is greater than a first threshold, the audio level of any audio file to be selected is determined to be the fifth level; the audio quality of the audio file to be selected corresponding to the fifth level is lower than the quality threshold. Further, if the audio level of any audio file to be selected belongs to the fifth level, the initial audio file is determined as the target audio file.
[0110] In an embodiment of the present application, the gain value generated by the loudness processing algorithm such as the loudness equalization algorithm can be statistically analyzed, and the amount of calculation is small. By using multiple statistics of the gain (i.e., audio feature parameters) to map the effect of loudness equalization, the effect of the loudness equalization algorithm can be judged from multiple dimensions with high accuracy. By storing the gain value of each frame of audio data in the form of a histogram, it is compatible with audio files of different lengths. Further, the inter-frame gain change of adjacent frames of audio data can be used to measure whether the audio file will have a problem of fluctuating. Further, the maximum gain value can be used to infer whether there is a problem of over-amplification of the background noise; and according to the tolerance for different problems, the audio feature parameters are measured and determined, and the audio file can be output in a targeted manner. If there is a candidate audio file that meets the requirements, that is, meets the corresponding parameter threshold, the candidate audio file can be output as the optimal result. Since this audio processing method does not require statistics of global audio signals or future audio signals throughout the process, and does not need to know the reference audio signal, it only needs to calculate the process value calculated by the statistical algorithm to achieve the evaluation of the effect, and the initial audio file can be streamed. Therefore, when evaluating the loudness equalization effect, the amount of calculation is small, the calculation process is simple, the delay is low, and it can be applied to a variety of scenarios. For example, in the on-demand platform, the overall ideal processing effect (such as the first-level audio file to be selected) can be selected and distributed according to the effect, thereby reducing user complaints, improving user experience, and realizing the control of the audio quality of the on-demand platform.
[0111] In the embodiment of the present application, multiple audio files to be selected are obtained by performing audio processing on the initial audio file using multiple loudness processing algorithms; then, the target audio file can be determined from the multiple audio files to be selected or the initial audio file based on the audio feature parameters of the multiple audio files to be selected, and the target audio file can be sent to the terminal device. The loudness of the audio file can be adjusted to a suitable range by the loudness processing algorithm. Since the effect of the audio files to be selected corresponding to the multiple loudness processing algorithms is evaluated, the effect of each audio file to be selected can be determined, so that the audio file with better effect can be selected for sending, which is equivalent to improving the quality of the audio file on the basis of the initial audio file, which can reduce the situation of audio harshness, thereby reducing damage to the human ear, reducing user complaints, and improving the user experience.
[0112] The method of the embodiment of the present application is introduced above, and the device of the embodiment of the present application is introduced below.
[0113] See also Figure 4 , Figure 4 : is a schematic diagram of the composition structure of an audio processing device provided in an embodiment of the present application. The above audio processing device can be deployed on a computer device; the audio processing device can be used to execute the corresponding steps in the audio processing method provided in an embodiment of the present application. The audio processing device 40 includes:
[0114] The audio processing unit 401 is used to obtain an initial audio file, and respectively use N loudness processing algorithms in the algorithm set to perform audio processing on the initial audio file to obtain N audio files to be selected; one loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer;
[0115] The parameter acquisition unit 402 is used to respectively acquire audio feature parameters of the N audio files to be selected; the audio feature parameters are used to indicate the audio quality of the audio files to be selected;
[0116] The file determining unit 403 is used to determine a target audio file from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected, and send the target audio file to the terminal device.
[0117] Optionally, the initial audio file includes M frames of audio data; the audio processing unit 401 is specifically configured to:
[0118] Using each loudness processing algorithm of the N loudness processing algorithms to process the M frames of audio data in the initial audio file, respectively, to obtain gain values of the M frames of audio data corresponding to each loudness processing algorithm; one frame of audio data corresponds to one gain value, and the gain value of the audio data is used to reflect the volume of the audio data;
[0119] Determine the N audio files to be selected based on the gain values of the M frames of audio data corresponding to the N loudness processing algorithms respectively;
[0120] The parameter acquisition unit 402 is specifically used for:
[0121] Based on the gain values of the M frames of audio data corresponding to the N loudness processing algorithms respectively, audio feature parameters of the N to-be-selected audio files are determined.
[0122] Optionally, the file determining unit 403 is specifically configured to:
[0123] Acquire a target strategy, and determine the audio levels of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected; the target strategy includes parameter thresholds corresponding to the audio feature parameters of the audio files to be selected, and the audio level is used to reflect the audio quality of the audio files to be selected;
[0124] Based on the audio levels of the N audio files to be selected, the target audio file is determined from the N audio files to be selected or the initial audio file; the target audio file is one of the N audio files to be selected and the initial audio file.
[0125] Optionally, for any audio file to be selected from the N audio files to be selected, the audio feature parameters of the audio file to be selected include the maximum gain value, gain value change rate, gain peak number, gain variance, gain peak value, loudness value, and dynamic range of the audio file to be selected; the file determination unit 403 is specifically used to:
[0126] If the maximum gain value of any of the selected audio files is less than or equal to the first threshold, the gain change rate of any of the selected audio files is less than or equal to the second threshold, the gain peak number of any of the selected audio files is less than or equal to the third threshold, the gain variance of any of the selected audio files is less than or equal to the fourth threshold, the gain peak value of any of the selected audio files is less than or equal to the fifth threshold, the loudness value of any of the selected audio files does not fall within the sixth threshold, and the dynamic range of any of the selected audio files is less than or equal to the seventh threshold, then it is determined that the audio level of any of the selected audio files belongs to the first level; and the audio quality of the selected audio files corresponding to the first level is higher than the quality threshold;
[0127] If the audio level of any audio file to be selected belongs to the first level, then the audio file to be selected is determined as the target audio file.
[0128] Optionally, for any audio file to be selected from the N audio files to be selected, the audio feature parameters of the audio file to be selected include the maximum gain value, gain value change rate, gain peak number, gain variance, gain peak value, loudness value, and dynamic range of the audio file to be selected; the file determination unit 403 is specifically used to:
[0129] If the maximum gain value of any of the selected audio files is less than or equal to the first threshold, the gain change rate of any of the selected audio files is less than or equal to the second threshold, the gain peak number of any of the selected audio files is less than or equal to the third threshold, the gain variance of any of the selected audio files is less than or equal to the fourth threshold, the gain peak value of any of the selected audio files is less than or equal to the fifth threshold, the loudness value of any of the selected audio files does not fall within the sixth threshold, and the dynamic range of any of the selected audio files is greater than the seventh threshold, then it is determined that the audio level of any of the selected audio files is the second level; and the audio quality of the selected audio files corresponding to the second level is lower than that of the selected audio files corresponding to the first level;
[0130] If the audio level of any audio file to be selected belongs to the second level, then the audio file to be selected is determined as the target audio file.
[0131] Optionally, for any audio file to be selected from the N audio files to be selected, the audio feature parameters of the audio file to be selected include a maximum gain value, a gain value change rate, a gain peak number, a gain variance, a gain peak value, and a loudness value of the audio file to be selected; the file determination unit 403 is specifically used to:
[0132] If the maximum gain value of any of the selected audio files is less than or equal to the first threshold, the gain change rate of any of the selected audio files is less than or equal to the second threshold, the gain peak number of any of the selected audio files is less than or equal to the third threshold, the gain variance of any of the selected audio files is less than or equal to the fourth threshold, the gain peak value of any of the selected audio files is less than or equal to the fifth threshold, and the loudness value of any of the selected audio files belongs to the sixth threshold, then it is determined that the audio level of any of the selected audio files is the third level; and the audio quality of the selected audio file corresponding to the third level is lower than that of the selected audio file corresponding to the first level;
[0133] If the audio level of any of the to-be-selected audio files belongs to the third level, then the to-be-selected audio file is determined as the target audio file.
[0134] Optionally, for any audio file to be selected from the N audio files to be selected, the audio feature parameters of the audio file to be selected include the maximum gain value, gain value change rate, gain peak number, gain variance, and gain peak value of the audio file to be selected; the file determination unit 403 is specifically used to:
[0135] If the maximum gain value of any of the selected audio files is less than or equal to the first threshold, the gain change rate of any of the selected audio files is less than or equal to the second threshold, the gain peak number of any of the selected audio files is less than or equal to the third threshold, the gain variance of any of the selected audio files is less than or equal to the fourth threshold, and the gain peak value of any of the selected audio files is greater than the fifth threshold, then it is determined that the audio level of any of the selected audio files is the fourth level; the audio quality of the selected audio file corresponding to the fourth level is lower than that of the selected audio file corresponding to the first level;
[0136] If the audio level of any audio file to be selected belongs to the fourth level, then the audio file to be selected is determined as the target audio file.
[0137] Optionally, the N audio files to be selected include audio files to be selected of multiple levels; the file determination unit 403 is specifically configured to:
[0138] If the N audio files to be selected do not include the first level audio file to be selected, then obtain demand data; the demand data is used to reflect the attention paid to multiple audio feature parameters of the audio file;
[0139] Selecting, based on the demand data, a candidate audio file that matches the demand data from the multiple levels of candidate audio files;
[0140] The audio file to be selected that matches the demand data is determined as the target audio file.
[0141] Optionally, for any audio file to be selected from the N audio files to be selected, the audio feature parameters of the audio file to be selected include the maximum gain value, gain value change rate, gain peak number, and gain variance of the audio file to be selected; the file determination unit 403 is specifically used to:
[0142] If the maximum gain value of any of the selected audio files is less than or equal to the first threshold, the gain change rate of any of the selected audio files is less than or equal to the second threshold, the gain peak number of any of the selected audio files is less than or equal to the third threshold, and the gain variance of any of the selected audio files is greater than the fourth threshold, then the audio level of any of the selected audio files is determined to be the fifth level; or
[0143] If the maximum gain value of any audio file to be selected is less than or equal to the first threshold, the gain change rate of any audio file to be selected is less than or equal to the second threshold, and the gain peak number of any audio file to be selected is greater than the third threshold, then the audio level of any audio file to be selected is determined to be the fifth level; or
[0144] If the maximum gain value of any audio file to be selected is less than or equal to the first threshold, and the gain change rate of any audio file to be selected is greater than the second threshold, then determining the audio level of any audio file to be selected is the fifth level; or,
[0145] If the maximum gain value of any of the selected audio files is greater than the first threshold, determining that the audio level of any of the selected audio files is the fifth level; and the audio quality of the selected audio file corresponding to the fifth level is lower than the quality threshold;
[0146] If the audio level of any of the to-be-selected audio files belongs to the fifth level, the initial audio file is determined as the target audio file.
[0147] It should be noted that Figure 4 For the contents not mentioned in the corresponding embodiments, please refer to the description of the method embodiments, which will not be repeated here.
[0148] In the embodiment of the present application, multiple audio files to be selected are obtained by performing audio processing on the initial audio file using multiple loudness processing algorithms; then, the target audio file can be determined from the multiple audio files to be selected or the initial audio file based on the audio feature parameters of the multiple audio files to be selected, and the target audio file can be sent to the terminal device. The loudness of the audio file can be adjusted to a suitable range by the loudness processing algorithm. Since the effect of the audio files to be selected corresponding to the multiple loudness processing algorithms is evaluated, the effect of each audio file to be selected can be determined, so that the audio file with better effect can be selected for sending, which is equivalent to improving the quality of the audio file on the basis of the initial audio file, which can reduce the situation of audio harshness, thereby reducing damage to the human ear, reducing user complaints, and improving the user experience.
[0149] See also Figure 5 , Figure 5 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 5As shown, the above-mentioned computer device 50 may include: a processor 501, a network interface 504 and a memory 505. In addition, the above-mentioned computer device 50 may also include: a user interface 503, and at least one communication bus 502. Among them, the communication bus 502 is used to realize the connection and communication between these components. Among them, the user interface 503 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 503 may also include a standard wired interface and a wireless interface. The network interface 504 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 505 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 505 may optionally also be at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0150] exist Figure 5 In the computer device 50 shown, the network interface 504 can provide a network communication function; the user interface 503 is mainly used to provide an input interface for the user; and the processor 501 can be used to call the device control application stored in the memory 505 to achieve:
[0151] Obtain an initial audio file, and respectively use N loudness processing algorithms in the algorithm set to perform audio processing on the initial audio file to obtain N audio files to be selected; one loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer;
[0152] Acquire audio feature parameters of the N audio files to be selected respectively; the audio feature parameters are used to indicate the audio quality of the audio files to be selected;
[0153] A target audio file is determined from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected, and the target audio file is sent to the terminal device.
[0154] It should be understood that the computer device 50 described in the embodiment of the present application can execute the above Figure 2 and Figure 3 The description of the above audio processing method in the corresponding embodiment can also be performed as described above. Figure 4 The description of the audio processing device in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.
[0155] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, which includes program instructions, which, when executed by a computer, causes the computer to execute the method of the aforementioned embodiment, and the computer may be part of the computer device mentioned above. For example, it is the above-mentioned processor 501. As an example, the program instructions may be deployed on a computer device for execution, or deployed on multiple computer devices located at one location for execution, or, executed on multiple computer devices distributed at multiple locations and interconnected by a communication network, and multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain network.
[0156] Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0157] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. An audio processing method, characterized in that: The method comprises: Acquire an initial audio file, use each loudness processing algorithm in the algorithm set to process M frames of audio data in the initial audio file respectively, and obtain gain values of the M frames of audio data corresponding to each loudness processing algorithm; one frame of audio data corresponds to one gain value, and the gain value of the audio data is used to reflect the volume of the audio data. One loudness processing algorithm corresponds to M gain values, and the algorithm set includes N loudness processing algorithms; one loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer; Based on the gain values of the M frames of audio data corresponding to each loudness processing algorithm, each audio file to be selected is determined to obtain the N audio files to be selected; one audio file to be selected includes the gain values of the M frames of audio data corresponding to one loudness processing algorithm, and the N loudness processing algorithms correspond to M*N gain values; Based on the gain values of the M frames of audio data corresponding to each loudness processing algorithm, determine the audio feature parameters of each of the to-be-selected audio files to obtain the audio feature parameters of the N to-be-selected audio files; the audio feature parameters are used to indicate the audio quality of the to-be-selected audio files; Determine a target audio file from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected, and send the target audio file to the terminal device; The step of determining a target audio file from the N audio files to be selected or the initial audio file based on the audio feature parameters of the N audio files to be selected comprises: Acquire a target strategy, and determine the audio levels of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected; the audio level is used to reflect the audio quality of the audio files to be selected, and the target strategy means that if the audio feature parameters of the audio files to be selected meet the parameter threshold corresponding to the audio feature parameters of the audio files to be selected, then it is determined that the audio level of the audio files to be selected is greater than the level threshold; if the audio feature parameters of the audio files to be selected do not meet the parameter threshold corresponding to the audio feature parameters of the audio files to be selected, then it is determined that the audio level of the audio files to be selected is less than or equal to the level threshold; The target audio file is determined from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected.
2. The method according to claim 1, characterized in that For any of the N audio files to be selected, determining the audio level of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected includes: If the maximum gain value of any of the selected audio files is less than or equal to the first threshold, the gain change rate of any of the selected audio files is less than or equal to the second threshold, the gain peak number of any of the selected audio files is less than or equal to the third threshold, the gain variance of any of the selected audio files is less than or equal to the fourth threshold, the gain peak value of any of the selected audio files is less than or equal to the fifth threshold, the loudness value of any of the selected audio files does not fall within the sixth threshold, and the dynamic range of any of the selected audio files is less than or equal to the seventh threshold, it is determined that the audio level of any of the selected audio files belongs to the first level; and the audio quality of the selected audio files corresponding to the first level is higher than the quality threshold; The step of determining the target audio file from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected comprises: If the audio level of any of the to-be-selected audio files belongs to the first level, the any of the to-be-selected audio files is determined as the target audio file.
3. The method according to claim 2, characterized in that The step of determining the audio levels of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected includes: If the maximum gain value of any of the to-be-selected audio files is less than or equal to the first threshold, the gain change rate of any of the to-be-selected audio files is less than or equal to the second threshold, the gain peak number of any of the to-be-selected audio files is less than or equal to the third threshold, the gain variance of any of the to-be-selected audio files is less than or equal to the fourth threshold, the gain peak value of any of the to-be-selected audio files is less than or equal to the fifth threshold, the loudness value of any of the to-be-selected audio files does not fall within the sixth threshold, and the dynamic range of any of the to-be-selected audio files is greater than the seventh threshold, then it is determined that the audio level of any of the to-be-selected audio files is the second level; and the audio quality of the to-be-selected audio files corresponding to the second level is lower than that of the to-be-selected audio files corresponding to the first level; The step of determining the target audio file from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected comprises: If the audio level of any of the to-be-selected audio files belongs to the second level, the any of the to-be-selected audio files is determined as the target audio file.
4. The method according to claim 3, characterized in that: The step of determining the audio levels of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected includes: If the maximum gain value of any of the to-be-selected audio files is less than or equal to the first threshold, the gain change rate of any of the to-be-selected audio files is less than or equal to the second threshold, the gain peak number of any of the to-be-selected audio files is less than or equal to the third threshold, the gain variance of any of the to-be-selected audio files is less than or equal to the fourth threshold, the gain peak value of any of the to-be-selected audio files is less than or equal to the fifth threshold, and the loudness value of any of the to-be-selected audio files belongs to the sixth threshold, then it is determined that the audio level of any of the to-be-selected audio files is the third level; and the audio quality of the to-be-selected audio files corresponding to the third level is lower than that of the to-be-selected audio files corresponding to the first level; The step of determining the target audio file from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected comprises: If the audio level of any of the to-be-selected audio files belongs to the third level, the any of the to-be-selected audio files is determined as the target audio file.
5. The method according to claim 4, characterized in that The step of determining the audio levels of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected includes: If the maximum gain value of any of the to-be-selected audio files is less than or equal to the first threshold, the gain change rate of any of the to-be-selected audio files is less than or equal to the second threshold, the gain peak number of any of the to-be-selected audio files is less than or equal to the third threshold, the gain variance of any of the to-be-selected audio files is less than or equal to the fourth threshold, and the gain peak value of any of the to-be-selected audio files is greater than the fifth threshold, then it is determined that the audio level of any of the to-be-selected audio files is the fourth level; and the audio quality of the to-be-selected audio files corresponding to the fourth level is lower than that of the to-be-selected audio files corresponding to the first level; The step of determining the target audio file from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected comprises: If the audio level of any of the to-be-selected audio files belongs to the fourth level, the any of the to-be-selected audio files is determined as the target audio file.
6. The method according to any one of claims 3 to 5, characterized in that: The N audio files to be selected include audio files to be selected at multiple levels; The step of determining the target audio file from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected comprises: If the N audio files to be selected do not include the audio file to be selected at the first level, then acquiring demand data; the demand data is used to reflect the attention paid to multiple audio feature parameters of the audio file; Selecting, based on the demand data, a candidate audio file that matches the demand data from the candidate audio files of the multiple levels; The audio file to be selected that matches the requirement data is determined as the target audio file.
7. The method according to claim 5, characterized in that The step of determining the audio levels of the N audio files to be selected based on the target strategy and the audio feature parameters of the N audio files to be selected includes: If the maximum gain value of any of the to-be-selected audio files is less than or equal to the first threshold, the gain change rate of any of the to-be-selected audio files is less than or equal to the second threshold, the gain peak number of any of the to-be-selected audio files is less than or equal to the third threshold, and the gain variance of any of the to-be-selected audio files is greater than the fourth threshold, then the audio level of any of the to-be-selected audio files is determined to be the fifth level; or If the maximum gain value of any of the to-be-selected audio files is less than or equal to the first threshold, the gain change rate of any of the to-be-selected audio files is less than or equal to the second threshold, and the gain peak number of any of the to-be-selected audio files is greater than the third threshold, then determining that the audio level of any of the to-be-selected audio files is the fifth level; or If the maximum gain value of any of the to-be-selected audio files is less than or equal to the first threshold, and the gain change rate of any of the to-be-selected audio files is greater than the second threshold, then determining that the audio level of any of the to-be-selected audio files is the fifth level; or, If the maximum gain value of any of the to-be-selected audio files is greater than the first threshold, determining that the audio level of any of the to-be-selected audio files is the fifth level; and the audio quality of the to-be-selected audio files corresponding to the fifth level is lower than the quality threshold; The step of determining the target audio file from the N audio files to be selected or the initial audio file based on the audio levels of the N audio files to be selected comprises: If the audio level of any of the to-be-selected audio files belongs to the fifth level, the initial audio file is determined as the target audio file.
8. An audio processing device, characterized in that: The device comprises: an audio processing unit, configured to obtain an initial audio file, and process M frames of audio data in the initial audio file respectively using each loudness processing algorithm in the algorithm set, to obtain a gain value of the M frames of audio data corresponding to each loudness processing algorithm; one frame of audio data corresponds to one gain value, the gain value of the audio data is used to reflect the volume of the audio data, one loudness processing algorithm corresponds to M gain values, the algorithm set includes N loudness processing algorithms; one loudness processing algorithm corresponds to one audio file to be selected, and N is a positive integer; The audio processing unit is further used to determine each audio file to be selected based on the gain value of the M frames of audio data corresponding to each loudness processing algorithm, so as to obtain the N audio files to be selected; one audio file to be selected includes the gain value of the M frames of audio data corresponding to one loudness processing algorithm, and the N loudness processing algorithms correspond to M*N gain values; a parameter acquisition unit, configured to determine the audio feature parameters of each of the to-be-selected audio files based on the gain values of the M frames of audio data corresponding to each of the loudness processing algorithms, so as to obtain the audio feature parameters of the N to-be-selected audio files; the audio feature parameters are used to indicate the audio quality of the to-be-selected audio files; A file determining unit, configured to determine a target audio file from the N audio files to be selected or the initial audio file based on audio feature parameters of the N audio files to be selected, and send the target audio file to a terminal device; The file determination unit is specifically used to obtain a target strategy, and determine the audio levels of the N to-be-selected audio files based on the target strategy and the audio feature parameters of the N to-be-selected audio files; the audio level is used to reflect the audio quality of the to-be-selected audio files, and the target strategy means: if the audio feature parameters of the to-be-selected audio files meet the parameter threshold corresponding to the audio feature parameters of the to-be-selected audio files, then it is determined that the audio level of the to-be-selected audio files is greater than the level threshold; if the audio feature parameters of the to-be-selected audio files do not meet the parameter threshold corresponding to the audio feature parameters of the to-be-selected audio files, then it is determined that the audio level of the to-be-selected audio files is less than or equal to the level threshold; based on the audio levels of the N to-be-selected audio files, the target audio file is determined from the N to-be-selected audio files or the initial audio file.
9. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code so that the computer device executes the method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Audio processing method and device, electronic equipment and storage medium
CN110312146A
Audio processing method and device
CN112151055A