CN116320133A - Audio playing method and device, electronic equipment and storage medium - Google Patents

Audio playing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116320133A
CN116320133A CN202310348801.6A CN202310348801A CN116320133A CN 116320133 A CN116320133 A CN 116320133A CN 202310348801 A CN202310348801 A CN 202310348801A CN 116320133 A CN116320133 A CN 116320133A
Authority
CN
China
Prior art keywords
filter
target
function
signal
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310348801.6A
Other languages
Chinese (zh)
Inventor
曹健
王诗钧
郭华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202310348801.6A priority Critical patent/CN116320133A/en
Publication of CN116320133A publication Critical patent/CN116320133A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/68Circuit arrangements for preventing eavesdropping
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Stereophonic System (AREA)

Abstract

The application discloses an audio playing method, an audio playing device, electronic equipment and a storage medium, and belongs to the technical field of terminal control. Applied to an electronic device, the method comprises: acquiring a target audio signal to be played; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. The method and the device can reduce the signal leakage condition of the target audio signal in the target position area and improve the confidentiality of the audio signal.

Description

Audio playing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of terminal control technologies, and in particular, to an audio playing method, an audio playing device, an electronic device, and a storage medium.
Background
With the development of science and technology, various terminal devices are presented in the daily life of people, and people can use the terminal devices to perform voice calls, video calls, and the like.
In the context of voice communications, the problem of privacy of communications is often involved. In the call process, after the terminal device of the receiving end plays the audio data through the speaker or other sound playing devices, the user can hear the audio data in a certain range and hear the audio data by other users, so that the voice data is leaked in the call process. In order to improve call privacy and prevent leakage of played voice data, when the terminal equipment at the receiving end plays sound, the back shell of the terminal equipment is driven to sound, so that the played sound signal is offset with the leaked sound signal to a certain extent, and interception by other users is avoided. In the scheme, the back shell of the driving terminal equipment has narrower sounding frequency band, so that the hearing effect of a receiver user is affected, certain limitation is also provided in the aspect of leakage prevention, and the situation of voice data leakage still exists.
Disclosure of Invention
In order to solve the problems in the prior art and improve the efficiency of the electronic device in migrating the background of the image, the embodiment of the application provides an audio playing method, an audio playing device, the electronic device and a storage medium. The technical scheme is as follows:
In one aspect, the present application provides an audio playing method, applied to an electronic device, where the method includes:
acquiring a target audio signal to be played;
playing the target audio signal through an audio playing module of the electronic equipment;
the audio playing module comprises at least two pronunciation units and at least one filter, wherein at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units.
In one aspect, the present application provides an audio playing device, applied to an electronic apparatus, the device including:
the signal acquisition module is used for acquiring a target audio signal to be played;
the audio playing module is used for playing the target audio signal through the audio playing module of the electronic equipment;
the audio playing module comprises at least two pronunciation units and at least one filter, wherein at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units.
In another aspect, the application provides an electronic device comprising a processor and a memory having stored therein at least one instruction, at least one program, code set, or instruction set, loaded and executed by the processor to implement an audio playback method according to one aspect.
In another aspect, the present application provides a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement an audio playback method as described in one aspect.
In another aspect, embodiments of the present application provide a computer program product which, when run on a computer, causes the computer to perform the audio playback method as described in one of the above aspects.
In another aspect, an embodiment of the present application provides an application publishing platform, where the application publishing platform is configured to publish a computer program product, and when the computer program product runs on a computer, cause the computer to execute the audio playing method according to the above aspect.
The beneficial effects that technical scheme that this application embodiment provided include at least:
acquiring a target audio signal to be played; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic architecture diagram of a voice call scenario according to an exemplary embodiment of the present application;
fig. 2 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of an audio playing module according to an exemplary embodiment of the present application;
fig. 4 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
fig. 5 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
FIG. 6 is a schematic illustration of a division of a target location area related to FIG. 3 in accordance with an exemplary embodiment of the present application;
fig. 7 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
Fig. 8 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
fig. 9 is a schematic structural diagram of an audio playing module according to an exemplary embodiment of the present application;
fig. 10 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
FIG. 11 is a schematic diagram of an audio playback module of FIG. 3 according to an exemplary embodiment of the present application;
fig. 12 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
FIG. 13 is a schematic diagram of an audio playback module of FIG. 3 according to an exemplary embodiment of the present application;
fig. 14 is a method flowchart of an audio playing method according to an exemplary embodiment of the present application;
fig. 15 is a block diagram of an audio playing device according to an exemplary embodiment of the present application;
fig. 16 is a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The scheme provided by the application can be used in a scene of voice call by using terminal equipment in daily life, and for convenience of understanding, the scene architecture of the application scene related to the embodiment of the application is first introduced briefly.
Along with development of scientific technology, terminal equipment is more and more popular in intellectualization, and various terminal equipment can establish communication connection and perform data transmission, so that interaction of various video data and audio data is realized.
For example, please refer to fig. 1, which illustrates an architecture diagram of a voice call scenario according to an exemplary embodiment of the present application. As shown in fig. 1, a first terminal device 101, a second terminal device 102, and a server 103 are included.
The first terminal device 101 and the second terminal device 102 may be terminal devices having a voice call function. For example, the first terminal device 101 and the second terminal device 102 may include, but are not limited to, wearable devices (e.g., a bracelet, a smart watch, a smart glasses, etc.), a mobile phone, a tablet computer, a notebook computer, a smart glasses, a smart watch, a desktop computer, a laptop portable computer, a smart home device, etc., having a database storage function.
Server 103 may be at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. The server 103 is used to provide background services for applications supporting virtual environments. Alternatively, the server 103 may undertake primary computing work, with the first terminal device 101 and the second terminal device 102 undertaking secondary computing work; alternatively, the server 103 performs a secondary computing job, and the first terminal apparatus 101 and the second terminal apparatus 102 perform a primary computing job; alternatively, the server 103 performs cooperative computing with the first terminal device 101 and the second terminal device 102 by using a distributed computing architecture.
Alternatively, the first terminal device 101 and the second terminal device 102 may respectively establish a wireless communication connection with each other or with a server through a network providing device, for example, the network providing device may be a WiFi device, an Access Point (AP) device, or the like in a home environment, or the network providing device may also be a base station.
The first terminal apparatus 101 and the second terminal apparatus 102 can mutually transmit data after establishing a wireless communication connection with the network providing apparatus. Alternatively, a communication connection is established between the first terminal apparatus 101 and the second terminal apparatus 102, and then data such as images, videos, and the like is transmitted through the communication connection. Wherein the wireless communication connection may also be referred to as a communication network or network connection, the communication connection using standard communication techniques and/or protocols. The network is typically the Internet, but may be any network including, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks. In some embodiments, data exchanged over the network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), extensible markup Language (Extensible Markup Language, XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure socket layer (Secure Socket Layer, SSL), transport layer security (Transport Layer Security, TLS), virtual private network (Virtual Private Network, VPN), internet protocol security (Internet Protocol Security, IPsec), and the like. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
In the voice call scenario, after receiving the voice data input by the user, the first terminal device 101 as the voice data sender sends the voice data to be transmitted to the second terminal device 102 through the above wireless communication connection, and the second terminal device 102 plays the voice data through its speaker or loudspeaker, so that the user of the second terminal device 102 receives the voice information.
Optionally, call privacy is always the focus of attention of users, and because in the call process, after the terminal device at the receiving end plays the audio data through its own speaker or other sound playing devices, the user can hear the audio data in a certain range, and the user can hear the audio data in a certain range, which causes the leakage of the voice data in the call process. How to reduce the leakage of sound signals in a voice call scene is an important ring to ensure privacy, and in order to reduce the leakage of sound in a call scene, the intelligibility of far-field voice is usually reduced by transmitting interference sound signals based on a masking principle. Or, the terminal equipment generates two paths of sound signals to enable the sound signals of the partial frequency bands to be overlapped with each other, so that the sound signals of the partial frequency bands can be mutually offset, the effect that the voice is disturbed is achieved, and the intelligibility is reduced. Or the terminal equipment does not process one acoustic signal of the two generated acoustic signals, and calculates the amplitude and the phase to be adjusted according to the relative geometric relationship between the sounding unit and the offset position of the other acoustic signal, so as to realize the effect of equal-amplitude anti-phase offset of the far-field acoustic signal. Or when the terminal equipment at the receiving end plays sound, the back shell of the terminal equipment is driven to sound, so that the played sound signal is offset with the leaked sound signal to a certain extent, and interception by other users is avoided.
In the above scheme for preventing the sound signal from leaking, the interference sound signal emitted according to the masking principle also plays an interference role in the near field, and influences the hearing. When the acoustic signals of the partial frequency bands are superimposed on each other, if the frequency band containing the speech intelligible information is superimposed and enhanced, the privacy is lowered. There are also cases where the result calculated solely in accordance with the relative geometrical relationship is inaccurate. The frequency band of the sound of the back shell of the driving terminal equipment is narrower, so that the hearing effect of the receiving user is affected, and the leakage prevention method has certain limitation. Therefore, at present, terminal devices are basically processed based on fixed interference modes, so that leakage of played voice data is prevented, flexibility is lacking for voice data in different frequency bands, certain limitation is also provided in terms of leakage prevention, and the situation of voice data leakage still exists.
In order to solve the problems in the related art, reduce the leakage condition of the audio signal played by the audio playing module of the terminal device, improve the call privacy in the voice call scene, the application provides an audio playing method, which can flexibly calculate the working coefficient of the second filter and the working coefficient of the first filter by maximizing the energy contrast between the near-field propagation region and the far-field propagation region, and timely adjust the condition of audio data output in the voice call scene.
Referring to fig. 2, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be the terminal device in fig. 1. As shown in fig. 2, the audio playing method may include the steps of:
step 201, a target audio signal to be played is obtained.
Optionally, the electronic device may obtain a target audio signal to be played by an audio playing module of the electronic device, where the audio playing module includes at least two sound producing units and at least one filter, the at least one filter is connected to one sound producing unit of the at least two sound producing units, and the at least one filter is used to adjust an amplitude and a phase of an audio signal sent by the sound producing unit connected to the at least one filter.
Alternatively, the electronic device may be the receiving terminal device of the voice data in the voice call scenario in fig. 1, and the target audio signal may be any audio signal that receives the transmission of the transmitting device. Optionally, the audio playing module may be an audio playing module capable of playing sound, such as a speaker module, a voice receiver module, a sound producing module, and the like, in the terminal device as the receiving party in the voice communication scene. The terminal device as the receiving party can play the test audio signal to be played through the audio play module of the terminal device.
Optionally, taking the example that the audio playing unit includes two pronunciation units, the two pronunciation units are a second pronunciation unit and a first pronunciation unit, the at least one filter includes a first filter, and the first pronunciation unit is electrically connected with the first filter. Referring to fig. 3, a schematic structural diagram of an audio playing module according to an exemplary embodiment of the present application is shown. As shown in fig. 3, the second sound generating unit 301 and the first sound generating unit 302, the first filter 303, and the target position area 304 are included. The target location area is a sound canceling area of at least two sound emitting units, and the target location area 304 may be determined in advance according to the positions of the second sound emitting unit and the first sound emitting unit, for example, the target location area 304 may be an area within a propagation range of 10cm to 20cm between the second sound emitting unit and the first sound emitting unit. The electronic device applies an overall delay compensation to the test audio signal played by the second pronunciation unit 301, achieving the effect at the cancellation.
Step 202, playing a target audio signal through an audio playing module of the electronic device, wherein the audio playing module comprises at least two pronunciation units and at least one filter, the at least one filter is connected with one pronunciation unit of the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units.
Optionally, when the audio playing module of the electronic device plays the target audio signal, the target cost function is constructed in advance according to the transfer function between each pronunciation unit and the target position area, and the target cost function is solved to obtain the working coefficient of at least one filter, so that the working coefficient of at least one filter is adjusted to the calculated working coefficient, the audio signals played by each pronunciation unit are filtered through the filters respectively connected, and the sound signals transmitted are the filtered signals.
Alternatively, taking the above fig. 3 as an example, when the electronic device plays the target audio signal, the first filter may operate with the second working coefficient, and play the target audio signal through the second sound generating unit and the first sound generating unit, respectively, so that the first sound generating unit plays the target audio signal and propagates through the first filter.
The second working coefficient is obtained by constructing a target cost function according to a transmission function between each pronunciation unit and the target position area and solving the target cost function. For example, in fig. 3, the audio playing module of the electronic device may play the test audio signal in advance, and by obtaining a transfer function between each pronunciation unit and the target location area 304, thereby constructing a target cost function, solving the target cost function, obtaining and determining a corresponding second working coefficient, and adjusting the first filter to work with the second working coefficient, so that the signal energy in the target location area is lower.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In one possible implementation manner, before playing the target audio data, the electronic device may obtain, by playing the test audio signal in advance, a first propagation signal collected at the target location area, obtain a transfer function between each pronunciation unit and the target location area, and construct a target cost function according to the transfer function between each pronunciation unit and the target location area, thereby determining a working coefficient of a corresponding filter, and adjust the working coefficient of the filter to the calculated working coefficient in advance.
Referring to fig. 4, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 4, the audio playing method may include the steps of:
step 401, acquiring a first propagation signal of a test audio signal played by an audio playing module in a target position area.
Alternatively, the structure of the audio playing module may be as shown in fig. 3, and in this application, the electronic device may detect the audio playing module by testing the audio data, so as to obtain the working coefficient of at least one filter. If the above-mentioned fig. 3 contains only the first filter, the electronic device may acquire the operation coefficients of the first filter, and if two filters are contained, the electronic device may acquire the operation coefficients of the two filters.
In the process of obtaining the working coefficient of the at least one filter, the electronic device may obtain the first propagation signal of the test audio signal played by the audio playing module in the target position area through a mode of pre-estimation calculation or a mode of microphone acquisition. For example, if the electronic device is a terminal device or a server, after acquiring a test audio signal that needs to be played, the electronic device acquires a first propagation signal that is estimated and calculated to reach the target location area according to propagation of the test audio signal in space. When the electronic device is a separate voice test device, the first propagation signal acquired by the microphone in the target location area may be acquired by connecting the microphone. Alternatively, the test audio signal played by the audio playing module through the second sound producing unit and the first sound producing unit may be a logarithmic sweep frequency signal.
Optionally, the first propagation signal includes a propagation signal of each sound generating unit in the audio playing module propagated to the target location area, taking fig. 3 as an example, after the electronic device plays the test audio signal through the second sound generating unit and the first sound generating unit in the audio playing module, the electronic device collects the test audio signal in the target location area through the microphone, and the obtained first propagation signal in the target location area includes a propagation signal due of the second sound generating unit playing the test audio signal propagated to the target location area 1 And the first sound generating unit plays the transmission signal dut for transmitting the test audio signal to the target position area 2
Step 402, according to the first propagation signal, a transfer function between each pronunciation unit and the target location area is obtained.
Optionally, the electronic device obtains a transfer function between each sound unit and the target location area according to the obtained first propagation signal. Taking the above fig. 3 as an example, the first propagation signal in the target location area acquired by the electronic device includes the due 1 And due 2 . The electronic device can calculate the transfer function H between the second pronunciation unit and the target location area according to the following formula 1 And a transfer function H between the first sound generating unit and the target position area 2
Figure BDA0004162243040000051
Figure BDA0004162243040000052
Wherein F is fourier transform operation, and ref is a reference signal, which can be preset by a developer.
Step 403, constructing a target cost function according to the transfer function between each pronunciation unit and the target position region.
Optionally, after obtaining the transfer function between each pronunciation unit and the target location area, the electronic device may construct the target cost function in a preset manner. Optionally, the objective cost function includes at least one filter working coefficient to be calculated. That is, the working coefficient of at least one filter that needs to be calculated is used as a parameter variable in the objective cost function. Optionally, the preset manner may be preset in the electronic device by a developer. For example, the preset mode may be a direct division construction mode, a least square construction mode, or a weighted least square construction mode, and different preset modes are constructed based on different mathematical principles.
Step 404, adjusting the working coefficient of at least one filter according to the objective cost function, so that the signal energy propagated to the objective position area by the audio playing module is lower.
Optionally, after the electronic device obtains the objective cost function, the working coefficient of each filter is obtained by calculation according to the objective cost function, and the working coefficients of each filter are adjusted to the working coefficients obtained by calculation. In one possible implementation, the manner in which the electronic device adjusts the operating coefficients of the at least one filter according to the objective cost function may be as follows: solving a target cost primitive function according to a preset algorithm to obtain respective target working coefficients of at least one filter; the operating coefficient of the at least one filter is adjusted to a target operating coefficient.
The preset algorithm may be preset in the electronic device by a developer. The preset algorithm corresponds to the preset mode adopted in the construction process, and the objective cost function solving process constructed according to different preset modes is also different. For example, the electronic device is an objective cost function constructed according to the weighted least squares construction method, and then the electronic device solves according to a preset algorithm corresponding to the weighted least squares construction method The respective target working coefficients of the at least one filter are obtained, and the working coefficients of the at least one filter are adjusted to the target working coefficients. Still taking the example shown in fig. 3 as an example, the electronic device may determine the second pronunciation unit according to the transfer function H between the second pronunciation unit and the target location 1 And a transfer function H between the first sound generating unit and the target position area 2 Constructing a target cost function, wherein the target cost function comprises the working coefficient of the first filter, obtaining the target working coefficient of the first filter by solving the target cost function, and adjusting the working coefficient of the first filter to the target working coefficient.
Step 405, a target audio signal to be played is obtained.
Optionally, the electronic device may receive an audio signal sent by the terminal device as the sender, where the audio signal is a target audio signal, and when the target audio signal needs to be played, the audio playing module of the electronic device may acquire the target audio signal to be played.
In step 406, the target audio signal is played by an audio playing module of the electronic device.
Optionally, taking the example shown in fig. 3 as an example, the audio playing module may play the target audio signal through the second sound generating unit and the target audio signal through the first sound generating unit; the first filter operates with the calculated second operating coefficient.
The second working coefficient is obtained by solving a target cost function, and the target cost function is constructed according to a transfer function between each pronunciation unit and the target position area. After the second working coefficient is calculated, the working coefficient of the first filter is adjusted to the second working coefficient to work, then the target audio signal is played through the second sound producing unit and the target audio signal is played through the first sound producing unit, so that the first filter adjusts the amplitude and the phase of the target audio signal played by the first sound producing unit through the second working coefficient, the signal energy transmitted to the target position area is less, and the confidentiality of the audio signal in the voice call process is improved.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In the following, taking the structure of the audio playing module shown in fig. 3 as an example, different construction methods and different preset algorithms may be adopted to describe the method embodiments shown in fig. 2 and fig. 4 by way of example.
Referring to fig. 5, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 5, the audio playing method may include the steps of:
step 501, a first propagation signal of a test audio signal played by an audio playing module in a target position area is obtained.
The manner in which the electronic device obtains the first propagation signal may refer to the description in step 401, which is not described herein. Taking the above FIG. 3 as an example, the dut tableAfter the electronic equipment plays the test audio signal through the second sound producing unit and the first sound producing unit in the audio playing module, the electronic equipment collects the test audio signal in the target position area through the microphone, and the obtained first propagation signal in the target position area comprises a propagation signal due of the second sound producing unit playing the test audio signal to propagate into the target position area 1 And the first sound generating unit plays the transmission signal dut for transmitting the test audio signal to the target position area 2
Step 502, according to the first propagation signal, a transfer function between each pronunciation unit and the target location area is obtained.
Optionally, the manner in which the electronic device obtains the transfer function between each sound unit and the target location area according to the obtained first propagation signal may refer to the content in step 402, which is not described herein. For example, the first propagation signal within the target location area acquired by the electronic device includes a due 1 And due 2 . The electronic device may be formulated as follows
Figure BDA0004162243040000061
Respectively calculating a transfer function H between the second pronunciation unit and the target position area 1 And a transfer function H between the first sound generating unit and the target position area 2 . Wherein the H is obtained 1 And H 2 The influence of the acoustic structure and the relative geometric relation of the sound generating unit is considered, and the information of the actual propagation of the acoustic signal is contained.
Step 503, obtaining a frequency response matrix function of the first filter according to the transfer function between each pronunciation unit and the target position area; and acquiring a frequency response weighting matrix function of the first filter according to the frequency response matrix function.
In fig. 3, the working coefficient of the filter to be calculated is the working coefficient of the first filter, and the objective cost function constructed by the electronic device is a coefficient combination function including the working coefficient of the first filter. That is, the objective cost function includes the working coefficients of at least one filter to be calculated, and the working coefficients of at least one filter to be calculated are used as a parameter variable in the objective cost function.
Optionally, the coefficient combination function is a frequency response weighting matrix function of the first filter, in this embodiment, the preset manner may be a weighted least squares construction manner, and the electronic device may construct the objective cost function according to a transfer function between each pronunciation unit and the objective position area as follows: acquiring a frequency response matrix function of a first filter according to a transmission function between each pronunciation unit and a target position area; and acquiring a frequency response weighting matrix function of the first filter according to the frequency response matrix function.
Optionally, in the structure shown in fig. 3, in order to implement constant amplitude inversion of the acoustic signal at the target position area, the amplitude and phase of the audio signal played by the first sound generating unit need to be adjusted by the first filter, and the following effects are implemented by the first filter:
H t =H 2 H d
Wherein H is d A frequency response matrix representing the first filter, H t Is set at H 1 Based on the added overall time delay, H t The effect that can be achieved by the tester as required is preset. That is, the test audio signal played by the electronic device for the second sound unit may also be adjusted by adding an overall time delay thereto.
Then the frequency response matrix function of the first filter can be expressed as: h d =H t /H 2
And the electronic equipment acquires the frequency response weighting matrix function of the first filter according to the frequency response matrix function. In this application, the frequency response weighting matrix function can be expressed as: y=ab.
Wherein A is H 2 Has n discrete frequency points:
Figure BDA0004162243040000071
y is H t Has n discrete frequency points, n is greater than 1:
Figure BDA0004162243040000072
b is the working coefficient of the first filter to be solved, and the coefficient length of the first filter is k:
Figure BDA0004162243040000073
w is a discrete frequency point weighting vector, and w of each frequency point can be distributed according to actual requirements. For example, a larger w is assigned to important bins and a smaller w is assigned to unimportant bins. For example, for a test audio signal, a developer may mark in advance a corresponding w for each frequency point of the test audio signal, and the electronic device may determine the corresponding w and the obtained H according to the pre-marked w 1 And obtaining y.
The electronic device can acquire the frequency response weighting matrix function of the first filter through the process, and calculate the required working coefficient of the first filter based on the frequency domain-based WLS algorithm. That is, the electronic device may construct the objective cost function expression of the WLS based on the weighted least squares construction scheme as:
J(b)=||y-Αb|| 2
in step 504, the working coefficients of at least one filter are adjusted according to the frequency response weighting matrix function, so that the signal energy propagated to the target position area by the audio playing module is lower.
Optionally, after the electronic device obtains the objective cost function, the working coefficient of each filter is obtained by calculation according to the objective cost function, and the working coefficients of each filter are adjusted to the working coefficients obtained by calculation. For the objective cost function obtained in steps 501 to 503 above, the electronic equipment is based on a weighted least square construction mode according to the pair constructing target cost of WLS function J (b) = |y-ab||| 2 And solving to obtain the calculated second working coefficient.
In the present application, b is taken as the working coefficient of the first filter to be calculated in the process, and b is taken as b in the present application WLS The value of the sum of the values,
Figure BDA0004162243040000074
that is, b is solved when the objective cost function is set to the minimum value. Wherein, WLS solution for obtaining the second work coefficient of the first filter by Moore pseudo-inverse is:
b WLS =(A H A) -1 (A H y)
The above calculation b WLS The value of the first filter is adjusted to b WLS So that the audio playback module propagates less signal energy into the target location area.
In one possible implementation, the number of pre-planned sampling points is greater than 2 when the electronic device samples in the acquisition target location area. For example, the electronic device divides the target position area in advance, defines sampling points for collecting the audio signals, takes the case that the number of the sampling points in the target position area is not less than 2, samples each sampling point through a microphone, obtains a transmission function between each pronunciation unit corresponding to each sampling point and the target position area, and obtains a frequency response matrix function corresponding to each sampling point according to the transmission function between each pronunciation unit corresponding to each sampling point and the target position area; acquiring a frequency response weighting matrix function corresponding to each sampling point according to the frequency response matrix function corresponding to each sampling point; acquiring a fused target weighting matrix function according to the frequency response weighting matrix function corresponding to each sampling point; and solving pseudo-inverse of the target weighting matrix function according to a least square method to obtain a target working coefficient of the first filter.
For example, please refer to fig. 6, which illustrates a schematic diagram of dividing a target location area related to fig. 3 according to an exemplary embodiment of the present application. As shown in fig. 6, an audio playing module 601 is included, and a target position area 602 is included. In space, the target location area 602 includes a plurality of sampling points (p 1, p2, … … p8 are each sampling point), and the electronic device may acquire each propagation data at each location through a microphone.
Optionally, the electronic device obtains a frequency response weighting matrix function corresponding to each sampling point according to the processes from step 501 to step 503; and acquiring a fused target weighting matrix function according to the frequency response weighting matrix function corresponding to each sampling point. With m, y as a plurality of sampling points in FIG. 6 1 ,y 2 ……y m Respectively representing a frequency response weighting matrix function corresponding to each sampling point acquired by the electronic equipment, A 1 ,A 2 ……A m Respectively represent H corresponding to each sampling point acquired by the electronic equipment 2 Is a frequency domain weighted convolution matrix of (a). The electronic device may derive the following respective formulas:
Figure BDA0004162243040000081
the electronic equipment can fuse the obtained frequency response weighting matrix functions corresponding to the sampling points to obtain a fused target weighting matrix function. Please refer to the following formula:
Figure BDA0004162243040000085
Optionally, the electronic device fuses the obtained frequency response weighting matrix functions corresponding to the sampling points according to the formula, and solves the pseudo inverse time of the target weighting matrix function according to the least square method to make b WLS =(C H C) -1 (C H Y); finally, the working coefficient of the first filter is adjusted to b WLS The method has the advantages that the signal energy transmitted to the target position area by the audio playing module is lower, and the robustness of the scheme can be improved by utilizing the data of a plurality of sampling points.
In one possible implementation manner, the number of sampling points in the target position area is not less than 2, and when the electronic device solves the pseudo-inverse of the coefficient combination function according to the least square method to obtain the target working coefficient of the first filter, the electronic device may further be configured as follows: solving pseudo-inverse of the frequency response weighting matrix function corresponding to each sampling point according to a least square method, and obtaining the working coefficient of the first filter obtained by calculation aiming at each sampling point; and calculating the target working coefficient of the first filter according to the working coefficient of the first filter calculated for each sampling point.
For example, for the m sampling points, the electronic device may solve the pseudo-inverse of the frequency response weighting matrix function corresponding to the m sampling points according to the least square method, calculate coefficients of the m first filters, transform the coefficients of the m first filters to the frequency domain, and average the amplitudes and phases, respectively. For the m sampling points, the electronic device may calculate according to the following formula:
Figure BDA0004162243040000082
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0004162243040000083
corresponding to each H calculated by the above process d Average value of pair->
Figure BDA0004162243040000084
And performing inverse Fourier transform to obtain a second working parameter of the first filter to be acquired.
Step 505, obtain a target audio signal to be played.
In step 506, the target audio signal is played through an audio playing module of the electronic device.
Optionally, details of the implementation of steps 505 to 506 may refer to the processes of steps 405 to 406, which are not described herein.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In addition, the influence of the acoustic structure of the sounding unit is considered, the actual transmission function is started, the acoustic structure is closer to the actual situation of acoustic signal propagation, the optimal result is calculated by the frequency domain WLS method for minimizing the cost function, more accurate amplitude and phase adjustment can be carried out on the acoustic signal, all frequency components can be automatically adjusted, and a large amount of work is avoided. In addition, larger weight can be allocated to important frequency points, and the method is more flexible. The effect of conversation privacy has been promoted to this scheme.
In one possible implementation manner, the least square method is a least square LS algorithm based on a time domain, and correspondingly, in the process of constructing the objective cost function, the electronic device adopts a construction manner based on the least square LS algorithm.
Referring to fig. 7, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 7, the audio playing method may include the steps of:
Step 701, acquiring a first propagation signal of a test audio signal played by an audio playing module in a target position area.
The manner in which the electronic device obtains the first propagation signal may refer to the description in step 401, which is not described herein. Taking the above fig. 3 as an example, the due represents a sound signal collected by the microphone, after the electronic device plays the test audio signal through the second sound producing unit and the first sound producing unit in the audio playing module, the electronic device collects the test audio signal in the target position area through the microphone, and the obtained first propagation signal in the target position area includes the propagation signal due of the second sound producing unit playing the test audio signal to propagate into the target position area 1 And the first sound generating unit plays the transmission signal dut for transmitting the test audio signal to the target position area 2
Step 702, obtaining a transfer function between each pronunciation unit and the target location area according to the first propagation signal.
Optionally, the manner in which the electronic device obtains the transfer function between each sound unit and the target location area according to the obtained first propagation signal may refer to the content in step 402, which is not described herein. For example, the first propagation signal within the target location area acquired by the electronic device includes a due 1 And due 2 . The electronic device may be formulated as follows
Figure BDA0004162243040000091
Respectively calculating a transfer function H between the second pronunciation unit and the target position area 1 And a transfer function H between the first sound generating unit and the target position area 2
Step 703, obtaining impulse response between each pronunciation unit and the target position area according to the transfer function between each pronunciation unit and the target position area.
The electronic device may construct the objective cost function in the following manner. In this embodiment, the electronic device constructs the objective cost function by adopting a construction method based on the least square LS algorithm, where the objective cost function is a coefficient combination function including the working coefficients of the first filter, and the coefficient combination function is a first delay formula function. The electronic device may execute steps 703 to 704 to construct a first delay formula function.
In this step, the electronic device may first obtain an impulse response between each sound unit and the target position area according to the following formula according to a transfer function between each sound unit and the target position area.
Figure BDA0004162243040000092
Figure BDA0004162243040000093
Wherein, based on the H obtained in the above FIG. 3 1 And H 2 I can be calculated by the above formula 1 And I 2 。I 1 Representing impulse response between the second sound unit and the target position region, I 2 Representing the impulse response between the first sound emitting unit and the target position area.
Step 704, obtaining a first time delay formula function according to the impulse response and the time delay matrix between each pronunciation unit and the target position area, wherein the first time delay formula function comprises the working coefficient of the first filter.
Optionally, in the process of executing steps 703 to 704, the electronic device calculates an impulse response between each sound unit and the target position area after obtaining the transfer function between each sound unit and the target position area, and constructs a first time delay formula function based on the time delay matrix added to the second sound unit.
For example: in order to achieve equal amplitude inversion of the sound signals of the second sound emitting unit and the first sound emitting unit in the target position area, an adjustment in amplitude and phase needs to be applied to the first sound emitting unit, and the following effects are achieved through the first filter in fig. 3:
Figure BDA0004162243040000094
where b is the working coefficient of the first filter to be solved,
Figure BDA0004162243040000095
representing convolution, I t Is set at I 1 And adding overall time delay on the basis. The first delay formula function that the electronic device can construct is as follows: i t =Ab。/>
Wherein A is impulse response I 2 Is a convolution matrix of:
Figure BDA0004162243040000101
the electronic device can obtain the first time delay formula function through the process, and calculate the required working coefficient of the first filter by adopting the LS algorithm based on the time domain based on the electronic device. That is, the electronic device may construct the objective cost function expression of LS based on the least squares construction method as follows:
J(b)=||I t -Αb|| 2
it should be noted that, in the process of constructing the objective cost function, the electronic device may also need to obtain the delay matrix H applied to the second pronunciation unit before constructing the objective cost function according to the transfer function between each pronunciation unit and the target location area t ,H t Can be preset by a tester according to the effect of the implementation of the requirement, thereby calculating the corresponding I t
Step 705, adjusting the working coefficient of at least one filter according to the first delay formula function, so that the signal energy propagated to the target position area by the audio playing module is lower.
Optionally, after the electronic device obtains the first time delay formula function (i.e. the objective cost function), the electronic device calculates and obtains the working coefficient of each filter according to the first time delay formula function, and adjusts the working coefficient of each filterAnd (3) finishing the operation to the calculated working coefficient. For the first delay formula function obtained in the steps 701 to 703, the electronic device constructs the objective cost function J (b) = |i of LS according to the method of constructing LS based on the least square method t -Αb|| 2 And solving to obtain the calculated second working coefficient.
In the present application, b is taken as the working coefficient of the first filter to be calculated in the process, and b is taken as b in the present application LS The value of the sum of the values,
Figure BDA0004162243040000102
that is, b is solved when the objective cost function is set to the minimum value. The LS solution for obtaining the second working coefficient of the first filter by using Moore pseudo-inverse is as follows:
b LS =(A H A) -1 (A H I t )
the above calculation b LS The value of the first filter is adjusted to b LS So that the audio playback module propagates less signal energy into the target location area.
In a possible implementation manner, the number of sampling points in the target position area is not less than 2, the electronic device can sample at each sampling point through the microphone, so as to obtain a transmission function between each pronunciation unit corresponding to each sampling point and the target position area, and obtain an impulse response between each pronunciation unit corresponding to each sampling point and the target position area; acquiring a first time delay formula function corresponding to each sampling point according to an impulse response and a time delay matrix between each pronunciation unit corresponding to each sampling point and a target position area; and constructing an objective cost function according to the first delay formula function corresponding to each sampling point.
For example, taking fig. 6 as an example, the electronic device obtains a first delay formula function corresponding to each sampling point according to the processes from step 701 to step 703; and acquiring a fused target cost function according to the first delay formula function corresponding to each sampling point. In FIG. 6, the number of sampling points is m, I t,1 ,I t,2 ……I t,m Respectively representing a first time delay formula function corresponding to each sampling point acquired by the electronic equipment, A 1 ,A 2 ……A m Respectively represent the I corresponding to each sampling point acquired by the electronic equipment 2 Is a frequency domain weighted convolution matrix of (a). The electronic device may obtain the following respective first delay formula functions:
Figure BDA0004162243040000103
the electronic equipment can fuse the first delay formula functions corresponding to the obtained sampling points to obtain a fused target cost function. Please refer to the following formula:
Figure BDA0004162243040000104
optionally, the electronic device fuses the obtained first time delay formula functions corresponding to the sampling points according to the formula, and solves the pseudo-inverse time of the objective cost function according to the least square method to make b LS =(C H C) -1 (C H Y); finally, the working coefficient of the first filter is adjusted to b LS The method has the advantages that the signal energy transmitted to the target position area by the audio playing module is lower, and the robustness of the scheme can be improved by utilizing the data of a plurality of sampling points.
In one possible implementation manner, the number of sampling points in the target position area is not less than 2, and when the electronic device solves the pseudo-inverse of the coefficient combination function according to the least square method to obtain the target working coefficient of the first filter, the electronic device may further be configured as follows: solving pseudo-inverse of a first delay formula function corresponding to each sampling point according to a least square method to obtain a working coefficient of a first filter calculated for each sampling point; and calculating the target working coefficient of the first filter according to the working coefficient of the first filter calculated for each sampling point.
For example, for the m sampling points, the electronic device may solve the pseudo-inverse of the first delay formula function corresponding to the m sampling points according to the least square method, calculate coefficients of the m first filters, transform the coefficients of the m first filters to the frequency domain, and average the amplitude and the phase respectively. For the m sampling points, the electronic device may calculate according to the following formula:
Figure BDA0004162243040000111
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0004162243040000112
corresponding to each H calculated by the above process d Average value of pair->
Figure BDA0004162243040000113
And performing inverse Fourier transform to obtain a second working parameter of the first filter to be acquired.
Step 706, a target audio signal to be played is obtained.
In step 707, the target audio signal is played by an audio playing module of the electronic device.
Optionally, details of the implementation of steps 706 to 707 may refer to the processes from steps 405 to 406, which are not described herein.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In addition, the influence of the acoustic structure of the sounding unit is considered, the real situation of sound signal propagation is more similar from the actual transmission function, the optimal result is calculated by the time domain LS method of the minimized cost function, more accurate amplitude and phase adjustment can be carried out on the sound signal, all frequency components can be automatically adjusted, and a large amount of work is avoided. The effect of conversation privacy has been promoted to this scheme.
In one possible implementation, the second sound generating unit is electrically connected to the second equalizer module, and the first filter is further electrically connected to the first equalizer module; the second equalizer module is used for adjusting the audio signal transmitted by the second pronunciation unit; the first equalizer module is used for adjusting the audio signal output by the first filter. Based on the embodiment shown in fig. 5, the electronic device may further test the acoustic signal of the target location area, verify which frequency band has a large influence on the intelligibility, and apply the corresponding Equalizer (EQ) curve coefficient.
Referring to fig. 8, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 8, the audio playing method may include the steps of:
Step 801, a first propagation signal of a test audio signal played by an audio playing module in a target position area is obtained.
The manner in which the electronic device plays the test audio signal through the audio playing module and obtains the first propagation signal may refer to the description in step 401, which is not repeated herein.
Step 802, a signal band included in a first propagated signal is acquired.
Optionally, the electronic device may identify the first propagation signal collected by the microphone, and obtain a signal frequency band included in the first propagation signal. For example, the sound signal has 10 octaves at 20Hz-20kHz, and the electronic device further obtains, according to the obtained first propagation signal, an octave where a signal frequency band included in the first propagation signal is located.
Step 803, determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band included in the first propagation signal.
Referring to fig. 9, a schematic structural diagram of an audio playing module according to an exemplary embodiment of the present application is shown in fig. 3. As shown in fig. 9, the second pronunciation unit 901 and the first pronunciation unit 902, the first filter 903, the target location area 904, the second equalizer module 905, and the first equalizer module 906 are included. The second sound generating unit 901 is directly electrically connected to the second equalizer module 905, and the first sound generating unit 902 is electrically connected to the first filter 903, and is further electrically connected to the first equalizer module 906 through the first filter 903.
Optionally, the manner in which the electronic device determines the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band included in the first propagation signal may be as follows: and the electronic equipment inquires a preset coefficient relation table according to the obtained signal frequency band contained in the first propagation signal, and obtains the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module through the coefficient relation table. The coefficient relation table contains the corresponding relation between each frequency band and the equalization coefficient.
Signal frequency band Equalizing coefficient
Frequency range one Equalization coefficient one
Frequency range II Equalizing coefficient two
Frequency range three Equalizing coefficient three
…… ……
TABLE 1
As shown in table 1, the electronic device obtains the corresponding equalization coefficient according to the frequency range of each signal frequency band according to the signal frequency band included in the obtained first propagation signal. For example, the acoustic signal may have 10 octaves at 20Hz-20kHz, and 10 frequency ranges may be included in table 1, so, in combination with the structure shown in fig. 9, the present scheme may generate equalization coefficients of 10×3×2 groups (10 octaves, 3 attenuations, and 2 sounding units), and apply attenuation of-5 dB, -10dB, and-15 dB for each octave, respectively.
Optionally, the electronic device loads the obtained equalization coefficients into the first equalization module and the second equalization module in fig. 9, so as to obtain EQ coefficient 1 and EQ coefficient 2 for adjusting signals in different frequency bands, thereby improving the privacy of the voice call.
It should be noted that, in practical application, the test audio signal may be a downlink signal received by the electronic device, and then the first propagation signal is audio data received by the electronic device including the audio playing module.
In a possible implementation manner, in the dynamic monitoring process, the method can also determine a signal frequency band contained in an environmental sound signal by acquiring the environmental sound signal; the electronic device may determine the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band included in the first propagation signal in the following manner: and determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band contained in the environment sound signal and the signal frequency band contained in the first propagation signal.
That is, when the stronger frequency component in the ambient sound signal is close to the frequency component affecting the speech intelligibility in the call downlink signal, the ambient sound signal can play a certain masking role, and the suppression amount of the frequency can be properly reduced (i.e. the equalization coefficient is improved), so that the speech heard by the user is closer to the original speech.
Step 804, obtaining a transfer function between each pronunciation unit and the target location area according to the first propagation signal.
Step 805, constructing a target cost function according to the transfer function between each pronunciation unit and the target location area.
Step 806, adjusting the working coefficient of at least one filter according to the objective cost function.
Optionally, the signal energy propagated to the target location area when the audio playing module plays the audio signal can be lower after adjustment.
In step 807, the target audio signal to be played is obtained.
Step 808, playing the target audio signal by an audio playing module of the electronic device.
Optionally, details of the implementation of steps 804 to 808 may refer to the processes from steps 502 to 506, which are not described herein.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In addition, the influence of the acoustic structure of the sounding unit is considered, the actual transmission function is started, the acoustic structure is closer to the actual situation of acoustic signal propagation, the optimal result is calculated by the frequency domain WLS method for minimizing the cost function, more accurate amplitude and phase adjustment can be carried out on the acoustic signal, all frequency components can be automatically adjusted, and a large amount of work is avoided. In addition, larger weight can be allocated to important frequency points, and the method is more flexible. Based on the amplitude and phase adjustment of the FIR filter, subjective test is performed, and simultaneously EQ processing is applied to the second pronunciation unit and the first pronunciation unit, so that the speech intelligibility at the offset position is further reduced. The effect of conversation privacy has been promoted to this scheme.
In one possible implementation, the second sound generating unit is electrically connected to the second phase shifter, and the first filter is further electrically connected to the first phase shifter; the second phase shifter is used for adjusting the amplitude and the phase of the audio signal transmitted by the second pronunciation unit; the first phase shifter is used for adjusting the amplitude and the phase of the audio signal output by the first filter. Based on the embodiment shown in fig. 5, the electronic device may divide the test audio signal and apply corresponding adjustment parameters to each phase shifter.
Referring to fig. 10, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 10, the audio playing method may include the steps of:
in step 1001, a first propagation signal of a test audio signal played by the audio playing module in a target location area is obtained.
Referring to fig. 11, a schematic structural diagram of an audio playing module according to an exemplary embodiment of the present application is shown in fig. 3. As shown in fig. 11, the second sound generating unit 1101 and the first sound generating unit 1102, the first filter 1103, the target position area 1104, the second phase shifter 1105 and the first phase shifter 1106 are included. The second sound generating unit 1101 is directly electrically connected to the second phase shifter 1105, and the first sound generating unit 1102 is electrically connected to the first filter 1103 and is further electrically connected to the first phase shifter 1106 through the first filter 1103.
The manner in which the electronic device obtains the first propagation signal may refer to the description in step 401, which is not described herein.
In this embodiment, the test audio signal is an audio signal obtained by dividing the test audio signal according to a preset bandwidth, for example, before the electronic device plays the test audio signal through the audio playing module, the test audio signal is divided by the preset bandwidth, and then the test audio signal is respectively divided by the second sound generating unit and the first sound generating unit according to the preset bandwidth and then played. The preset bandwidth is preset in the electronic equipment by a developer. For example, for a 20Hz-20kHz sound signal, the second sound generating unit and the first sound generating unit play the divided audio signals, respectively, based on a bandwidth of 20Hz-20kHz divided into a plurality of sub-bands according to a fixed octave.
Step 1002, a first current sub-band in which the second sound generating unit is currently located when the second sound generating unit plays the test audio signal is obtained, and a second current sub-band in which the first sound generating unit is currently located when the first sound generating unit plays the test audio signal is obtained.
In step 1003, a phase adjustment parameter of the second phase shifter is determined based on the first current sub-band, and a phase adjustment parameter of the first phase shifter is determined based on the second current sub-band.
Optionally, the manner in which the electronic device determines the phase adjustment parameter of the second phase shifter according to the first current sub-band and determines the phase adjustment parameter of the first phase shifter according to the second current sub-band may be as follows: the electronic equipment inquires a preset parameter relation table according to the obtained first current sub-band, obtains the phase adjustment parameter of the second phase shifter through the parameter relation table, inquires the preset parameter relation table according to the obtained second current sub-band, and obtains the phase adjustment parameter of the first phase shifter through the parameter relation table. The parameter relation table contains the corresponding relation between each sub-band and the phase adjustment parameter.
Current subband Phase adjustment parameters
Current subband one Phase adjustment parameter 1
Current subband two Phase adjustment parameter two
Current subband three Phase ofAdjusting parameter III
…… ……
TABLE 2
As shown in table 2, the electronic device obtains the corresponding phase adjustment parameters by looking up the table 2 according to the obtained first current sub-band and the second current sub-band. For example, the acoustic signal is divided into 10 subbands (here, 10 subbands are exemplary and may be divided into other subbands in practical applications) in 10 octaves at 20Hz-20kHz, where table 1 may include 10 subbands, and the electronic device may obtain corresponding phase adjustment parameters according to the obtained current subband, and implement phase adjustment in a range from-180 degrees to 180 degrees through a phase shifter. For example, the phase adjustment is performed from-180 degrees to 180 degrees in 20-degree steps.
In one possible implementation, after the electronic device determines the phase adjustment parameters of the second phase shifter according to the first current sub-band, the electronic device may also adjust for the frequency component with the larger residual after cancellation after determining the phase adjustment parameters of the first phase shifter according to the second current sub-band. For example, the electronic device obtains a maximum frequency in the first propagated signal; constructing a single-frequency signal with the maximum frequency according to the maximum frequency; and adjusting the phase adjustment parameter of the second phase shifter and the phase adjustment parameter of the first phase shifter according to the single-frequency signal. Fine adjustment is performed in a vicinity of the second phase shifter and a phase shift value corresponding to a phase adjustment parameter of the second phase shifter.
Optionally, after acquiring a first current sub-band where the second sound generating unit is currently located when the second sound generating unit plays the test audio signal and acquiring a second current sub-band where the first sound generating unit is currently located when the first sound generating unit plays the test audio signal, adjusting the phase according to a step length of 20 degrees from-180 degrees to 180 degrees, recording two paths of sound signals of which the second sound generating unit and the first sound generating unit individually reach the target position area and the sound signals of which the two paths of sound signals are counteracted by the microphone, obtaining the difference in gain and compensating according to the two paths of sound signals of the second sound generating unit and the first sound generating unit, judging the direction of phase adjustment according to the sound signals of which the two paths of sound signals are counteracted, and adjusting the direction of which the counteraction effect becomes good.
Step 1004, obtaining a signal frequency band contained in the first propagation signal.
The details of the implementation of step 1004 may be referred to the description of step 802, which is not repeated herein.
In step 1005, the amplitude adjustment parameter of the second phase shifter and the amplitude adjustment parameter of the first phase shifter are determined according to the signal frequency band included in the first propagation signal.
Optionally, in this embodiment, the electronic device needs to acquire the amplitude adjustment parameter of the second phase shifter and the amplitude adjustment parameter of the first phase shifter in addition to the phase adjustment parameter of the second phase shifter and the phase adjustment parameter of the first phase shifter.
Optionally, the manner in which the electronic device determines the amplitude adjustment parameter of the second phase shifter and the amplitude adjustment parameter of the first phase shifter according to the signal frequency band included in the first propagation signal may be as follows: and the electronic equipment inquires a preset amplitude parameter relation table according to the obtained signal frequency band contained in the first propagation signal, and obtains the amplitude adjustment parameters of the second phase shifter and the amplitude adjustment parameters of the first phase shifter through the amplitude parameter relation table. The corresponding relation between each frequency band and the amplitude adjustment parameter in the amplitude parameter relation table may be similar to the above table 1, and will not be described herein. For example, the acoustic signal may have 10 octaves at 20Hz-20kHz, and 10 frequency ranges may be included in table 1, so, in combination with the structure shown in fig. 9, the present scheme may generate equalization coefficients of 10×3×2 groups (10 octaves, 3 attenuations, and 2 sounding units), and apply attenuation of-5 dB, -10dB, and-15 dB for each octave, respectively.
Step 1006, obtaining a transfer function between each pronunciation unit and the target location area according to the first propagation signal.
Step 1007, constructing a target cost function according to the transfer function between each pronunciation unit and the target location area.
Step 1008, adjusting the working coefficient of at least one filter according to the objective cost function.
Alternatively, the adjustment may be followed by a lower signal energy that the audio playback module propagates into the target location area.
In step 1009, a target audio signal to be played is acquired.
In step 1010, the target audio signal is played by an audio playing module of the electronic device.
Optionally, details of the implementation of steps 1006 to 1010 may refer to the processes of steps 502 to 506, which are not described herein.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In addition, the influence of the acoustic structure of the sounding unit is considered, the actual transmission function is started, the acoustic structure is closer to the actual situation of acoustic signal propagation, the optimal result is calculated by the frequency domain WLS method for minimizing the cost function, more accurate amplitude and phase adjustment can be carried out on the acoustic signal, all frequency components can be automatically adjusted, and a large amount of work is avoided. Based on the adjustment of the amplitude and the phase of the filter, through objective data acquisition and subjective test, the phase shifter is utilized to apply secondary adjustment on the amplitude and the phase to the second sounding unit and the first sounding unit, so that the refinement degree is improved, and the speech intelligibility at the offset position is further reduced. The effect of conversation privacy has been promoted to this scheme.
In a possible implementation manner, at least two filters involved in the embodiment of fig. 4 further include a second filter, and the second sound generating unit is further electrically connected to the second filter.
Referring to fig. 12, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 12, the audio playing method may include the steps of:
Step 1201, acquiring a first propagation signal of a test audio signal played by the audio playing module in a target position area.
Referring to fig. 13, a schematic structural diagram of an audio playing module according to an exemplary embodiment of the present application is shown in fig. 3. As shown in fig. 11, the second sound producing unit 1301 and the first sound producing unit 1302, the second filter 1303, the first filter 1304, and the target position area 1305 are included. The second sound generating unit 1301 is electrically connected to the second filter 1303, the first sound generating unit 1302 is electrically connected to the first filter 1304, and is electrically connected to the first phase shifter 1306 through the first filter 1303.
Alternatively, the manner in which the electronic device obtains the first propagation signal may refer to the description in step 401 above, which is not described herein.
Step 1202, obtaining a transfer function between each pronunciation unit and the target location area according to the first propagation signal.
Optionally, the electronic device is configured to, according to the acquired firstThe manner in which the signal is propagated and the transfer function between each sound unit and the target location area is obtained may refer to the content in step 402, which is not described herein. For example, the first propagation signal within the target location area acquired by the electronic device includes a due 1 And due 2 . The electronic device may be formulated as follows
Figure BDA0004162243040000151
Respectively calculating a transfer function H between the second pronunciation unit and the target position area 1 And a transfer function H between the first sound generating unit and the target position area 2 . Wherein the H is obtained 1 And H 2 The influence of the acoustic structure and the relative geometric relation of the sound generating unit is considered, and the information of the actual propagation of the acoustic signal is contained.
Step 1203, obtaining a combined frequency response function of the second filter and the first filter according to the transfer function between each pronunciation unit and the target position region.
In fig. 12, the operation coefficients of the filter to be calculated are the operation coefficients of the second filter and the operation coefficients of the first filter, and the objective cost function constructed by the electronic device is a coefficient combination function including the operation coefficients of the second filter and the operation coefficients of the first filter. That is, the coefficient combination function includes the operation coefficient of the second filter and the operation coefficient of the first filter that need to be calculated, and the operation coefficient of the second filter and the operation coefficient of the first filter are used as one parameter variable in the coefficient combination function.
Optionally, the coefficient combination function is a combined frequency response weighting matrix function of the second filter and the first filter, in this embodiment, the preset manner may be a weighted least squares construction manner, and the electronic device may construct the objective cost function according to a transfer function between each pronunciation unit and the objective location area as follows: and acquiring a combined frequency response function of the second filter and the first filter according to the transmission function between each pronunciation unit and the target position area.
Optionally, in the structure shown in fig. 3, in order to implement constant amplitude inversion of the acoustic signal at the target position area, the amplitude and phase of the audio signal played by the first sound generating unit need to be adjusted by the first filter, and the following effects are implemented by the first filter:
H 1 H d1 -H 2 H d2 =0
H 1 H d1 +H 2 H d2 =2H t
the above is the combined frequency response function of the second filter and the first filter, which are needed to be obtained in the step. Wherein H is d1 Is the frequency response matrix of the second filter, H d2 Is the frequency response matrix of the first filter, H t Is set at H 1 Based on the added overall time delay, H t The effect that can be achieved by the tester as required is preset. That is, the test audio signal played by the electronic device for the second sound unit may also be adjusted by adding an overall time delay thereto.
Step 1204, obtaining a combined frequency response weighting matrix function according to the combined frequency response function.
Optionally, the electronic device obtains a combined frequency response weighting matrix function according to the combined frequency response function. The electronic device converts the combined frequency response function obtained in the step 1203 to obtain a coefficient combined function (i.e. a combined frequency response weighting matrix function) including the working coefficients of the second filter and the working coefficients of the first filter, where optionally, the combined frequency response weighting matrix function constructed by the electronic device may be expressed as: y=ab.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0004162243040000152
M 1 and M 2 Respectively H 1 And H 2 Has n discrete frequency points:
Figure BDA0004162243040000153
Figure BDA0004162243040000161
y is H t Has n discrete frequency points, n is greater than 1:
Figure BDA0004162243040000162
b is the working coefficient of the first filter to be solved, and the coefficient lengths of the second filter and the first filter are k.
Optionally, w is a discrete frequency point weighting vector, and w of each frequency point can be allocated according to actual requirements. For example, a larger w is assigned to important bins and a smaller w is assigned to unimportant bins. For example, for a test audio signal, a developer may mark in advance a corresponding w for each frequency point of the test audio signal, and the electronic device may determine the corresponding w and the obtained H according to the pre-marked w 1 And H 2 And obtaining a corresponding y value.
The electronic device can obtain the combined frequency response weighting matrix function through the process, and calculate the required working coefficients of the second filter and the first filter based on the combined frequency response weighting matrix function by adopting a WLS algorithm based on a frequency domain. That is, the electronic device may construct the objective cost function expression of the WLS based on the weighted least squares construction scheme as:
J(b)=||y-Αb|| 2
step 1205, adjusting the working coefficient of at least one filter according to the objective cost function.
Alternatively, the adjustment may be followed by a lower signal energy that the audio playback module propagates into the target location area.
Optionally, after the electronic device obtains the objective cost function, the working coefficient of each filter is obtained by calculation according to the objective cost function, and the working coefficients of each filter are adjusted to the working coefficients obtained by calculation. The targets obtained in the above steps 501 to 503For the cost function, the electronic equipment constructs an objective cost function J (b) = |y-Ab|of the WLS according to a weighted least square construction mode 2 And solving to obtain the calculated working coefficients of the second filter and the first filter.
In the present application, b is taken as the working coefficient of the second filter and the working coefficient of the first filter to be calculated in the process, and b is taken as b in the present application WLS The value of the sum of the values,
Figure BDA0004162243040000163
that is, b is solved when the objective cost function is set to the minimum value. The WLS solution for obtaining the working coefficients of the second filter and the working coefficients of the first filter by using Moore pseudo-inverse is as follows:
b WLS =(A H A) -1 (A H y)
the bWLS values are calculated as described above, with the required FIR coefficients 1 and 2 being [ b (0) … b (k-1) ] and [ b (k) … b (2 k-1) ], respectively. The operating coefficients of the second filter are adjusted to [ b (0) … b (k-1) ], and the operating coefficients of the first filter are adjusted to [ b (k) … b (2 k-1) ], so that the signal energy propagated into the target location area by the audio playing module is lower.
In step 1206, a target audio signal to be played is obtained.
In step 1207, the target audio signal is played through an audio playing module of the electronic device.
Optionally, details of the implementation of steps 1206 to 1207 may refer to the processes from step 405 to step 406, which are not described herein.
It should be noted that the content mentioned in the above embodiments of the method may be used in combination with each other in one electronic device. In addition, the audio playing module of the electronic device may also include more pronunciation units and filters, each pronunciation unit is connected with each filter one to one, and on the basis of the structure, the schemes of the EQ curve and the phase shifter mentioned in the scheme may also be applied, which will not be repeated here.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In addition, the influence of the acoustic structure of the sounding unit is considered, the actual transmission function is started, the acoustic structure is closer to the actual situation of acoustic signal propagation, the first working coefficient of the second filter and the second working coefficient of the first filter are calculated at the same time by the frequency domain WLS method for minimizing the cost function, the degree of freedom is higher, and more accurate amplitude and phase adjustment can be carried out on the acoustic signals. And all frequency components can be automatically adjusted, so that a great deal of work is saved. In addition, larger weight can be allocated to important frequency points, and the method is more flexible. The effect of conversation privacy has been promoted to this scheme.
In one possible implementation, the electronic device uses direct phase division to obtain the required filter operating coefficients.
Referring to fig. 14, a flowchart of a method of audio playing method according to an exemplary embodiment of the present application is shown, where the audio playing method may be performed by an electronic device, and the electronic device may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. As shown in fig. 14, the audio playing method may include the steps of:
In step 1401, a first propagation signal of the test audio signal played by the audio playing module in the target position area is obtained.
The manner in which the electronic device obtains the first propagation signal may refer to the description in step 401, which is not described herein.
Step 1402, obtaining a transfer function between each pronunciation unit and the target location area according to the first propagation signal.
Optionally, the manner in which the electronic device obtains the transfer function between each sound unit and the target location area according to the obtained first propagation signal may refer to the content in step 402, which is not described herein. For example, the first propagation signal within the target location area acquired by the electronic device includes a due 1 And due 2 . The electronic device may be formulated as follows
Figure BDA0004162243040000171
Respectively calculating a transfer function H between the second pronunciation unit and the target position area 1 And a transfer function H between the first sound generating unit and the target position area 2 . Wherein the H is obtained 1 And H 2 The influence of the acoustic structure and the relative geometric relation of the sound generating unit is considered, and the information of the actual propagation of the acoustic signal is contained.
Step 1403, constructing a target cost function according to the transfer function between each pronunciation unit and the target location area, where the target cost function is a frequency response matrix function.
Optionally, the objective cost function constructed by the electronic device is a frequency response matrix function of the first filter, that is, the electronic device obtains the frequency response matrix function of the first filter according to a transfer function between each pronunciation unit and the target location area.
Optionally, in the structure shown in fig. 3, in order to implement constant amplitude inversion of the acoustic signal at the target position area, the amplitude and phase of the audio signal played by the first sound generating unit need to be adjusted by the first filter, and the following effects are implemented by the first filter:
H t =H 2 H d
wherein H is d A frequency response matrix representing the first filter, H t Is set at H 1 Based on the added overall time delay, H t The effect that can be achieved by the tester as required is preset. That is, the test audio signal played by the electronic device for the second sound unit may also be adjusted by adding an overall time delay thereto.
Then the frequency response matrix function of the first filter can be expressed as: h d =H t /H 2 . Wherein H is d =H t /H 2 Is the objective cost function built by the electronic device.
In step 1404, the operating coefficients of at least one filter are adjusted according to the frequency response matrix function.
Alternatively, the adjustment may be followed by a lower signal energy that the audio playback module propagates into the target location area.
Optionally, the electronic device divides the delay matrix applied to the second pronunciation unit by the first transmission function according to a function division algorithm, and solves the frequency response matrix function to obtain the working coefficient of the first filter. Namely, H obtained by the calculation t And H 2 Is carried into the target cost function, thereby obtaining H d And for H d And performing inverse Fourier transform to obtain a second working parameter of the first filter to be acquired.
In step 1405, a target audio signal to be played is acquired.
In step 1406, the target audio signal is played by an audio playing module of the electronic device.
Optionally, details of the implementation of steps 1405 to 506 may refer to the processes of steps 405 to 406, which are not described herein.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In addition, the influence of the acoustic structure of the sounding unit is considered, and the sounding unit is closer to the real situation of sound signal propagation from the actual transfer function, so that the amplitude and the phase of the sound signal can be more accurately adjusted, all frequency components can be automatically adjusted, and a large amount of work is avoided. The effect of conversation privacy has been promoted to this scheme.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Referring to fig. 15, a block diagram of an audio playing device according to an exemplary embodiment of the present application is shown. The audio playing device 1500 may be used in an electronic device, which may be a terminal device in fig. 1, a separate voice test device, or a server in fig. 1. To perform all or part of the steps performed by the electronic device in the methods provided by the embodiments shown in fig. 2-14. The audio playback apparatus 1500 includes:
a signal acquisition module 1501, configured to acquire a target audio signal to be played;
an audio playing module 1502, configured to play the target audio signal through the audio playing module of the electronic device;
The audio playing module comprises at least two pronunciation units and at least one filter, wherein at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units.
In summary, a target audio signal to be played is obtained; playing the target audio signal through an audio playing module of the electronic equipment; the audio playing module comprises at least two pronunciation units and at least one filter, wherein the at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of the at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units. When the target audio signal is played, the target cost function is constructed according to the transfer function between each pronunciation unit of the audio playing module and the target position area, the target cost function is solved, the working coefficient of at least one filter is obtained, the working coefficient of at least one filter works according to the calculated working coefficient, and therefore when the target audio signal is played, the signal energy in the target position area is lower, the signal leakage condition of the audio signal in the far-field transmission area is reduced, and the confidentiality of the audio signal in the voice call process is improved.
Optionally, the apparatus further includes:
the first acquisition module is used for acquiring a first propagation signal of the test audio signal played by the audio playing module in the target position area before the target audio signal is played by the audio playing module of the electronic equipment;
the second acquisition module is used for acquiring a transmission function between each pronunciation unit and the target position area according to the first transmission signal;
the first construction module is used for constructing the target cost function according to the transmission function between each pronunciation unit and the target position area;
and the first adjusting module is used for adjusting the working coefficient of at least one filter according to the target cost function so that the signal energy transmitted to the target position area by the audio playing module is lower.
Optionally, the first adjusting module includes: the first acquisition unit and the first adjustment unit;
the first obtaining unit is configured to solve the target cost primitive function according to a preset algorithm, and obtain respective target working coefficients of at least one filter;
the first adjusting unit is used for adjusting the working coefficient of at least one filter to the respective target working coefficient.
Optionally, the at least two sound generating units include a second sound generating unit and a first sound generating unit, the at least two filters include a first filter, and the first sound generating unit is electrically connected with the first filter; the target cost function is a coefficient combination function including the working coefficients of the first filter; the preset algorithm is a least square method;
the step of solving the target cost primitive function according to a preset algorithm to obtain at least one working coefficient of the filter comprises the following steps:
and solving pseudo-inverse of the coefficient combination function according to a least square method to obtain a target working coefficient of the first filter.
Optionally, the least square method is a frequency domain based weighted least square filtering WLS algorithm, the coefficient combination function is a frequency response weighting matrix function of the first filter, and the constructing the target cost function according to a transfer function between each pronunciation unit and the target location area includes:
acquiring a frequency response matrix function of the first filter according to the transfer function between each pronunciation unit and the target position area;
and acquiring a frequency response weighting matrix function of the first filter according to the frequency response matrix function.
Optionally, the number of sampling points in the target location area is not less than 2, and the obtaining the frequency response matrix function of the first filter according to the transfer function between each pronunciation unit and the target location area includes:
acquiring a frequency response matrix function corresponding to each sampling point according to a transmission function between each pronunciation unit corresponding to each sampling point and the target position area;
the obtaining the frequency response weighting matrix function of the first filter according to the frequency response matrix function comprises the following steps:
acquiring a frequency response weighting matrix function corresponding to each sampling point according to the frequency response matrix function corresponding to each sampling point;
the solving the pseudo-inverse of the coefficient combination function according to the least square method to obtain the target working coefficient of the first filter includes:
acquiring a fused target weighting matrix function according to the frequency response weighting matrix function corresponding to each sampling point;
and solving pseudo-inverse of the target weighting matrix function according to a least square method to obtain a target working coefficient of the first filter.
Optionally, the second pronunciation unit is electrically connected with the second equalizer module, and the first filter is further electrically connected with the first equalizer module; the second equalizer module is used for adjusting the audio signal transmitted by the second pronunciation unit; the first equalizer module is used for adjusting the audio signal output by the first filter;
The device is also for:
acquiring a signal frequency band contained in the first propagation signal;
and determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band contained in the first propagation signal.
Optionally, the first propagated signal is audio data received by an electronic device that includes the audio playback module.
Optionally, the device is further configured to:
acquiring an environmental sound signal and determining a signal frequency band contained in the environmental sound signal;
the determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band included in the first propagation signal includes:
and determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band contained in the environment sound signal and the signal frequency band contained in the first propagation signal.
Optionally, the second sound generating unit is electrically connected with the second phase shifter, and the first filter is also electrically connected with the first phase shifter; the second phase shifter is used for adjusting the amplitude and the phase of the audio signal transmitted by the second pronunciation unit; the first phase shifter is used for adjusting the amplitude and the phase of the audio signal output by the first filter;
The test audio signal is an audio signal obtained by dividing the test audio signal according to a preset bandwidth.
Optionally, the device is further configured to:
acquiring a first current sub-band where the second sound generating unit is currently located when the second sound generating unit plays the test audio signal, and acquiring a second current sub-band where the first sound generating unit is currently located when the first sound generating unit plays the test audio signal;
and determining the phase adjustment parameter of the second phase shifter according to the first current sub-band, and determining the phase adjustment parameter of the first phase shifter according to the second current sub-band.
Optionally, the device is further configured to:
acquiring a maximum frequency in the first propagation signal;
constructing a single-frequency signal of the maximum frequency according to the maximum frequency;
and adjusting the phase adjustment parameters of the second phase shifter and the phase adjustment parameters of the first phase shifter according to the single-frequency signal.
Optionally, the device is further configured to:
acquiring a signal frequency band contained in the first propagation signal;
and determining the amplitude adjustment parameter of the second phase shifter and the amplitude adjustment parameter of the first phase shifter according to the signal frequency band contained in the first propagation signal.
Optionally, the at least two filters are further used for a second filter, and the second pronunciation unit is electrically connected with the second filter; the coefficient combination function is a combined frequency response weighting matrix function of the second filter and the first filter, and the constructing the target cost function according to a transfer function between each pronunciation unit and the target position region includes:
acquiring a combined frequency response function of the second filter and the first filter according to the transfer function between each pronunciation unit and the target position area;
and acquiring a combined frequency response weighting matrix function according to the combined frequency response function.
Optionally, the number of sampling points in the target position area is not less than 2, the solving the pseudo-inverse of the coefficient combination function according to a least square method, to obtain a target working coefficient of the first filter, includes:
solving pseudo-inverse of the frequency response weighting matrix function corresponding to each sampling point according to the least square method, and obtaining the working coefficient of the first filter calculated for each sampling point;
and calculating a target working coefficient of the first filter according to the working coefficient of the first filter calculated for each sampling point.
Optionally, the least square method is a least square LS algorithm in a time domain, the coefficient combination function is a first time delay formula function, and before the constructing the target cost function according to a transfer function between each pronunciation unit and the target location area, the apparatus is further configured to:
acquiring a delay matrix applied to the second pronunciation unit;
the constructing the objective cost function according to the transfer function between each pronunciation unit and the objective position area includes:
acquiring impulse response between each pronunciation unit and the target position area according to a transfer function between each pronunciation unit and the target position area;
and acquiring the first time delay formula function according to the impulse response between each pronunciation unit and the target position area and the time delay matrix, wherein the first time delay formula function comprises the working coefficient of the first filter.
Optionally, the number of sampling points in the target location area is not less than 2, and constructing the target cost function according to a transfer function between each pronunciation unit and the target location area includes:
Acquiring impulse response between each pronunciation unit corresponding to each sampling point and the target position area according to a transmission function between each pronunciation unit corresponding to each sampling point and the target position area;
acquiring a first delay formula function corresponding to each sampling point according to impulse response between each pronunciation unit corresponding to each sampling point and the target position area and the delay matrix;
and constructing the target cost function according to the first delay formula function corresponding to each sampling point.
Optionally, the number of sampling points in the target position area is not less than 2, the solving the pseudo-inverse of the coefficient combination function according to a least square method, to obtain a target working coefficient of the first filter, includes:
solving pseudo-inverse of a first delay formula function corresponding to each sampling point according to the least square method, and obtaining a working coefficient of the first filter calculated for each sampling point;
and calculating a target working coefficient of the first filter according to the working coefficient of the first filter calculated for each sampling point.
Optionally, the at least two sound generating units include a second sound generating unit and a first sound generating unit, the at least two filters include a first filter, and the first sound generating unit is electrically connected with the first filter; the target cost function is a frequency response matrix function of the first filter, and the preset algorithm is a function division algorithm;
The constructing the objective cost function according to the transfer function between each pronunciation unit and the objective position area includes:
acquiring a frequency response matrix function of the first filter according to the transfer function between each pronunciation unit and the target position area;
the step of solving the target cost primitive function according to a preset algorithm to obtain at least one working coefficient of the filter comprises the following steps:
and dividing the time delay matrix applied to the second pronunciation unit by the first transfer function according to the function dividing algorithm, and solving a frequency response matrix function to obtain the working coefficient of the first filter.
Optionally, the electronic device is further configured to a microphone, and the acquiring a first propagation signal of the test audio signal played by the audio playing module in the target location area includes:
and collecting a first propagation signal of the test audio signal played by the audio playing module in the target position area through the microphone.
Alternatively, the electronic device may be the terminal device in fig. 1, please refer to fig. 16, which illustrates a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application. As shown in fig. 16, the terminal device includes a processor 1610, a transceiver 1620, and a display unit 1670. Among them, the display unit 1670 may include a display screen.
Optionally, the terminal device can also include memory 1630. Processor 1610, transceiver 1620 and memory 1630 may communicate with each other via an internal connection path to communicate ranging data, memory 1630 being used to store a computer program, and processor 1610 being used to call and run the computer program from memory 1630.
The processor 1610 may be combined with the memory 1630 into a single processing device, more commonly a separate component, and the processor 1610 is configured to execute the program code stored in the memory 1630 to perform the functions described above. In particular implementations, the memory 1630 may also be integrated within the processor 1610 or separate from the processor 1610.
It will be appreciated that the terminal device shown in fig. 16 may include one or more processing units, such as: processor 1610 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
A memory may also be provided in processor 1610 for storing instructions and data. In some embodiments, the memory in processor 1610 is a cache memory. The memory may hold instructions or data that is just used or recycled by the processor 1610. If the processor 1610 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided, reducing the latency of the processor 1610, and thus improving the efficiency of the system.
In some embodiments, processor 1610 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I-C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I-S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 1610 with the transceiver 1620. For example: the processor 1610 communicates with the bluetooth module in the transceiver 1620 through a UART interface to implement a bluetooth function.
The MIPI interface may be used to connect processor 1610 with peripheral devices such as display unit 1670. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 1610 and display unit 1670 communicate through a DSI interface to implement display functionality of a terminal device.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect processor 1610 with display unit 1670, transceiver 1620, and the like. The GPIO interface may also be configured as an I-C interface, an I-S interface, a UART interface, an MIPI interface, etc.
The transceiver 1620 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (IR), etc., as applied on a terminal device. The transceiver 1620 may be one or more devices that integrate at least one communication processing module, and may include, for example, a bluetooth module.
Memory 1630 may be used for storing computer-executable program code that includes instructions. Memory 1630 may include a program area and a data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the terminal device, such as positioning data, etc. In addition, memory 1630 may include high-speed random access memory and may also include non-volatile memory such as at least one magnetic disk storage device, flash memory device, universal flash memory (universal flash storage, UFS), and the like. Processor 1610 performs various functional applications of the terminal device and data processing by executing instructions stored in memory 1630 and/or instructions stored in a memory provided in the processor.
In addition, in order to make the functions of the terminal device more complete, the terminal device may further include one or more of a power supply 1650, an input unit 1660, an audio circuit 1680, a sensor 1602, and the like.
A power supply 1650 for providing power to various devices or circuits in the terminal equipment. Preferably, the power supply 1650 may be logically connected to the processor 1610 through a power management device, so as to perform functions of managing charging, discharging, and power consumption through the power management device.
The input unit 1660 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal device. In particular, the input unit 1660 may include a touch panel and other input devices. The touch panel, also called a touch screen, may collect touch operations on or near the user, such as operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus, etc., and drive the corresponding connection device according to a preset program. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1610, and can receive commands sent from the processor 1610 and execute them. In addition, the touch panel may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1660 may include other input devices in addition to the touch panel. In particular, other input devices may include, but are not limited to, one or more of function keys, a trackball, a joystick, etc.
The display unit 1670 may be used to display information input by a user or information provided to the user and various menus of the terminal device. The display unit 1670 may include a display panel, and optionally, the display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel may cover the display panel, and when the touch panel detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 1610 to determine a type of touch event, and then the processor 1610 provides a corresponding visual output on the display panel according to the type of touch event.
The terminal device can also include at least one sensor 1602, such as a gyroscopic sensor, a motion sensor, and other sensors. In particular, a gyroscopic sensor may be used to determine the motion pose of the terminal device. In some embodiments, the angular velocity of the terminal device about three axes (i.e., x, y, and z axes) may be determined by a gyroscopic sensor. The gyroscopic sensor may also be used to navigate, somatosensory a game scene. As one of the motion sensors, the acceleration sensor can detect the acceleration in all directions (i.e., x, y and z axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the terminal equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor and the like, which are also configured for the terminal device, are not described herein.
Audio circuitry 1680 may include speakers and microphones to provide an audio interface between the user and the terminal device. The audio circuit 1680 may transmit the received electrical signal converted from audio data to a speaker, which converts the electrical signal to a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by audio circuit 1680 and converted into audio data, which are processed by audio data output processor 1610 for transmission via RF circuitry to, for example, another terminal device, or which are output to memory 1630 for further processing.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
It should be appreciated that in embodiments of the present application, the processor may be a central processing unit (Central Processing Unit, CPU), the processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Embodiments of the present application also provide a computer readable medium storing at least one instruction that is loaded and executed by the processor to implement all or part of the steps performed by the electronic device in the audio playing method according to the above embodiments.
Embodiments of the present application also provide a computer program product storing at least one instruction that is loaded and executed by the processor to implement all or part of the steps of the audio playing method described in the above embodiments, which are executed by an electronic device.
It should be noted that: the apparatus provided in the above embodiment only illustrates the division of the above functional modules when performing control of the electronic device, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.

Claims (20)

1. An audio playing method, applied to an electronic device, comprising:
acquiring a target audio signal to be played;
playing the target audio signal through an audio playing module of the electronic equipment;
the audio playing module comprises at least two pronunciation units and at least one filter, wherein at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units.
2. The method of claim 1, wherein prior to the playing of the target audio signal by the audio playing module of the electronic device, the method further comprises:
acquiring a first propagation signal of a test audio signal played by the audio playing module in a target position area;
acquiring a transfer function between each pronunciation unit and a target position area according to the first propagation signal;
constructing the target cost function according to the transfer function between each pronunciation unit and the target position area;
and adjusting the working coefficient of at least one filter according to the target cost function.
3. The method of claim 2, wherein adjusting the operating coefficients of at least one of the filters according to the objective cost function comprises:
solving the target cost primitive function according to a preset algorithm to obtain a target working coefficient of at least one filter;
and adjusting the working coefficient of at least one filter to the target working coefficient.
4. The method of claim 3, wherein the at least two sound units comprise a second sound unit and a first sound unit, the at least two filters comprise a first filter, and the first sound unit is electrically connected to the first filter; the target cost function is a coefficient combination function including the working coefficients of the first filter; the preset algorithm is a least square method;
The step of solving the target cost primitive function according to a preset algorithm to obtain at least one working coefficient of the filter comprises the following steps:
and solving pseudo-inverse of the coefficient combination function according to a least square method to obtain a target working coefficient of the first filter.
5. A method as recited in claim 4, wherein said least squares method is a frequency domain based weighted least squares filtering WLS algorithm, said coefficient combining function is a frequency response weighting matrix function of said first filter, said constructing said target cost function from a transfer function between each pronunciation element and said target location region comprising:
acquiring a frequency response matrix function of the first filter according to the transfer function between each pronunciation unit and the target position area;
and acquiring a frequency response weighting matrix function of the first filter according to the frequency response matrix function.
6. The method of claim 5, wherein the number of sampling points in the target location area is not less than 2, and the obtaining the frequency response matrix function of the first filter according to the transfer function between each pronunciation unit and the target location area includes:
Acquiring a frequency response matrix function corresponding to each sampling point according to a transmission function between each pronunciation unit corresponding to each sampling point and the target position area;
the obtaining the frequency response weighting matrix function of the first filter according to the frequency response matrix function comprises the following steps:
acquiring a frequency response weighting matrix function corresponding to each sampling point according to the frequency response matrix function corresponding to each sampling point;
the solving the pseudo-inverse of the coefficient combination function according to the least square method to obtain the target working coefficient of the first filter includes:
acquiring a fused target weighting matrix function according to the frequency response weighting matrix function corresponding to each sampling point;
and solving pseudo-inverse of the target weighting matrix function according to a least square method to obtain a target working coefficient of the first filter.
7. The method of claim 5 or 6, wherein the first filter is further electrically connected to a first equalizer module, and the second sound unit is electrically connected to a second equalizer module; the second equalizer module is used for adjusting the audio signal transmitted by the second pronunciation unit; the first equalizer module is used for adjusting the audio signal output by the first filter;
The method further comprises the steps of:
acquiring a signal frequency band contained in the first propagation signal;
and determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band contained in the first propagation signal.
8. The method of claim 7, wherein the method further comprises:
acquiring an environmental sound signal and determining a signal frequency band contained in the environmental sound signal;
the determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band included in the first propagation signal includes:
and determining the equalization coefficient of the second equalizer module and the equalization coefficient of the first equalizer module according to the signal frequency band contained in the environment sound signal and the signal frequency band contained in the first propagation signal.
9. The method of claim 5 or 6, wherein the first filter is further electrically connected to a first phase shifter, and the second sound unit is electrically connected to a second phase shifter; the second phase shifter is used for adjusting the amplitude and the phase of the audio signal transmitted by the second pronunciation unit; the first phase shifter is used for adjusting the amplitude and the phase of the audio signal output by the first filter;
The test audio signal is an audio signal obtained by dividing the test audio signal according to a preset bandwidth.
10. The method according to claim 9, wherein the method further comprises:
acquiring a first current sub-band where the second sound generating unit is currently located when the second sound generating unit plays the test audio signal, and acquiring a second current sub-band where the first sound generating unit is currently located when the first sound generating unit plays the test audio signal;
and determining the phase adjustment parameter of the second phase shifter according to the first current sub-band, and determining the phase adjustment parameter of the first phase shifter according to the second current sub-band.
11. The method according to claim 10, wherein the method further comprises:
acquiring a maximum frequency in the first propagation signal;
constructing a single-frequency signal of the maximum frequency according to the maximum frequency;
and adjusting the phase adjustment parameters of the second phase shifter and the phase adjustment parameters of the first phase shifter according to the single-frequency signal.
12. The method according to claim 9, wherein the method further comprises:
acquiring a signal frequency band contained in the first propagation signal;
And determining the amplitude adjustment parameter of the second phase shifter and the amplitude adjustment parameter of the first phase shifter according to the signal frequency band contained in the first propagation signal.
13. The method of claim 4, wherein the at least two filters further comprise a second filter, the second sound unit being electrically connected to the second filter; the coefficient combination function is a combined frequency response weighting matrix function of the second filter and the first filter, and the constructing the target cost function according to a transfer function between each pronunciation unit and the target position region includes:
acquiring a combined frequency response function of the second filter and the first filter according to the transfer function between each pronunciation unit and the target position area;
and acquiring a combined frequency response weighting matrix function according to the combined frequency response function.
14. The method of claim 5, wherein the number of sampling points in the target location area is not less than 2, wherein the solving the coefficient combining function according to the least squares method for the pseudo-inverse, to obtain the target working coefficient of the first filter, comprises:
Solving pseudo-inverse of the frequency response weighting matrix function corresponding to each sampling point according to the least square method, and obtaining the working coefficient of the first filter calculated for each sampling point;
and calculating a target working coefficient of the first filter according to the working coefficient of the first filter calculated for each sampling point.
15. The method of claim 4, wherein the least square method is a least squares, LS, algorithm in the time domain, the coefficient combination function is a first time delay formula function, and prior to constructing the target cost function from the transfer function between each sound unit and the target location area, further comprising:
acquiring a delay matrix applied to the second pronunciation unit;
the constructing the objective cost function according to the transfer function between each pronunciation unit and the objective position area includes:
acquiring impulse response between each pronunciation unit and the target position area according to a transfer function between each pronunciation unit and the target position area;
and acquiring the first time delay formula function according to the impulse response between each pronunciation unit and the target position area and the time delay matrix, wherein the first time delay formula function comprises the working coefficient of the first filter.
16. The method of claim 15, wherein the number of sampling points in the target location area is not less than 2, and wherein constructing the target cost function from the transfer function between each pronunciation unit and the target location area comprises:
acquiring impulse response between each pronunciation unit corresponding to each sampling point and the target position area according to a transmission function between each pronunciation unit corresponding to each sampling point and the target position area;
acquiring a first delay formula function corresponding to each sampling point according to impulse response between each pronunciation unit corresponding to each sampling point and the target position area and the delay matrix;
and constructing the target cost function according to the first delay formula function corresponding to each sampling point.
17. The method of claim 15, wherein the number of sampling points in the target location area is not less than 2, wherein the solving the coefficient combining function according to the least squares method for the pseudo-inverse, to obtain the target working coefficient of the first filter, comprises:
solving pseudo-inverse of a first delay formula function corresponding to each sampling point according to the least square method, and obtaining a working coefficient of the first filter calculated for each sampling point;
And calculating a target working coefficient of the first filter according to the working coefficient of the first filter calculated for each sampling point.
18. An audio playing apparatus, characterized by being applied to an electronic device, comprising:
the signal acquisition module is used for acquiring a target audio signal to be played;
the audio playing module is used for playing the target audio signal through the audio playing module of the electronic equipment;
the audio playing module comprises at least two pronunciation units and at least one filter, wherein at least one filter is connected with one pronunciation unit in the at least two pronunciation units, the working coefficient of at least one filter is obtained by solving a target cost function, the target cost function is constructed according to a transmission function between each pronunciation unit and a target position area, and the target position area is a sound counteracting area of the at least two pronunciation units.
19. An electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the audio playback method of any one of claims 1-17.
20. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by a processor to implement the audio playback method of any one of claims 1 to 17.
CN202310348801.6A 2023-03-31 2023-03-31 Audio playing method and device, electronic equipment and storage medium Pending CN116320133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310348801.6A CN116320133A (en) 2023-03-31 2023-03-31 Audio playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310348801.6A CN116320133A (en) 2023-03-31 2023-03-31 Audio playing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116320133A true CN116320133A (en) 2023-06-23

Family

ID=86790425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310348801.6A Pending CN116320133A (en) 2023-03-31 2023-03-31 Audio playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116320133A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117714581A (en) * 2023-08-11 2024-03-15 荣耀终端有限公司 Audio signal processing method and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117714581A (en) * 2023-08-11 2024-03-15 荣耀终端有限公司 Audio signal processing method and electronic equipment

Similar Documents

Publication Publication Date Title
US11276414B2 (en) Method and device for processing audio signal using audio filter having non-linear characteristics to prevent receipt of echo signal
JP6505252B2 (en) Method and apparatus for processing audio signals
US9489963B2 (en) Correlation-based two microphone algorithm for noise reduction in reverberation
US10924877B2 (en) Audio signal processing method, terminal and storage medium thereof
WO2015184893A1 (en) Mobile terminal call voice noise reduction method and device
US9369801B2 (en) Wireless speaker system with noise cancelation
EP3618461A1 (en) Audio signal processing method and apparatus, terminal and storage medium
CN111524498B (en) Filtering method and device and electronic equipment
US10403259B2 (en) Multi-microphone feedforward active noise cancellation
US20200265848A1 (en) Method for recovering audio signals, terminal and storage medium
CN109547848B (en) Loudness adjustment method and device, electronic equipment and storage medium
US11272304B2 (en) Method and terminal for playing audio data, and storage medium thereof
WO2021203906A1 (en) Automatic volume adjustment method and apparatus, and medium and device
CN116320133A (en) Audio playing method and device, electronic equipment and storage medium
CN105027540A (en) Echo suppression
CN111405416A (en) Stereo recording method, electronic device and storage medium
CN109155802A (en) For generating the device of audio output
CN114040285A (en) Method and device for generating parameters of feedforward filter of earphone, earphone and storage medium
CN110136733B (en) Method and device for dereverberating audio signal
CN116346977A (en) Audio playing method and device, electronic equipment and storage medium
CN111565088B (en) Interference method of sensor signal in terminal equipment and related device
CN110992973A (en) Signal time delay determination method and electronic equipment
CN115884030A (en) Noise reduction method and device, earphone equipment, storage medium and chip
CN113192531B (en) Method, terminal and storage medium for detecting whether audio is pure audio
JP6434333B2 (en) Phase control signal generation apparatus, phase control signal generation method, and phase control signal generation program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination