Audio playing method and device, electronic equipment and storage medium
Through the combination of audio signal feature decomposition and historical information, the problem of poor experience of traditional audio playback in complex environments is solved, the refined processing of audio signals is realized, and the quality and user experience of audio playback are improved.
Patent Information
- Application Number
- CN202411286907.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-20
AI Technical Summary
Traditional audio playback methods cannot effectively process the received audio signals, especially in complex environments, users have poor listening experience and lack flexibility.
Multiple groups of audio signals are obtained by decomposing the characteristic of the audio signal based on the audio signal, and the audio signal to be processed is determined based on the historical reception information of the device, and pre-processing such as noise reduction, equalization and compression are carried out to improve the clarity and sound quality of the audio.
It significantly improves the quality and user experience of audio playback, improves the intelligence level of audio playback, enhances targetedness and practicality, and provides a purer and more realistic audio experience.
Smart Images

Figure CN119170030A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of audio processing, and more specifically, relates to an audio playing method and device, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of electronic devices and software technology, audio playback has become an indispensable part of modern life. Whether it is a smartphone, tablet, computer, or smart home device, audio playback functions are built-in to meet users' diverse audio needs.
[0003] Traditional audio playback methods are unable to effectively process received audio signals and are not flexible enough in playback control, which seriously affects the user's listening experience in complex environments. Summary of the invention
[0004] The purpose of the present disclosure is to provide an audio playback method and device, an electronic device, and a storage medium to solve the problem of poor listening experience of users in complex environments.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an audio playback method, which is applied to a first device and includes: Decomposing the received audio signal based on the characteristics of the audio signal to obtain multiple groups of first audio signals; Determine a second audio signal to be processed based on the time domain characteristics of the multiple groups of first audio signals and the historical reception information of the first device; the first device is a device that receives the audio signal, and the second audio signal is one or more groups of the multiple groups of first audio signals; The second audio signal is preprocessed to obtain a first target audio signal, and the first target audio signal is played.
[0006] According to a second aspect of an embodiment of the present disclosure, there is provided an audio playback device, which is applied to a first device and includes: a decomposition module, configured to decompose the received audio signal based on the characteristics of the received audio signal to obtain a plurality of groups of first audio signals; A first determination module is configured to determine a second audio signal to be processed based on time domain features of the multiple groups of first audio signals and historical reception information of the first device; the first device is a device that receives the audio signal, and the second audio signal is one or more groups of the multiple groups of first audio signals; The processing module is used to pre-process the second audio signal to obtain a first target audio signal, and play the first target audio signal.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned audio playback method when executing the computer program.
[0008] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned audio playback method are implemented.
[0009] The audio playback method and device, electronic device, and storage medium provided by the embodiments of the present disclosure have the following beneficial effects: The present disclosure significantly improves the quality of audio playback and the personalized experience of users through refined processing. First, the present disclosure can perform intelligent decomposition based on multiple features of the audio signal to effectively separate different components in the mixed signal. Secondly, the present disclosure combines the historical reception information of the device to accurately identify and prioritize the audio parts that the user is most concerned about, greatly enhancing the pertinence and practicality of the playback. Finally, through pre-processing technologies such as noise reduction, equalization and compression, the clarity and sound quality of the audio are further improved, and noise interference is reduced, allowing users to enjoy a purer and more realistic audio experience. Overall, the present disclosure can not only improve the intelligence level of audio playback, but also bring users a better quality of auditory enjoyment. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 A flowchart of an audio playback method provided by an embodiment of the present disclosure; Figure 2 A structural block diagram of an audio playback device provided in an embodiment of the present disclosure; Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0013] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0014] Please refer to Figure 1 , Figure 1 A flowchart of an audio playback method provided in an embodiment of the present disclosure is provided, the method comprising: S101: Decomposing an audio signal based on a feature of a received audio signal to obtain a plurality of groups of first audio signals.
[0015] In this embodiment, the audio signal received by the first device is a mixed signal, such as a mixed signal of voice and ambient noise during a voice call, a mixed signal of music, human voice and ambient sound during a musical, etc. There are many characteristics of audio signals, such as spectral characteristics (spectral range, spectral distribution), time domain characteristics (waveform shape, time domain characteristic parameters), signal characteristics (periodicity, randomness), etc.
[0016] Decomposing the audio signal based on the features of the received audio signal to obtain multiple groups of first audio signals can be understood as: The audio signal is decomposed based on the frequency spectrum characteristics of the received audio signal to obtain multiple groups of first audio signals; or the audio signal is decomposed based on the time domain characteristics of the received audio signal to obtain multiple groups of first audio signals; or the audio signal is decomposed based on the signal characteristics of the received audio signal to obtain multiple groups of first audio signals.
[0017] The audio signal is decomposed based on the time domain characteristics of the received audio signal to obtain multiple groups of first audio signals. Different types of audio signals usually have different energy levels. For example, the short-time energy of a speech signal usually has obvious fluctuations when speaking, while the short-time energy of a music signal is relatively stable. Therefore, the first audio signal can be speech signals of different speakers, music signals of different instruments, etc.
[0018] The audio signal is decomposed to obtain multiple groups of first audio signals, wherein the decomposition method may be a method based on a filter bank, a method based on a signal processing algorithm, or a method based on machine learning. In this embodiment, a decomposition method based on machine learning may be used, for example, a deep neural network (such as a convolutional neural network, a recurrent neural network, etc.) is used to perform feature learning and decomposition on the audio signal. Through a large amount of training data, the network can automatically learn the potential structure and feature representation of the audio signal, thereby achieving effective decomposition.
[0019] S102: Determine a second audio signal to be processed based on time domain features of multiple groups of first audio signals and historical reception information of a first device; the first device is a device that receives audio signals, and the second audio signal is one or more of the multiple groups of first audio signals.
[0020] In this embodiment, each group of first audio signals has time domain features. Time domain features refer to the performance in the time dimension, such as the duration of the signal, the change of amplitude over time, the start and end time of the signal, etc. By analyzing these time domain features, the time characteristics of the first audio signal can be understood. For example, the time domain waveform of the speech signal is relatively complex and contains many details and changes, such as the pronunciation process of initials and finals. The time domain waveform of the music signal is usually relatively regular and has a certain degree of repeatability and symmetry.
[0021] The historical reception information is information about the characteristics, types, sources, etc. of the audio signals received by the first device in the past. Such information can help determine the currently received audio signal and determine the second audio signal to be processed. For example, if the source of the audio signal received by the first device in the past is a voice call, then the second audio signal can be a voice signal; if the source of the audio signal received by the first device in the past is a song played on a CD, then the first audio signal can be a music signal.
[0022] Determining the second audio signal to be processed based on the time domain features of the multiple groups of first audio signals and the historical reception information of the first device can be understood as: Time domain features include the duration of the signal, the change of amplitude over time, the start and end time of the signal, etc. Preliminary classification is performed based on the typical time domain features of different types of audio signals. For example, a signal with a complex time domain waveform and containing many detailed changes is initially judged as a speech signal; a signal with a regular waveform, repetitiveness and symmetry is initially judged as a music signal, etc.
[0023] Check the historical reception information of the first device to understand the characteristics, types and sources of the audio signals received in the history. If the historical reception information shows that the history mainly receives audio signals related to voice calls, then the audio playback device (equivalent to the first device) is more inclined to determine the first audio signal with similar time domain characteristics of the voice signal as the second audio signal to be processed among the current multiple groups of first audio signals. For example, if a group of first audio signals has a short duration, complex amplitude changes and obvious vocalization start and end characteristics, it can be treated as the second audio signal for priority processing.
[0024] If the historical reception information of the first device indicates that multiple types of audio signals were often processed simultaneously in the past, for example, in some work scenarios, it is necessary to process audio signals of voice calls while paying attention to specific prompt sound signals and background music signals. Then, when the audio signal is received again and decomposed into multiple groups of first audio signals, the audio playback device will simultaneously determine the multiple groups of first audio signals with voice features, prompt sound features, and music features as second audio signals to be processed based on historical habits.
[0025] For the first audio signal whose time domain characteristics are not obvious or whose type is difficult to directly determine, other factors in the historical reception information can be comprehensively considered. For example, if the historical reception information shows that a certain type of audio notification is frequently received recently, then even if the time domain characteristics of the audio signal are not typical, it can be further analyzed as a possible second audio signal.
[0026] S103: Preprocess the second audio signal to obtain a first target audio signal, and play the first target audio signal.
[0027] In this embodiment, the second audio signal is preprocessed to obtain the first target audio signal, including: performing noise reduction processing, equalization processing, and compression processing on the second audio signal to obtain the first target audio signal. The noise reduction processing includes determining the noise reduction method according to the noise characteristics, and adjusting the parameters of the noise reduction method according to the noise characteristics and the characteristics of the second audio signal. For example, in the spectral subtraction method, it is necessary to adjust the time window length of the noise estimation, the noise reduction coefficient and other parameters; in the Wiener filtering method, it is necessary to adjust the length, step size and other parameters of the filter; in the adaptive filtering method, it is necessary to select a suitable adaptive algorithm and adjust the initial parameters of the filter.
[0028] The equalization process includes determining the target of the equalization process according to the characteristics of the second audio signal, and selecting a suitable equalizer for processing according to the target of the equalization process. For example, in a graphic equalizer, the gain value of each frequency point needs to be adjusted; in a parametric equalizer, the three parameters of center frequency, bandwidth and gain need to be adjusted; in a digital equalizer, the corresponding parameters need to be adjusted according to specific algorithms and application requirements.
[0029] The compression process includes analyzing the dynamic range of the second audio signal, determining the target of the compression process according to the characteristics of the second audio signal, selecting a target compressor according to the target of the compression process, and adjusting the compression parameters of the target compressor according to the characteristics of the audio signal and the target of the compression process. For example, in a hardware compressor, it is necessary to adjust parameters such as compression ratio, threshold, attack time, and release time; in a software compressor, it is necessary to adjust corresponding parameters according to specific algorithms and application requirements.
[0030] After the preprocessing is completed, the audio playback device can play the first target audio signal to the user through the built-in speaker. During the playback process, the device will decode and convert according to the format and parameters of the audio to ensure that the audio can be played correctly. For example, for a digital audio file, the device needs to decode it into an analog audio signal before it can be played through the speaker. During the playback process, the device can also optimize the audio signal played by itself so that the audio signal heard by the user is the most comfortable.
[0031] From the above, it can be concluded that the present disclosure significantly improves the quality of audio playback and the personalized experience of users through refined processing. First, the present disclosure can perform intelligent decomposition based on multiple features of the audio signal to effectively separate different components in the mixed signal. Secondly, the present disclosure combines the historical reception information of the device to accurately identify and prioritize the audio parts that the user is most concerned about, greatly enhancing the pertinence and practicality of the playback. Finally, through pre-processing technologies such as noise reduction, equalization and compression, the clarity and sound quality of the audio are further improved, and noise interference is reduced, allowing users to enjoy a purer and more realistic audio experience. In general, the present disclosure can not only improve the intelligence level of audio playback, but also bring users a better quality of auditory enjoyment.
[0032] In one embodiment of the present disclosure, determining a second audio signal to be processed based on time domain features of multiple groups of first audio signals and historical reception information of a first device includes: Determine the environmental characteristics of the first device according to the historical received information of the first device; A second audio signal to be processed is determined based on time domain characteristics of multiple groups of first audio signals and characteristics of an environment in which the first device is located.
[0033] In this embodiment, the historical reception information includes the type, frequency, source, etc. of the audio signals received by the audio playback device in the past, and the environmental characteristics of the device are determined based on the above information of the audio signal. If the historical reception information shows that the audio signal mainly comes from a specific radio station, it means that the device is in a home or car environment, and the user has the habit of listening to the radio. If the music signal accounts for a large proportion in the historical reception information, and most of them are music of a specific style, the device is in a leisure and entertainment place such as a cafe, bar, etc.; if the historical reception information is mainly voice signals, the device is in a conference room, classroom, etc.
[0034] The time domain features of the multiple groups of first audio signals can be extracted using a time domain analysis method (such as directly observing waveforms, calculating short-time energy, zero crossing rate, etc.). Common time domain features include signal amplitude, amplitude, period, duration, short-time energy, zero crossing rate, etc.
[0035] If the music playback device is in an office environment, the first audio signal with clear voice features (such as obvious pronunciation start and end, relatively stable amplitude change) is processed as the second audio signal. The importance of voice communication in an office environment is relatively high. If the music playback device is in a music performance venue environment, the first audio signal with a regular rhythm, a specific frequency distribution and a first duration is processed as the second audio signal. The importance of music signals in music performance venues is relatively high.
[0036] From the above, it can be concluded that this embodiment identifies the current environment characteristics by combining the historical reception information of the first device, and then combines it with the time domain characteristics of multiple groups of first audio signals to accurately screen out the second audio signal to be processed that best meets the current environment requirements. This method can significantly improve the intelligence level of audio processing, ensure that the audio content is adapted to the environment, enhance the personalization and comfort of the user experience, and at the same time reduce unnecessary audio processing and improve the efficiency of audio processing.
[0037] In one embodiment of the present disclosure, the audio playback method further includes: Calculating an error value between the quality of a first target audio signal played by the first device and the quality of a preset audio signal; Determine the preset playback parameters of the PI controller based on the information input by the user, and input the error value into the PI controller to obtain the corresponding playback parameter adjustment amount; The quality of the first target audio signal played by the first device is adjusted based on the playback parameter adjustment amount.
[0038] In this embodiment, calculating the error value between the quality of the first target audio signal played by the first device and the quality of the preset audio signal includes: A measurement index of audio signal quality is determined, and an error value between the quality of a first target audio signal played by the first device and the quality of a preset audio signal is calculated according to the measurement index of audio signal quality.
[0039] Metrics for measuring audio signal quality include signal-to-noise ratio, total harmonic distortion, frequency response, etc. For example, the signal-to-noise ratio is the ratio of signal power to noise power. The higher the ratio, the better the quality of the audio signal. Error value E=Q ref -Q actual , where Q ref Indicates the quality of the preset audio signal, Q actual Indicates the quality of the first target audio signal played by the first device.
[0040] The information input by the user may be preference information of audio features or environment information. The preference information includes volume preference, timbre preference, equalization setting preference, etc. The environment information may be a quiet environment, a noisy environment, etc.
[0041] Determining the preset playback parameters of the PI controller based on the information input by the user can be understood as converting the information input by the user into specific preset playback parameter characteristics. In response to the information input by the user being the preference information of the audio characteristics, the preset volume parameters, timbre parameters and equalization setting parameters are determined according to the preference information of the audio characteristics; in response to the information input by the user being the environmental information, the preset volume parameters and timbre parameters are determined according to the environmental information.
[0042] For example, if the user clearly indicates that they prefer loud, medium, or low volume, a relative volume level range can be set directly. For example, the loud volume can be set to 70%-100% of the device volume, the medium volume to 40%-70%, and the low volume to 10%-40%. When the user inputs "I like the sound to be louder", indicating their preference for a higher volume, the volume parameter is set to 70%-100% of the device volume.
[0043] According to the information input by the user, "enhance low frequency, weaken high frequency", the gain of different frequency bands is directly adjusted. For example, enhancing low frequency can increase the gain of low frequency band (such as 20Hz-250Hz) by 3-6dB, and weakening high frequency can reduce the gain of high frequency band (such as 5kHz-20kHz) by 2-5dB.
[0044] The working principle of PI controller is: The PI controller consists of two parts: proportional and integral. The proportional part immediately generates an adjustment based on the current error value, while the integral part processes the accumulated error to eliminate the steady-state error. The output of the PI controller is a playback parameter adjustment that combines the proportional and integral effects.
[0045] The error value is input into the PI controller to obtain the corresponding playback parameter adjustment amount, and the quality of the first target audio signal played by the first device is adjusted based on the playback parameter adjustment amount. For example, the first device is a smart speaker, and the user hopes to hear high-quality music playback effects from the smart speaker. The preset audio signal quality is based on high signal-to-noise ratio and balanced frequency response. First, when the smart speaker plays music, the system analyzes the currently played audio signal in real time. By comparing parameters such as the signal-to-noise ratio and frequency response of the actual played audio with the preset standard, the error value is calculated. For example, if the actual played audio signal-to-noise ratio is lower than the preset value, a corresponding error will be generated. Then, this error value is input into the PI controller. The PI controller performs operations based on the preset proportional coefficient and integral coefficient. If the error is large, the proportional part will quickly generate a large playback parameter adjustment amount, such as increasing the volume or adjusting the gain of a specific frequency band. At the same time, the integral part will accumulate errors over time and further adjust the playback parameters to eliminate steady-state errors.
[0046] Assuming that the current error value indicates that the low-frequency part of the audio is insufficient, the PI controller calculates a playback parameter adjustment amount to instruct the smart speaker to increase the gain of the low-frequency band. After receiving this adjustment amount, the smart speaker immediately adjusts the audio equalization setting to increase the volume of the low-frequency part, making the played music fuller.
[0047] During the playback process, the device continuously repeats the above steps, monitors the audio quality in real time and calculates the error value, inputs it into the PI controller to obtain the new playback parameter adjustment amount, and continuously adjusts the playback parameters of the smart speaker. In this way, the smart speaker can gradually approach the preset audio quality standard and provide users with a better music playback experience.
[0048] It can be concluded from the above that this embodiment can automatically adjust the quality of the first target audio signal played by the first device through the PI controller according to the error between the quality of the actually played audio and the preset audio, thereby improving the audio playback quality.
[0049] In one embodiment of the present disclosure, the audio playback method further includes: In response to the noise level of the environment in which the first device is located being less than a first noise threshold, updating the playback parameter adjustment amount according to the first step; In response to the noise of the environment in which the first device is located being greater than or equal to the first noise threshold, the playback parameter adjustment amount is updated according to a second step length; the first step length is smaller than the second step length.
[0050] In this embodiment, when the noise of the environment in which the first device is located is less than the first noise threshold, it means that the environment is relatively quiet, and the playback parameter adjustment amount can be updated according to the smaller first step length. At this time, the adjustment of the playback parameter will be relatively smooth, which can maintain the clarity and details of the audio and avoid abrupt volume changes or sound effect adjustments in a quiet environment.
[0051] When the noise of the environment in which the first device is located is greater than or equal to the first noise threshold, it means that the environment is relatively complex, and the playback parameter adjustment amount can be updated according to the larger second step size. The adjustment of the playback parameter will be relatively rapid, so that the user can quickly and clearly hear the audio content in a noisy environment.
[0052] It can be concluded from the above that this embodiment can dynamically adjust the playback parameter adjustment step size according to the environmental noise, so that the audio playback device can better adapt to different environmental conditions. Whether it is a quiet indoor or noisy outdoor, it can provide users with a relatively high-quality audio experience.
[0053] In one embodiment of the present disclosure, determining preset playback parameters of the PI controller based on information input by a user includes: In response to the noise of the environment in which the first device is located being less than a first noise threshold, determining a preset playback parameter of the PI controller based on information input by a user; In response to the noise of the environment in which the first device is located being greater than or equal to a first noise threshold, a preset playback parameter of the PI controller is determined based on information input by a user and the noise of the environment in which the first device is located.
[0054] In this embodiment, the preset playback parameters of the PI controller are related to the environment in which the first device is located. When the noise of the environment in which the first device is located is less than the first noise threshold, it means that the current environment is relatively quiet, and the influence of the environmental noise can be ignored. The preset playback parameters of the PI controller can be determined based on the information input by the user. When the noise of the environment in which the first device is located is greater than or equal to the first noise threshold, the environment is relatively noisy. At this time, it is necessary to consider the influence of the user input information and the environmental noise on the preset playback parameters of the PI controller.
[0055] For example, when the noise in the environment where the first device is located is less than the first noise threshold, the proportional coefficient and integral coefficient of the PI controller are set relatively small, because in an environment with low noise, the error of the audio signal is relatively small and does not require overly strong adjustments. When the noise in the environment where the first device is located is greater than or equal to the first noise threshold, the proportional coefficient and integral coefficient are set relatively large. In order to quickly respond to changes in audio quality in a noisy environment, a stronger adjustment force is required. Larger proportional coefficients and integral coefficients can enable the PI controller to adjust the error more quickly to meet the audio playback requirements in a noisy environment.
[0056] In one embodiment of the present disclosure, the error value is input into the PI controller to obtain the corresponding playback parameter adjustment amount, including: The error value is input into the first formula to obtain the corresponding playback parameter adjustment amount, and the first formula includes:
[0057] Among them, Q represents the adjustment amount of the playback parameters, represents the first proportionality coefficient, represents the error value, represents the first integral coefficient, Indicates the cumulative value of the error from the beginning to the current moment.
[0058] In one embodiment of the present disclosure, the error value is input into the PI controller to obtain the corresponding playback parameter adjustment amount, including: In response to the error value being a negative number, adjusting a first proportional coefficient of the PI controller within a first time period, and adjusting a first integral coefficient of the PI controller within a second time period; In response to the error value being a positive number, a first integral coefficient of the PI controller is adjusted within a first time period.
[0059] Adjust the first proportional coefficient of the PI controller, including: If the noise of the environment in which the first device is located is less than the first noise threshold, adjusting the first proportional coefficient of the PI controller to the second proportional coefficient; If the noise of the environment in which the first device is located is greater than or equal to the first noise threshold, adjusting the first proportional coefficient of the PI controller to a third proportional coefficient; The second proportionality coefficient is smaller than the third proportionality coefficient.
[0060] The second proportionality coefficient is calculated according to the second formula, which is:
[0061] Where a and b are preset adjustment factors; N is the measured value of the current environmental noise; N max is the maximum noise reference value; Q ref Indicates the quality of the preset audio signal, Q actual Indicates the quality of the first target audio signal played by the first device; Is a positive number.
[0062] In this embodiment, a and b are used to control the size range of the proportional coefficient, and a and b can be determined according to the performance of the audio playback device. For example, if the audio playback device is more sensitive to changes in audio quality, smaller values of a and b are required to avoid over-adjustment; if the audio playback device responds relatively slowly, larger values of a and b are required to speed up the adjustment speed.
[0063] It is the maximum noise reference value set, indicating the maximum noise level that may occur. This expression makes the value of this part close to 1 when the noise is small, and gradually decreases as the noise increases, thereby reflecting the influence of noise on the proportional coefficient. is a very small positive number used to prevent the denominator from being zero.
[0064] In the second formula, when the ambient noise of the first device is less than the first noise threshold, the second proportional coefficient calculated by this formula is relatively small. This is because in a quiet environment, the deviation of the audio signal from the preset quality standard does not need to adjust the playback parameters too much, and a smaller proportional coefficient can avoid over-adjustment and ensure the stability and comfort of audio playback.
[0065] The third proportionality coefficient is calculated according to the third formula, which is:
[0066] Where c and d are preset adjustment factors; N is the measured value of the current environmental noise; N max is the maximum noise reference value; Q ref Indicates the quality of the preset audio signal, Q actual Indicates the quality of the first target audio signal played by the first device; Is a positive number.
[0067] It is the maximum noise reference value set, indicating the maximum noise level that may occur. This expression makes the value of this part greater than 1 when the noise is large, and gradually increases as the noise increases, thereby reflecting the influence of noise on the proportional coefficient.
[0068] In this embodiment, the PI controller generally includes a proportional module and an integral module, and correspondingly, each preset playback parameter includes a proportional coefficient of the proportional module and an integral coefficient of the integral module. By adjusting the preset playback parameters, the listening needs of different users can be met.
[0069] If the error value is a negative number, it indicates that the quality of the first target audio signal played by the first device does not meet the quality of the preset audio signal. At this time, you can choose to improve the quality of the first target audio signal as quickly as possible by adjusting the first proportional coefficient of the PI controller within the first time length, and then fine-tune it by adjusting the first integral coefficient of the PI controller within the second time length.
[0070] The error value is a positive number, indicating that the quality of the first target audio signal played by the first device has reached the quality of the preset audio signal, and overadjustment may have occurred. At this time, for the user, there is no need to quickly adjust the quality of the first target audio signal played by the first device to the quality of the preset audio signal. Therefore, you can choose to slowly adjust the quality of the first target audio signal by adjusting the first integral coefficient of the PI controller within the first time length.
[0071] It can be concluded from the above that this embodiment achieves precise control of the quality of the first target audio signal by adjusting different parameters of the PI controller according to the positive or negative error value. When the error is negative, adjusting the proportional coefficient can quickly improve the audio quality; when the error is positive, adjusting the integral coefficient slowly avoids over-adjustment to meet different listening needs. At the same time, the use of the PI controller can flexibly adapt to various situations and improve the adaptability and stability of audio playback.
[0072] In an embodiment of the present disclosure, decomposing an audio signal based on a feature of a received audio signal to obtain a plurality of groups of first audio signals includes: Extracting features of the audio signal according to the features of the audio signal to obtain a first feature vector; The first eigenvector is input into a decomposition model for decomposition to obtain a plurality of groups of first audio signals.
[0073] In this embodiment, the first feature vector is obtained by extracting features from the audio signal. The first feature vector is a digital representation of the audio signal, which compresses the complex information of the audio signal into a vector for subsequent processing and analysis. The dimension and specific content of the first feature vector depend on the feature extraction method used.
[0074] For example, feature extraction based on Short-Time Fourier Transform (STFT): Assuming that the audio signal is framed, each frame is N sampling points long, and the dimension of the feature vector obtained after STFT is usually M×K, where M is the number of frequency bins and K is the number of time frames. Each element in the first feature vector represents the amplitude or energy value at a specific time frame and frequency bin. For example, an element in the feature vector can represent the audio signal strength at a specific frequency at a certain moment.
[0075] For example, feature extraction based on deep learning (such as convolutional neural networks): The dimension of the first feature vector depends on the network structure and design. The first feature vector may include the encoding of a specific sound pattern in the audio signal, distinguishing features of different sound sources, etc.
[0076] The decomposition model is a tool specifically used to process audio signal decomposition tasks. It can be built based on machine learning algorithms, deep learning architectures, or traditional signal processing methods. The purpose of the decomposition model is to decompose the input first eigenvector into multiple groups of first audio signals. These first audio signals can represent different components or characteristics of the audio signal, such as signals in different frequency ranges, signals from different sound sources, signals from different time segments, etc. The multiple groups of first audio signals obtained by decomposition can be further used for various audio processing tasks, such as audio enhancement, noise removal, sound source separation, audio classification, etc. By processing different first audio signals separately, the audio processing goals can be better achieved and the audio processing quality can be improved. It can be concluded from the above that this embodiment achieves multi-dimensional analysis of complex audio signals by accurately capturing the first eigenvector of the audio signal and finely dividing it with the help of the decomposition model, providing richer materials for subsequent audio processing.
[0077] In one embodiment of the present disclosure, preprocessing the second audio signal to obtain the first target audio signal includes: In response to the second audio signal being a first type of signal, preprocessing the second audio signal according to the type of the second audio signal to obtain a first target audio signal; In response to the second audio signal being a second type of signal, preprocessing the plurality of groups of first audio signals respectively to obtain first target audio signals; The number of types of audio signals in the first type of signal is smaller than the number of types of audio signals in the second type of signal.
[0078] In this embodiment, the first type of signal represents a single type of audio signal. When the second audio signal is a single type of audio signal, the second audio signal is preprocessed according to the type of the second audio signal to obtain the first target audio signal: When the second audio signal is a speech signal, the second audio signal is subjected to noise reduction, echo cancellation and speech enhancement processing to obtain the first target audio signal; when the second audio signal is a music signal, the second audio signal is subjected to equalization processing, compression processing and reverberation processing to obtain the first target audio signal.
[0079] The second type of signal represents a plurality of different types of audio signals. When the second audio signal is a plurality of different types of audio signals, the plurality of groups of first audio signals are preprocessed to obtain the first target audio signal: When the second audio signal is a combination signal of a speech signal and a music signal, the speech signal is subjected to noise reduction, echo cancellation and speech enhancement processing to obtain a temporary speech signal, the music signal is subjected to equalization processing, compression processing and reverberation processing to obtain a temporary music signal, and the temporary speech signal and the temporary music signal are combined to obtain the first target audio signal.
[0080] Voice signals often contain environmental noise, such as fan noise, air conditioning noise, and traffic noise. Noise reduction algorithms can be used to remove these noises and improve voice clarity. In voice communications, echo problems may occur, affecting call quality. Echo cancellation algorithms can be used to remove echoes and improve voice intelligibility. For voice signals with low signal-to-noise ratios, voice enhancement algorithms can be used to improve voice quality.
[0081] The frequency range of music signals is relatively wide, and the frequency distribution of different instruments and human voices is also different. You can use an equalizer to adjust the frequency response of the music signal to balance the volume of different frequency components. The dynamic range of music signals is relatively large. In order to make the music have a better performance on different playback devices, you can use a compressor to compress the music signal. The compressor can control the dynamic range of the music signal, so that the part with a larger volume is compressed and the part with a smaller volume is boosted, so that the overall volume of the music is more stable. Appropriate reverberation can make music sound more natural and spatial. You can use a reverberator to add reverberation effects to music signals.
[0082] It can be concluded from the above that this embodiment implements differentiated preprocessing strategies by distinguishing audio signal types. For single-type audio, targeted optimization is performed directly; for multi-type mixed audio, detailed decomposition and separate processing are performed to ensure that each audio element receives the best processing effect. This method not only improves the flexibility and accuracy of audio processing, but also significantly enhances the quality of the final audio output and user experience.
[0083] Corresponding to the audio playing method of the above embodiment, Figure 2 This is a structural block diagram of an audio playback device provided by an embodiment of the present disclosure. For ease of description, only the parts related to the embodiment of the present disclosure are shown. Figure 2 The audio playback device 20 includes: a decomposition module 21, a first determination module 22 and a processing module 23.
[0084] The decomposition module 21 is used to decompose the audio signal based on the characteristics of the received audio signal to obtain multiple groups of first audio signals; A first determination module 22 is used to determine a second audio signal to be processed based on time domain features of multiple groups of first audio signals and historical reception information of the first device; the first device is a device that receives audio signals, and the second audio signal is one or more groups of the multiple groups of first audio signals; The processing module 23 is used to pre-process the second audio signal to obtain a first target audio signal, and play the first target audio signal.
[0085] In one embodiment of the present disclosure, the first determining module 22 is specifically configured to: Determine the environmental characteristics of the first device according to the historical received information of the first device; A second audio signal to be processed is determined based on time domain characteristics of multiple groups of first audio signals and characteristics of an environment in which the first device is located.
[0086] In one embodiment of the present disclosure, the processing module 23 is further configured to: Calculating an error value between the quality of a first target audio signal played by the first device and the quality of a preset audio signal; Determine the preset playback parameters of the PI controller based on the information input by the user, and input the error value into the PI controller to obtain the corresponding playback parameter adjustment amount; The quality of the first target audio signal played by the first device is adjusted based on the playback parameter adjustment amount.
[0087] In one embodiment of the present disclosure, the processing module 23 is further configured to: In response to the noise level of the environment in which the first device is located being less than a first noise threshold, updating the playback parameter adjustment amount according to the first step; In response to the noise of the environment in which the first device is located being greater than or equal to the first noise threshold, the playback parameter adjustment amount is updated according to a second step length; the first step length is smaller than the second step length.
[0088] In one embodiment of the present disclosure, the processing module 23 is further specifically configured to: The error value is input into the first formula to obtain the corresponding playback parameter adjustment amount, and the first formula includes:
[0089] Among them, Q represents the adjustment amount of the playback parameters, represents the first proportionality coefficient, represents the error value, represents the first integral coefficient, Indicates the cumulative value of the error from the beginning to the current moment.
[0090] In one embodiment of the present disclosure, the decomposition module 21 is specifically used to: Extracting features of the audio signal according to the features of the audio signal to obtain a first feature vector; The first eigenvector is input into a decomposition model for decomposition to obtain a plurality of groups of first audio signals.
[0091] In one embodiment of the present disclosure, the processing module 23 is specifically used to: In response to the second audio signal being a first type of signal, preprocessing the second audio signal according to the type of the second audio signal to obtain a first target audio signal; In response to the second audio signal being a second type of signal, preprocessing the plurality of groups of first audio signals respectively to obtain first target audio signals; The number of types of audio signals in the first type of signal is smaller than the number of types of audio signals in the second type of signal.
[0092] See also Figure 3 , Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 3 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 23 are shown.
[0093] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0094] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0095] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0096] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the audio playback method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.
[0097] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0098] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0099] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0103] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0104] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. An audio playback method, characterized in that: Applied to a first device, comprising: Decomposing the received audio signal based on the characteristics of the audio signal to obtain multiple groups of first audio signals; Determine a second audio signal to be processed based on the time domain characteristics of the multiple groups of first audio signals and the historical reception information of the first device; the first device is a device that receives the audio signal, and the second audio signal is one or more groups of the multiple groups of first audio signals; The second audio signal is preprocessed to obtain a first target audio signal, and the first target audio signal is played.
2. The audio playback method according to claim 1, wherein: Determining a second audio signal to be processed based on the time domain features of the multiple groups of first audio signals and historical reception information of the first device includes: Determining characteristics of the environment in which the first device is located according to historical reception information of the first device; A second audio signal to be processed is determined based on the time domain characteristics of the multiple groups of first audio signals and characteristics of the environment in which the first device is located.
3. The audio playback method according to claim 1, wherein: Also includes: Calculating an error value between the quality of a first target audio signal played by the first device and the quality of a preset audio signal; Determine the preset playback parameters of the PI controller based on the information input by the user, and input the error value into the PI controller to obtain the corresponding playback parameter adjustment amount; The quality of the first target audio signal played by the first device is adjusted based on the playback parameter adjustment amount.
4. The audio playback method according to claim 3, characterized in that: Also includes: In response to the noise level of the environment in which the first device is located being less than a first noise threshold, updating the playback parameter adjustment amount according to the first step; In response to the noise of the environment in which the first device is located being greater than or equal to a first noise threshold, updating the playback parameter adjustment amount according to a second step length; The first step length is smaller than the second step length.
5. The audio playback method according to claim 3, characterized in that: The step of inputting the error value into a PI controller to obtain a corresponding playback parameter adjustment amount includes: The error value is input into a first formula to obtain a corresponding playback parameter adjustment amount, wherein the first formula includes: Among them, Q represents the adjustment amount of the playback parameters, represents the first proportionality coefficient, represents the error value, represents the first integral coefficient, Indicates the cumulative value of the error from the beginning to the current moment.
6. The audio playback method according to claim 1, characterized in that: The step of decomposing the audio signal based on the feature of the received audio signal to obtain a plurality of groups of first audio signals includes: Extracting features of the audio signal according to the features of the audio signal to obtain a first feature vector; The first feature vector is input into a decomposition model for decomposition to obtain multiple groups of first audio signals.
7. The audio playback method according to claim 1, wherein: The preprocessing of the second audio signal to obtain the first target audio signal includes: In response to the second audio signal being a first type of signal, preprocessing the second audio signal according to the type of the second audio signal to obtain a first target audio signal; In response to the second audio signal being a second type of signal, preprocessing the plurality of groups of first audio signals respectively to obtain first target audio signals; The number of types of audio signals in the first type of signals is smaller than the number of types of audio signals in the second type of signals.
8. An audio playback device, characterized in that: Applied to a first device, comprising: a decomposition module, configured to decompose the received audio signal based on the characteristics of the received audio signal to obtain a plurality of groups of first audio signals; A first determination module is configured to determine a second audio signal to be processed based on time domain features of the multiple groups of first audio signals and historical reception information of the first device; the first device is a device that receives the audio signal, and the second audio signal is one or more groups of the multiple groups of first audio signals; The processing module is used to pre-process the second audio signal to obtain a first target audio signal, and play the first target audio signal.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
