Volume adjustment method, device and computer-readable storage medium

By echo cancellation and voice signal judgment on the ambient sound signal, adjusting the volume of the audio playback unit, solving the problem of interference between user voice and electronic device audio on the ambient sound, and achieving more accurate adaptive volume adjustment.

CN114299980BActive Publication Date: 2025-04-08SHENZHEN TCL NEW-TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111644102.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-04-08
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

In the prior art, user voice and electronic device audio have a large interference with ambient sound, resulting in misjudgment of volume adaptive adjustment.

Method used

By acquiring the ambient sound signal and the reference signal, echo cancellation is performed, the ambient residual signal is obtained, and whether the speech signal is included is determined based on the residual signal. When the ambient sound signal does not contain a voice signal, the playback volume of the audio playback unit is adjusted according to the sound pressure level of the reference filter signal and the ambient residual signal.

Benefits of technology

It reduces the interference of user voice and electronic device audio on ambient sound, avoids misjudgment of volume adaptive adjustment, and achieves more accurate volume adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299980B_ABST
    Figure CN114299980B_ABST
Patent Text Reader

Abstract

The present invention discloses a volume adjustment method, device and computer-readable storage medium. The volume adjustment method comprises: firstly obtaining the ambient sound signal collected by the audio acquisition unit and the reference signal to be played in the audio playback unit, and obtaining the corresponding reference filter signal according to the reference signal; then performing echo elimination on the ambient sound signal according to the reference filter signal to obtain the ambient residual signal; then judging whether the ambient sound signal contains a voice signal according to the ambient residual signal; finally, when the ambient sound signal does not contain a voice signal, adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filter signal and the sound pressure of the ambient residual signal. The present invention eliminates the echo signal formed by the reference signal in the ambient sound signal, and determines whether to adjust the playback volume of the audio playback unit according to whether there is a voice signal, so as to reduce the interference of the user's voice and the audio of the electronic device itself on the ambient sound, and avoid misjudgment of the volume adaptive adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal processing, and in particular to a volume adjustment method, device and computer-readable storage medium. Background Art

[0002] With the popularization of intelligent electronic devices, electronic devices with audio playback functions (such as TVs and speakers) also need to be able to achieve volume adaptation and automatically adjust the volume of audio playback according to the ambient sound. However, the user's voice and the audio played by the electronic device itself will affect the ambient sound, which is prone to misjudgment of volume adjustment. Summary of the invention

[0003] Based on the above-mentioned deficiencies in the prior art, the purpose of the present invention is a volume adjustment method, device and computer-readable storage medium, which can reduce the interference of user voice and audio of electronic equipment on ambient sound and avoid misjudgment of volume adaptive adjustment.

[0004] To achieve the above object, the present invention first provides a volume adjustment method, which is applied to an electronic device, wherein the electronic device also includes an audio acquisition unit and an audio playback unit, and the volume adjustment method includes:

[0005] Acquire the ambient sound signal collected by the audio collection unit and the reference signal to be played in the audio playback unit, and obtain the corresponding reference filter signal according to the reference signal;

[0006] Perform echo cancellation on the ambient sound signal according to the reference filtering signal to obtain an ambient residual signal;

[0007] According to the environmental residual signal, determining whether the environmental sound signal contains a speech signal;

[0008] When the ambient sound signal does not contain a speech signal, the playback volume of the audio playback unit is adjusted according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal.

[0009] Optionally, the step of judging whether the ambient sound signal contains a speech signal according to the ambient residual signal includes:

[0010] Obtain the signal kurtosis value of the environmental residual signal;

[0011] According to the signal kurtosis value and the preset kurtosis threshold, it is determined whether the ambient sound signal contains a speech signal.

[0012] Optionally, the step of adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal includes:

[0013] Determining a reference filtered signal sound pressure level and an ambient residual signal sound pressure level according to the reference filtered signal sound pressure and the ambient residual signal sound pressure;

[0014] Determining a volume control parameter according to a reference filtered signal sound pressure level and an ambient residual signal sound pressure level;

[0015] When the volume control parameter is greater than a preset first sound pressure level threshold, controlling the audio playback unit to increase the volume;

[0016] When the volume control parameter is less than a preset second sound pressure level threshold, the audio playback unit is controlled to reduce the volume.

[0017] Optionally, before the step of adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal, the method further includes:

[0018] Obtaining smoothed energy corresponding to the reference signal;

[0019] Whether the audio playback unit is in a playback state is determined according to the smoothing energy.

[0020] Optionally, the step of obtaining a corresponding reference filtered signal according to the reference signal includes:

[0021] Obtaining an impulse response function corresponding to an echo channel, where the echo channel includes a channel from an audio playback unit to an audio acquisition unit;

[0022] Performing a convolution operation on the reference signal and the impulse response function to obtain a convolution result, which is a corrected reference signal;

[0023] The modified reference signal is processed by an adaptive filter to obtain a reference filtered signal.

[0024] Optionally, after the step of performing echo cancellation on the ambient sound signal through an adaptive filter according to the convolution result to obtain an ambient residual signal, the method further includes:

[0025] Nonlinear processing is performed on the environment residual signal to eliminate residual echo in the environment residual signal.

[0026] Optionally, before the step of adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal, the method further includes:

[0027] Obtaining smoothed energy corresponding to the reference signal;

[0028] Obtaining the change amount of the adaptive filter coefficient according to the reference signal and the smoothing energy;

[0029] Whether to adjust the playback volume of the audio playback unit is determined according to the coefficient change of the adaptive filter.

[0030] Optionally, before the step of acquiring the ambient sound signal collected by the audio collection unit and the reference signal to be played in the audio playback unit, and obtaining the corresponding reference filter signal according to the reference signal, the method further includes:

[0031] Acquire the audio sample signal broadcast by the audio playing unit through the audio acquisition unit;

[0032] The audio acquisition unit is calibrated according to the sound pressure of the audio sample signal and the calibrated sound pressure.

[0033] The present invention also provides a volume adjustment device, which is applied to an electronic device. The electronic device also includes an audio acquisition unit and an audio playback unit. The volume adjustment device includes:

[0034] A signal acquisition unit, used to acquire the ambient sound signal collected by the audio acquisition unit and the reference signal to be played in the audio playback unit, and obtain a corresponding reference filter signal according to the reference signal;

[0035] An echo cancellation unit, used to perform echo cancellation on the ambient sound signal according to the reference filtering signal to obtain an ambient residual signal;

[0036] A signal determination unit, configured to determine whether the ambient sound signal contains a speech signal according to the ambient residual signal;

[0037] The volume control unit is used to adjust the playback volume of the audio playback unit according to the sound pressure of the reference filter signal and the sound pressure of the environmental residual signal when the environmental sound signal does not contain a voice signal.

[0038] The present invention provides a computer-readable storage medium, on which a computer program is stored, and when a processor of the computer medium executes the computer program, the steps of any one of the above-mentioned volume adjustment methods are implemented.

[0039] Compared with the prior art, the beneficial effects of the present invention include: the volume adjustment method of the present invention first obtains the ambient sound signal collected by the audio acquisition unit and the reference signal to be played in the audio playback unit, and obtains the corresponding reference filter signal according to the reference signal; then, the ambient sound signal is echo-cancelled according to the reference filter signal to obtain the ambient residual signal; then, according to the ambient residual signal, it is determined whether the ambient sound signal contains a voice signal; finally, when the ambient sound signal does not contain a voice signal, the playback volume of the audio playback unit is adjusted according to the sound pressure of the reference filter signal and the sound pressure of the ambient residual signal. The present invention eliminates the echo signal formed by the reference signal in the ambient sound signal, and determines whether to adjust the playback volume of the audio playback unit according to whether there is a voice signal, so as to reduce the interference of the user's voice and the audio of the electronic device itself on the ambient sound, and avoid misjudgment of volume adaptive adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments or the prior art, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 The steps of the volume adjustment method according to the embodiment of the present invention are Figure 1 ;

[0042] Figure 2 The steps of the volume adjustment method according to the embodiment of the present invention are Figure 2 ;

[0043] Figure 3 The steps of the volume adjustment method according to the embodiment of the present invention are Figure 3 ;

[0044] Figure 4 is a framework diagram of an electronic device according to an embodiment of the present invention;

[0045] Figure 5 It is a framework diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following description of the embodiments is with reference to the attached diagrams to illustrate specific embodiments in which the present invention can be implemented. In the description of the present invention, it should be understood that the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0047] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or mutual communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0048] The disclosure below provides many different embodiments or examples to realize different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention.

[0049] The embodiment of the present invention provides a volume adjustment method, which is applied to electronic equipment, such as Figure 4 As shown, the electronic device further includes an audio acquisition unit 1 and an audio playback unit 2. The electronic device includes but is not limited to a device with an audio playback function such as a television set and a sound box. The audio acquisition unit 1 may include a microphone, and the audio playback unit 2 may include a speaker. Figure 1 As shown, the volume adjustment method includes the following steps:

[0050] Step 100, obtaining the ambient sound signal collected by the audio collection unit 1 and the reference signal to be played in the audio playback unit 2, and obtaining a corresponding reference filtering signal according to the reference signal.

[0051] like Figure 2 As shown, the step of obtaining a corresponding reference filtered signal according to the reference signal may include:

[0052] Step 110 , obtaining an impulse response function corresponding to an echo channel, where the echo channel includes a channel from the audio playback unit 2 to the audio acquisition unit 1 .

[0053] Step 120, performing a convolution operation on the reference signal and the impulse response function to obtain a convolution result, which is the modified reference signal.

[0054] Specifically, the speaker can play the excitation signal, which is received by the audio playback unit 2 after the impulse response of the echo channel. Under the test environment, the excitation signal played by the speaker and the corresponding recording signal formed by the microphone receiving the excitation signal can be used to identify the echo channel, correct the reference signal and perform echo cancellation. The reverberation of the above environment is represented by the echo channel impulse response function, and the reference signal played by the speaker is convolved by the echo channel impulse response function to correct the reference signal in real time. The above convolution result is the corrected reference signal.

[0055] Step 130, the modified reference signal is processed by an adaptive filter to obtain a reference filtered signal. The adaptive filter uses an adaptive filtering algorithm including NLMS (normalized least mean square algorithm), LMS (least mean square algorithm) or RLS (recursive least square algorithm).

[0056] Specifically, in the above steps, the ambient sound signal (i.e., the microphone signal) is d n , the corrected reference signal is x n , for dn and x n Perform short-time Fourier transform to obtain frequency domain signals D(l,k) and X(l,k), where l is the frame index, k is the frequency index, and k=1,2,...,K, where K is the number of points of FFT transform (fast Fourier transform);

[0057] Reference filtered signal X s (l,k)=X h (l,k)W(l,k), where X h (l,k) is the historical cache value of X(l,k), and W(l,k) is the adaptive filter coefficient.

[0058] Step 200, echo cancellation is performed on the ambient sound signal according to the reference filter signal to obtain an ambient residual signal. The audio signal played by the audio playback unit 2 is propagated into the spatial environment and is collected by the audio collection unit 1 to form an echo signal. The ambient sound signal collected by the microphone contains the echo signal and the external signal (i.e., the ambient residual signal). The echo signal is eliminated from the ambient sound signal to obtain the ambient residual signal. The ambient residual signal is the audio signal after echo cancellation in the ambient sound.

[0059] Specifically, according to the formula E(l,k)=D(l,k)-X h (l,k)W(l,k), echo cancellation is performed on the ambient sound signal collected by the microphone, where E(l,k) is the ambient residual signal;

[0060] X h (l,k)=[X(l,k),X(l-1,k),...,X(l-ORD+1,k)],

[0061]

[0062] Where ORD is the order of NLMS, μ is the step size adjustment factor, * It means to find the conjugate.

[0063] When the adaptive filter is used for echo cancellation in this embodiment, it can be performed in the time domain or in the frequency domain. Taking the frequency domain NLMS for echo cancellation as an example, the process of echo cancellation is specifically described. In other embodiments of the present invention, LMS or RLS can be used for echo cancellation. When the echo is eliminated in this embodiment, the order of the adaptive filter can be set to a smaller order according to the echo channel function measured in advance, such as the order can be set to a single digit, so as to accelerate the convergence speed of the echo cancellation process and minimize the pollution to the target signal. In this embodiment, the echo cancellation is suitable for relatively fixed electronic devices and the reverberation environment is not fixed. For example, in a bedroom with carpets and wall cloths, the reverberation is small; in a conference room with tempered glass on all four sides, the reverberation is large. By first identifying the echo channel, the echo channel impulse response function of the echo channel is obtained, and then the reference signal buffer assigned is convolved with the echo channel impulse response function to adapt to a variety of reverberation environments and enhance the adaptability of electronic devices to reverberation environments.

[0064] Step 300, judging whether the ambient sound signal contains a speech signal according to the ambient residual signal. Specifically, it includes: first, obtaining the signal kurtosis value of the ambient residual signal, and the signal kurtosis value G(l) can be calculated by the following formula:

[0065]

[0066] Among them, l is the frame index, H is the frame length, o(l,h) is the time domain signal obtained after the environmental residual signal is inverse Fourier transformed, is the average value of o(l,h).

[0067] Then, according to the signal kurtosis value and the preset kurtosis threshold, it is determined whether the ambient sound signal contains a speech signal. For example, the preset kurtosis threshold is η1, when G(l)>η1, it is considered that the ambient sound signal contains a speech signal, indicating that a user is speaking at this time, so the volume is not adaptively adjusted to avoid the volume adjustment interfering with the user's normal speaking and conversation.

[0068] Step 400, when the ambient sound signal does not contain a speech signal, the playback volume of the audio playback unit 2 is adjusted according to the sound pressure of the reference filter signal and the sound pressure of the ambient residual signal. Figure 3 As shown, including:

[0069] Step 410, determining the sound pressure level of the ambient sound signal and the sound pressure level of the ambient residual signal according to the sound pressure of the ambient sound signal and the sound pressure of the ambient residual signal. The sound pressure level is defined as the ratio of the measured sound pressure p to the reference sound pressure p(ref) multiplied by 20, i.e., 20lg p / p(ref), in decibels.

[0070] Specifically, the method for calculating the sound pressure level of the environmental residual signal is as follows: First, the sound pressure P of the environmental residual signal is calculated. n (l):

[0071]

[0072] Where P n (l) is the sound pressure of the smoothed ambient sound signal of the lth frame, l is the frame index, α is the smoothing coefficient, o(l,h) is the ambient residual signal of the lth frame, and H is the frame length;

[0073] Then calculate the sound pressure level SPL of the environmental residual signal n (l):

[0074] SPL n (l) = 20lg (P n (l))+P AOP ;

[0075] Where P AOP It is the maximum sound pressure level of the microphone and is an inherent parameter of the microphone.

[0076] The sound pressure level of the loudspeaker signal is calculated as follows:

[0077] The reference filtered signal is the loudspeaker signal, and the sound pressure in the frequency domain is:

[0078] X s (l,k)=X h (l,k)W(k),

[0079]

[0080] Among them, X s (l,k) is the reference filtered signal, X h (l,k) is the historical cache value of the reference filtered signal X(l,k), W(k) is the adaptive filter coefficient, P s (l) is the sound pressure of the reference filtered signal; the sound pressure level SPL of the reference filtered signal s (l) is:

[0081] SPL s (l) = 20lg (P s (l))+P AOP .

[0082] Step 420: Determine the volume control parameter according to the sound pressure level of the ambient sound signal and the sound pressure level of the ambient residual signal. Specifically, the volume control parameter is ΔSPL = SPL n (l)-SPL s (l).

[0083] Step 430a: When the volume control parameter is greater than a preset first sound pressure level threshold, the audio playback unit 2 is controlled to increase the playback volume. Specifically, the first sound pressure level threshold is VOL max , when △SPL>VOL max , controls the speaker to increase the playback volume.

[0084] Step 430b: When the volume control parameter is less than the preset second sound pressure level threshold, control the audio playback unit 2 to reduce the playback volume. Specifically, assuming that the second sound pressure level threshold is VOL min , when △SPL <VOL min When the volume is turned off, the speaker is controlled to reduce the playback volume and return to the normal volume range.

[0085] In addition, the SPL will be affected when the volume increases. s (l), so the SPL needs to be calibrated based on the original volume of the device (i.e. the volume before it is increased). s (l) value.

[0086] In one embodiment, before the step of adjusting the playback volume of the audio playback unit 2 according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal, the step further includes:

[0087] First, obtain the smoothing energy corresponding to the reference signal; specifically, the smoothing energy is the short-time smoothing energy. The short-time smoothing energy E(l) can be calculated by the following formula:

[0088]

[0089] Wherein, β is a recursive smoothing factor, which may be 0.95 in this embodiment, x(l,n) is a reference signal, and l is a frame index.

[0090] Then, it is determined whether the audio playback unit 2 is in the playback state according to the smooth energy. Specifically, the smooth energy threshold is set to ε. When E(l)>ε, it can be determined that the speaker of the electronic device is in the playback state, and the volume adaptive adjustment can be performed. Otherwise, it is determined that the speaker is not in the playback state, and the volume adaptive adjustment is not performed.

[0091] In one embodiment, after the step of performing echo cancellation on the ambient sound signal through an adaptive filter according to the convolution result to obtain the ambient residual signal, the method further includes:

[0092] Nonlinear processing is performed on the environment residual signal to eliminate residual echo in the environment residual signal.

[0093] The echo elimination process of this embodiment is a linear elimination process. In order to further improve the effect of echo elimination, a nonlinear post-processing process is added to further eliminate the echo residue remaining after the echo elimination by NLMS, LMS or RLS. Take the elimination of echo residue by Wiener filter as an example:

[0094]

[0095] O(l,k) represents the environmental residual signal after eliminating the echo residue, E(l,k) is the environmental residual signal, X h (l,k) is the historical cache value of the reference signal X(l,k), and α is a constant. The above echo cancellation process is performed in the frequency domain. If it needs to be converted into a time domain signal, the time domain signal of the environmental residual signal after echo cancellation is obtained by performing an inverse Fourier transform.

[0096] In one embodiment, before the step of adjusting the playback volume of the audio playback unit 2 according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal, the step further includes:

[0097] First, obtain the smoothing energy corresponding to the reference wave signal. The calculation formula of the smoothing energy σ(l,k) of the reference signal is as follows:

[0098] σ 2 (l,k)=βσ 2 (l-1,k)+(1-β)|X(l,k)| 2 ,

[0099] Wherein l is the frame index, k is the frequency index, β is the recursive smoothing factor, which can be taken as 0.95 in this embodiment, and X(l,k) is the reference signal.

[0100] Then, the change amount of the adaptive filter coefficient is obtained according to the reference signal and the smoothing energy. Specifically, the calculation formula of the change amount δ(l) of the adaptive filter coefficient is as follows:

[0101] in,

[0102]

[0103]

[0104] Finally, the change in the adaptive filter coefficient determines whether to adjust the playback volume of the audio playback unit. Specifically, the change threshold is set to η0. When δ(l)>η0, it is determined that the adaptive filter has not converged well, the echo cancellation result of the lth frame is abandoned, and the speaker does not make adaptive adjustments.

[0105] Only when the adaptive filter reaches a better convergence state, the next step of volume adaptive adjustment is entered. This embodiment uses the coefficient change of the filter to judge the convergence state and avoid the influence of echo residue.

[0106] In this embodiment, considering that there may be a certain deviation in the consistency of microphone gain, and that the parameters of electronic equipment change over time, it is necessary to selectively calibrate the microphone gain according to user needs during the mass production stage. Therefore, before the step of obtaining the ambient sound signal collected by the audio collection unit 1 and the reference signal to be played by the audio playback unit 2, the following steps are also included:

[0107] First, the audio sample signal broadcast by the audio playing unit 2 is obtained through the audio acquisition unit 1, and the audio sample signal includes reference white noise. Then, the audio acquisition unit 1 is calibrated according to the sound pressure of the audio sample signal and the calibration sound pressure.

[0108] Specifically, in a quiet environment, the speaker is prevented from playing reference white noise () at a specified position, and the sound pressure P is calculated. The calculation formula is as follows:

[0109]

[0110] Among them, x n (t) is the audio sample signal, T is the frame duration of the sample signal, N is the number of sample signals, and the expected microphone gain G = P / P0 is obtained by calculating the ratio of the audio sample signal sound pressure P to the calibration sound pressure P0. The calibration sound pressure P0 is obtained by recording with a microphone under the same loudspeaker and the same white noise source and using the same calculation method.

[0111] When the value of the expected microphone gain G is not within the specified range, it indicates that the working parameters of the microphone need to be calibrated, and then the microphone is adjusted so that the value of the expected microphone gain G is within the specified range.

[0112] The volume adjustment method of the present invention first obtains the ambient sound signal collected by the audio collection unit 1 and the reference signal to be played in the audio playback unit 2, and obtains the corresponding reference filter signal according to the reference signal; then, the ambient sound signal is echo-cancelled according to the reference filter signal to obtain the ambient residual signal; then, according to the ambient residual signal, it is determined whether the ambient sound signal contains a voice signal; finally, when the ambient sound signal does not contain a voice signal, the playback volume of the audio playback unit 2 is adjusted according to the sound pressure of the reference filter signal and the sound pressure of the ambient residual signal. The present invention eliminates the echo signal formed by the reference signal in the ambient sound signal, and determines whether to adjust the playback volume of the audio playback unit 2 according to whether there is a voice signal, so as to reduce the interference of the user's voice and the audio of the electronic device itself on the ambient sound, and avoid misjudgment of volume adaptive adjustment.

[0113] In the first aspect, the volume adjustment method provided in this embodiment obtains an environmental residual signal through echo cancellation, and filters the reference signal through an adaptive filtering algorithm to obtain a reference filtered signal. According to the sound pressure ratio of the reference filtered signal and the environmental residual signal (that is, the sound pressure level difference between the reference filtered signal and the environmental residual signal), a decision is made as to whether to make the volume of the audio playback unit 2 of the electronic device adaptively change.

[0114] Secondly, this embodiment uses the kurtosis value of the environmental residual signal to determine whether the environmental sound signal may contain voice information uttered by the user, thereby avoiding the volume change adjustment strategy when there is voice in the environment.

[0115] Finally, the entity determines whether the adaptive filter has converged by the change in coefficients of the adaptive filter, thereby avoiding misleading volume changes caused by a large amount of echo residues before convergence.

[0116] The embodiment of the present invention provides a volume adjustment device 3, which is applied to electronic equipment, such as Figure 4 As shown, the electronic device further includes an audio acquisition unit 1 and an audio playback unit 2, and the volume adjustment device 3 includes a signal acquisition unit 31, an echo elimination unit 32, a signal determination unit 33 and a volume control unit 34. Among them:

[0117] The signal acquisition unit 31 is used to acquire the ambient sound signal collected by the audio acquisition unit 1 and the reference signal to be played in the audio playback unit 2, and obtain a corresponding reference filter signal according to the reference signal.

[0118] The echo cancellation unit 32 is used to perform echo cancellation on the ambient sound signal according to the reference filtering signal to obtain an ambient residual signal.

[0119] The signal determination unit 33 is used to determine whether the ambient sound signal contains a speech signal according to the ambient residual signal.

[0120] The volume control unit 34 is used to adjust the playback volume of the audio playback unit according to the sound pressure of the reference filter signal and the sound pressure of the environmental residual signal when the environmental sound signal does not contain a speech signal.

[0121] The volume adjustment device of the embodiment of the present invention adopts the volume adjustment method provided in the above embodiment, by eliminating the echo signal formed by the reference signal in the ambient sound signal, and deciding whether to adjust the playback volume of the audio playback unit 2 according to whether there is a voice signal, so as to reduce the interference of the user voice and the audio of the electronic device itself on the ambient sound, and avoid misjudgment of the volume adaptive adjustment.

[0122] The embodiment of the present invention also provides a computer device, such as Figure 5 As shown, it includes a storage medium and a processor, the storage medium stores a computer program, and when the processor executes the computer program, the steps of any volume adjustment method in the above embodiments are implemented.

[0123] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions (computer programs), or by controlling related hardware through instructions (computer programs), and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, a storage medium of a computer device in an embodiment of the present invention stores a plurality of instructions, which can be loaded by a processor to execute the steps of any embodiment of the volume adjustment method provided in an embodiment of the present invention.

[0124] The computer device of the embodiment of the present invention first obtains the ambient sound signal collected by the audio collection unit and the reference signal to be played in the audio playback unit, and obtains the corresponding reference filter signal according to the reference signal; then, the ambient sound signal is echo-cancelled according to the reference filter signal to obtain the ambient residual signal; then, according to the ambient residual signal, it is determined whether the ambient sound signal contains a voice signal; finally, when the ambient sound signal does not contain a voice signal, the playback volume of the audio playback unit is adjusted according to the sound pressure of the reference filter signal and the sound pressure of the ambient residual signal. The present invention eliminates the echo signal formed by the reference signal in the ambient sound signal, and determines whether to adjust the playback volume of the audio playback unit according to whether there is a voice signal, so as to reduce the interference of the user's voice and the audio of the electronic device itself on the ambient sound, and avoid misjudgment of the adaptive adjustment of the volume.

[0125] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any volume control method in the above embodiment are implemented.

[0126] Wherein, the storage medium and the processor are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines, such as through a bus connection. The storage medium stores computer execution instructions for implementing the data access control method, including at least one software function module that can be stored in the storage medium in the form of software or firmware. The processor executes various functional applications and data processing by running the software program and module stored in the storage medium. The storage medium can be, but is not limited to, a random access storage medium (Random Access Memory, referred to as RAM), a read-only storage medium (Read Only Memory, referred to as ROM), a programmable read-only storage medium (Programmable Read-Only Memory, referred to as PROM), an erasable read-only storage medium (Erasable Programmable Read-Only Memory, referred to as EPROM), an electrically erasable read-only storage medium (Electric Erasable Programmable Read-Only Memory, referred to as EEPROM), etc. Wherein, the storage medium is used to store programs, and the processor executes the program after receiving the execution instruction. Furthermore, the software programs and modules in the above-mentioned storage medium may also include an operating system, which may include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components. The processor may be an integrated circuit chip having signal processing capabilities. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic flow diagrams disclosed in this embodiment may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0127] Since the instructions stored in the storage medium can execute the steps in any volume adjustment method embodiment provided in the embodiments of the present invention, the beneficial effects that can be achieved by any volume adjustment method provided in the embodiments of the present invention can be achieved. For details, please refer to the previous embodiments and will not be repeated here.

[0128] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A volume adjustment method, characterized in that: Applied to an electronic device, the electronic device further includes an audio acquisition unit and an audio playback unit, and the volume adjustment method includes: Acquire the ambient sound signal collected by the audio collection unit and the reference signal to be played in the audio playback unit, and obtain a corresponding reference filtering signal according to the reference signal; Performing echo cancellation on the ambient sound signal according to the reference filtering signal to obtain an ambient residual signal; Determining whether the ambient sound signal contains a speech signal according to the ambient residual signal; When the ambient sound signal does not include a speech signal, adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal; The step of judging whether the ambient sound signal contains a speech signal according to the ambient residual signal comprises: Obtaining a signal kurtosis value of the environmental residual signal; According to the signal kurtosis value and a preset kurtosis threshold, it is determined whether the ambient sound signal contains a speech signal.

2. The volume adjustment method according to claim 1, characterized in that: The step of adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the environmental residual signal comprises: Determining a reference filtered signal sound pressure level and an ambient residual signal sound pressure level according to the sound pressure of the reference filtered signal and the sound pressure of the ambient residual signal; Determining a volume control parameter according to the reference filtered signal sound pressure level and the ambient residual signal sound pressure level; When the volume control parameter is greater than a preset first sound pressure level threshold, controlling the audio playback unit to increase the volume; When the volume control parameter is less than a preset second sound pressure level threshold, the audio playback unit is controlled to reduce the volume.

3. The volume adjustment method according to claim 1, characterized in that: Before the step of adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the environmental residual signal, the method further includes: Obtaining smoothed energy corresponding to the reference signal; Whether the audio playback unit is in a playback state is determined according to the smoothing energy.

4. The volume adjustment method according to claim 1, characterized in that: The step of obtaining a corresponding reference filtered signal according to the reference signal comprises: Acquire an impulse response function corresponding to an echo channel, where the echo channel includes a channel from the audio playback unit to the audio acquisition unit; Performing a convolution operation on the reference signal and the impulse response function to obtain a convolution result, wherein the convolution result is a modified reference signal; The modified reference signal is processed by an adaptive filter to obtain a reference filtered signal.

5. The volume adjustment method according to claim 4, characterized in that: After the step of performing echo cancellation on the ambient sound signal through an adaptive filter according to the convolution result to obtain an ambient residual signal, the method further includes: Nonlinear processing is performed on the environment residual signal to eliminate residual echo in the environment residual signal.

6. The volume adjustment method according to claim 4, characterized in that: Before the step of adjusting the playback volume of the audio playback unit according to the sound pressure of the reference filtered signal and the sound pressure of the environmental residual signal, the method further includes: Obtaining smoothed energy corresponding to the reference signal; Obtaining the adaptive filter coefficient variation according to the reference signal and the smoothing energy; Whether to adjust the playback volume of the audio playback unit is determined according to the coefficient change of the adaptive filter.

7. The volume adjustment method according to claim 1, characterized in that: Before the step of acquiring the ambient sound signal collected by the audio collection unit and the reference signal to be played in the audio playback unit, and obtaining the corresponding reference filter signal according to the reference signal, the method further includes: Acquire the audio sample signal broadcast by the audio playing unit through the audio acquisition unit; The audio acquisition unit is calibrated according to the sound pressure of the audio sample signal and the calibrated sound pressure.

8. A volume adjustment device, characterized in that: Applied to electronic equipment, the electronic equipment further includes an audio acquisition unit and an audio playback unit, and the volume adjustment device includes: A signal acquisition unit, used to acquire the ambient sound signal collected by the audio acquisition unit and the reference signal to be played in the audio playback unit, and obtain a corresponding reference filter signal according to the reference signal; an echo cancellation unit, configured to perform echo cancellation on the ambient sound signal according to the reference filter signal to obtain an ambient residual signal; A signal determination unit, configured to determine whether the ambient sound signal contains a speech signal according to the ambient residual signal; A volume control unit, configured to adjust the playback volume of the audio playback unit according to the sound pressure of the reference filter signal and the sound pressure of the environmental residual signal when the environmental sound signal does not contain a speech signal; The signal determination unit is specifically used for: Obtaining a signal kurtosis value of the environmental residual signal; According to the signal kurtosis value and a preset kurtosis threshold, it is determined whether the ambient sound signal contains a speech signal.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the processor executes the computer program, the steps of the volume adjustment method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Automatic volume adjustment processing method and device based on ambient sound, terminal and medium

    CN112423064A

  • Volume adjustment method and device, electronic equipment and computer readable storage medium

    CN117116276A

  • Removing recurring environmental sounds

    US9799329B1