Method and device for adjusting parameters of audio playing equipment and electronic equipment
By detecting the occlusion of the audio playback device and adjusting the parameters, the problem of damage to the volume and sound quality when the speaker is blocked is solved, and the audio playback effect is improved.
Patent Information
- Application Number
- CN202311494267.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-09
- Publication Date
- 2025-05-09
AI Technical Summary
During audio playback, when the speaker is blocked, the volume and sound quality of the sound will be damaged, affecting the audio playback effect of the terminal.
By detecting the occlusion of the audio playback device, the audio signal is collected by adjacent audio acquisition devices for echo analysis, determine whether the speaker is blocked, and automatically adjust the parameters of the audio playback device to compensate for the volume loss caused by the occlusion.
It realizes automatic adjustment of the volume parameters when the speaker is blocked, improves the audio playback effect and avoids the problem of unclear sound quality.
Smart Images

Figure CN119967336A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a parameter adjustment method and device for an audio playback device and an electronic device. Background Art
[0002] Audio playback devices, such as speakers, are provided on some terminal devices that can make calls or play audio or video. For example, in daily life, mobile terminals are often used for audio and video calls, listening to songs, watching videos, playing games, listening to the radio, watching live broadcasts and other entertainment activities. These applications all use the playback function of the speaker.
[0003] Generally, the existing solution of which speaker the sound comes from during audio playback is determined at the beginning of application design, and will not be automatically switched or adjusted during the entire application experience. In other words, the use and settings of the speaker are pre-set and fixed by the program developer according to the application. If the user intentionally or unintentionally blocks the audio playback device in working state during the experience, the sound volume and sound quality will be damaged, which will affect the audio playback effect of the terminal.
[0004] Therefore, how to provide a parameter adjustment scheme for an audio playback device that can automatically adjust the parameters of the audio playback device after the audio playback device is blocked to improve the audio playback quality is a technical problem that urgently needs to be solved in the field. Summary of the invention
[0005] The embodiments of this specification provide a method, apparatus, device, storage medium, and computer program product for adjusting parameters of an audio playback device, which realize automatic detection of whether an audio playback device is blocked, and automatically adjust the parameters of the audio playback device based on the detected blockage of the audio playback device, thereby improving the audio playback effect.
[0006] On the one hand, an embodiment of the present specification provides a method for adjusting parameters of an audio playback device, the method comprising:
[0007] When it is detected that the audio playback device in the target terminal is started, obtaining device layout information of the target terminal, wherein the device layout information includes the number and position relationship of the audio playback devices and audio collection devices in the target terminal;
[0008] Acquire a working audio playback device in the target terminal that is in a working state, and based on the positional relationship between the audio playback device and the audio collection device in the target terminal, use an audio collection device adjacent to the working audio playback device to perform audio collection on an audio signal played by the working audio playback device;
[0009] Performing echo analysis on the audio signal collected by the adjacent audio collection device to obtain an echo estimation result corresponding to the working audio playback device;
[0010] Based on the echo estimation result corresponding to the working audio playback device, determining whether the working audio playback device is blocked;
[0011] When the working audio playback device is blocked, parameters of the audio playback device on the target terminal are adjusted.
[0012] Another aspect provides a parameter adjustment device for an audio playback device, the device comprising:
[0013] A device layout information acquisition module, used to acquire device layout information of the target terminal when detecting that the audio playback device in the target terminal is started, wherein the device layout information includes the number and position relationship of the audio playback devices and audio acquisition devices in the target terminal;
[0014] An audio acquisition module is used to acquire a working audio playback device in the target terminal that is in a working state, and based on the positional relationship between the audio playback device and the audio acquisition device in the target terminal, use an adjacent audio acquisition device of the working audio playback device to perform audio acquisition on the audio signal played by the working audio playback device;
[0015] An echo estimation module, used to perform echo analysis on the audio signal collected by the adjacent audio collection device to obtain an echo estimation result corresponding to the working audio playback device;
[0016] An occlusion judgment module, used to judge whether the working audio playback device is blocked based on the echo estimation result corresponding to the working audio playback device;
[0017] The parameter adjustment module is used to adjust the parameters of the audio playback device on the target terminal when the working audio playback device is blocked.
[0018] Another aspect provides an electronic device, including: a processor;
[0019] a memory for storing instructions executable by the processor;
[0020] The processor is configured to execute the instruction to implement any of the above-mentioned parameter adjustment methods for the audio playback device.
[0021] On the other hand, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned parameter adjustment methods for audio playback devices.
[0022] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the parameter adjustment method of the audio playback device provided in the above various optional implementations.
[0023] The parameter adjustment method, apparatus, device, storage medium, and computer program product of the audio playback device provided in the embodiments of this specification have the following technical effects:
[0024] The parameter adjustment method of the audio playback device provided in the embodiment of the present specification automatically obtains the device layout information of the target terminal when it is detected that the audio playback device in the target terminal is started, obtains the neighboring audio acquisition devices of the current working audio playback device based on the device layout information, uses the neighboring audio acquisition devices to collect the audio signal played by the working audio playback device, performs echo analysis based on the collected audio signal, determines whether the working audio playback device is blocked based on the echo estimation result obtained by the echo analysis, and then automatically adjusts the volume parameters of the audio playback device on the target terminal based on the blocking condition of the working audio playback device to compensate for the volume loss caused by the blocking of the audio playback device, thereby realizing the automatic adjustment of the volume parameters of the audio playback device and improving the audio playback effect of the target terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions and advantages in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 What is shown is only a schematic diagram of an application environment of a method for adjusting parameters of an audio playback device;
[0027] Figure 2 This is a schematic diagram of the layout of the speaker and microphone on a mobile phone terminal in a scenario example of this manual;
[0028] Figure 3 is a flow chart of a method for adjusting parameters of an audio playback device provided by an embodiment of the present specification;
[0029] Figure 4 is a schematic diagram of the principle flow of echo analysis in one embodiment of this specification;
[0030] Figure 5 is a schematic diagram of a parameter adjustment process of a speaker in an embodiment of this specification;
[0031] Figure 6 is a schematic diagram of a parameter adjustment scheme of a speaker in an embodiment of this specification;
[0032] Figure 7 It is a structural schematic diagram of a parameter adjustment device for an audio playback device provided in an embodiment of this specification;
[0033] Figure 8 is a block diagram of an electronic device for adjusting parameters of an audio playback device provided in an embodiment of this specification;
[0034] Fig. 9 It is a block diagram of another electronic device for adjusting parameters of an audio playback device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this specification.
[0036] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0037] See also Figure 1 , Figure 1 1 is a schematic diagram of an application environment of a parameter adjustment method for an audio playback device provided in an embodiment of the present specification. The application environment may at least include a server 100 and a terminal 200.
[0038] In an optional embodiment, the server 100 can be used to receive data sent by the terminal 200, adjust the parameters of the audio playback device on the terminal 200, and send the adjustment instruction to the terminal 200, or the server 100 can be used to store the device information of different terminals and the parameter adjustment strategy of the audio playback device for use by each terminal. The server 100 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0039] In an optional embodiment, the terminal 200 may be a terminal device that sends data to the server 100, or a terminal device that directly obtains local device information and adjusts the parameters of the semantic playback device of the local terminal. Specifically, the terminal 200 may be an electronic device such as a smart phone, a desktop computer, a tablet computer, a laptop computer, a smart wearable device, a vehicle-mounted device, etc.; it may also be software running on the above electronic devices, such as an application, a small program, etc. The operating system running on the electronic device in the embodiments of this specification may include but is not limited to Android system, IOS system, Linux, Windows, etc.
[0040] In addition, it should be noted that Figure 1 What is shown is merely a schematic diagram of an application environment of a method for adjusting parameters of an audio playback device, and the embodiments of this specification are not limited to the above.
[0041] In the embodiments of this specification, the server 100 and the terminal 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of this specification.
[0042] The parameter adjustment method of the audio playback device in the embodiment of this specification can be used in a terminal device with an audio playback device (such as a speaker), and the terminal device can be used for audio and video calls, listening to songs, watching videos, playing games, listening to radio, watching live broadcasts and other entertainment activities. These applications will use the playback function of the speaker. However, in life, similar scenarios are often encountered, for example: holding the mobile phone horizontally with both hands to play games, during the game process, the human hand usually blocks the sound hole of the mobile phone, especially in the process of operating the screen with fingers, the palm of the hand basically completely blocks the sound outlet, resulting in the sound not being released well and affecting the speaker playback effect; for example, in some live broadcast applications, the mobile phone is fixed on a bracket, and the design of some mobile phone brackets is unscientific or the user clamps the mobile phone in the wrong position, resulting in the bottom speaker being blocked and the playback sound volume is lost or the sound feels dull and unclear; for example, in a call application, the mobile phone screen is placed flat on the desktop with the phone facing down, and the speaker on the top of the mobile phone is pressed on the desktop, thereby blocking the sound of the top speaker, affecting the user's listening effect.
[0043] However, for applications on general terminals, such as audio and video calls, listening to music, watching videos, playing games, listening to the radio, watching live broadcasts, etc., according to different application needs, application developers will set one or more of the speakers in the terminal as available speakers for the application according to the model, and start the set speakers when the application needs the speakers. Figure 2 This is a schematic diagram of the layout of the speaker and microphone on a mobile phone terminal in a scenario example of this manual, such as Figure 2 As shown, currently mobile phones have top speakers and bottom speakers, and each speaker has one microphone next to it and two microphones adjacent to it. The bottom speaker is usually selected as the available speaker of the application by default. When the user opens the application and clicks on the speaker external mode, the default available speaker set in the application will be activated, and the sound will be played in the way of the speaker preset by the program developer. The speaker status will not change during the entire application process. If the speaker is blocked during use, the sound quality of the application will be damaged.
[0044] The embodiments of this specification provide a method for adjusting parameters of a language playback device, which can automatically turn on a microphone adjacent to a speaker for recording according to the device layout information of a target terminal, analyze the echo components in the recording in real time, calculate the echo estimation result, and determine whether the adjacent speaker is in an occluded state through the echo estimation result. If the corresponding speaker is detected to be blocked, corresponding processing measures are executed to adjust the volume parameters of the speaker on the target terminal, reduce the impact of the speaker being blocked, and improve the playback effect and sound quality of the terminal.
[0045] The following describes a method for adjusting parameters of an audio playback device in an embodiment of this specification. Figure 3 It is a flow chart of a parameter adjustment method for an audio playback device provided by an embodiment of the present specification. The present specification provides method operation steps such as the embodiment or flow chart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many steps, and does not represent the only execution order. When the actual system or server product is executed, the method sequence shown in the embodiment or the accompanying drawings may be executed or executed in parallel (for example, in a parallel processor or multi-threaded processing environment). The method can be applied to terminals with audio playback devices, such as computers, tablet computers, smart phones, smart wearable devices, and vehicle-mounted devices, or applied to applications or applets on the terminal that need to use audio playback devices. Of course, it can also be applied to servers according to actual needs, and the embodiments of this specification do not specifically limit this. Specifically, Figure 3 As shown, the method may include:
[0046] S302: When it is detected that the audio playback device in the target terminal is started, the device layout information of the target terminal is obtained, where the device layout information includes the quantity and position relationship of the audio playback devices and audio collection devices in the target terminal.
[0047] In the specific implementation process, the target terminal may be a terminal that currently needs to adjust the parameters of the audio device, specifically a mobile phone, a laptop computer, a tablet, or other devices with an audio playback function or an audio call function. When it is detected that the audio playback device on the target terminal is started, such as: when an application on the target terminal needs to play audio or make an audio call, and the audio playback device needs to be started, the device layout information of the target terminal is obtained. Among them, the device layout information may include the number of audio playback devices and audio acquisition devices in the target terminal and the positional relationship between each audio playback device and the audio acquisition device. The audio acquisition device can be understood as a device in the target terminal that can collect audio information for voice calls, such as: the microphone in some terminals can be an audio acquisition device. In the device layout information, the position of each audio playback device and audio acquisition device on the target terminal and the distance between each audio playback device and the audio acquisition device can be marked, or only the adjacent audio acquisition devices of each audio playback device can be marked for subsequent use. Such as: Figure 2 The mobile phone terminal shown includes two speakers (i.e., audio playback devices) and two microphones (i.e., audio acquisition devices), wherein the top speaker is adjacent to the top microphone, and the bottom speaker is adjacent to the bottom microphone, while the top speaker is relatively far from the bottom microphone, and the bottom speaker is also relatively far from the top microphone.
[0048] In some embodiments of this specification, obtaining the device layout information of the target terminal includes:
[0049] Obtain the model of the target terminal, and obtain the device layout information of the target terminal according to the model of the target terminal.
[0050] In the specific implementation process, the device layout information of terminals of different models is generally different, but the device layout of terminals of the same model is generally the same, and the device layout information of the target terminal can be obtained by obtaining the model of the target terminal and according to the model of the target terminal. For example: the device layout information of terminals of different models can be stored in the cloud or the local target terminal in advance, and when it is detected that an audio playback device is started on the target terminal, the model of the target terminal can be obtained, and the device layout information corresponding to the model can be obtained from the cloud or local database based on the model of the target terminal.
[0051] By storing the device layout information corresponding to different models, when the parameters of the audio playback device need to be adjusted, the layout information of the audio playback device and audio acquisition device of the target terminal can be quickly obtained based on the model of the target terminal, laying a data foundation for the subsequent parameter adjustment of the audio playback device and improving the speed of the parameter adjustment of the audio playback device.
[0052] S304: Acquire a working audio playback device in the target terminal that is in working state, and based on the positional relationship between the audio playback device and the audio collection device in the target terminal, use an adjacent audio collection device of the working audio playback device to collect audio signals played by the working audio playback device.
[0053] In a specific implementation process, after obtaining the device layout information of the target terminal, the audio playback device currently in working state in the target terminal can be obtained as a working audio playback device, wherein the working audio playback device can be one or more, and can be determined according to the default settings in the application being used in the target terminal, such as: if a video application on the target terminal is set to start a certain speaker at the bottom of the terminal to play sound when playing the video, after the video application is started, the speaker at the bottom can be the current working audio playback device. Usually, the audio playback device and audio acquisition device of the terminal are designed in pairs, and an audio acquisition device is set near each audio playback device. Based on the device layout information of the target terminal, the adjacent audio acquisition device of the working audio playback device can be obtained. The adjacent audio acquisition device of the working audio playback device can be understood as the audio acquisition device closest to the working audio playback device on the target terminal, or the audio acquisition device on the target terminal within a preset distance from the working audio playback device. It can be set according to actual needs, and the embodiments of this specification are not specifically limited. Usually, one audio playback device corresponds to one adjacent audio acquisition device. If there are multiple working audio playback devices, each working audio playback device can correspond to one adjacent audio acquisition device.
[0054] After obtaining the neighboring audio acquisition device of the working audio playback device, the neighboring audio acquisition device can be used to collect audio. The working audio playback device is playing audio, and the neighboring audio acquisition device can collect the audio signal played by the working audio playback device. The audio collection time can be set according to actual needs, such as: collecting 3 seconds of audio signal, or collecting 5 seconds of audio signal, which is not specifically limited in the embodiments of this specification.
[0055] For example: when the user opens the video application on the target terminal, the video application will start the default speaker A in the program to play the audio in the video. Speaker A is the current working audio playback device. After detecting that speaker A is started, the device layout information of the target terminal can be obtained. Based on the device layout information of the target terminal, the adjacent microphone B corresponding to speaker A on the target terminal, that is, the adjacent audio acquisition device, can be obtained. The adjacent microphone B corresponding to speaker A is used for audio acquisition. At this time, speaker A is playing the audio data in the video application. The adjacent microphone B can collect the audio signal played by speaker A during the video application playback process.
[0056] Generally, when the application on the target terminal is started, the audio capture device will also be turned on. After determining the neighboring audio capture devices of the working audio playback device, the neighboring audio capture devices can be used to record and collect the audio signals played by the working audio playback device. Of course, if the neighboring audio capture device is not turned on, if the user authorizes the audio capture device to be turned on, the neighboring audio capture device can be automatically turned on to record and collect the audio signals played by the audio playback device. If the working audio playback device is not currently playing audio, it is also possible to use pre-stored test audio to play audio on the working audio playback device using the test audio, thereby using the neighboring audio capture device to record and collect audio signals to determine whether the working audio playback device is blocked.
[0057] S306: Perform echo analysis on the audio signal collected by the neighboring audio collection device and the input audio signal of the working audio playback device to obtain an echo estimation result corresponding to the working audio playback device.
[0058] In the specific implementation process, the volume and sound quality of audio playback devices such as speakers will be affected when they are blocked by external objects, but how to detect whether the speaker is blocked is a key technology. During the research process of the present invention, it was found that the layout of the acoustic space of a general mobile terminal is relatively compact, and the spatial positions of the microphone and the speaker are relatively close. Therefore, when the speaker is blocked by external objects, most of the sound emitted by the speaker will be quickly reflected back by the external objects, and the microphone next to it will collect a relatively large echo signal. If the speaker is not blocked, the sound will be released smoothly and the echo signal of the signal collected by the microphone is much smaller than that of the blocked scene. In the embodiment of this specification, it is possible to determine whether the speaker is in an obstructed state by detecting the echo size of the signal collected by the microphone. Specifically, after the audio signal played by the working audio playback device is collected by the adjacent audio collection device of the working audio playback device, the collected audio signal and the input audio signal of the working audio playback device can be echo analyzed to obtain the echo estimation result corresponding to the working audio playback device. Among them, the input audio signal of the working audio playback device can be understood as the audio signal input into the working audio playback device by the application currently using the working audio playback device, such as: if the application using the working audio playback device is a video application, then the input audio signal can be understood as the audio signal in the video data played in the video application, if the application using the working audio playback device is an audio call application, then the input audio signal can be understood as the audio signal input into the audio call application by the user. Echo analysis can be understood as a method for analyzing the size of the echo in the collected audio signal, and the echo estimation result can be understood as a parameter that can characterize the size of the echo signal in the audio signal.
[0059] Among them, the specific method of echo analysis can be selected according to actual needs, and is not specifically limited in the embodiments of this specification. For example, referring to the records of the above embodiments, if the audio playback device is blocked by external objects, there will be a relatively large echo, and there may be a certain difference between the audio signal collected by the adjacent audio acquisition device and the input audio signal of the audio playback device. It is possible to judge whether there is a relatively large echo signal in the audio signal collected by the adjacent audio acquisition device by comparing the audio signal collected by the adjacent audio acquisition device with the input audio signal of the working audio playback device. If the difference between the collected audio signal and the input audio signal is relatively large, it means that there is a relatively large echo signal. Alternatively, an audio acquisition device in a terminal device with the same model as the target terminal is used in advance to collect audio signals when the audio playback device adjacent to it plays audio at different volume levels, and the audio signal collected in this case is stored as a test audio signal. When performing echo analysis on the audio signal collected by the neighboring audio collection device of the working audio playback device in the target terminal, the audio signal collected by the neighboring audio collection device can be compared with the test audio signal acquired in advance. For example, the test audio signal with the same current volume as the working audio playback device is compared with the audio signal collected by the neighboring audio collection device, and the difference between the two audio signals is used as the echo estimation result. If the difference is too large, it may indicate that there is a relatively large echo signal at present.
[0060] In some embodiments of the present specification, performing echo analysis on the audio signal collected by the neighboring audio collection device and the input audio signal of the working audio playback device to obtain the echo estimation result corresponding to the working audio playback device includes:
[0061] Performing adaptive filtering on the input audio signal of the working audio playback device to obtain a linear echo estimation signal corresponding to the input audio signal;
[0062] Subtracting the audio signal collected by the adjacent audio collection device from the linear echo estimation signal to obtain a residual signal;
[0063] Perform nonlinear processing on the residual signal to obtain a signal after echo suppression;
[0064] Subtracting the audio signal collected by the adjacent audio collection device from the echo suppressed signal to obtain an echo estimation signal;
[0065] An echo estimation result corresponding to the working audio playback device is obtained based on the echo estimation signal.
[0066] In the specific implementation process, Figure 4 Schematic diagram of the principle flow of echo analysis in one embodiment of this specification. Figure 4As shown, when performing echo analysis on the audio signal collected by the adjacent audio acquisition device, the input audio signal of the working audio playback device corresponding to the adjacent audio acquisition device can be firstly adaptively filtered to obtain a linear echo estimation signal corresponding to the input audio signal. Adaptive filtering is a filtering method that can remove noise from the input audio signal of the working audio playback device and improve the accuracy of the echo estimation result. Specifically, a suitable adaptive filter can be selected as needed to adaptively filter the input audio signal of the working audio playback device. The embodiment of this specification does not specifically limit the method of adaptive filtering.
[0067] In addition, if Figure 4 As shown, in some embodiments of the present specification, adaptive filtering is performed on the input audio signal of the working audio playback device to obtain a linear echo estimation signal corresponding to the input audio signal, including:
[0068] Perform echo delay detection on the audio signal collected by the adjacent audio collection device to obtain the echo delay value of the audio signal;
[0069] Based on the echo delay value, an input audio signal of a working audio playback device corresponding to a neighboring audio acquisition device is offset to obtain a reference alignment signal;
[0070] The reference alignment signal is adaptively filtered to obtain a linear echo estimation signal corresponding to the input audio signal.
[0071] In the specific implementation process, Figure 4 As shown, the audio signal d collected by the microphone, i.e., the adjacent audio collection device, is subjected to echo delay detection to obtain the acoustic echo delay value delay of the audio signal. The echo delay value delay is used to perform offset processing on the reference signal x (i.e., the input audio signal mentioned above) of the speaker corresponding to the microphone, i.e., the working audio playback device, to obtain a reference alignment signal x', and then the reference alignment signal x' is adaptively filtered to obtain a linear echo estimation signal corresponding to the input audio signal.
[0072] The embodiments of the present specification perform echo delay detection on the audio signals collected by the neighboring audio collection device, and then use the results of the echo delay detection to perform offset processing on the input audio signals of the working audio playback device, and adaptively filter the results after the offset processing, thereby improving the accuracy of the input audio signal filtering processing, and further improving the accuracy of the subsequent echo analysis results, providing an accurate data basis for determining whether the working audio playback device is blocked.
[0073] like Figure 4As shown, after obtaining the linear echo estimation signal corresponding to the input audio signal of the working audio acquisition device, the audio signal d collected by the neighboring audio acquisition device can be subtracted from the linear echo estimation signal to obtain the filtered residual signal e. The residual signal e is subjected to NLP (Nonlinear programming) to obtain the echo suppressed signal, which can be understood as the remaining sound signal other than the echo signal. Then, the audio signal d collected by the neighboring audio acquisition device is subtracted from the obtained echo suppressed signal to obtain the desired echo estimation signal. The echo estimation signal can characterize the size of the echo in the audio signal collected by the neighboring audio acquisition device. Based on the echo estimation signal, the echo estimation result corresponding to the working audio playback device can be obtained.
[0074] In some embodiments of this specification, obtaining an echo estimation result corresponding to the working audio playback device based on the echo estimation signal includes:
[0075] Performing energy calculation on the echo estimation signal to obtain an echo estimation energy value;
[0076] The echo estimation energy value is divided by the energy value of the reference alignment signal to obtain an echo gain value, and the echo gain value is used as the echo estimation result corresponding to the working audio playback device.
[0077] In a specific implementation process, after obtaining the echo estimation signal, the echo estimation signal can be energy-calculated to obtain an echo estimation energy value En_echo, and the echo estimation energy value En_echo can be divided by the energy value En_x' of the reference alignment signal x', to obtain the echo gain value EchoGain = En_echo / En_x'. Energy calculation can be understood as a method for calculating the energy in an audio signal, which can be selected according to actual needs, such as: a short-time energy algorithm can be used to calculate the energy of the echo estimation signal and the reference alignment signal, or other energy algorithms can be selected, and the embodiments of this specification do not specifically limit this. The calculated echo gain value is used as the echo estimation result corresponding to the corresponding working audio playback device, and the echo gain value can characterize the size of the echo existing in the audio signal of the working audio playback device collected by the neighboring audio acquisition device.
[0078] The embodiments of this specification collect the audio signal played by the working audio playback device through the adjacent audio collection device of the working audio playback device, perform echo estimation on the audio signal, and provide a specific echo estimation method. Based on the echo estimation result, it is evaluated whether the working audio playback device is blocked, so that the parameters of the audio playback device on the target terminal can be adjusted to reduce the problem of poor audio playback effect and sound quality caused by the audio playback device being blocked, thereby improving the audio playback effect of the target terminal.
[0079] S308: Based on the echo estimation result corresponding to the working audio playback device, determine whether the working audio playback device is blocked.
[0080] In the specific implementation process, the audio signal played by the working audio playback device is collected by the neighboring audio collection device corresponding to each working audio playback device, and the collected audio signal is echo analyzed to obtain the echo estimation result corresponding to each working audio playback device, and judge whether the working audio playback device is blocked based on the echo estimation result. The echo estimation result can characterize the size of the echo in the collected audio signal and other information, such as: the echo estimation result can be the difference between the audio signal collected by the neighboring audio collection device and the input audio signal (or test audio signal) of the working audio playback device, or it can also be the echo gain value recorded in the above embodiment. The obtained echo estimation result can be compared with a preset threshold. If the echo estimation result is greater than the preset threshold, it can be considered that the working audio playback device corresponding to the echo estimation result is blocked, and the working audio playback device with an echo estimation result greater than the preset threshold can be used as a blocked audio playback device.
[0081] S310: When the working audio playback device is blocked, adjust parameters of the audio playback device on the target terminal.
[0082] In the specific implementation process, after determining that there is a blocked working audio playback device in the target terminal based on the echo estimation result, such as: one or more working audio playback devices are blocked, it can be explained that the current audio playback effect of the target terminal will be affected, and the parameters of the audio playback device on the target terminal can be adjusted, such as: the volume parameters of the audio playback device on the target terminal can be adjusted, and the volume of each working audio playback device can be increased to compensate for the volume loss caused by the audio playback device being blocked, and improve the audio playback effect of the target terminal. Or, the parameters of some sound effect enhancement functions in the blocked audio playback device (such as: sound effect mode, pitch change, equalizer, etc.) are adjusted to improve the sound quality of the audio signal played by the audio playback device, and compensate for the unclear sound quality caused by the audio playback device being blocked. Of course, according to actual needs, other parameter adjustment strategies for audio playback devices can also be set, and this specification embodiment does not specifically limit this. Of course, if the audio signal collected by the adjacent audio acquisition device is echo analyzed, it is determined that there is no currently blocked working audio playback device, indicating that the playback effect of the current audio playback device will not be affected, and the parameters of the audio playback device on the target terminal can be adjusted.
[0083] In some embodiments of this specification, adjusting parameters of an audio playback device on a target terminal includes:
[0084] When it is determined that at least one working audio playback device on the target terminal is blocked, it is determined whether there is a working audio playback device in the target terminal that is not blocked, and if so, the volume of the unblocked working audio playback device is increased.
[0085] In the specific implementation process, if the audio signal collected by the adjacent audio acquisition device is echo-analyzed, and it is determined that at least one working audio playback device on the current target terminal is blocked, it means that the parameters of the audio playback device of the target terminal can be triggered to adjust. It can be first determined whether there is a working audio playback device that is not blocked at present, such as: the number of the blocked working audio playback device and the working audio playback device on the target terminal can be compared to determine whether there is a working audio playback device that is not blocked at present. For example: if there are 2 working audio playback devices on the target terminal at present, and after echo analysis, it is determined that there is one blocked working audio playback device, then it can be determined that there is another unblocked working audio playback device at present. Then, based on the situation of the blocked working audio playback device and the unblocked working audio playback device on the target terminal, the corresponding parameter adjustment strategy is selected. If it is determined that there is currently one blocked audio playback device and at least one unblocked audio playback device after echo analysis, the volume of the unblocked audio playback device can be directly increased to compensate for the volume loss of the blocked audio playback device and improve the overall audio playback effect of the target terminal. Among them, the multiple or value of the volume increase of the unobstructed audio playback device can be set according to actual needs, and the embodiments of this specification do not make specific limitations. For example: if the original volume of the unobstructed working audio playback device is relatively small, then the volume can be increased. If the original volume of the unobstructed working audio playback device is already relatively loud, then the volume can be increased less.
[0086] It can be seen that the parameters of the audio playback device adjusted in some embodiments of the present specification are mainly volume parameters. By adjusting the volume parameters, the volume loss caused by the audio playback device being blocked can be quickly compensated.
[0087] In some embodiments of this specification, adjusting parameters of an audio playback device on a target terminal includes:
[0088] When it is determined that there is no unobstructed working audio playback device in the target terminal, determine whether there is an unactivated audio playback device in the target terminal. If there is an unactivated audio playback device in the target terminal, turn on at least one unactivated audio playback device, and set the volume of the newly activated audio playback device to be greater than the volume of the obstructed audio playback device, wherein the obstructed audio playback device is a working audio playback device that is obstructed in the target terminal.
[0089] In the specific implementation process, after comparing the number of blocked audio playback devices on the target terminal with the number of working audio playback devices, it is found that all current working audio playback devices are blocked, that is, there is no unblocked working audio playback device at present. At this time, it can be determined whether there are other unactivated audio playback devices on the target terminal. Usually, there can be multiple audio playback devices on a terminal, but the number of audio playback devices activated by the application on the terminal by default may be different. Some applications may only start one or part of the audio playback devices at a time to meet the needs, and some applications may need to start all audio playback devices to meet the needs. After determining that there is no unblocked working audio playback device on the target terminal, it is determined whether there are any unactivated audio playback devices on the target terminal. If there are unactivated audio playback devices, at least one unactivated audio playback device can be turned on, and the volume of the newly activated audio playback device can be set to be greater than the volume of the blocked audio playback device, so that the volume loss of the blocked audio playback device can be compensated and the audio playback effect can be improved. Among them, the specific number of unactivated audio playback devices can be determined according to actual needs, and the embodiments of this specification are not specifically limited. For example, the degree of obstruction of the currently blocked audio playback device can be analyzed based on the echo analysis result. For example, if the echo gain value is relatively large, it can be said that the obstruction may be relatively serious. If the degree of obstruction is relatively high, several more audio playback devices can be turned on. If the degree of obstruction is not high, fewer audio playback devices can be turned on. Of course, the number of unopened audio playback devices also needs to be considered, and this specification does not specifically limit this. The blocked audio playback device can be understood as a working audio playback device that is blocked on the target terminal after echo analysis.
[0090] It should be noted that when determining whether there are other unstarted audio playback devices on the target terminal, the unstarted audio playback device needs to be an available audio playback device. If an audio playback device is damaged, the audio playback device can be marked in the device layout information of the target terminal and ignored when determining whether there are other unstarted audio playback devices.
[0091] In addition, if there are multiple obstructed audio playback devices, when setting the volume of the newly turned on audio playback device, the average value, median value or maximum value of the volume of the obstructed audio playback device can be used as a standard to set the volume of the newly turned on audio playback device, such as: setting the volume of the newly turned on audio playback device to 1.5 times the average value (or median value or maximum value) of the volume of the obstructed audio playback device. The specific setting scheme of the volume of the newly turned on audio playback device can be set or adjusted according to actual needs, and the embodiments of this specification do not make specific limitations.
[0092] In the case where all working audio playback devices on the target terminal are blocked, the embodiment of the present specification automatically identifies and detects whether there are other available audio playback devices that have not been activated. If so, at least one available audio playback device that has not been activated is automatically activated, and the volume loss of the blocked working audio playback device is compensated by setting the volume of the newly activated audio playback device, thereby improving the audio playback effect and realizing automatic adjustment of the parameters of the audio playback device.
[0093] In some embodiments of this specification, adjusting parameters of an audio playback device on a target terminal further includes:
[0094] When there is an unobstructed working audio playback device or an unactivated audio playback device in the target terminal, the volume of the obstructed audio playback device is reduced.
[0095] In a specific implementation process, when there is an unobstructed working audio playback device on the target terminal, the volume of the unobstructed working audio playback device can be increased while the volume of the obstructed audio playback device can be reduced. Similarly, when there is no unobstructed working audio playback device on the target terminal, but there is an unactivated audio playback device, the volume of the obstructed audio playback device can be reduced while setting the volume of the newly activated audio playback device. This can not only make up for the volume loss caused by the obstruction of the audio playback device, but also avoid the problem of poor sound quality of the blocked audio playback device due to being blocked and the life of the blocked audio playback device being affected by being blocked.
[0096] In some embodiments of this specification, adjusting parameters of an audio playback device on a target terminal includes:
[0097] If it is determined that there is no unobstructed working audio playback device in the target terminal and there is no unstarted audio playback device, the volume of the obstructed audio playback device is increased, wherein the obstructed audio playback device is a working audio playback device that is obstructed in the target terminal.
[0098] In the specific implementation process, after comparing the number of blocked audio playback devices on the target terminal with the number of working audio playback devices, it is found that all current working audio playback devices are blocked, which means that there is no unblocked working audio playback device at present. At this time, it can be determined whether there are other unactivated audio playback devices on the target terminal. If it is determined through detection that there are no unactivated audio playback devices on the target terminal, that is to say, all available audio playback devices on the target terminal have been started, audio playback is being performed, and all audio playback devices are blocked. At this time, the volume of the blocked audio playback device can be increased, such as: the volume of all blocked audio playback devices is increased by 1 times, or according to the blocking degree of each audio playback device, the audio playback device with a relatively low blocking degree is selected to increase the volume, or according to the position of each audio playback device, one or two audio playback devices are selected at different positions to increase the volume. The method of increasing the volume of the blocked audio playback device can be set or adjusted according to actual needs, and the embodiments of this specification are not specifically limited.
[0099] When all audio playback devices of the target terminal are started and blocked, the volume loss caused by the blockage is compensated by automatically increasing the volume of the blocked audio playback device, thereby automating the adjustment of audio playback device parameters and improving the audio playback effect of the terminal.
[0100] The parameter adjustment method of the audio playback device provided in the embodiment of the present specification automatically obtains the device layout information of the target terminal when it is detected that the audio playback device in the target terminal is started, obtains the neighboring audio acquisition devices of the current working audio playback device based on the device layout information, uses the neighboring audio acquisition devices to collect the audio signal played by the working audio playback device, performs echo analysis based on the collected audio signal, determines whether the working audio playback device is blocked based on the obtained echo estimation result, and then automatically adjusts the volume parameters of the audio playback device on the target terminal based on the blocking condition of the working audio playback device to compensate for the volume loss caused by the blocking of the audio playback device, thereby realizing automatic adjustment of the volume parameters of the audio playback device and improving the audio playback effect of the target terminal.
[0101] In some embodiments of this specification, the method further includes:
[0102] The working audio playback device in the target terminal in a working state is obtained once at a preset time interval, and it is determined whether the working audio playback device obtained each time is blocked, so as to adjust the parameters of the audio playback device in the target terminal.
[0103] In the specific implementation process, during the use of the target terminal, the state of the audio playback device may be different at different times. For example, the application being used in the target terminal may change, and the audio playback devices started by different applications may be different. In addition, the target terminal may move during use, and the audio playback device that was originally unobstructed may become obstructed during the movement. Similarly, the audio playback device that was originally obstructed may become unobstructed during the movement. A preset time can be set in advance, and the working audio playback device in the target terminal in a working state is obtained every preset time, and the audio signal played by the working audio playback device is collected using the adjacent audio acquisition device of the working audio playback device. Based on the audio signal received by the adjacent audio acquisition device, it is determined whether the working audio playback device is blocked. Based on the blocking of each working audio playback device on the target terminal, the parameter adjustment strategy of the audio playback device on the target terminal is determined, and the parameters of the audio playback device on the target terminal are adjusted. The specific adjustment method can refer to the records of the above embodiment and will not be repeated here.
[0104] That is to say, in the embodiments of the present specification, the working audio playback device in working state on the target terminal can be obtained once at regular intervals, and a detection can be performed on whether it is blocked. Based on the situation that the audio playback device is blocked, the parameters of the audio playback device on the target terminal are readjusted to ensure that the audio playback in the target terminal can continue to maintain a relatively good playback effect.
[0105] Figure 5 FIG. 1 is a flow chart of the parameter adjustment process of a speaker in an embodiment of the present specification. Figure 5 As shown, taking a speaker as an audio playback device and a microphone as an audio acquisition device as an example, the parameter adjustment process of the audio playback device in the embodiment of this specification is specifically introduced:
[0106] like Figure 5As shown, the program deployed on the terminal (such as a smart phone) will detect the model of the current terminal (the layout and number of speakers and microphones of different models are different), and find the corresponding device layout information of the speaker and microphone from the terminal or the cloud according to the model result. Based on the device layout information, the number of speakers of the terminal and the adjacent microphones corresponding to the speakers can be found out (used to control the start of the microphone and the corresponding acquisition of the audio signal). During the normal application experience process of the user, the default speaker (one or more speakers) designed by the original application program will be used for sound playback, and the microphone adjacent to the speaker in the playback working state will be turned on for recording. The obtained recording signal and playback signal will be echo analyzed, and the echo gain value average EchoGainAvg within a period of time (for example, 3 seconds) will be calculated. When the EchoGainAvg value exceeds the preset threshold Thrd, it is judged that the adjacent speaker corresponding to the recording microphone is currently in a blocked state. On the contrary, if the EchoGainAvg value is lower than Thrd, it is considered that the current speaker is not blocked. If the speaker is not blocked, the parameters and state of the current player will not be changed. On the contrary, if the speaker is judged to be in a blocked state, the corresponding speaker parameter adjustment strategy will be executed.
[0107] Figure 6 Schematic diagram of a parameter adjustment scheme of a speaker in an embodiment of this specification. Figure 6 As shown, the parameter adjustment of the speaker can be divided into two cases according to whether the speaker in working state on the terminal is completely blocked. Currently, there are multiple speakers in the playing state, and the volume of the blocked speaker will be adjusted to a times the current volume (usually a<1), and if other speakers are also in the playing state and the detection result is not blocked (that is, the working speakers on the current terminal are not completely blocked, and there are still unblocked working speakers), the volume of the speaker will be amplified to b times the current volume (usually b>1) to compensate for the volume loss of the speaker in the blocked state; if there is only one speaker in the playing state and it is detected to be in the blocked state (that is, the working speakers on the current terminal are all blocked), it will be determined whether there are other available speakers and turned on for sound playback, the volume of the original speaker will be reduced to a times, and the newly started speaker will be set to b times the original speaker; if the current speaker is detected to be blocked but there are no other speakers available for this model, then the volume of the speaker in the playing state will be increased to b times to increase the volume to compensate for the impact of the blockage.
[0108] The detection and speaker strategy update process in the above embodiment can be performed continuously during the speaker playback process, or can be performed at a time period, for example, recording echo detection and speaker parameter update are performed once every 3 seconds, and then the second recording echo detection and speaker parameter update are performed after waiting for 3 seconds until the playback ends. If the current application itself needs to start the microphone and speaker, the recording signal required here can be obtained from the application.
[0109] Among them, the matching relationship between the speaker and the adjacent microphone, the detection threshold, and the speaker parameter status execution strategy can be placed in the cloud. The detection strategy downloaded from the cloud can be executed through the terminal, and the final speaker execution strategy is judged by the cloud and downloaded to the terminal for final implementation. This can reduce the data storage pressure of the terminal and better update the strategy matching of the model.
[0110] The embodiments of this specification perform acoustic echo analysis with microphones adjacent to each speaker when the speaker is in operation, thereby determining whether the corresponding speaker is blocked, and then turning off the blocked speaker and selecting an unblocked speaker for playback; or reducing the output volume of the blocked speaker while increasing the playback volume of the unblocked speaker, thereby avoiding the problem of speaker output volume and sound quality being damaged. The solution provided by the embodiments of this specification can solve the problem of the sound volume and sound quality being affected by the external blocking of the terminal speaker outlet in conventional applications, and can realize the automatic detection of whether the speaker is blocked and the adaptive parameter adjustment of the speaker, without the need for manual intervention, reflecting a better intelligent control effect, and effectively improving the sound playback effect in the application.
[0111] Based on the parameter adjustment method of the audio playback device described above, one or more embodiments of this specification also provide a terminal and a server for parameter adjustment processing of an audio playback device. The terminal and the server may include a device (including a distributed system), software (application), module, component, server, terminal, etc. using the method described in the embodiment of this specification and a device combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiment of this specification is as described in the following embodiment. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiment of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can implement a combination of software and / or hardware of predetermined functions. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0112] It can be seen from the technical solutions provided in the above embodiments of this specification that the embodiments of this specification also provide a parameter adjustment device for an audio playback device. Figure 7 is a structural diagram of a parameter adjustment device for an audio playback device provided in an embodiment of this specification, such as Figure 7 As shown, the above device comprises:
[0113] The device layout information acquisition module 710 is used to acquire the device layout information of the target terminal when detecting that the audio playback device in the target terminal is started, wherein the device layout information includes the number and position relationship of the audio playback devices and audio collection devices in the target terminal;
[0114] The audio acquisition module 720 is used to acquire a working audio playback device in the target terminal that is in working state, and based on the positional relationship between the audio playback device and the audio acquisition device in the target terminal, use an adjacent audio acquisition device of the working audio playback device to perform audio acquisition on the audio signal played by the working audio playback device;
[0115] The echo estimation module 730 is used to perform echo analysis on the audio signal collected by the neighboring audio collection device and the input audio signal of the working audio playback device to obtain an echo estimation result corresponding to the working audio playback device;
[0116] The blocking judgment module 740 is used to judge whether the working audio playback device is blocked based on the echo estimation result corresponding to the working audio playback device;
[0117] The parameter adjustment module 750 is used to adjust the parameters of the audio playback device on the target terminal when the working audio playback device is blocked.
[0118] In some embodiments, the parameter adjustment module 750 is specifically used to:
[0119] When it is determined that at least one of the working audio playback devices on the target terminal is blocked, it is determined whether there is a working audio playback device in the target terminal that is not blocked, and if so, the volume of the unblocked working audio playback device is increased.
[0120] In some embodiments, the parameter adjustment module 750 is specifically used to:
[0121] When it is determined that there is no unobstructed working audio playback device in the target terminal, determine whether there is an unactivated audio playback device in the target terminal. If there is an unactivated audio playback device in the target terminal, turn on at least one unactivated audio playback device, and set the volume of the newly activated audio playback device to be greater than the volume of the obstructed audio playback device, wherein the obstructed audio playback device is a working audio playback device that is obstructed in the target terminal.
[0122] In some embodiments, the parameter adjustment module 750 is specifically used to:
[0123] When there is an unblocked working audio playback device or an unactivated audio playback device in the target terminal, the volume of the blocked audio playback device is reduced.
[0124] In some embodiments, the parameter adjustment module 750 is specifically used to:
[0125] When it is determined that there is no unobstructed working audio playback device in the target terminal and no unactivated audio playback device, the volume of the obstructed audio playback device is increased, wherein the obstructed audio playback device is a working audio playback device that is obstructed in the target terminal.
[0126] In some embodiments, the device layout information acquisition module 710 is specifically used to:
[0127] The model of the target terminal is obtained, and the device layout information of the target terminal is obtained according to the model of the target terminal.
[0128] In some embodiments, the echo estimation module 730 is specifically used to:
[0129] Performing adaptive filtering processing on the input audio signal of the working audio playback device corresponding to the adjacent audio acquisition device to obtain a linear echo estimation signal corresponding to the input audio signal;
[0130] Subtracting the audio signal collected by the adjacent audio collection device from the linear echo estimation signal to obtain a residual signal;
[0131] Performing nonlinear processing on the residual signal to obtain a signal after echo suppression;
[0132] Subtracting the audio signal collected by the adjacent audio collection device from the echo suppressed signal to obtain an echo estimation signal;
[0133] An echo estimation result corresponding to the working audio playback device is obtained based on the echo estimation signal.
[0134] In some embodiments, the echo estimation module 730 is specifically used to:
[0135] Performing echo delay detection on the audio signal collected by the adjacent audio collection device to obtain an echo delay value of the audio signal;
[0136] Performing offset processing on the input audio signal of the working audio playback device corresponding to the adjacent audio acquisition device based on the echo delay value to obtain a reference alignment signal;
[0137] The reference alignment signal is adaptively filtered to obtain a linear echo estimation signal corresponding to the input audio signal.
[0138] In some embodiments, the echo estimation module 730 is specifically used to:
[0139] Performing energy calculation on the echo estimation signal to obtain an echo estimation energy value;
[0140] The echo estimation energy value is divided by the energy value of the reference alignment signal to obtain the echo gain value, and the echo gain value is used as the echo estimation result corresponding to the working audio playback device.
[0141] In some embodiments, the apparatus further comprises a cycle detection adjustment module, configured to:
[0142] The working audio playback device in the target terminal is obtained once at a preset time interval and it is determined whether the working audio playback device obtained each time is blocked, so as to adjust the volume parameter of the audio playback device in the target terminal.
[0143] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated in detail here. The device in the above embodiment may also include other implementation methods according to the description of the method embodiment, and the specific implementation method can refer to the description of the relevant method embodiment, which will not be repeated here one by one.
[0144] Figure 8 is a block diagram of an electronic device for adjusting parameters of an audio playback device provided by an embodiment of this specification. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a parameter adjustment method for an audio playback device is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0145] Fig. 9 is a block diagram of another electronic device for adjusting parameters of an audio playback device provided in an embodiment of the present specification. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The electronic device includes a processor, a memory and a network interface connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a parameter adjustment method for an audio playback device is implemented.
[0146] Those skilled in the art will understand that Figure 8 or Fig. 9 The structure shown in the figure is merely a block diagram of a portion of the structure related to the embodiment scheme of this specification, and does not constitute a limitation on the electronic device to which the embodiment scheme of this specification is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] In an exemplary embodiment, an electronic device is also provided, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the parameter adjustment method of the audio playback device as in the embodiment of this specification.
[0148] In an exemplary embodiment, a computer-readable storage medium is also provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the parameter adjustment method of the audio playback device in the embodiment of this specification.
[0149] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the parameter adjustment method of the audio playback device provided in the above various optional implementations.
[0150] It is understandable that in the specific implementation of this specification, user-related data is involved. When the above embodiments of this specification are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0151] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this specification can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0152] Those skilled in the art will readily appreciate other implementations of the embodiments of the present specification after considering the specification and practicing the invention disclosed herein. The present specification is intended to cover any variations, uses, or adaptations of the embodiments of the present specification, which follow the general principles of the embodiments of the present specification and include common knowledge or customary technical means in the art that are not disclosed in the embodiments of the present specification. The description and embodiments are to be considered merely as exemplary, and the true scope and spirit of the embodiments of the present specification are indicated by the following claims.
[0153] It should be understood that the embodiments of the present specification are not limited to the precise structures described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the embodiments of the present specification is limited only by the appended claims.
Claims
1. A method for adjusting parameters of an audio playback device, characterized in that: The method comprises: When it is detected that the audio playback device in the target terminal is started, obtaining device layout information of the target terminal, wherein the device layout information includes the number and position relationship of the audio playback devices and audio collection devices in the target terminal; Acquire a working audio playback device in the target terminal that is in a working state, and based on the positional relationship between the audio playback device and the audio collection device in the target terminal, use an audio collection device adjacent to the working audio playback device to perform audio collection on an audio signal played by the working audio playback device; Performing echo analysis on the audio signal collected by the neighboring audio collection device and the input audio signal of the working audio playback device to obtain an echo estimation result corresponding to the working audio playback device; Based on the echo estimation result corresponding to the working audio playback device, determining whether the working audio playback device is blocked; When the working audio playback device is blocked, parameters of the audio playback device on the target terminal are adjusted.
2. The method according to claim 1, characterized in that The step of adjusting parameters of the audio playback device on the target terminal includes: When it is determined that at least one of the working audio playback devices on the target terminal is blocked, it is determined whether there is a working audio playback device in the target terminal that is not blocked, and if so, the volume of the unblocked working audio playback device is increased.
3. The method according to claim 2, characterized in that The step of adjusting parameters of the audio playback device on the target terminal includes: If it is determined that there is no unobstructed working audio playback device in the target terminal, determine whether there is an unstarted audio playback device in the target terminal. If there is an unstarted audio playback device in the target terminal, turn on at least one unstarted audio playback device, and set the volume of the newly turned on audio playback device to be greater than the volume of the obstructed audio playback device, wherein the obstructed audio playback device is a working audio playback device that is blocked in the target terminal.
4. The method according to claim 3, characterized in that The step of adjusting parameters of the audio playback device on the target terminal further includes: When there is an unblocked working audio playback device or an unactivated audio playback device in the target terminal, the volume of the blocked audio playback device is reduced.
5. The method according to claim 2, characterized in that: The step of adjusting parameters of the audio playback device on the target terminal includes: If it is determined that there is no unobstructed working audio playback device in the target terminal and there is no unactivated audio playback device, the volume of the obstructed audio playback device is increased, wherein the obstructed audio playback device is a working audio playback device that is obstructed in the target terminal.
6. The method according to claim 1, characterized in that The acquiring device layout information of the target terminal includes: The model of the target terminal is obtained, and the device layout information of the target terminal is obtained according to the model of the target terminal.
7. The method according to claim 1, characterized in that The performing echo analysis on the audio signal collected by the neighboring audio collection device and the input audio signal of the working audio playback device to obtain the echo estimation result corresponding to the working audio playback device includes: Performing adaptive filtering on the input audio signal of the working audio playback device to obtain a linear echo estimation signal corresponding to the input audio signal; Subtracting the audio signal collected by the adjacent audio collection device from the linear echo estimation signal to obtain a residual signal; Performing nonlinear processing on the residual signal to obtain a signal after echo suppression; Subtracting the audio signal collected by the adjacent audio collection device from the echo suppressed signal to obtain an echo estimation signal; An echo estimation result corresponding to the working audio playback device is obtained based on the echo estimation signal.
8. The method according to claim 7, characterized in that The step of performing adaptive filtering on the input audio signal of the working audio playback device to obtain a linear echo estimation signal corresponding to the input audio signal includes: Performing echo delay detection on the audio signal collected by the adjacent audio collection device to obtain an echo delay value of the audio signal; Performing offset processing on the input audio signal of the working audio playback device corresponding to the adjacent audio acquisition device based on the echo delay value to obtain a reference alignment signal; The reference alignment signal is adaptively filtered to obtain a linear echo estimation signal corresponding to the input audio signal.
9. The method according to claim 8, characterized in that The obtaining, based on the echo estimation signal, an echo estimation result corresponding to the working audio playback device includes: Performing energy calculation on the echo estimation signal to obtain an echo estimation energy value; The echo estimation energy value is divided by the energy value of the reference alignment signal to obtain an echo gain value, and the echo gain value is used as the echo estimation result corresponding to the working audio playback device.
10. The method according to claim 1, characterized in that The method further comprises: The working audio playback device in the target terminal is obtained once at a preset time interval and it is determined whether the working audio playback device obtained each time is blocked, so as to adjust the parameters of the audio playback device in the target terminal.
11. A parameter adjustment device for an audio playback device, characterized in that: The device comprises: A device layout information acquisition module, used to acquire device layout information of the target terminal when detecting that the audio playback device in the target terminal is started, wherein the device layout information includes the number and position relationship of the audio playback devices and audio acquisition devices in the target terminal; An audio acquisition module is used to acquire a working audio playback device in the target terminal that is in a working state, and based on the positional relationship between the audio playback device and the audio acquisition device in the target terminal, use an adjacent audio acquisition device of the working audio playback device to perform audio acquisition on the audio signal played by the working audio playback device; An echo estimation module, used to perform echo analysis on the audio signal collected by the neighboring audio collection device and the input audio signal of the working audio playback device, and obtain an echo estimation result corresponding to the working audio playback device; An occlusion judgment module, used to judge whether the working audio playback device is blocked based on the echo estimation result corresponding to the working audio playback device; The parameter adjustment module is used to adjust the parameters of the audio playback device on the target terminal when the working audio playback device is blocked.
12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instruction to implement the parameter adjustment method of the audio playback device according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the parameter adjustment method for an audio playback device according to any one of claims 1 to 10.
Citation Information
Cited By
Audio recording quality enhancement method and device, storage medium and electronic device
CN120690216A