Audio playing method and device, electronic equipment and storage medium

By setting multiple sound units and filters in the audio playback module and adjusting the filter operating coefficients according to the energy contrast of the near-field and far-field propagation regions, the problem of audio signal leakage in voice calls of terminal devices is solved, and the privacy of the call is improved.

CN116346977BActive Publication Date: 2026-04-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-03-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, terminal devices suffer from audio signal leakage during voice calls, especially when audio data is played through a speaker. The audio signal can be heard by other users within a certain range, affecting the privacy of the call. Furthermore, existing anti-leakage measures lack flexibility.

Method used

An audio playback module is employed, including at least two speaker units and two filters. The operating coefficient of each filter is determined based on the maximum energy contrast between the near-field propagation region and the far-field propagation region. The signal leakage in the far-field propagation region is reduced by flexibly adjusting the operating coefficient of the filters.

Benefits of technology

It effectively reduces the leakage of audio signals in the far-field propagation area and improves the confidentiality of audio signals during voice calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346977B_ABST
    Figure CN116346977B_ABST
Patent Text Reader

Abstract

The application discloses an audio playing method and device, electronic equipment and storage medium, and belongs to the technical field of terminal control. The method is applied to the electronic equipment, and comprises the following steps: obtaining a target audio signal to be played; and playing the target audio signal through an audio playing module of the electronic equipment; wherein the audio playing module comprises at least two sound production units and at least two filters, each sound production unit is connected with a filter in correspondence, and the working coefficient of each filter is determined according to the maximum energy contrast of a test audio signal between a near-field propagation area and a far-field propagation area, and the distance between the near-field propagation area and the audio playing module is smaller than the distance between the far-field propagation area and the audio playing module. The application can reduce the signal leakage of the audio signal in the far-field propagation area, and improve the confidentiality of the audio signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal control technology, and in particular to an audio playback method, device, electronic device and storage medium. Background Technology

[0002] With the development of science and technology, all kinds of terminal devices have appeared in people's daily lives, and people can use terminal devices to make voice calls, video calls, etc.

[0003] In voice call scenarios, the issue of call privacy often arises. During a call, the audio data played by the receiving terminal device through its own speaker or other sound playback devices can be heard not only by the user but also by other users within a certain range, resulting in the leakage of voice data. To improve call privacy and prevent the leakage of played voice data, one solution involves driving the back cover of the receiving terminal device to emit sound while playing sound, thus partially canceling out any leaked sound signal and preventing eavesdropping. However, this solution uses a narrow frequency band to drive the back cover, which not only affects the receiving user's hearing experience but also has limitations in preventing leakage, meaning the possibility of voice data leakage still exists. Summary of the Invention

[0004] To address the problems of existing technologies and reduce audio signal leakage during playback from the audio playback module of terminal devices, this application provides an audio playback method, apparatus, electronic device, and storage medium. The technical solution is as follows:

[0005] In one aspect, this application provides an audio playback method applied to an electronic device, the method comprising:

[0006] Acquire the target audio signal to be played;

[0007] The target audio signal is played through the audio playback module of the electronic device;

[0008] The audio playback module includes at least two sound-producing units and at least two filters. Each sound-producing unit is connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast of the test audio signal between the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module.

[0009] In one aspect, this application provides an audio playback device for use in an electronic device, the device comprising:

[0010] The signal acquisition module is used to acquire the target audio signal to be played.

[0011] A signal playback module is used to play the target audio signal through the audio playback module of the electronic device;

[0012] The audio playback module includes at least two sound-producing units and at least two filters. Each sound-producing unit is connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast of the test audio signal between the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module.

[0013] In another aspect, this application provides an electronic device comprising a processor and a memory, wherein the memory stores 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 the instruction set being loaded and executed by the processor to implement the audio playback method as described in one aspect.

[0014] In another aspect, this application provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the audio playback method as described in one aspect.

[0015] On the other hand, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform the audio playback method as described in one aspect above.

[0016] On the other hand, embodiments of this application provide an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the audio playback method as described in one aspect above.

[0017] The beneficial effects of the technical solutions provided in this application include at least the following:

[0018] The method involves acquiring a target audio signal to be played and playing the target audio signal through an audio playback module of an electronic device. The audio playback module includes at least two sound-producing units and at least two filters, with each sound-producing unit connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. When playing the target audio signal, this application determines the operating coefficient of each filter based on the maximum energy contrast between the near-field and far-field propagation regions of the audio playback module. Each filter operates according to its calculated operating coefficient, thereby minimizing signal energy in the far-field propagation region, reducing signal leakage in the far-field propagation region, and improving the confidentiality of the audio signal during voice calls. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the architecture of a voice call scenario according to an exemplary embodiment of this application;

[0021] Figure 2 This is a flowchart of an audio playback method provided in an exemplary embodiment of this application;

[0022] Figure 3 This is a schematic diagram of the structure of an audio playback module according to an exemplary embodiment of this application;

[0023] Figure 4 This is a flowchart of an audio playback method provided in an exemplary embodiment of this application;

[0024] Figure 5 This is a flowchart of an audio playback method provided in an exemplary embodiment of this application;

[0025] Figure 6 This application relates to an exemplary embodiment. Figure 3 A schematic diagram illustrating the division of a sound field propagation region;

[0026] Figure 7 This is a structural block diagram of an audio playback device provided in an exemplary embodiment of this application;

[0027] Figure 8This is a schematic diagram of the structure of a terminal device provided in an exemplary embodiment of this application. Detailed Implementation

[0028] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0029] The solution provided in this application can be used in daily life scenarios where terminal devices are used for voice calls. To facilitate understanding, the scenario architecture of the application scenarios involved in the embodiments of this application will be briefly introduced below.

[0030] With the development of science and technology, the intelligence of terminal devices is becoming more and more common. Various terminal devices can establish communication connections and transmit data, realizing the interaction of various video and audio data.

[0031] For example, please refer to Figure 1 This illustrates an architectural diagram of a voice call scenario according to an exemplary embodiment of this application. Figure 1 As shown, it includes a first terminal device 101, a second terminal device 102, and a server 103.

[0032] The first terminal device 101 and the second terminal device 102 can be terminal devices with voice call functions. For example, the first terminal device 101 and the second terminal device 102 can be, but are not limited to, wearable devices (such as wristbands, smartwatches, smart glasses, etc.), mobile phones, tablets, laptops, smart glasses, smartwatches, desktop computers, laptop computers, smart home devices, and other terminal devices with database storage functions.

[0033] Server 103 can be at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 103 is used to provide background services for applications that support the virtual environment. Optionally, server 103 can undertake the main computing work, while the first terminal device 101 and the second terminal device 102 undertake secondary computing work; or, server 103 can undertake secondary computing work, while the first terminal device 101 and the second terminal device 102 can undertake the main computing work; or, server 103, the first terminal device 101, and the second terminal device 102 can collaborate on computing using a distributed computing architecture.

[0034] Optionally, the first terminal device 101 and the second terminal device 102 can establish a wireless communication connection with each other or with a server through a network providing device. For example, the network providing device can be a WiFi device in a home environment, a wireless access point (AP) device, or a base station.

[0035] After establishing a wireless communication connection with the network provider, the first terminal device 101 and the second terminal device 102 can transmit data to each other. Optionally, a communication connection is established between the first terminal device 101 and the second terminal device 102, and then data such as images and videos are transmitted through the communication connection. The wireless communication connection can also be referred to as a communication network or network connection, and the communication connection uses standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to any combination of Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless networks, private networks, or virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some of the links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0036] In a voice call scenario, after receiving voice data input by the user, the first terminal device 101, acting as the voice data sender, sends the voice data to be transmitted to the second terminal device 102 via the aforementioned wireless communication connection. The second terminal device 102 then plays the voice data through its own speaker or loudspeaker, allowing the user of the second terminal device 102 to receive the voice information.

[0037] Optionally, call privacy is always a key concern for users. During a call, the audio data played by the receiving terminal device through its own speaker or other sound playback devices can be heard not only by the user but also by other users within a certain range, resulting in the leakage of voice data. Reducing audio signal leakage in voice call scenarios is a crucial aspect of ensuring privacy. Currently, to reduce audio leakage during calls, methods typically rely on masking principles, emitting interfering sound signals to reduce the intelligibility of far-field speech. Alternatively, the terminal device can generate two audio signals, allowing certain frequency bands to overlap and cancel each other out, thus disrupting the speech and reducing intelligibility. Another option is for the terminal device to leave one of the generated audio signals unprocessed, while the amplitude and phase of the other signal are calculated based on the relative geometric relationship between the transmitting unit and the cancellation point, achieving an effect of equal amplitude and anti-phase cancellation of far-field audio signals. Alternatively, while the receiving terminal device is playing sound, the back cover of the terminal device can be driven to emit sound, so that the played sound signal cancels out the leaked sound signal to a certain extent, thus preventing other users from eavesdropping.

[0038] In the aforementioned schemes to prevent audio signal leakage, the interference signals emitted based on the masking principle also have an interfering effect in the near field, affecting the listening experience. When audio signals of certain frequency bands are superimposed, if the frequency band containing intelligible speech information is amplified, it can actually lead to a decrease in privacy. Results calculated solely based on relative geometric relationships can also be inaccurate. The frequency band of the sound emitted from the back cover of the driving terminal device is relatively narrow, which not only affects the listening experience for the receiving user but also has limitations in preventing leakage. Therefore, current terminal devices are basically based on fixed interference methods to prevent the leakage of played audio data. This lack of flexibility for audio data in different frequency bands and its limitations in preventing leakage mean that audio data leakage still occurs.

[0039] To address the problems existing in the aforementioned related technologies, reduce the leakage of audio signals played by the audio playback module of terminal devices, and improve the privacy of voice calls, this application provides an audio playback method that can flexibly calculate the operating coefficients of the first filter and the second filter by maximizing the energy contrast between the near-field propagation region and the far-field propagation region, and adjust the audio data output in a timely manner in voice call scenarios.

[0040] Please refer to Figure 2 The diagram illustrates a flowchart of an audio playback method provided in an exemplary embodiment of this application. This audio playback method can be executed by an electronic device, which may be the aforementioned... Figure 1 Terminal devices in the process. For example... Figure 2 As shown, the audio playback method may include the following steps:

[0041] Step 201: Obtain the target audio signal to be played.

[0042] Optionally, the electronic device can acquire the target audio signal to be played by the audio playback module of the electronic device. The audio playback module includes at least two sound units and at least two filters. The at least two sound units are connected to the at least two filters in a one-to-one correspondence. Each filter is used to adjust the amplitude and phase of the audio signal emitted by the sound unit connected to it.

[0043] Optionally, the electronic device can be in the above-mentioned Figure 1 In a voice call scenario, the receiving terminal device can receive any audio signal sent by the sending device. Optionally, the audio playback module can be any audio playback module capable of playing sound, such as a speaker module, earpiece module, or sound-producing module in the receiving terminal device. The receiving terminal device can play the test audio signal that needs to be played through its own audio playback module.

[0044] Optionally, taking an audio playback unit comprising two sound units as an example, the two sound units are a first sound unit and a second sound unit. The first sound unit is electrically connected to a first filter, and the second sound unit is electrically connected to a second filter. Please refer to [reference needed]. Figure 3 This illustrates a structural schematic diagram of an audio playback module according to an exemplary embodiment of this application. Figure 3 As shown, it includes a first sound-producing unit 301 and a second sound-producing unit 302, a first filter 303, a second filter 304, a near-field propagation region 305, and a far-field propagation region 306. The near-field propagation region 305 and the far-field propagation region 306 can be predetermined based on the positions of the first and second sound-producing units. For example, the near-field propagation region 305 may be located within 1 cm of the propagation range of the first and second sound-producing units, and the far-field propagation region 306 may be located within 10 cm to 20 cm of the propagation range of the first and second sound-producing units.

[0045] Step 202: Play the target audio signal through the audio playback module of the electronic device. The audio playback module includes at least two sound units and at least two filters. Each sound unit is connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is smaller than the distance between the far-field propagation region and the audio playback module.

[0046] Optionally, when the audio playback module of the electronic device plays the target audio signal, the operating coefficient of each filter is adjusted in advance to the operating coefficient determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region, so that the audio signal played by each speaker unit is filtered by its respective connected filter, and the sound signal that is propagated is the filtered signal.

[0047] Alternatively, the above methods still apply. Figure 3 For example, when an electronic device plays a target audio signal, it can make the first filter work with the first working coefficient and the second filter work with the second working coefficient, and play the target audio signal through the first sound unit and the second sound unit respectively, so that the target audio signal played by the first sound unit is propagated through the first filter and the target audio signal played by the second sound unit is propagated through the second filter.

[0048] The first and second operating coefficients are determined based on the maximum energy contrast between the near-field and far-field propagation regions, where the distance between the near-field propagation region and the audio playback module is smaller than the distance between the far-field propagation region and the audio playback module. For example, in the above... Figure 3 The system also includes a near-field propagation region 305 and a far-field propagation region 306. The electronic device calculates the maximum value of the maximum energy contrast between the near-field propagation region 305 and the far-field propagation region 306 in advance, thereby determining the corresponding first operating coefficient and second operating coefficient. The first filter is adjusted to operate with the first operating coefficient, and the second filter is adjusted to operate with the second operating coefficient, so that the signal energy in the far-field propagation region is lower.

[0049] In summary, the process involves acquiring a target audio signal to be played and playing the target audio signal through an audio playback module of an electronic device. The audio playback module includes at least two sound-producing units and at least two filters, with each sound-producing unit connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. This application determines the operating coefficient of each filter based on the maximum energy contrast between the near-field and far-field propagation regions of the audio playback module when playing the target audio signal. This allows each filter to operate according to its calculated operating coefficient, thereby minimizing signal energy in the far-field propagation region, reducing signal leakage in the far-field propagation region, and improving the confidentiality of the audio signal during voice calls.

[0050] In one possible implementation, before playing the target audio data, the electronic device can obtain the maximum energy contrast between the near-field propagation region and the far-field propagation region by playing a test audio signal in advance, and determine the corresponding first operating coefficient and second operating coefficient based on the maximum energy contrast between the near-field propagation region and the far-field propagation region, and adjust the operating coefficients of the first filter and the second filter to the first operating coefficient and the second operating coefficient in advance.

[0051] Please refer to Figure 4 The diagram illustrates a flowchart of an audio playback method provided in an exemplary embodiment of this application. This audio playback method can be executed by an electronic device, which may be the aforementioned... Figure 1 The terminal device in the test can be a standalone voice testing device, or it can be one of the above. Figure 1 The server in the middle.

[0052] like Figure 4 As shown, the audio playback method may include the following steps:

[0053] Step 401: Obtain the operating coefficients of each filter.

[0054] Optionally, taking a number of sound-producing units and a number of filters of 2 as an example, the electronic device can obtain the first operating coefficient of the first filter and the second operating coefficient of the second filter.

[0055] Optionally, the electronic device may obtain the first operating coefficient of the first filter and the second operating coefficient of the second filter in the following manner: obtaining the first propagation signal of the test audio signal played through the audio playback module in the near-field propagation region, and obtaining the second propagation signal of the test audio signal in the far-field propagation region; obtaining the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the first propagation signal and the second propagation signal; and obtaining the first operating coefficient of the first filter and the second operating coefficient of the second filter based on the maximum energy contrast, so as to make the signal energy in the far-field propagation region lower.

[0056] Optionally, the electronic device can test the audio playback module by playing test audio data, thereby obtaining the first operating coefficient and the second operating coefficient. The structure of the audio playback module can be referenced above. Figure 3 The details of the above will not be repeated here. In this embodiment, the electronic device plays test audio data through the audio playback module and acquires the first propagation signal of the test audio data in the aforementioned near-field propagation region, and acquires the second propagation signal of the test audio signal in the far-field propagation region.

[0057] Optionally, the electronic device can acquire the first propagation signal of the test audio signal played by the audio playback module in the near-field propagation area and the second propagation signal of the test audio signal in the far-field propagation area through pre-calculation or microphone acquisition. For example, if the electronic device is a terminal device or a server, after acquiring the test audio signal it needs to play, it can pre-calculate the first propagation signal reaching the near-field propagation area and the second propagation signal reaching the far-field propagation area based on the propagation of the test audio signal in space. When the electronic device is a standalone voice testing device, it can acquire the first propagation signal acquired by the microphone in the near-field propagation area and the second propagation signal acquired by the microphone in the far-field propagation area by connecting a microphone.

[0058] Optionally, the electronic device constructs the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the acquired first propagation signal and second propagation signal. This maximum energy contrast includes a combination of the operating coefficients of the first filter and the second filter. Optionally, the maximum energy contrast between the near-field propagation region and the far-field propagation region can be pre-stored in the electronic device. After acquiring the first propagation signal and the second propagation signal, the electronic device performs a preset calculation based on these signals and inputs it into the maximum energy contrast between the near-field propagation region and the far-field propagation region.

[0059] Optionally, in this application, the electronic device can calculate the first operating coefficient of the first filter and the second operating coefficient of the second filter under the condition that the maximum energy contrast satisfies the maximum value, and adjust the operating coefficients of the first filter and the second filter to the calculated coefficient values, thereby making the signal energy of the subsequently played audio signal propagating to the far-field propagation area lower. When the electronic device includes more speaker units and filters, the execution process is similar to the above, and will not be repeated here.

[0060] Step 402: Obtain the target audio signal to be played.

[0061] Optionally, the electronic device can receive an audio signal sent by a terminal device acting as the sender. This audio signal is the target audio signal. When it is necessary to play the target audio signal, the electronic device can obtain the target audio signal to be played by its audio playback module.

[0062] Step 403: Play the target audio signal through the audio playback module of the electronic device.

[0063] Optionally, the audio playback module is as described above. Figure 3As shown in the example, the electronic device can play the target audio signal through the first sound unit and through the second sound unit; the first filter operates with a first operating coefficient and the second filter operates with a second operating coefficient.

[0064] The first and second operating coefficients are determined based on the maximum value of the maximum energy contrast between the near-field propagation region and the far-field propagation region, and the distance between the near-field propagation region and the audio playback module is smaller than the distance between the far-field propagation region and the audio playback module.

[0065] After calculating the first and second operating coefficients, the operating coefficients of the first filter are adjusted to the first operating coefficient, and the operating coefficients of the second filter are adjusted to the second operating coefficient. Then, the target audio signal is played through the first and second sound units. This allows the first filter to adjust the amplitude and phase of the target audio signal played by the first sound unit with the first operating coefficient, and the second filter to adjust the amplitude and phase of the target audio signal played by the second sound unit with the second operating coefficient. This results in less signal energy propagating into the far-field propagation area, improving the confidentiality of the audio signal during voice calls.

[0066] In summary, the process involves acquiring a target audio signal to be played and playing the target audio signal through an audio playback module of an electronic device. The audio playback module includes at least two sound-producing units and at least two filters, with each sound-producing unit connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. This application determines the operating coefficient of each filter based on the maximum energy contrast between the near-field and far-field propagation regions of the audio playback module when playing the target audio signal. This allows each filter to operate according to its calculated operating coefficient, thereby minimizing signal energy in the far-field propagation region, reducing signal leakage in the far-field propagation region, and improving the confidentiality of the audio signal during voice calls.

[0067] In one possible implementation, taking the acquisition of the first and second propagation signals by the electronic device through microphone acquisition as an example, for any test audio signal played by an audio playback module, its propagation area can include a near-field propagation area and a far-field propagation area. N sampling points can be divided in the near-field and far-field propagation areas. The microphone can acquire data at each sampling point to obtain N first propagation signals in the near-field propagation area and N second propagation signals in the far-field propagation area.

[0068] Please refer to Figure 5 The diagram illustrates a flowchart of an audio playback method provided in an exemplary embodiment of this application. This audio playback method can be executed by an electronic device, which may be the aforementioned... Figure 1 The terminal device in the test can be a standalone voice testing device, or it can be one of the above. Figure 1 The server in the middle.

[0069] like Figure 5 As shown, the audio playback method may include the following steps:

[0070] Step 501: Using a microphone, acquire the first propagation signal of the test audio signal in the near-field propagation area; and using a microphone, acquire the second propagation signal of the test audio signal in the far-field propagation area.

[0071] Optionally, the test audio signal is emitted by an audio playback module, which includes a first sound unit and a second sound unit. The first sound unit is electrically connected to a first filter, and the second sound unit is electrically connected to a second filter; its structural diagram can be found in [reference needed]. Figure 3 This will not be elaborated upon here.

[0072] Optionally, in this scheme, the near-field propagation area can be divided into multiple near-field sub-regions, and the far-field propagation area can be divided into multiple far-field sub-regions. During acquisition, the microphone can acquire the first propagation signal of the test audio signal in each near-field sub-region, and the second propagation signal of the test audio signal in each near-field and far-field sub-region. Correspondingly, the electronic device can acquire the first propagation signal of the test audio signal in each near-field sub-region, and the second propagation signal of the test audio signal in each far-field sub-region.

[0073] The number of divisions for the far-field propagation region and the near-field propagation region is the same, and each of the divided near-field sub-regions corresponds one-to-one with each of the divided far-field sub-regions.

[0074] For example, the number of divisions between the far-field propagation region and the near-field propagation region is no less than two, and each divided near-field sub-region corresponds one-to-one with each divided far-field sub-region. For example, in the above... Figure 3In this design, both the far-field and near-field propagation regions in the space are divided. Each near-field sub-region corresponds to a specific far-field sub-region. A microphone can collect data within each near-field sub-region or each far-field sub-region, obtaining a first propagation signal within each near-field sub-region and a second propagation signal within each far-field sub-region. Optionally, the near-field propagation region can also be called the sound field enhancement region, and the far-field propagation region can be called the dark area or the cancellation region; these names can be set manually.

[0075] Please refer to Figure 6 It illustrates an exemplary embodiment of this application relating to Figure 3 A schematic diagram illustrating the division of a sound field propagation region. (Example) Figure 6 As shown, it includes an audio playback module 601, a near-field propagation region 602, and a far-field propagation region 603. In space, the sampling points corresponding to each near-field sub-region after the near-field propagation region 602 is divided are p1, p2, ..., p8, and the sampling points corresponding to each far-field sub-region after the far-field propagation region 603 is divided are w1, w2, ..., w8. Propagation data can be obtained by collecting data at each sampling point using a microphone.

[0076] Optionally, in the above Figure 3 In the audio playback module, when playing the test audio signal, it plays it simultaneously through the first and second sound-emitting units; that is, the test audio signal is played simultaneously through both the first and second sound-emitting units. Therefore, the first propagation signal collected by the microphone in the near-field propagation area includes the audio signal transmitted from the first sound-emitting unit and the audio signal transmitted from the second sound-emitting unit. Similarly, the second propagation signal collected by the microphone in the far-field propagation area includes the audio signal transmitted from both the first and second sound-emitting units.

[0077] In this application, if we take `dut` to represent the sound signal collected by the microphone as an example, the superscript `b` of `dut` indicates that the test audio signal reaches the near-field propagation area, the superscript `d` of `dut` indicates that the test audio signal reaches the far-field propagation area, and the subscript `xy` of `dut` indicates the y-th sampling point corresponding to the sound unit x. By dividing the near-field and far-field propagation areas into N sampling points as described above, the microphone can collect data at each sampling point within the near-field propagation area, obtaining the first propagation signal within the N near-field propagation areas, including: the signal propagated by the first sound unit to each near-field propagation area. And the signals propagated by the second sound-producing unit to each near-field propagation region. The microphone can collect data at each sampling point within the far-field propagation area, obtaining N second propagation signals within the far-field propagation areas, including: signals propagated from the first sound unit to each far-field propagation area. And the signals propagated by the second sound-producing unit to each far-field propagation region.

[0078] Optionally, the test audio signal played by the audio playback module through the first and second sound units can be a logarithmic sweep signal.

[0079] Step 502: Obtain the first impulse response convolution vector and the second impulse response convolution vector based on the first propagation signal and the second propagation signal.

[0080] The first impulse response convolution vector is the impulse response convolution vector of the test audio signal when it reaches the near-field propagation region, and the second impulse response convolution vector is the impulse response convolution vector of the test audio signal when it reaches the far-field propagation region.

[0081] Optionally, the electronic device can obtain a first impulse response convolution vector and a second impulse response convolution vector based on the first propagation signal and the second propagation signal obtained above. For example, the first propagation signal includes... as well as, Therefore, the electronic device can calculate the transfer function between the first sound-producing unit and each near-field transmission region. The transfer function between the second sounding unit and each near-field transmission region Similarly, the second propagation signal includes as well as, Therefore, the electronic device can calculate the transfer function between the first sound-producing unit and each far-field transmission region. The transfer function between the second sound-producing unit and each far-field transmission region

[0082] in:

[0083]

[0084]

[0085]

[0086]

[0087] Here, F refers to the Fourier transform operation, and ref is the reference signal, which can be preset by the developers.

[0088] Optionally, after obtaining each transfer function, the electronic device can calculate its respective impulse response based on each transfer function in the following manner.

[0089] in:

[0090]

[0091]

[0092]

[0093]

[0094] In the above formula, This represents the impulse response of the first sounding unit reaching the i-th sampling point within the near-field propagation region. This represents the impulse response of the second sounding unit reaching the i-th sampling point within the near-field propagation region. This represents the impulse response of the first sounding unit reaching the i-th sampling point within the far-field propagation region. The impulse response represents the impulse response at the i-th sampling point within the far-field propagation region of the second sound-producing unit, where the length of each impulse response convolution vector is n. The calculated impulse response takes into account the influence of the sound-producing unit's acoustic structure and relative geometric relationships, and includes information about the actual propagation of the sound signal.

[0095] After obtaining the various impulse responses described above, the electronic device can also calculate the required first impulse response convolution vector and second impulse response convolution vector based on each impulse response. For example, the electronic device calculates according to the following formula:

[0096]

[0097]

[0098] in, It is the impulse response convolution vector of the test audio signals propagated by the first and second sounding units reaching the i-th sampling point in the near-field propagation region; is the impulse response convolution vector of the test audio signal propagated by the first and second sounding units reaching the i-th sampling point in the source field propagation region; l is the discrete time, and k is the current coefficient length of the first and second filters.

[0099] Since the test audio signal is emitted by both the first and second sound-emitting units, in this application, the first impulse response convolution vector includes the impulse response convolution vector of the test audio signal emitted by the first sound-emitting unit reaching the near-field propagation region and the impulse response convolution vector of the test audio signal emitted by the second sound-emitting unit reaching the near-field propagation region; the second impulse response convolution vector includes the impulse response convolution vector of the test audio signal emitted by the first sound-emitting unit reaching the far-field propagation region and the impulse response convolution vector of the test audio signal emitted by the second sound-emitting unit reaching the far-field propagation region.

[0100] Step 503: Obtain the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the first impulse response convolution vector and the second impulse response convolution vector.

[0101] Optionally, the electronic device may obtain the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the first impulse response convolution vector and the second impulse response convolution vector calculated above, in the following manner:

[0102] The electronic device obtains the target feature vector based on the first impulse response convolution vector, the second impulse response convolution vector, and the coefficient combination formula. The coefficient combination formula is a combination equation between the working coefficients of the first filter and the working coefficients of the second filter. The target feature vector is the feature vector corresponding to the largest eigenvalue of the coefficient combination formula. Based on the first impulse response convolution vector and the target feature vector, the near-field region energy of the near-field propagation region is obtained. Based on the second impulse response convolution vector and the target feature vector, the far-field region energy of the far-field propagation region is obtained. Based on the near-field region energy and the far-field region energy, the maximum energy contrast is obtained.

[0103] The coefficient combination formula can be pre-designed and set in the electronic device by the developers based on the first and second filters. Optionally, the coefficient combination formula can be expressed as follows:

[0104]

[0105] Where U is the identity matrix and δ is the regularization factor.

[0106] In one possible implementation, the electronic device substitutes the first impulse response convolution vector and the second impulse response convolution vector into the coefficient combination formula to calculate the maximum eigenvalue of the coefficient combination formula; then, it obtains the eigenvector corresponding to the maximum eigenvalue of the coefficient combination formula. That is, the eigenvector corresponding to the maximum eigenvalue obtained by the above coefficient combination formula is the target eigenvector b to be obtained in this step. opt .

[0107] Optionally, the computer device obtains the near-field region energy of the near-field propagation region based on the first impulse response convolution vector and the target feature vector; the near-field region energy is represented by E. b E indicates b It can be as follows:

[0108]

[0109] The computer device obtains the far-field region energy of the far-field propagation region based on the second impulse response convolution vector and the target feature vector; the near-field region energy is represented by E. d E indicates d It can be as follows:

[0110]

[0111] Optionally, the computer device obtains the energy contrast equation based on the near-field energy and the far-field energy, and the energy contrast is represented by J(b).

[0112]

[0113] Step 504: Based on the maximum energy contrast, obtain the first operating coefficient of the first filter and the second operating coefficient of the second filter.

[0114] Optionally, to ensure that the acoustic signal is as small as possible in the far-field propagation region, the electronic device uses energy contrast as a cost function, and obtains the corresponding target feature vector b when the energy contrast J(b) reaches its maximum value. opt That is, take

[0115] According to the above calculation method, the first operating coefficient of the first filter finally calculated by the electronic device is [b opt (0), b opt (1)…b opt (k-1)], the second operating coefficient of the second filter finally calculated by the electronic device is [b opt (k), b opt (k+1)…b opt [2k-1] When the electronic device operates the first and second filters with the calculated operating coefficients, the energy contrast equation can be maximized, thereby achieving the lowest signal energy in the far-field propagation area.

[0116] In one possible implementation, the privacy level of the test audio signal is obtained; based on the privacy level, a target energy contrast ratio corresponding to the privacy level is obtained; and the target energy contrast ratio is determined as the maximum energy contrast ratio. Based on the maximum energy contrast ratio, the first operating coefficients of the first filter and the second operating coefficients of the second filter are obtained, as follows: the electronic device substitutes the target energy contrast ratio into the energy contrast ratio equation to obtain the first operating coefficients of the first filter and the second operating coefficients of the second filter. The electronic device can also obtain the privacy level of the test audio signal. This privacy level can be pre-edited and stored by the developers, or it can be determined autonomously by the electronic device based on the content of the test audio signal. The electronic device obtains the corresponding target energy contrast ratio based on the obtained privacy level. The electronic device can pre-store a correspondence table between privacy levels and target energy contrast ratios. After obtaining the privacy level, the corresponding target energy contrast ratio is obtained by querying the correspondence table.

[0117] In the process of obtaining the first operating coefficient of the first filter and the second operating coefficient of the second filter based on the maximum energy contrast, the target energy contrast is substituted into the energy contrast equation as the maximum energy contrast to obtain the first operating coefficient of the first filter and the second operating coefficient of the second filter.

[0118] Optionally, steps 501 to 504 above illustrate a method by which an electronic device obtains the first operating coefficient of the first filter and the second operating coefficient of the second filter. After obtaining the first operating coefficient and the second operating coefficient, the operating coefficient of the first filter is adjusted to the first operating coefficient, and the operating coefficient of the second filter is adjusted to the second operating coefficient.

[0119] It should be noted that during steps 501 to 504 above, the acquisition of the first propagation signal of the test audio signal played through the audio playback module in the near-field propagation area and the acquisition of the second propagation signal of the test audio signal in the far-field propagation area can be performed by a dedicated voice testing device. The voice testing device sends the collected data to the electronic device to perform subsequent steps. Alternatively, the collected data can be uploaded to the server, and the calculation process can also be performed by the server. After obtaining the first and second working coefficients, the server sends them to the electronic device for adjustment.

[0120] Step 505: Adjust the operating coefficients of the first filter to the first operating coefficients, and adjust the operating coefficients of the second filter to the second operating coefficients.

[0121] Step 506: Obtain the target audio signal to be played by the audio playback module of the electronic device.

[0122] Optionally, in a scenario where an electronic device is making a voice call with another terminal device, it can receive a target audio signal sent by the other terminal device. This target audio signal is what the electronic device's audio playback module is going to play.

[0123] Step 507: Play the target audio signal through the first sound unit and the second sound unit.

[0124] Optionally, through the calculations in steps 501 to 504 above, the electronic device applies the calculation results to the first filter and the second filter, so that the first filter operates with a first operating coefficient and the second filter operates with a second operating coefficient. After the target audio signal is played through the first sound unit and the target audio signal is played through the second sound unit, the target audio signal played by the first sound unit can continue to pass through the first filter and the target audio signal played by the second sound unit can continue to pass through the second filter, thereby reducing the signal energy in the far-field propagation area and reducing leakage.

[0125] It should be noted that the audio playback module of the above-mentioned electronic device is also an example containing two sound units. In actual applications, it can also contain more sound units. Its data processing process is similar to that of this solution, and will not be described in detail here.

[0126] In summary, the process involves acquiring a target audio signal to be played and playing the target audio signal through an audio playback module of an electronic device. The audio playback module includes at least two sound-producing units and at least two filters, with each sound-producing unit connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. This application determines the operating coefficient of each filter based on the maximum energy contrast between the near-field and far-field propagation regions of the audio playback module when playing the target audio signal. This allows each filter to operate according to its calculated operating coefficient, thereby minimizing signal energy in the far-field propagation region, reducing signal leakage in the far-field propagation region, and improving the confidentiality of the audio signal during voice calls.

[0127] In addition, this solution takes into account the influence of the acoustic structure of the sound unit itself. Starting from the actual transmission function, it is closer to the real situation of sound signal propagation. Furthermore, by maximizing the energy contrast of the near-field propagation region, the adjustment coefficients of each filter are calculated. This allows for more accurate adjustment of the amplitude and phase of the sound signal, ensuring that the far-field leakage of the sound signal is minimized, thereby improving the privacy of the call.

[0128] In addition, this solution can obtain the target energy contrast corresponding to the privacy level of the actual test audio signal, use the target energy contrast as the maximum energy contrast, and obtain the working coefficient of the corresponding filter. This makes the amplitude and phase of the sound signal more flexible, improving the privacy of the call while better meeting the needs of the current scenario.

[0129] The following are embodiments of the apparatus of this application, which can be used to execute the embodiments of the method of this application. For details not disclosed in the embodiments of the apparatus of this application, please refer to the embodiments of the method of this application.

[0130] Please refer to Figure 7 This diagram illustrates a structural block diagram of an audio playback device provided in an exemplary embodiment of this application. The audio playback device 700 can be used in an electronic device, which may be the aforementioned... Figure 1 The terminal device in the test can be a standalone voice testing device, or it can be one of the above. Figure 1 The server in the middle. To execute Figure 2 , Figure 4 or Figure 5 The illustrated embodiment provides all or part of the steps performed by an electronic device in the method. The audio playback device 700 includes:

[0131] The signal acquisition module 701 is used to acquire the target audio signal to be played.

[0132] The signal playback module 702 is used to play the target audio signal through the audio playback module of the electronic device.

[0133] The audio playback module includes at least two sound-producing units and at least two filters. Each sound-producing unit is connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast of the test audio signal between the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module.

[0134] In summary, the process involves acquiring a target audio signal to be played and playing the target audio signal through an audio playback module of an electronic device. The audio playback module includes at least two sound-producing units and at least two filters, with each sound-producing unit connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. This application determines the operating coefficient of each filter based on the maximum energy contrast between the near-field and far-field propagation regions of the audio playback module when playing the target audio signal. This allows each filter to operate according to its calculated operating coefficient, thereby minimizing signal energy in the far-field propagation region, reducing signal leakage in the far-field propagation region, and improving the confidentiality of the audio signal during voice calls.

[0135] Optionally, the device further includes:

[0136] The first acquisition module is used to acquire the operating coefficients of each filter before the target audio signal is played through the audio playback module of the electronic device.

[0137] Optionally, the at least two filters include a first filter and a second filter, and the first acquisition module includes: a first acquisition unit, a second acquisition unit, and a third acquisition unit;

[0138] The first acquisition unit is used to acquire a first propagation signal of the test audio signal played by the audio playback module in the near-field propagation area, and to acquire a second propagation signal of the test audio signal in the far-field propagation area;

[0139] The second acquisition unit is configured to acquire the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the first propagation signal and the second propagation signal;

[0140] The third acquisition unit is used to acquire the first operating coefficient of the first filter and the second operating coefficient of the second filter based on the maximum energy contrast.

[0141] Optionally, the third acquisition unit includes: a first acquisition subunit and a second acquisition subunit;

[0142] The first acquisition subunit is used to acquire a first impulse response convolution vector and a second impulse response convolution vector based on the first propagation signal and the second propagation signal. The first impulse response convolution vector is the impulse response convolution vector of the test audio signal when it reaches the near-field propagation region, and the second impulse response convolution vector is the impulse response convolution vector of the test audio signal when it reaches the far-field propagation region.

[0143] The second acquisition subunit is used to acquire the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the first impulse response convolution vector and the second impulse response convolution vector.

[0144] Optionally, the second acquisition subunit is further configured to:

[0145] Based on the first impulse response convolution vector, the second impulse response convolution vector, and the coefficient combination equation, a target feature vector is obtained. The coefficient combination equation is a combination equation between the working coefficients of the first filter and the working coefficients of the second filter. The target feature vector is the feature vector corresponding to the largest eigenvalue of the coefficient combination equation.

[0146] The near-field region energy of the near-field propagation region is obtained based on the first impulse response convolution vector and the target feature vector.

[0147] The far-field region energy of the far-field propagation region is obtained based on the second impulse response convolution vector and the target feature vector.

[0148] The maximum energy contrast is obtained based on the near-field region energy and the far-field region energy.

[0149] Optionally, obtaining the target feature vector based on the first impulse response convolution vector, the second impulse response convolution vector, and the coefficient combination equation includes:

[0150] Substitute the first impulse response convolution vector and the second impulse response convolution vector into the coefficient combination equation to calculate the maximum eigenvalue of the coefficient combination equation.

[0151] Obtain the eigenvector corresponding to the largest eigenvalue of the coefficient combination equation.

[0152] Optionally, the first acquisition unit includes:

[0153] The first dividing subunit is used to divide the near-field propagation region into multiple near-field sub-regions and the far-field propagation region into multiple far-field sub-regions.

[0154] The third acquisition subunit is used to acquire the first propagation signal of the test audio signal in each of the near-field sub-regions, and to acquire the second propagation signal of the test audio signal in each of the far-field sub-regions;

[0155] The far-field propagation region and the near-field propagation region are divided into the same number of regions, and each of the divided near-field sub-regions corresponds one-to-one with each of the divided far-field sub-regions.

[0156] Optionally, the electronic device further includes a microphone, and the third acquisition subunit is used for,

[0157] The microphone is used to acquire the first propagation signal of the test audio signal in each of the near-field sub-regions; and the microphone is used to acquire the second propagation signal of the test audio signal in each of the far-field and near-field sub-regions.

[0158] Optionally, the device further includes:

[0159] The second acquisition module is used to acquire the privacy level of the test audio signal before acquiring the first working coefficient of the first filter and the second working coefficient of the second filter;

[0160] The third acquisition module is used to acquire the target energy contrast corresponding to the privacy level based on the privacy level.

[0161] The first determining module is used to determine the target energy contrast as the maximum energy contrast.

[0162] Optionally, the aforementioned electronic device may be Figure 1 For terminal devices, please refer to Figure 8 This illustrates a schematic diagram of the structure of a terminal device provided in an exemplary embodiment of this application. Figure 8 As shown, the terminal device includes a processor 810, a transceiver 820, and a display unit 870. The display unit 870 may include a display screen.

[0163] Optionally, the terminal device may also include a memory 830. The processor 810, transceiver 820 and memory 830 can communicate with each other through an internal connection path to transmit ranging data. The memory 830 is used to store computer programs, and the processor 810 is used to call and run the computer programs from the memory 830.

[0164] The processor 810 and memory 830 can be combined into a single processing device, but more commonly they are independent components. The processor 810 executes the program code stored in the memory 830 to achieve the aforementioned functions. In specific implementations, the memory 830 can be integrated into the processor 810, or it can be independent of the processor 810.

[0165] Understandable, Figure 8 The terminal device shown may include one or more processing units. For example, processor 810 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0166] The processor 810 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 810 is a cache memory. This memory can store instructions or data that the processor 810 has just used or that are used repeatedly. If the processor 810 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 810, and thus improves the efficiency of the system.

[0167] In some embodiments, the processor 810 may include one or more interfaces. Interfaces may include inter-integrated circuit (IC) interfaces, inter-integrated circuit sound (IS) interfaces, pulse code modulation (PCM) interfaces, universal asynchronous receiver / transmitter (UART) interfaces, mobile industry processor interfaces (MIPI), general-purpose input / output (GPIO) interfaces, subscriber identity module (SIM) interfaces, and / or universal serial bus (USB) interfaces, etc.

[0168] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 810 and the transceiver 820. For example, the processor 810 communicates with the Bluetooth module in the transceiver 820 via the UART interface to implement Bluetooth functionality.

[0169] The MIPI interface can be used to connect the processor 810 to peripheral devices such as the display unit 870. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 810 and the display unit 870 communicate via the DSI interface to realize the display function of the terminal device.

[0170] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 810 to the display unit 870, transceiver 820, etc. The GPIO interface can also be configured as an IC interface, IS interface, UART interface, MIPI interface, etc.

[0171] Transceiver 820 can provide solutions for wireless communication applications on terminal devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. Transceiver 820 can be one or more devices integrating at least one communication processing module; for example, it may include a Bluetooth module.

[0172] The memory 830 can be used to store computer executable program code, which includes instructions. The memory 830 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the terminal device (such as location data), etc. Furthermore, the memory 830 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 810 executes various functional applications and data processing of the terminal device by running instructions stored in the memory 830 and / or instructions stored in memory disposed in the processor.

[0173] In addition, to further enhance the functionality of the terminal device, it may also include one or more of the following: power supply 850, input unit 860, audio circuit 880, and sensor 802.

[0174] Power supply 850 is used to provide power to various devices or circuits in the terminal device. Preferably, power supply 850 can be logically connected to processor 810 through a power management device, thereby enabling functions such as charging, discharging, and power consumption management through the power management device.

[0175] The input unit 860 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the terminal device. Specifically, the input unit 860 may include a touch panel and other input devices. A touch panel, also known as a touchscreen, can collect touch operations performed by the user on or near it, such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel, and drive corresponding connected devices according to a pre-set program. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 810, and can receive and execute commands from the processor 810. Furthermore, the touch panel can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, the input unit 860 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys, trackballs, joysticks, etc.

[0176] The display unit 870 can be used to display information input by the user or information provided to the user, as well as various menus of the terminal device. The display unit 870 may include a display panel, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel. Furthermore, a touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 810 to determine the type of touch event. Subsequently, the processor 810 provides corresponding visual output on the display panel based on the type of touch event.

[0177] The terminal device may also include at least one sensor 802, such as a gyroscope sensor, a motion sensor, and other sensors. Specifically, the gyroscope sensor can be used to determine the motion posture of the terminal device. In some embodiments, the angular velocity of the terminal device around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor. The gyroscope sensor can also be used in navigation and motion-sensing game scenarios. As a type of motion sensor, an accelerometer can detect the magnitude of acceleration in various directions (i.e., the x, y, and z axes), and when stationary, it can detect the magnitude and direction of gravity. It can be used for applications that identify the posture of the terminal device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, tapping), etc. Other sensors that may be configured on the terminal device, such as pressure gauges, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0178] The audio circuit 880 may include a speaker and a microphone, providing an audio interface between the user and the terminal device. The audio circuit 880 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by the audio circuit 880, converted back into audio data, and output to the processor 810 for processing. The processed audio data is then transmitted via an RF circuit to, for example, another terminal device, or output to the memory 830 for further processing.

[0179] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device. In other embodiments of this application, the terminal device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0180] It should be understood that, in the embodiments of this application, the processor may be a Central Processing Unit (CPU), or it may 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. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0181] This application also provides a computer-readable medium storing at least one instruction, which is loaded and executed by the processor to implement all or part of the steps performed by the electronic device in the audio playback method described in the above embodiments.

[0182] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the audio playback method described in the above embodiments, including all or part of the steps performed by the electronic device.

[0183] It should be noted that the device provided in the above embodiments is only illustrated by the division of the above functional modules when controlling electronic devices. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0184] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0185] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0186] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An audio playback method, characterized in that, Applied to electronic devices, the method includes: In a voice call scenario, acquire the target audio signal to be played; The target audio signal is played through the audio playback module of the electronic device; The audio playback module includes at least two sound-producing units and at least two filters, including a first filter and a second filter. Each sound-producing unit is connected to a corresponding filter. The operating coefficient of each filter is determined based on the maximum energy contrast between the test audio signal in the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. The method for obtaining the maximum energy contrast includes: obtaining a target feature vector based on a first impulse response convolution vector, a second impulse response convolution vector, and a coefficient combination equation, wherein the coefficient combination equation is a combination equation between the operating coefficients of the first filter and the operating coefficients of the second filter, and the target feature vector is the feature vector corresponding to the largest eigenvalue of the coefficient combination equation; obtaining the near-field region energy of the near-field propagation region based on the first impulse response convolution vector and the target feature vector; obtaining the far-field region energy of the far-field propagation region based on the second impulse response convolution vector and the target feature vector; and obtaining the maximum energy contrast based on the near-field region energy and the far-field region energy. The first impulse response convolution vector and the second impulse response convolution vector are obtained based on a first propagation signal and a second propagation signal. The first propagation signal is obtained in the near-field propagation region by a test audio signal played by the audio playback module, and the second propagation signal is obtained in the far-field propagation region by the test audio signal.

2. The method according to claim 1, characterized in that, Before playing the target audio signal through the audio playback module of the electronic device, the method further includes: Obtain the operating coefficients of each filter.

3. The method according to claim 2, characterized in that, The process of obtaining the operating coefficients of each filter includes: Acquire a first propagation signal of the test audio signal played through the audio playback module in the near-field propagation region, and acquire a second propagation signal of the test audio signal in the far-field propagation region; Based on the first propagation signal and the second propagation signal, obtain the maximum energy contrast of the test audio signal between the near-field propagation region and the far-field propagation region; Based on the maximum energy contrast, the first operating coefficient of the first filter and the second operating coefficient of the second filter are obtained.

4. The method according to claim 3, characterized in that, The step of obtaining the maximum energy contrast between the near-field propagation region and the far-field propagation region based on the first propagation signal and the second propagation signal includes: Based on the first propagation signal and the second propagation signal, a first impulse response convolution vector and a second impulse response convolution vector are obtained. The first impulse response convolution vector is the impulse response convolution vector of the test audio signal when it reaches the near-field propagation region, and the second impulse response convolution vector is the impulse response convolution vector of the test audio signal when it reaches the far-field propagation region. The maximum energy contrast between the near-field propagation region and the far-field propagation region is obtained based on the first impulse response convolution vector and the second impulse response convolution vector.

5. The method according to claim 1, characterized in that, The step of obtaining the target feature vector based on the first impulse response convolution vector, the second impulse response convolution vector, and the coefficient combination equation includes: Substitute the first impulse response convolution vector and the second impulse response convolution vector into the coefficient combination equation to calculate the maximum eigenvalue of the coefficient combination equation. Obtain the eigenvector corresponding to the largest eigenvalue of the coefficient combination equation.

6. The method according to any one of claims 3 to 5, characterized in that, The step of acquiring a first propagation signal of the test audio signal played through the audio playback module in the near-field propagation region, and acquiring a second propagation signal of the test audio signal in the far-field propagation region, includes: The near-field propagation region is divided into multiple near-field sub-regions, and the far-field propagation region is divided into multiple far-field sub-regions. Acquire a first propagation signal of the test audio signal in each of the near-field sub-regions, and acquire a second propagation signal of the test audio signal in each of the far-field sub-regions; The far-field propagation region and the near-field propagation region are divided into the same number of regions, and each of the divided near-field sub-regions corresponds one-to-one with each of the divided far-field sub-regions.

7. The method according to claim 6, characterized in that, The electronic device further includes a microphone, and the acquisition of a first propagation signal of the test audio signal in each of the near-field sub-regions, and the acquisition of a second propagation signal of the test audio signal in each of the far-field sub-regions, includes: The microphone is used to acquire a first propagation signal of the test audio signal in each near-field sub-region; and the microphone is used to acquire a second propagation signal of the test audio signal in each far-field sub-region.

8. The method according to any one of claims 3 to 5, characterized in that, Before obtaining the first operating coefficients of the first filter and the second operating coefficients of the second filter, the method further includes: Obtain the privacy level of the test audio signal; Based on the privacy level, obtain the target energy contrast corresponding to the privacy level; The target energy contrast is determined as the maximum energy contrast.

9. An audio playback device, characterized in that, Applied to electronic devices, the device includes: The signal acquisition module is used to acquire the target audio signal to be played in a voice call scenario. A signal playback module is used to play the target audio signal through the audio playback module of the electronic device; The audio playback module includes at least two sound-producing units and at least two filters, including a first filter and a second filter. Each sound-producing unit is connected to one filter. The operating coefficients of each filter are determined based on the maximum energy contrast of the test audio signal between the near-field propagation region and the far-field propagation region. The distance between the near-field propagation region and the audio playback module is less than the distance between the far-field propagation region and the audio playback module. The maximum energy contrast is obtained by: obtaining a target feature vector based on a first impulse response convolution vector, a second impulse response convolution vector, and a coefficient combination equation. The coefficient combination equation is a combination equation between the operating coefficients of the first filter and the operating coefficients of the second filter. The feature vector is the feature vector corresponding to the largest eigenvalue of the coefficient combination equation; the near-field region energy of the near-field propagation region is obtained based on the first impulse response convolution vector and the target feature vector; the far-field region energy of the far-field propagation region is obtained based on the second impulse response convolution vector and the target feature vector; the maximum energy contrast is obtained based on the near-field region energy and the far-field region energy; the first impulse response convolution vector and the second impulse response convolution vector are obtained based on the first propagation signal and the second propagation signal; the first propagation signal is obtained in the near-field propagation region by the test audio signal played by the audio playback module, and the second propagation signal is obtained in the far-field propagation region by the test audio signal.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing 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 the instruction set being loaded and executed by the processor to implement the audio playback method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or instruction set is loaded and executed by a processor to implement the audio playback method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Audio processing method, device and equipment and audio calibration system

    CN114373470A

  • Sound field partition control method for maximizing sound energy contrast ratio under reconstruction error constraint

    CN114827837A