Audio gain control method and system for Bluetooth sound box
By designing an audio gain control system for Bluetooth speakers, extracting the amplitude level and frequency segments of the audio signal, as well as environmental noise impact factors, and building a gain matrix to determine the final audio gain, the problem that Bluetooth speakers cannot dynamically adjust the audio gain in different environments is solved, and high-quality audio playback and user experience improvement are achieved.
Patent Information
- Application Number
- CN202411803688.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-10
AI Technical Summary
Bluetooth speakers cannot dynamically adjust the audio gain in different environments, resulting in audio distortion in quiet environments or audio is flooded with noise in noisy environments, which cannot meet users' needs for high-quality audio playback.
An audio gain control system is designed to extract the amplitude level and frequency segment of the audio signal, as well as the environmental noise impact factor, through the audio acquisition module, the preprocessing module, the audio processing module, the noise acquisition module and the noise processing module, and build a gain matrix to determine the final audio gain, and amplify or attenuate the audio signal.
It realizes automatic adjustment of audio gain based on audio signal characteristics and ambient noise, improving audio playback quality and user experience, ensuring that the audio can be clearly and audible in different environments, avoiding distortion or being overwhelmed by noise.
Smart Images

Figure CN119729290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of audio gain control, and in particular to an audio gain control method and system for a Bluetooth speaker. Background Art
[0002] With the widespread use of Bluetooth speakers in various scenarios, such as indoor and outdoor gatherings, personal music appreciation, voice calls, etc., users have put forward higher and higher requirements for their audio playback quality. The environment in which Bluetooth speakers are located is complex and changeable, and the noise level in different environments varies greatly, from a quiet library to a noisy street or a lively party scene, which poses a major challenge to the accurate transmission and clear playback of audio signals.
[0003] In traditional audio processing technology, Bluetooth speakers often use fixed audio gain settings, and cannot dynamically adjust the gain according to the characteristics of the audio signal itself and changes in the surrounding environment. This results in the audio being distorted in a quiet environment due to excessive gain, affecting the sound quality; while in a noisy environment, the audio may be drowned out by noise and difficult to hear due to insufficient gain. For example, when playing soft classical music, a fixed high gain may distort the subtle notes in the music and destroy the beauty of the music; while when listening to voice navigation or conference calls in a noisy outdoor environment, low gain will cause the voice information to be masked by ambient noise and cannot be effectively conveyed.
[0004] In addition, the audio signal itself has rich amplitude and frequency characteristics, and audio of different amplitudes and frequency bands has different effects on the overall auditory effect. In the past, there was a lack of accurate analysis and targeted processing of these characteristics, which made it difficult to achieve balanced optimization of each audio frequency band, unable to fully tap the audio performance potential of Bluetooth speakers, and unable to meet users' demand for high-quality audio playback in diverse audio content and complex environments. Therefore, there is an urgent need for a control system that can automatically and accurately adjust the audio gain according to the audio signal characteristics and environmental noise conditions, so as to improve the audio playback quality and user experience of Bluetooth speakers in various usage scenarios. Summary of the invention
[0005] The purpose of the present invention is to provide an audio gain control method and system for a Bluetooth speaker, which solves the technical problems raised in the background technology.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] An audio gain control system for a Bluetooth speaker, comprising:
[0008] The audio acquisition module is used to acquire the audio signal input from the Bluetooth speaker at a specified sampling frequency;
[0009] A pre-processing module, used for performing pre-emphasis processing on the audio signal collected within a time length T;
[0010] The audio processing module is used to perform signal feature extraction processing on the audio signal after pre-emphasis for a time length T, and extract the amplitude level and different frequency bands of the audio signal;
[0011] A noise collection module is used to collect noise signals in the environment where the Bluetooth speaker is located at a specified sampling frequency;
[0012] The noise processing module is used to analyze the noise impact of the noise signal collected within the time length T, and then obtain the environmental noise impact factor;
[0013] A gain analysis unit, used to determine the final audio gain according to the amplitude level, frequency band and environmental noise impact factor of the audio signal;
[0014] The gain output unit is used to apply the calculated final audio gain to the audio signal, amplify or attenuate the audio signal to obtain a processed audio signal, and then output the processed audio signal through the Bluetooth speaker.
[0015] As a further solution of the present invention: the pre-emphasis processing method is as follows:
[0016] The audio signal collected within the time length T is marked as X i , i=1, 2, ... n;
[0017] Then through:
[0018] Y i =X i -α×X i-1
[0019] Calculate the pre-emphasized audio signal Y i .
[0020] As a further solution of the present invention: the signal feature extraction processing method is as follows:
[0021] Step F1: extract the pre-emphasized audio signal Y i ;
[0022] Step F2: Signal Amplitude Feature Extraction
[0023] Step F2.1, by:
[0024]
[0025] Calculate the pre-emphasized audio signal Y i The root mean square value RMS is used as the signal amplitude feature;
[0026] Step F2.2, dividing the audio signal into amplitude levels according to the signal amplitude feature RMS combined with the corresponding preset amplitude thresholds T1 and T2;
[0027] Specifically:
[0028] If RMS < T1, the audio signal is judged as a low-amplitude signal;
[0029] If T1≤RMS≤T2, the audio signal is judged as a medium amplitude signal;
[0030] If RMS ≥ T2, the audio signal is judged as a high-amplitude signal;
[0031] Step F3: Signal frequency feature extraction
[0032] Step F3.1: pre-emphasize the audio signal Y i Perform fast Fourier transform and get the spectrum of the audio signal, which is recorded as Y k , where k is the frequency bin number;
[0033] The frequency bin number is an index used to mark different frequency bands in the spectrum;
[0034] Step F3.2, then pass:
[0035]
[0036] Calculate the center frequency Fc of the spectrum;
[0037] Where N represents the number of points for fast Fourier transform operation, that is, the length of the input discrete signal sequence;
[0038] Step F3.3, dividing the audio signal into frequency segments according to the center frequency Fc of the spectrum combined with the corresponding preset frequency thresholds F1 and F2;
[0039] Specifically:
[0040] If Fc<F1, the audio signal is judged as a low-frequency signal;
[0041] If F1≤Fc≤F2, the audio signal is judged as an intermediate frequency signal;
[0042] If Fc≥F2, the audio signal is judged as a high-frequency signal.
[0043] As a further solution of the present invention: wherein the sampling frequencies of the noise signal and the audio signal are both set to f, the acquisition time length is T, and the number of data points collected is n, and n=f×T.
[0044] As a further solution of the present invention: the noise impact analysis method is as follows:
[0045] First, the noise signal collected within the time length T is marked as C i , i=1, 2, ... n;
[0046] Then through:
[0047]
[0048] Calculate the energy EC of the environmental noise signal;
[0049] Then the energy EC of the environmental noise signal is compared with the noise energy threshold ECy, and the environmental noise impact factor is determined based on the comparison result:
[0050] When EC<ECy, the value of the environmental noise impact factor is 1;
[0051] When EC ≥ ECy, then:
[0052]
[0053] Calculate the environmental noise impact factor β;
[0054] Where k is the preset proportionality coefficient.
[0055] As a further solution of the present invention: the final audio gain is determined as follows:
[0056] Step E1, constructing a 3×3 gain matrix;
[0057] Step E3: extract the corresponding gain value from the gain matrix according to the amplitude level and frequency band of the audio signal, and use it as the initial gain value of the audio signal, and record it as G0, that is, G0=G ij ;
[0058] Step E4, extracting environmental noise impact factor β;
[0059] Step E5, by:
[0060] GU=G0×β
[0061] Calculate the final audio gain GU.
[0062] As a further solution of the present invention: the gain matrix is used to store the corresponding gain values under different audio feature combinations;
[0063] The gain matrix is represented by a two-dimensional matrix as follows:
[0064]
[0065] Among them, the rows correspond to the amplitude levels, the columns correspond to the frequency bands, and G ij Indicates the gain values corresponding to different audio feature combinations, i=1, 2, 3, which correspond to low amplitude signals, medium amplitude signals, and high amplitude signals respectively, and j=1, 2, 3, which correspond to low frequency signals, medium frequency signals, and high frequency signals respectively;
[0066] The gain value is a coefficient pre-set based on different audio feature combinations, which is used to adjust the audio gain according to the amplitude and frequency characteristics of the audio signal; the corresponding gain values under different audio feature combinations are based on comprehensive considerations of audio perception, device performance, and audio playback effects in different environments, and are empirical values determined through a large number of audio test experiments.
[0067] As a further solution of the present invention: in the gain output unit, the processing formula of the audio signal is as follows:
[0068] Z i =GU×Y i
[0069] In the formula, Z i is the processed audio signal.
[0070] A method for controlling audio gain of a Bluetooth speaker, the method is implemented by the audio gain control system for a Bluetooth speaker, and the method comprises the following steps:
[0071] The first step: information collection:
[0072] The audio signal inputted into the Bluetooth speaker is collected at a specified sampling frequency, and the noise signal of the environment where the Bluetooth speaker is located is collected at a specified sampling frequency;
[0073] Step 2: Preprocessing
[0074] Performing pre-emphasis processing on the audio signal collected within the time length T;
[0075] Step 3: Data Processing
[0076] The audio signal after pre-emphasis in the time length T is processed by signal feature extraction, and the amplitude level and different frequency bands of the audio signal are extracted; at the same time, the noise signal collected in the time length T is analyzed for noise impact, and the environmental noise impact factor is obtained;
[0077] Step 4: Gain Analysis
[0078] Determine the final audio gain according to the amplitude level, frequency band and environmental noise impact factor of the audio signal;
[0079] Step 5: Gain Output
[0080] The calculated final audio gain is applied to the audio signal, the audio signal is amplified or attenuated to obtain a processed audio signal, and then the processed audio signal is output through the Bluetooth speaker.
[0081] Beneficial effects of the present invention:
[0082] Improve audio playback quality: By pre-emphasizing the audio signal, the performance of the audio signal in the subsequent processing link can be optimized, the recognizability of the signal characteristics can be enhanced, and the audio can be adjusted more accurately, thereby improving the overall playback quality. The final audio gain is determined based on the amplitude level of the audio signal, different frequency bands, and environmental noise influencing factors. The audio can be amplified or attenuated in a targeted manner according to the audio's own characteristics and the environmental conditions, so that the audio can better restore the original sound effect when playing, avoiding situations such as the sound being too small to be heard or too loud to be distorted.
[0083] Adapt to different environments: In terms of considering the impact of environmental noise, the noise signal of the environment where the Bluetooth speaker is located is collected, and the noise impact analysis is performed to obtain the environmental noise impact factor, which is used to participate in the determination of the final audio gain. In this way, the Bluetooth speaker can adaptively adjust the audio gain in environments with different noise levels, such as quiet indoors and noisy outdoors, to ensure the audibility and clarity of the audio, and enhance the user experience of using the Bluetooth speaker in various environments.
[0084] Accurate audio feature processing: In the signal feature extraction and processing stage, the audio signal is carefully divided from the two dimensions of amplitude feature and frequency feature. Through scientific and reasonable calculation methods, such as calculating the root mean square value to determine the amplitude level, using fast Fourier transform and related calculations to determine the frequency band, etc., the characteristics of the audio signal are accurately grasped, laying the foundation for the subsequent accurate determination of the appropriate audio gain; the constructed gain matrix is used to store the corresponding gain values under different audio feature combinations. These gain values are based on a comprehensive consideration of audio perception, device performance, and audio playback effects in different environments, and are empirical values determined through a large number of audio test experiments, which further ensures that the most appropriate gain adjustment strategy is matched according to the specific audio characteristics to achieve accurate audio gain control. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The present invention will be further described below in conjunction with the accompanying drawings.
[0086] Figure 1 The present invention is a system block diagram of an audio gain control method and system for a Bluetooth speaker.
[0087] Figure 2 The present invention is a flowchart of an audio gain control method and system for a Bluetooth speaker. DETAILED DESCRIPTION
[0088] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0089] Embodiment 1
[0090] See also Figure 1 and Figure 2 As shown, the present invention is an audio gain control system for a Bluetooth speaker, comprising:
[0091] The audio acquisition module is used to acquire the audio signal input from the Bluetooth speaker at a specified sampling frequency;
[0092] The sampling frequency of the audio signal is set to f, the acquisition time length is T, and the number of data points collected is n, and n=f×T;
[0093] A pre-processing module, used for performing pre-emphasis processing on the audio signal collected within a time length T;
[0094] The specific method is as follows:
[0095] The audio signal collected within the time length T is marked as X i , i=1, 2, ... n;
[0096] Then through:
[0097] Y i =X i -α×X i-1
[0098] Calculate the pre-emphasized audio signal Y i ;
[0099] An audio processing module, used for performing signal feature extraction processing on the audio signal after pre-emphasis for a time length T;
[0100] The specific method is as follows:
[0101] Step F1: extract the pre-emphasized audio signal Y i ;
[0102] Step F2: Signal Amplitude Feature Extraction
[0103] Step F2.1, by:
[0104]
[0105] Calculate the pre-emphasized audio signal Y i The root mean square value RMS is used as the signal amplitude feature;
[0106] Step F2.2, dividing the audio signal into amplitude levels according to the signal amplitude feature RMS combined with the corresponding preset amplitude thresholds T1 and T2;
[0107] Specifically:
[0108] If RMS < T1, the audio signal is judged as a low-amplitude signal;
[0109] If T1≤RMS≤T2, the audio signal is judged as a medium amplitude signal;
[0110] If RMS ≥ T2, the audio signal is judged as a high-amplitude signal;
[0111] Step F3: Signal frequency feature extraction
[0112] Step F3.1: pre-emphasize the audio signal Y i Perform fast Fourier transform and get the spectrum of the audio signal, which is recorded as Y k , where k is the frequency bin number;
[0113] In this embodiment, the fast Fourier transform is an algorithm for efficiently calculating the discrete Fourier transform, which is used to convert a discrete signal in the time domain to the frequency domain. In simple terms, it is to convert an audio signal originally described by time as an independent variable into a form described by frequency components and their corresponding amplitudes and phases. It is a prior art, so it will not be described in detail.
[0114] The frequency bin number is an index used to mark different frequency bands in the spectrum;
[0115] Step F3.2, then pass:
[0116]
[0117] Calculate the center frequency Fc of the spectrum;
[0118] Where N represents the number of points for fast Fourier transform operation, that is, the length of the input discrete signal sequence;
[0119] In this embodiment, the reason why only k=1 to k=N / 2 are considered is that the part greater than N / 2 is conjugate symmetric to the first half, and for real signals, the information contained therein is redundant to a certain extent, and the main frequency energy distribution and characteristic information can be well described by the positive frequency part. Therefore, when calculating the centroid frequency, only the spectrum points in the first half, i.e., the spectrum points from k=1 to k=N / 2, need to be considered, so that the spectrum information can be more effectively used to obtain a centroid frequency value that can represent the center position of the signal frequency distribution;
[0120] Step F3.3, dividing the audio signal into frequency segments according to the center frequency Fc of the spectrum combined with the corresponding preset frequency thresholds F1 and F2;
[0121] Specifically:
[0122] If Fc<F1, the audio signal is judged as a low-frequency signal;
[0123] If F1≤Fc≤F2, the audio signal is judged as an intermediate frequency signal;
[0124] If Fc≥F2, the audio signal is judged as a high-frequency signal.
[0125] This embodiment 1 optimizes the audio signal through pre-emphasis processing and enhances the signal characteristics for subsequent processing. By calculating the root mean square value to determine the signal amplitude characteristics and divide the amplitude levels, and using fast Fourier transform to calculate the frequency center of gravity of the spectrum and divide the frequency bands, the amplitude and frequency characteristics of the audio signal can be accurately extracted, laying the foundation for subsequent processing based on audio characteristics, helping to improve the accuracy and pertinence of audio processing, thereby improving the fineness of the audio playback effect, so that the audio can more accurately restore the sound details when the speaker is played, so that the audience can have a better listening experience.
[0126] Embodiment 2
[0127] As the second embodiment of the present invention, when the present application is implemented, compared with the first embodiment, the technical solution of the present embodiment is different from that of the first embodiment only in that the present embodiment further includes:
[0128] A noise collection module is used to collect noise signals in the environment where the Bluetooth speaker is located at a specified sampling frequency;
[0129] Among them, the sampling frequency of the noise signal is set to f, the acquisition time length is T, and the number of data points collected is n;
[0130] A noise processing module is used to analyze the noise impact of the noise signal collected within the time length T;
[0131] The specific method is as follows:
[0132] First, the noise signal collected within the time length T is marked as C i , i=1, 2, ... n;
[0133] Then through:
[0134]
[0135] Calculate the energy EC of the environmental noise signal;
[0136] Then the energy EC of the environmental noise signal is compared with the noise energy threshold ECy, and the environmental noise impact factor is determined based on the comparison result:
[0137] When EC<ECy, the value of the environmental noise impact factor is 1;
[0138] When EC ≥ ECy, then:
[0139]
[0140] Calculate the environmental noise impact factor β;
[0141] Where k is the preset proportionality coefficient;
[0142] A gain analysis unit, used to determine an audio gain value according to an amplitude level, a frequency band and an environmental noise influence factor of an audio signal;
[0143] The specific method is as follows:
[0144] Step E1, constructing a 3×3 gain matrix;
[0145] The gain matrix is a two-dimensional table data structure used to store the corresponding gain values under different audio feature combinations;
[0146] Among them, rows correspond to amplitude levels and columns correspond to frequency bands;
[0147] The gain matrix is represented by a two-dimensional matrix as follows:
[0148]
[0149] Among them, G ij Indicates the gain values corresponding to different audio feature combinations, i=1, 2, 3, which correspond to low amplitude signals, medium amplitude signals, and high amplitude signals respectively, and j=1, 2, 3, which correspond to low frequency signals, medium frequency signals, and high frequency signals respectively;
[0150] The gain value is a coefficient pre-set according to different audio feature combinations, which is used to adjust the audio gain according to the amplitude and frequency characteristics of the audio signal. The corresponding gain values under different audio feature combinations are based on comprehensive considerations of audio perception, device performance, and audio playback effects in different environments, and are empirical values determined through a large number of audio test experiments.
[0151] In this example:
[0152] Example 1: For the low amplitude-low frequency element G in the gain matrix 11 :
[0153] By testing a large number of low-amplitude, low-frequency audio signals in a quiet environment, combined with the performance characteristics of the audio equipment, a suitable gain value can be determined. For example, in order to avoid excessive amplification and generate noise and ensure a certain degree of audibility in a quiet environment, G 11 Set to 1.1; this value is determined by testing different types of low-amplitude, low-frequency audio, such as a soft double bass solo and low-frequency wind sounds in a quiet environment, on a Bluetooth speaker, based on the human ear's hearing perception and the distortion of the audio device.
[0154] Example 2: For the low-amplitude-mid-frequency element G in the gain matrix 12 :
[0155] Considering the importance of the mid-frequency band in audio perception and the characteristics of low-amplitude signals in this frequency band, the test was conducted in a mild noise environment. For example, for low-amplitude mid-frequency audio signals such as voice conversations, in order to make the voice clearer in a mild noise environment, the G 12 Set to 1.3; this value can both increase the volume of the voice and avoid distortion and noise amplification caused by over-amplification to a certain extent.
[0156] Example 3: For the low-amplitude-high-frequency element G in the gain matrix 13 :
[0157] For low-amplitude high-frequency audio signals, such as crisp bird sounds and slight high-frequency instrument overtones, the test was conducted in a moderate noise environment. Since high-frequency signals are relatively susceptible to noise interference and the human ear is more sensitive to high frequencies, after repeated tests, G 13 Set to 1.2 to emphasize high-frequency details while keeping the audio pure and audible;
[0158] Example 4: For the mid-amplitude-low-frequency element G in the gain matrix 21 :
[0159] For medium-amplitude low-frequency audio signals, such as bass drums at normal volume, double bass performances with medium-strong intensity, etc., in a quiet environment, in order to enhance the shock of low frequencies without causing audio distortion, after audio equipment performance testing and human ear hearing evaluation, G 21 Set to 1.5;
[0160] Example 5: For the mid-amplitude-mid-frequency element G in the gain matrix 22 :
[0161] Medium-amplitude intermediate-frequency audio signals are more common in audio content, such as normal volume voice conversations, the main playing frequency bands of most musical instruments, etc. In a mild noise environment, through the test of various types of medium-amplitude intermediate-frequency audio, such as human voices and main instrument melodies in pop music, broadcast voices, etc., G 22 Set it to 1.6 to ensure the clarity and richness of the audio in this frequency band.
[0162] Example 6: For the mid-range-high frequency element G in the gain matrix 23 :
[0163] For medium-amplitude high-frequency audio signals, such as bright trumpet high-pitched performances and high-frequency string music cadenzas, in a moderate noise environment, after testing different music styles and audio materials, G 23 Set it to 1.4 to highlight the brightness and details of high frequencies while balancing the relationship with other frequency bands and adapting to the noise environment;
[0164] Example 7: For the high amplitude-low frequency band element G in the gain matrix 31 :
[0165] High-amplitude low-frequency audio signals, such as strong subwoofer effects, bass parts in a large symphony orchestra, etc., in a heavy noise environment, in order to ensure the dominance of low frequencies and not overload the speakers, after testing the power and distortion characteristics of audio equipment, G 31 Set to 2.0;
[0166] Example 8: For the high-amplitude-mid-frequency element G in the gain matrix 32 :
[0167] High-amplitude mid-frequency audio signals, such as loud speeches, strong instrument solos or mid-frequency parts of ensembles, etc., in a heavy noise environment, after testing different audio scenarios, G 32 Set to 1.8 to ensure that the mid-frequency signal can still be clearly transmitted and coordinated with other frequency bands in high volume and noisy environment;
[0168] Example 9: For the high amplitude-high frequency element G in the gain matrix 33 :
[0169] For high-amplitude high-frequency audio signals, such as extremely bright and loud high-frequency instrument performances, strong high-frequency sound effects, etc., in a heavy noise environment, considering the characteristics of high-frequency signals and the high-frequency response capabilities of the speakers, G 33 Set it to 1.6 to keep the high frequencies crisp and delicate at high volumes, avoiding harshness or distortion caused by over-amplification.
[0170] Step E3: extract the corresponding gain value from the gain matrix according to the amplitude level and frequency band of the audio signal, and use it as the initial gain value of the audio signal, and record it as G0, that is, G0=G ij ;
[0171] In this embodiment, for example, when the audio signal is a low-amplitude low-frequency signal, the initial gain value G0=G 11 ; When it is a medium amplitude intermediate frequency signal, G0=G 22 ;wait;
[0172] Step E4, extracting environmental noise impact factor β;
[0173] Step E5, by:
[0174] GU=G0×β
[0175] Calculate the final audio gain GU;
[0176] The gain output unit is used to apply the calculated final audio gain GU to the audio signal, amplify or attenuate the audio signal, and obtain the processed audio signal Z i =GU×Y i , and then output the processed audio signal through the speaker of the Bluetooth speaker.
[0177] The noise collection and processing module newly added in the second embodiment of the present invention can effectively analyze the environmental noise and derive the environmental noise influencing factor. The final audio gain is determined by combining the amplitude level and frequency band of the audio signal itself and the influencing factor, so that the Bluetooth speaker can automatically adjust the audio gain according to the noise conditions of the environment. Whether it is to ensure the fineness of the audio in a quiet environment or to ensure the audibility of the audio in a noisy environment, the audio output can always adapt to environmental changes, improving the practicality and user experience of the Bluetooth speaker in different environments. Based on the gain matrix determined by a large number of audio test experiments, the audio perception, device performance, and audio playback effects in different environments are comprehensively considered, and appropriate gain values are set for audio signals of different amplitude levels and frequency bands. This makes the adjustment of the audio gain more scientific and reasonable, and can achieve the purpose of optimizing the audio playback effect in different audio scenarios, avoiding problems such as audio distortion and volume imbalance caused by improper gain setting, and further improving the audio quality.
[0178] Embodiment 3
[0179] As the third embodiment of the present invention, when the present application is specifically implemented, compared with the first and second embodiments, the technical solution of this embodiment is to combine the solutions of the first and second embodiments mentioned above for implementation.
[0180] This embodiment 3 combines the solutions of embodiment 1 and embodiment 2, and has both the precise audio signal feature extraction and processing capabilities of embodiment 1 and the environment adaptive audio gain control function of embodiment 2. This combination can optimize the audio processing process of the Bluetooth speaker in all aspects, fully consider and effectively process everything from the characteristics of the audio signal itself to environmental factors, thereby maximizing the audio playback quality and adaptability, meeting the high requirements of users for Bluetooth speaker audio effects in various complex scenarios, and providing a more stable and high-quality audio output experience.
[0181] The present invention also provides an audio gain control method for a Bluetooth speaker, which is implemented by the audio gain control system for a Bluetooth speaker, and the method comprises the following steps:
[0182] The first step: information collection:
[0183] The audio signal inputted into the Bluetooth speaker is collected at a specified sampling frequency, and the noise signal of the environment where the Bluetooth speaker is located is collected at a specified sampling frequency;
[0184] Step 2: Preprocessing
[0185] Performing pre-emphasis processing on the audio signal collected within the time length T;
[0186] Step 3: Data Processing
[0187] The audio signal after pre-emphasis in the time length T is processed by signal feature extraction, and the amplitude level and different frequency bands of the audio signal are extracted; at the same time, the noise signal collected in the time length T is analyzed for noise impact, and the environmental noise impact factor is obtained;
[0188] Step 4: Gain Analysis
[0189] Determine the final audio gain according to the amplitude level, frequency band and environmental noise impact factor of the audio signal;
[0190] Step 5: Gain Output
[0191] The calculated final audio gain is applied to the audio signal, the audio signal is amplified or attenuated to obtain a processed audio signal, and then the processed audio signal is output through the Bluetooth speaker.
[0192] The present invention provides a complete audio gain control system and a corresponding control method, which covers multiple orderly steps from audio signal and noise signal acquisition, preprocessing, data processing, gain analysis to final gain output. Each link cooperates closely and complements each other, so that the entire audio gain control process is clear, efficient and reliable, which is convenient for practical application in devices such as Bluetooth speakers and plays a stable role, ensuring that audio playback is always in a better state.
[0193] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0194] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An audio gain control system for a Bluetooth speaker, characterized in that: include: The audio acquisition module is used to acquire the audio signal input from the Bluetooth speaker at a specified sampling frequency; A pre-processing module, used for performing pre-emphasis processing on the audio signal collected within a time length T; The audio processing module is used to perform signal feature extraction processing on the audio signal after pre-emphasis for a time length T, and extract the amplitude level and different frequency bands of the audio signal; A noise collection module is used to collect noise signals in the environment where the Bluetooth speaker is located at a specified sampling frequency; The noise processing module is used to analyze the noise impact of the noise signal collected within the time length T, and then obtain the environmental noise impact factor; A gain analysis unit, used to determine the final audio gain according to the amplitude level, frequency band and environmental noise impact factor of the audio signal; The gain output unit is used to apply the calculated final audio gain to the audio signal, amplify or attenuate the audio signal to obtain a processed audio signal, and then output the processed audio signal through the Bluetooth speaker.
2. The audio gain control system for a Bluetooth speaker according to claim 1, characterized in that: The pre-emphasis processing method is as follows: The audio signal collected within the time length T is marked as X i , i=1, 2, ... n; Then through: AND i =X i -α×X i-1 Calculate the pre-emphasized audio signal Y i .
3. The audio gain control system for a Bluetooth speaker according to claim 2, characterized in that: The signal feature extraction process is as follows: Step F1: extract the pre-emphasized audio signal Y i ; Step F2: Signal Amplitude Feature Extraction Step F2.1, by: Calculate the pre-emphasized audio signal Y i The root mean square value RMS is used as the signal amplitude feature; Step F2.2, dividing the audio signal into amplitude levels according to the signal amplitude feature RMS combined with the corresponding preset amplitude thresholds T1 and T2; Step F3: Signal frequency feature extraction Step F3.1: pre-emphasize the audio signal Y i Perform fast Fourier transform and get the spectrum of the audio signal, which is recorded as Y k , where k is the frequency bin number; The frequency bin number is an index used to mark different frequency bands in the spectrum; Step F3.2, then pass: Calculate the center frequency Fc of the spectrum; Where N represents the number of points for fast Fourier transform operation, that is, the length of the input discrete signal sequence; Step F3.3: Divide the audio signal into frequency segments according to the center frequency Fc of the spectrum in combination with the corresponding preset frequency thresholds F1 and F2.
4. The audio gain control system for a Bluetooth speaker according to claim 3, characterized in that: The amplitude levels in step F2.2 are divided as follows: If RMS < T1, the audio signal is judged as a low-amplitude signal; If T1≤RMS≤T2, the audio signal is judged as a medium amplitude signal; If RMS ≥ T2, the audio signal is judged as a high-amplitude signal; The frequency bands in step F3.3 are divided as follows: If Fc<F1, the audio signal is judged as a low-frequency signal; If F1≤Fc≤F2, the audio signal is judged as an intermediate frequency signal; If Fc≥F2, the audio signal is judged as a high-frequency signal.
5. The audio gain control system for a Bluetooth speaker according to claim 4, characterized in that: The noise impact analysis method is as follows: First, the noise signal collected within the time length T is marked as C i , i=1, 2, ... n; Then through: Calculate the energy EC of the environmental noise signal; Then the energy EC of the environmental noise signal is compared with the noise energy threshold ECy, and the environmental noise impact factor is determined based on the comparison result: When EC<ECy, the value of the environmental noise impact factor is 1; When EC ≥ ECy, then: Calculate the environmental noise impact factor β; Where k is the preset proportionality coefficient.
6. The audio gain control system for a Bluetooth speaker according to claim 5, characterized in that: The final audio gain is determined as follows: Step E1, constructing a 3×3 gain matrix; Step E3: extract the corresponding gain value from the gain matrix according to the amplitude level and frequency band of the audio signal, and use it as the initial gain value of the audio signal, and record it as G0, that is, G0=G ij ; Step E4, extracting environmental noise impact factor β; Step E5, by: GU=G0×β Calculate the final audio gain GU.
7. The audio gain control system for a Bluetooth speaker according to claim 6, characterized in that: The gain matrix is used to store the corresponding gain values under different audio feature combinations; The gain matrix is represented by a two-dimensional matrix as follows: Among them, the rows correspond to the amplitude levels, the columns correspond to the frequency bands, and G ij Indicates the gain values corresponding to different audio feature combinations, i=1, 2, 3, which correspond to low amplitude signals, medium amplitude signals, and high amplitude signals respectively, and j=1, 2, 3, which correspond to low frequency signals, medium frequency signals, and high frequency signals respectively; The gain value is a coefficient pre-set according to different audio feature combinations, and is used to adjust the audio gain according to the amplitude and frequency characteristics of the audio signal.
8. The audio gain control system for a Bluetooth speaker according to claim 7, characterized in that: In the gain output unit, the processing formula of the audio signal is as follows: WITH i =GU×Y i In the formula, Z i is the processed audio signal.
9. The audio gain control system for a Bluetooth speaker according to claim 1, characterized in that: in, The sampling frequencies of the noise signal and the audio signal are both set to f, the acquisition time length is T, and the number of data points collected is n, and n=f×T.
10. An audio gain control method for a Bluetooth speaker, characterized in that: The method is implemented by an audio gain control system for a Bluetooth speaker as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Volume adjusting method and device
CN101997498A
Volume adjustment method and device and equipment
CN107124149A
Audio gain control method and system for Bluetooth sound box
CN117939360A
Amplitude adjustment circuit, digital coherent receiver, and amplitude adjustment method
US20180123701A1