Audio gain control method and system for a bluetooth speaker
By dynamically adjusting the audio gain of the Bluetooth speaker, combined with signal feature extraction and noise impact analysis, the problem of audio distortion or being overwhelmed by noise in different environments has been solved, achieving high-quality audio playback and improved user experience.
Patent Information
- Application Number
- CN202411803688.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-12-10
AI Technical Summary
Bluetooth speakers cannot dynamically adjust gain according to audio signal characteristics and ambient noise in different environments, resulting in audio distortion or being drowned out by noise, making it difficult to meet users' needs for high-quality audio playback.
By combining an audio acquisition module, a preprocessing module, a noise acquisition module, and a gain analysis unit, along with signal feature extraction and noise impact analysis, the audio gain is dynamically adjusted, and a gain matrix is constructed to store the gain values under different combinations of audio features, thereby achieving precise audio gain control.
It improves audio playback quality and user experience, adapts to different environments, and ensures that audio can be heard clearly in quiet or noisy environments, avoiding distortion or being drowned out by noise.
Smart Images

Figure CN119729290B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of audio gain control, in particular to an audio gain control method and system for a Bluetooth speaker. BACKGROUND
[0002] With the wide application of Bluetooth speakers in various scenarios, such as indoor and outdoor gatherings, personal music appreciation, voice calls, etc., users have increasingly high requirements for the audio playback quality of Bluetooth speakers. The environment in which Bluetooth speakers are located is complex and variable, and the noise level in different environments differs 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, which cannot dynamically adjust the gain according to the characteristics of the audio signal itself and the changes in the surrounding environment. This results in distortion of the audio in a quiet environment due to excessive gain, affecting the sound quality, and in a noisy environment, the audio may be drowned out by noise due to insufficient gain, making it difficult to hear clearly. For example, when playing soft classical music, fixed high gain may distort the fine notes in the music, destroying the beauty of the music; when listening to voice navigation or telephone conference in a noisy outdoor environment, low gain will cause the voice information to be covered by environmental noise, making it difficult to effectively communicate.
[0004] In addition, audio signals themselves have rich amplitude and frequency characteristics, and different amplitude and frequency bands of audio have different effects on overall auditory effect. The lack of precise analysis and targeted processing of these characteristics in the past makes it difficult to achieve balanced optimization of each frequency band of audio, cannot fully exploit the audio performance potential of Bluetooth speakers, and cannot meet the needs of users 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 characteristics of the audio signal and the noise conditions of the environment to improve the audio playback quality and user experience of Bluetooth speakers in various use scenarios. SUMMARY
[0005] The purpose of the present application is to provide an audio gain control method and system for a Bluetooth speaker, which solves the technical problems raised in the background art.
[0006] The purpose of the present application can be achieved by the following technical solutions:
[0007] An audio gain control system for a Bluetooth speaker, comprising:
[0008] an audio acquisition module for acquiring audio signals input into the Bluetooth speaker at a specified sampling frequency;
[0009] A pre-processing module is configured to pre-emphasize the audio signal collected within a time length T;
[0010] An audio processing module is configured to perform signal feature extraction processing on the pre-emphasized audio signal within the time length T, and extract the amplitude level and different frequency bands of the audio signal;
[0011] A noise collection module is configured to collect the noise signal of the environment where the Bluetooth speaker is located at a specified sampling frequency;
[0012] A noise processing module is configured to perform noise impact analysis on the noise signal collected within the time length T, and then derive the environmental noise impact factor;
[0013] A gain analysis unit is configured to determine the final audio gain according to the amplitude level, frequency band of the audio signal and the environmental noise impact factor;
[0014] A gain output unit is configured to apply the calculated final audio gain to the audio signal, amplify or attenuate the audio signal, obtain the processed audio signal, and then output the processed audio signal through the Bluetooth speaker.
[0015] As a further scheme of the present application, the pre-emphasis processing mode is as follows:
[0016] The audio signal collected within the time length T is marked as X i , i = 1, 2, … n;
[0017] Then, by:
[0018] Y i = X i - α × X i-1
[0019] The pre-emphasized audio signal Y i is calculated.
[0020] As a further scheme of the present application, the signal feature extraction processing mode 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] The root mean square value RMS of the pre-emphasized audio signal Y i is calculated, and it is used as the signal amplitude feature;
[0026] Step F2.2, according to the signal amplitude characteristic RMS, combining the corresponding preset amplitude threshold T1 and T2, the audio signal is divided into amplitude levels;
[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, the pre-emphasized audio signal Y i is subjected to fast Fourier transform, and the frequency spectrum of the audio signal is obtained, and is recorded as Y k , wherein k is the frequency bin serial number;
[0033] The frequency bin serial number is an index method for marking different frequency bands in the frequency spectrum;
[0034] Step F3.2, then through:
[0035]
[0036] The center frequency Fc of the frequency spectrum is calculated;
[0037] In the formula, N represents the number of points subjected to fast Fourier transform operation, that is, the length of the input discrete signal sequence;
[0038] Step F3.3, according to the center frequency Fc of the frequency spectrum, combining the corresponding preset frequency threshold F1 and F2, the audio signal is divided into frequency bands;
[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 a medium frequency signal;
[0042] If Fc > F2, the audio signal is judged as a high frequency signal.
[0043] As a further scheme of the application: wherein the sampling frequency of the noise signal and the audio signal is set as f, the collection time length is T, and the number of data points collected is n, and n = f × T.
[0044] As a further scheme of the present application, the noise influence analysis mode is as follows:
[0045] First, the noise signal collected in the time length T is marked as C i , i = 1, 2, … n;
[0046] Then, the following is performed:
[0047]
[0048] The energy EC of the environmental noise signal is calculated;
[0049] Then, the energy EC of the environmental noise signal is compared with the noise energy threshold ECy, and according to the comparison result, the environmental noise influence factor is determined:
[0050] When EC < ECy, the value of the environmental noise influence factor is 1;
[0051] When EC ≥ ECy, the following is performed:
[0052]
[0053] The environmental noise influence factor β is calculated;
[0054] In the formula, k is a preset proportional coefficient.
[0055] As a further scheme of the present application, the final audio gain determination mode is as follows:
[0056] Step E1, a 3 × 3 gain matrix is constructed;
[0057] Step E3, according to the amplitude level and the frequency band of the audio signal, the corresponding gain value is extracted from the gain matrix, and is taken as the initial gain value of the audio signal, and is recorded as G0, that is, G0 = G ij ;
[0058] Step E4, the environmental noise influence factor β is extracted;
[0059] Step E5, the following is performed:
[0060] GU = G0 × β
[0061] The final audio gain GU is calculated.
[0062] As a further scheme of the present application, 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] Wherein, the row corresponds to the amplitude level, the column corresponds to the frequency band, G ij Indicates the corresponding gain value under different audio feature combinations, i=1, 2, 3, which correspond to low amplitude signals, medium amplitude signals, high amplitude signals in turn, j=1, 2, 3, which correspond to low frequency signals, medium frequency signals, high frequency signals in turn;
[0066] The gain value is a coefficient preset according to different audio feature combinations, which is used to adjust the gain of the audio according to the amplitude and frequency characteristics of the audio signal; the corresponding gain value under different audio feature combinations is an empirical value determined based on the comprehensive consideration of audio perception, device performance and audio playing effect in different environments, and through a large number of audio test experiments.
[0067] As a further scheme of the application: in the gain output unit, the processing formula of the audio signal is as follows:
[0068] Z i =GUxY i
[0069] In the formula, Z i is the processed audio signal.
[0070] An audio gain control method for a Bluetooth sound box, which is implemented by an audio gain control system for a Bluetooth sound box, and includes the following steps:
[0071] First step, information collection:
[0072] Collect the audio signal input in the Bluetooth sound box at a specified sampling frequency, and collect the noise signal of the environment where the Bluetooth sound box is located at a specified sampling frequency;
[0073] Second step, pretreatment
[0074] Pre-emphasis processing is performed on the audio signal collected within a time length T;
[0075] Third step, data processing
[0076] Signal feature extraction processing is performed on the audio signal pre-emphasized within a time length T, and the amplitude level and different frequency bands of the audio signal are extracted; at the same time, noise influence analysis is performed on the noise signal collected within a time length T, and then the environmental noise influence factor is obtained;
[0077] Fourth step, gain analysis
[0078] The final audio gain is determined according to the amplitude level, frequency band and environmental noise influence factor of the audio signal;
[0079] Fifth step, gain output
[0080] The final audio gain calculated is applied to the audio signal to amplify or attenuate the audio signal, and a processed audio signal is obtained, and the processed audio signal is output through a Bluetooth speaker.
[0081] The beneficial effects of the present application are:
[0082] The audio playback quality is improved: by pre-emphasizing the audio signal, the performance of the audio signal in the subsequent processing link is optimized, the recognizability of the signal characteristics is enhanced, and the audio is adjusted more accurately, thereby improving the overall playback quality. According to the amplitude level, different frequency bands, and environmental noise influence factors of the audio signal, the final audio gain is determined, which can realize the targeted amplification or attenuation of the audio according to the characteristics of the audio itself and the environmental conditions, so that the audio can better restore the original sound effect during playback, and avoid situations such as too small sound that cannot be heard or too large sound that produces distortion.
[0083] Adapt to different environments: in terms of environmental noise influence, the noise signal of the environment where the Bluetooth speaker is located is collected, and the environmental noise influence factor is obtained through noise influence analysis, which is used to determine the final audio gain. In this way, the Bluetooth speaker can adaptively adjust the audio gain in different noise level environments, such as quiet indoor and noisy outdoor, to ensure the audibility and clarity of the audio and improve the user experience of using the Bluetooth speaker in various environments.
[0084] Precise audio feature processing: in the signal feature extraction processing link, the audio signal is divided in detail from the amplitude feature and the frequency feature two dimensions, and the characteristics of the audio signal are accurately grasped 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., to lay a foundation for accurately determining the appropriate audio gain. The gain matrix is used to store the corresponding gain values under different audio feature combinations. These gain values are based on the comprehensive consideration of audio perception, device performance, and audio playback effect in different environments, and are determined through a large number of audio test experiments. The experience value further ensures that the most suitable gain adjustment strategy is matched according to the specific characteristics of the audio, and precise audio gain control is realized. BRIEF DESCRIPTION OF DRAWINGS
[0085] The present application will be further described below with reference to the accompanying drawings.
[0086] Figure 1 is a system block diagram of an audio gain control method and system for a Bluetooth speaker of the present application.
[0087] Figure 2 is a flowchart of an audio gain control method and system for a Bluetooth speaker of the present application. DETAILED DESCRIPTION
[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0089] Example 1
[0090] Please see 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 audio signal sampling frequency is set to f, the acquisition time is T, and the number of data points acquired is n, where n = f × T;
[0093] The preprocessing module is used to pre-emphasize the audio signals acquired within a time length T.
[0094] The specific method is as follows:
[0095] The audio signals collected within a time period T are labeled as X. i i = 1, 2, ..., n;
[0096] Subsequently passed:
[0097] Y i =X i -α×X i-1
[0098] Calculate the pre-emphasized audio signal Y i ;
[0099] The audio processing module is used to extract signal features from 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, Pass:
[0104]
[0105] Calculate the pre-emphasized audio signal Y i The root mean square (RMS) value is used as a characteristic of signal amplitude.
[0106] Step F2.2: Based on the signal amplitude characteristics RMS and the corresponding preset amplitude thresholds T1 and T2, the audio signal is divided into amplitude levels.
[0107] Specifically:
[0108] If RMS < T1, the audio signal is judged as a low-amplitude signal;
[0109] If T1≤RMS≤T2, then the audio signal is determined to be 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: The pre-emphasized audio signal Y... i Perform a Fast Fourier Transform (FFT) to obtain the spectrum of the audio signal, and denote it as Y. k Where k is the frequency bin number;
[0113] In this embodiment, the Fast Fourier Transform is an efficient algorithm for calculating the Discrete Fourier Transform, which is used to convert discrete signals in the time domain to the frequency domain. Simply put, it transforms audio signals that are originally described by time as the independent variable into a form described by frequency components and their corresponding amplitude and phase. It is existing technology, so it will not be described in detail.
[0114] Frequency bins are an indexing method used to mark different frequency bands in the spectrum;
[0115] Step F3.2, then proceeds:
[0116]
[0117] Calculate the centroid frequency Fc of the spectrum;
[0118] In the formula, N represents the number of points for the Fast Fourier Transform operation, which is the length of the input discrete signal sequence;
[0119] In this embodiment, the reason why only k = 1 to k = N / 2 is considered is that the part greater than N / 2 is the conjugate symmetry of the front half part, which contains redundant information to a certain extent for real number signals, and the main frequency energy distribution and characteristic information can be well described by the positive frequency part. Therefore, when calculating the center of gravity frequency, only the spectrum points of the front half part, i.e. the spectrum points of k = 1 to k = N / 2, need to be considered, so that the spectrum information can be more effectively utilized to obtain a center of gravity frequency value capable of representing the center position of the signal frequency distribution;
[0120] Step F3.3, according to the center of gravity frequency Fc of the spectrum, combining the corresponding preset frequency threshold F1 and F2, the audio signal is divided into frequency segments;
[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 a medium-frequency signal;
[0124] If Fc > F2, the audio signal is judged as a high-frequency signal.
[0125] The first embodiment of the present application optimizes the audio signal through pre-emphasis processing and enhances the signal characteristics for subsequent processing. The use of the root mean square value to determine the signal amplitude characteristics and divide the amplitude levels, and the use of the fast Fourier transform to calculate the spectrum center of gravity frequency and divide the frequency segments, can accurately extract the amplitude and frequency characteristics of the audio signal, lay a foundation for subsequent processing based on audio characteristics, help to improve the accuracy and pertinence of audio processing, thereby improving the fineness of audio playback effect, enabling the audio to more accurately restore sound details when played on a sound box, and enabling the audience to obtain a better auditory experience.
[0126] Embodiment Two
[0127] As the second embodiment of the present application, compared with the first embodiment, the technical solution of the present embodiment is only different from the first embodiment in that the present embodiment further comprises:
[0128] A noise collection module for collecting noise signals of the environment where the Bluetooth sound box is located at a specified sampling frequency;
[0129] Wherein, the sampling frequency of the noise signal is set to f, the collection time length is T, and the number of data points collected is n;
[0130] A noise processing module for analyzing the noise impact of the noise signals collected within the time length T;
[0131] The specific manner is as follows:
[0132] First, the noise signal collected in the time length T is marked as C i , i = 1, 2, … n;
[0133] Then, by:
[0134]
[0135] The energy EC of the environmental noise signal is calculated;
[0136] Then, the energy EC of the environmental noise signal is compared with the noise energy threshold ECy, and according to the comparison result, the environmental noise influence factor is determined:
[0137] When EC < ECy, the value of the environmental noise influence factor is 1;
[0138] When EC ≥ ECy, by:
[0139]
[0140] The environmental noise influence factor β is calculated;
[0141] Where k is a preset proportion coefficient;
[0142] The gain analysis unit is used to determine the audio gain value according to the amplitude level, frequency band and environmental noise influence factor of the audio signal;
[0143] The specific manner is as follows:
[0144] Step E1, a 3x3 gain matrix is constructed;
[0145] The gain matrix is a two-dimensional table form data structure for storing the corresponding gain values under different audio feature combinations;
[0146] Wherein, the row corresponds to the amplitude level, and the column corresponds to the frequency band;
[0147] The gain matrix is expressed in the following two-dimensional matrix form:
[0148]
[0149] Wherein, G ij represents the corresponding gain value under different audio feature combinations, i = 1, 2, 3, which correspond to low amplitude signal, medium amplitude signal and high amplitude signal in turn, j = 1, 2, 3, which correspond to low frequency signal, medium frequency signal and high frequency signal in turn;
[0150] The gain value is a coefficient preset according to different audio feature combinations, which is used to adjust the gain of the audio according to the amplitude and frequency characteristics of the audio signal; the corresponding gain value under different audio feature combinations is an empirical value determined based on the comprehensive consideration of audio perception, device performance, and audio playback effect in different environments, and through a large number of audio test experiments;
[0151] In this embodiment,
[0152] Example 1: For the low-amplitude-low-frequency element G in the gain matrix 11 :
[0153] Through the listening test of a large number of low-amplitude low-frequency audio signals in a quiet environment, combined with the performance characteristics of the audio device, a suitable gain value is determined. For example, in order to avoid excessive amplification to generate noise and ensure a certain audibility in a quiet environment, G 11 may be set to 1.1; this value is determined through the playback test of different types of low-amplitude low-frequency audio, such as soft cello solo, low-frequency wind sound in a quiet environment, etc., on a Bluetooth speaker, according to the human auditory perception and audio device distortion, etc.
[0154] Example 2: For the low-amplitude-medium-frequency element G in the gain matrix 12 :
[0155] Considering the importance of medium frequency in audio perception and the characteristics of low-amplitude signals in this frequency band, the test is carried out in a light noise environment. For example, for low-amplitude medium-frequency audio signals such as soft speech, in order to make the voice clearer and more audible in a light noise environment, G 12 may be set to 1.3; this value can not only increase the volume of the voice, but also avoid distortion and noise amplification caused by excessive 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 clear bird chirping sound and light high-frequency instrument overtone, etc., the test is carried out in a medium noise environment; since high-frequency signals are relatively susceptible to noise interference and human ears are more sensitive to high frequencies, G 13 is set to 1.2 to highlight the high-frequency details while maintaining the purity and audibility of the audio;
[0158] Example 4: For the medium-amplitude-low-frequency element G in the gain matrix 21 :
[0159] For medium amplitude low frequency audio signals, such as normal volume bass drum, medium intensity cello performance, etc., in a quiet environment, in order to enhance the sense of shock of low frequency and not to distort the audio, after audio equipment performance test and human ear auditory evaluation, G 21 is set to 1.5;
[0160] Example 5: for medium amplitude-medium frequency element G 22 in the gain matrix, set G
[0161] Medium amplitude medium frequency audio signals are common in audio content, such as normal volume speech dialogue, main performance frequency band of most musical instruments, etc.; in a light noise environment, through testing of various types of medium amplitude medium frequency audio, such as human voice and main instrument melody in popular music, broadcast speech, etc., G 22 is set to 1.6 to ensure the clarity and fullness of the audio in this frequency band.
[0162] Example 6: for medium amplitude-high frequency element G 23 in the gain matrix, set G
[0163] For medium amplitude high frequency audio signals, such as bright trumpet high note performance, high frequency string music, etc., in a medium noise environment, after testing of different music styles and audio materials, G 23 is set to 1.4 to highlight the brightness and details of high frequency, balance the relationship with other frequency bands and adapt to the noise environment;
[0164] Example 7: for high amplitude-low frequency element G 31 in the gain matrix, set G
[0165] High amplitude low frequency audio signals, such as strong bass effect, low sound part of large symphony orchestra, etc., in a heavy noise environment, in order to ensure the dominance of low frequency and not to overload the speaker, after testing of audio equipment power and distortion characteristics, G 31 is set to 2.0;
[0166] Example 8: for high amplitude-medium frequency element G 32 in the gain matrix, set G
[0167] High amplitude medium frequency audio signals, such as loud speech, strong instrument solo or medium frequency part in ensemble, etc., in a heavy noise environment, after testing of different audio scenes, G 32 is set to 1.8 to ensure that the medium frequency signal can still be clearly conveyed in a high volume and noise environment and coordinated with other frequency bands;
[0168] Example 9: for high amplitude-high frequency element G 33 in the gain matrix, set G
[0169] For high-amplitude high-frequency audio signals, such as extremely bright and loud high-frequency instrument performances, intense high-frequency sound effects, etc., in a severe noise environment, considering the characteristics of high-frequency signals and the high-frequency response capability of the sound box, G 33 is set to 1.6, which tries to maintain the clarity and delicacy of high frequencies at high volumes, avoiding harsh or distortion phenomena caused by excessive amplification;
[0170] Step E3, according to the amplitude level and frequency band of the audio signal, the corresponding gain value is extracted from the gain matrix, and it is taken as the initial gain value of the audio signal, and it is recorded 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 medium-frequency signal, G0=G 22 ; and so on;
[0172] Step E4, extract the environmental noise influence 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, and amplify or attenuate the audio signal to obtain the processed audio signal Z i =GU×Y i , and then output the processed audio signal through the speaker of the Bluetooth sound box.
[0177] The newly added noise collection and processing module in this embodiment two can effectively analyze the environmental noise and obtain the environmental noise influence factor. Combined with the amplitude level and frequency band of the audio signal itself and the influence factor, the final audio gain is determined, so that the Bluetooth sound box can automatically adjust the audio gain according to the noise situation of the environment. Whether it is to ensure the delicacy 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 sound box in different environments. The gain matrix determined based on a large number of audio test experiments comprehensively considers many factors such as audio perception, device performance, and audio playback effect in different environments, and sets appropriate gain values for audio signals of different amplitude levels and frequency bands. This makes the adjustment of audio gain more scientific and reasonable, and can achieve the purpose of optimizing audio playback effect in different audio scenes, avoiding problems such as audio distortion and volume imbalance caused by improper gain setting, and further improving the audio quality.
[0178] Embodiment three
[0179] As embodiment three of the present application, compared with embodiment one and embodiment two, the technical solution of this embodiment is to combine the schemes of embodiment one and embodiment two.
[0180] This embodiment three combines the schemes of embodiment one and embodiment two, which not only has the precise audio signal feature extraction and processing capability of embodiment one, but also has the environmental adaptive audio gain control function of embodiment two. This combination can optimize the audio processing process of the Bluetooth speaker in all directions, from the characteristics of the audio signal itself to environmental factors, and fully considers and effectively processes them, thereby maximizing the audio playback quality and adaptability, meeting the high requirements of users for the audio effect of the Bluetooth speaker in various complex scenarios, and providing a more stable and high-quality audio output experience.
[0181] The present application also provides an audio gain control method for a Bluetooth speaker, which is realized by the audio gain control system for a Bluetooth speaker. The method comprises the following steps:
[0182] First step, information collection:
[0183] Collect the input audio signal of the Bluetooth speaker at a specified sampling frequency, and collect the noise signal of the environment where the Bluetooth speaker is located at a specified sampling frequency;
[0184] Second step, preprocessing
[0185] Pre-emphasis processing is performed on the audio signal collected within a time length T;
[0186] Third step, data processing
[0187] Signal feature extraction processing is performed on the audio signal pre-emphasized within a time length T, and the amplitude level and different frequency bands of the audio signal are extracted. At the same time, noise influence analysis is performed on the noise signal collected within a time length T, and the environmental noise influence factor is obtained;
[0188] Fourth step, gain analysis
[0189] The final audio gain is determined according to the amplitude level, frequency band of the audio signal and the environmental noise influence factor;
[0190] Fifth step, gain output
[0191] The calculated final audio gain is applied to the audio signal, and the audio signal is amplified or attenuated to obtain the processed audio signal, and then the processed audio signal is output through the Bluetooth speaker.
[0192] The application provides a complete audio gain control system and a corresponding control method, which covers multiple ordered steps from audio signal and noise signal collection, preprocessing, data processing, gain analysis to final gain output, and each link closely cooperates and complements each other, so that the whole audio gain control process is clear, efficient and reliable, is convenient for practical application in Bluetooth speaker and other devices, and stably plays a role, and guarantees that the audio playing is always in an optimal state.
[0193] The above formulas are dimensionless values, and the formulas are obtained by software simulation of a large amount of data to obtain a formula of the most recent real situation, and the preset parameters and threshold values in the formula are set by the person skilled in the art according to the actual situation.
[0194] The above is only a specific embodiment of the application, but the protection scope of the application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered within the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.
Claims
1. An audio gain control system for a Bluetooth speaker, the system comprising: The method comprises the following steps: An audio acquisition module is configured to acquire audio signals input into a Bluetooth speaker at a specified sampling frequency; A preprocessing module is configured to perform pre-emphasis processing on the audio signals acquired within a time length T; An audio processing module is configured to perform signal feature extraction processing on the audio signals pre-emphasized within the time length T, and extract the amplitude level and different frequency bands of the audio signals; A noise acquisition module is configured to acquire noise signals of an environment in which the Bluetooth speaker is located at a specified sampling frequency; A noise processing module is configured to perform noise influence analysis on the noise signals acquired within the time length T, and the noise influence analysis is performed in the following manner: First, the noise signal collected in the time length T is marked as C i , i = 1, 2, … n; followed by The energy EC of the ambient noise signal is calculated; Then, the energy EC of the environmental noise signals is compared with a noise energy threshold ECy, and the environmental noise influence factor is determined according to the comparison result: When EC < ECy, the value of the environmental noise influence factor is 1; When EC≥ECy, the environmental noise influence factor β is calculated by , In the formula, k is a preset proportion coefficient; A gain analysis unit is configured to determine a final audio gain according to the amplitude level, frequency band and environmental noise influence factor of the audio signals, and the final audio gain is determined in the following manner: Step E1: A 3*3 gain matrix is constructed to store the corresponding gain values under different audio feature combinations, and the gain matrix is represented in the following two-dimensional matrix manner: ; wherein the rows correspond to amplitude levels and the columns correspond to frequency bands, G ij represent different audio feature combinations, i=1, 2, 3, which correspond to low amplitude signals, medium amplitude signals, and high amplitude signals in turn, j=1, 2, 3, which correspond to low frequency signals, medium frequency signals, and high frequency signals in turn; the gain value is a coefficient preset according to different audio feature combinations, which is used to adjust the gain of the audio according to the amplitude and frequency characteristics of the audio signal; Step E3, according to the amplitude level and frequency band of the audio signal, the corresponding gain value is extracted from the gain matrix as the initial gain value of the audio signal, and it is recorded as G0, that is, G0=G ij ; Step E4: The environmental noise influence factor β is extracted; Step E5: The final audio gain GU is calculated through GU=G0*β; A gain output unit is configured to apply the calculated final audio gain to the audio signals, amplify or attenuate the audio signals, obtain processed audio signals, and then output the processed audio signals through the Bluetooth speaker.
2. The audio gain control system for a Bluetooth speaker of claim 1, wherein, The pre-emphasis processing is performed in the following manner: The audio signal collected in the time length T is marked as X i , i = 1, 2, … n; Then, the following is performed: Y i = X i - a x X i-1 The pre-emphasized audio signal Y is calculated i .
3. The audio gain control system for a Bluetooth speaker of claim 2, wherein, The signal feature extraction processing is performed in the following manner: Step F1, extracting the pre-emphasized audio signal Y i ; Step F2: Signal amplitude feature extraction Step F2.1, computing the root mean square value RMS of the pre-emphasized audio signal Y i and using it as a signal amplitude feature. Step F2.2: According to the signal amplitude feature RMS, the corresponding preset amplitude thresholds T1 and T2 are combined to divide the audio signals into amplitude levels; Step F3: Signal frequency feature extraction Step F3.1, pre-emphasis of the audio signal Y i Performing a fast Fourier transform and obtaining the spectrum of the audio signal and denoting it as Y k where k is the frequency bin index; The frequency bins sequence number is an index method for marking different frequency bands in the frequency spectrum; Step F3.2, then by , the center of gravity frequency Fcof the computed spectrum; In the formula, N represents the number of points for performing the fast Fourier transform operation, that is, the length of the input discrete signal sequence; Step F3.3: According to the center frequency Fc of the frequency spectrum, the corresponding preset frequency thresholds F1 and F2 are combined to divide the audio signals into frequency bands.
4. The audio gain control system for a Bluetooth speaker of claim 3, wherein, The amplitude level division manner in step F2.2 is 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 band division manner in step F3.3 is 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 a medium-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 of claim 3, wherein, The gain output unit, the processing formula of the audio signal is Z i =GU×Y i , wherein Z i is the processed audio signal.
6. The audio gain control system for a Bluetooth speaker of claim 1, wherein, In the formula, The sampling frequencies of the noise signals and the audio signals are both set to f, the acquisition time length is T, and the number of data points acquired is n, and n = f * T.
7. An audio gain control method for a Bluetooth speaker, characterized in that, The method is implemented by using the audio gain control system for the Bluetooth speaker according to any one of claims 1-6.
Citation Information
Patent Citations
Volume adjusting method and device
CN101997498A
Audio gain control method and system for Bluetooth sound box
CN117939360A