CN116346977A - 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
CN116346977A
CN116346977A CN202310348793.5A CN202310348793A CN116346977A CN 116346977 A CN116346977 A CN 116346977A CN 202310348793 A CN202310348793 A CN 202310348793A CN 116346977 A CN116346977 A CN 116346977A
Authority
CN
China
Prior art keywords
field
far
propagation
signal
audio signal
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
CN202310348793.5A
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 CN202310348793.5A priority Critical patent/CN116346977A/en
Publication of CN116346977A publication Critical patent/CN116346977A/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04KSECRET COMMUNICATION; JAMMING OF COMMUNICATION
    • H04K3/00Jamming of communication; Counter-measures
    • H04K3/80Jamming or countermeasure characterized by its function
    • H04K3/82Jamming or countermeasure characterized by its function related to preventing surveillance, interception or detection
    • H04K3/825Jamming or countermeasure characterized by its function related to preventing surveillance, interception or detection by jamming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of the 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 that between the far-field propagation area and the audio playing module. The method and the device can reduce the signal leakage condition of the audio signal in the far-field propagation 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 reduce leakage of audio signals played by an audio playing module of a terminal device, the embodiment of the application provides an audio playing method, an audio playing device, electronic equipment 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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of a test audio signal in 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 that between the far-field propagation area and the audio playing module.
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 signal 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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of a test audio signal in 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 that between the far-field propagation area and the audio playing module.
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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of the 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 that between the far-field propagation area and the audio playing module. When the target audio signal is played, the working coefficient of each filter is determined according to the maximum energy contrast between the near-field propagation region and the far-field propagation region of the audio playing module, and the working coefficient of each filter works according to the calculated working coefficients, so that the signal energy in the far-field propagation region is the lowest, the signal leakage condition of the audio signal in the far-field propagation region 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 view of a division of a sound field propagation region according to an exemplary embodiment of the present application;
fig. 7 is a block diagram of an audio playing device according to an exemplary embodiment of the present application;
fig. 8 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 situation 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 first filter and the working coefficient of the second filter by maximizing the energy contrast between the near-field propagation area and the far-field propagation area, and timely adjust the situation 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 two filters, the at least two sound producing units are connected with the at least two filters in a one-to-one correspondence manner, and each filter is used for adjusting amplitude and phase of an audio signal sent by the sound producing unit connected with the electronic device.
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 audio playing unit as an example, the audio playing unit includes two sounding units, where the two sounding units are a first sounding unit and a second sounding unit, the first sounding unit is electrically connected to the first filter, and the second sounding unit is electrically connected to the second 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 first sound generating unit 301 and the second sound generating unit 302, the first filter 303, the second filter 304, the near-field propagation region 305, and the far-field propagation region 306 are included. The near-field propagation region 305 and the far-field propagation region 306 may be determined in advance according to the positions of the first sound emitting unit and the second sound emitting unit, for example, the near-field propagation region 305 is a region within 1cm of the propagation ranges of the first sound emitting unit and the second sound emitting unit, and the far-field propagation region 306 may be a region within 10cm to 20cm of the propagation ranges of the first sound emitting unit and the second sound emitting unit.
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 two filters, each pronunciation unit is correspondingly connected with one filter, and the working coefficient of each filter is determined according to the maximum energy contrast ratio of the tested 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.
Optionally, when the audio playing module of the electronic device plays the target audio signal, the working coefficient of each filter is adjusted in advance to the working coefficient determined according to the maximum energy contrast between the near-field propagation area and the far-field propagation area of the test audio signal, so that the audio signals played by the pronunciation units are filtered by the filters respectively connected, and the propagated sound signals are 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 a first working coefficient, and the second filter may operate with a second working coefficient, and play the target audio signal through the first sounding unit and the target audio signal through the second sounding unit respectively, so that the first sounding unit plays the target audio signal to propagate through the first filter, and the second sounding unit plays the target audio signal to propagate through the second filter.
The first working coefficient and the second working coefficient are determined according to 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 playing module is smaller than that between the far-field propagation region and the audio playing module. For example, in fig. 3, the near-field propagation region 305 and the far-field propagation region 306 are further included, and 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, so as to determine the corresponding first operating coefficient and the second operating coefficient, adjust the first filter to operate with the first operating coefficient, and adjust the second filter to operate with the second operating coefficient, so that the signal energy in the far-field propagation region 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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of the 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 that between the far-field propagation area and the audio playing module. When the target audio signal is played, the working coefficient of each filter is determined according to the maximum energy contrast between the near-field propagation region and the far-field propagation region of the audio playing module, and the working coefficient of each filter works according to the calculated working coefficients, so that the signal energy in the far-field propagation region is the lowest, the signal leakage condition of the audio signal in the far-field propagation region 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 a maximum energy contrast between the near-field propagation region and the far-field propagation region by playing the test audio signal in advance, determine the corresponding first working coefficient and the second working coefficient according to the maximum energy contrast between the near-field propagation region and the far-field propagation region, and adjust the working coefficients of the first filter and the second filter to the first working coefficient and the second 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:
in step 401, the working coefficients of each filter are obtained.
Optionally, taking the number of sound units and the number of filters as 2 as an example, the electronic device may obtain the first working coefficient of the first filter and the second working coefficient of the second filter.
Optionally, the manner in which the electronic device obtains the first working coefficient of the first filter and the second working coefficient of the second filter may be as follows: acquiring a first propagation signal of a test audio signal played by an audio playing module in a near-field propagation area, and acquiring a second propagation signal of the test audio signal in a far-field propagation area; acquiring the maximum energy contrast between the near-field propagation region and the far-field propagation region according to the first propagation signal and the second propagation signal; and acquiring a first working coefficient of the first filter and a second working coefficient of the second filter according to the maximum energy contrast ratio so as to enable the signal energy in the far-field propagation region to be lower.
Optionally, the electronic device may detect the audio playing module by playing the test audio data, thereby obtaining the first working coefficient and the second working coefficient. The structure of the audio playing module may refer to the content of fig. 3, and will not be described herein. In this embodiment, the electronic device plays the test audio data through the audio playing module, and obtains a first propagation signal of the test audio data in the near-field propagation area, and obtains a second propagation signal of the test audio signal in the far-field propagation area.
Optionally, the electronic device may acquire, by using a mode of pre-calculation or a mode of microphone acquisition, a first propagation signal of the test audio signal played by the audio playing module in the near-field propagation area, and acquire a second propagation signal of the test audio signal in the far-field propagation area. 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 and estimates a first propagation signal that arrives in a near-field propagation area and a second propagation signal that arrives in a far-field propagation 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 near-field propagation region and the second propagation signal acquired in the far-field propagation region may be acquired by connecting the microphone.
Optionally, the electronic device constructs a maximum energy contrast between the near-field propagation region and the far-field propagation region according to the acquired first propagation signal and the second propagation signal, wherein the maximum energy contrast includes a combination between an operating coefficient of the first filter and an operating coefficient of the second filter. Alternatively, the maximum energy contrast between the near-field propagation region and the far-field propagation region may be stored in the electronic device in advance, and after the electronic device acquires the first propagation signal and the second propagation signal, a preset operation is performed according to the first propagation signal and the second propagation signal, and the maximum energy contrast between the near-field propagation region and the far-field propagation region is brought into the maximum energy contrast between the near-field propagation region and the far-field propagation region.
Optionally, in this application, the electronic device may calculate the first working coefficient of the first filter and the second working coefficient of the second filter under the condition that the maximum energy contrast meets the maximum value, and adjust the working coefficients of the first filter and the second filter to the calculated coefficient values, so that the signal energy of the subsequently played audio signal propagating into the far-field propagation area is lower. When the electronic device includes more sound units and filters, the execution is similar to that described above, and will not be repeated here.
Step 402, 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 403, the target audio signal is played by the 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 first sound generating unit and the target audio signal through the second sound generating unit by the electronic device; the first filter operates with a first operating factor and the second filter operates with a second operating factor.
The first working coefficient and the second working coefficient are determined according to 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 playing module is smaller than that between the far-field propagation region and the audio playing module.
After the first working coefficient and the second working coefficient are calculated, the working coefficient of the first filter is adjusted to the first working coefficient to work, the working coefficient of the second filter is adjusted to the second working coefficient to work, then the target audio signal is played through the first sound generating unit and the target audio signal is played through the second sound generating unit, so that the first filter adjusts the amplitude and the phase of the target audio signal played by the first sound generating unit according to the first working coefficient, and the second filter adjusts the amplitude and the phase of the target audio signal played by the second sound generating unit according to the second working coefficient, so that the signal energy transmitted to a far-field transmission 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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of the 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 that between the far-field propagation area and the audio playing module. When the target audio signal is played, the working coefficient of each filter is determined according to the maximum energy contrast between the near-field propagation region and the far-field propagation region of the audio playing module, and the working coefficient of each filter works according to the calculated working coefficients, so that the signal energy in the far-field propagation region is the lowest, the signal leakage condition of the audio signal in the far-field propagation region is reduced, and the confidentiality of the audio signal in the voice call process is improved.
In one possible implementation manner, taking an example that the electronic device acquires the first propagation signal and the second propagation signal by acquiring through a microphone, for a test audio signal played by any one audio playing module, a propagation area of the test audio signal may include a near-field propagation area and a far-field propagation area, N sampling points may be divided in the near-field propagation area and the far-field propagation area, and the microphone may acquire at each sampling point, so as to obtain N first propagation signals in the near-field propagation area and N second propagation signals in the far-field propagation area.
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, respectively collecting first propagation signals of a test audio signal in a near-field propagation region through microphones; and respectively acquiring second propagation signals of the test audio signals in the far-field propagation region through microphones.
Optionally, the test audio signal is sent by an audio playing module, the audio playing module comprises a first sounding unit and a second sounding unit, the first sounding unit is electrically connected with the first filter, and the second sounding unit is electrically connected with the second filter; the schematic structure can be referred to in fig. 3, and will not be described herein.
Optionally, in the present solution, the near field propagation area may be divided into a plurality of near field sub-areas, and the far field propagation area may be divided into a plurality of far field sub-areas; when the microphone is used for collecting, the first propagation signals of the test audio signals in each near-field subarea can be collected respectively; and separately acquiring a second propagation signal of the test audio signal within each far-near-field sub-region. Accordingly, the electronic device may obtain a first propagation signal of the test audio signal within each near-field sub-region and a second propagation signal of the test audio signal within each far-field sub-region.
The number of the far field propagation areas is the same as that of the near field propagation areas, and each divided near field subarea corresponds to each divided far field subarea one by one.
For example, the number of divisions of the far field propagation region and the near field propagation region is not less than 2, and each divided near field sub-region corresponds to each divided far field sub-region one by one. For example, in fig. 3, the far field propagation area and the near field propagation area in the space are divided, and each near field subarea obtained by dividing corresponds to a corresponding far field subarea, and the microphone may collect in each near field subarea, or may collect in each far field subarea, so as to obtain the first propagation signal in each divided near field subarea; and a second propagation signal within each far field sub-region. Alternatively, the near field propagation region may also be referred to as a sound field enhancement region, the far field propagation region may also be referred to as a dark region or cancellation region, and the nomenclature may be set by human.
Referring to fig. 6, a schematic diagram of dividing a sound field propagation region according to an exemplary embodiment of the present application is shown in fig. 3. As shown in fig. 6, an audio playing module 601, a near field propagation region 602, and a far field propagation region 603 are included. In space, the sampling points corresponding to each near-field sub-region divided by the near-field propagation region 602 are p1, p2, … … p8, and the sampling points corresponding to each far-field sub-region divided by the far-field propagation region 603 are w1, w2, … … w8, respectively, and each propagation data can be acquired by a microphone at the position of each sampling point.
Optionally, in fig. 3, when the audio playing module plays the test audio signal, the test audio signal is played simultaneously by the first sounding unit and the second sounding unit, that is, the test audio signal is played simultaneously by the first sounding unit and the second sounding unit, respectively. Then, the first propagation signal collected by the microphone in the near-field propagation region includes the audio signal propagated by the first sound generating unit and the audio signal propagated by the second sound generating unit, and likewise, the second propagation signal collected by the microphone in the far-field propagation region includes the audio signal propagated by the first sound generating unit and the audio signal propagated by the second sound generating unit.
In this application, if the dut represents the sound signal collected by the microphone as an example, the superscript b of the dut represents that the test audio signal reaches the near-field propagation region, the superscript d of the dut represents that the test audio signal reaches the far-field propagation region, and the subscript xy of the dut represents the y-th collection point corresponding to the sound unit x. Through dividing the near-field propagation region and the far-field propagation region into the N sampling points, the microphone may collect at each sampling point in the near-field propagation region, and obtaining the first propagation signals in the N near-field propagation regions includes: signals transmitted by the first sound generating unit to the respective near-field transmission regions
Figure BDA0004161790370000121
And, signals propagated by the second pronunciation unit to the respective near-field propagation regions
Figure BDA0004161790370000122
The microphone may collect at each sampling point in the far-field propagation region, and obtaining the second propagation signals in the N far-field propagation regions includes: signals transmitted by the first sound generating unit to the respective far-field transmission regions
Figure BDA0004161790370000123
And, signals propagated by the second pronunciation unit to the respective far field propagation regions
Figure BDA0004161790370000124
Alternatively, the test audio signal played by the audio playing module through the first sound generating unit and the second sound generating unit may be a logarithmic sweep frequency signal.
Step 502, obtaining a first impulse response convolution vector and a second impulse response convolution vector according to the first propagation signal and the second propagation signal.
The first impulse response convolution vector is an impulse response convolution vector of the test audio signal reaching the near-field propagation region, and the second impulse response convolution vector is an impulse response convolution vector of the test audio signal reaching the far-field propagation region.
Optionally, the electronic device may obtain the first impulse response convolution vector and the second impulse response convolution vector according to the obtained first propagation signal and the obtained second propagation signal. For example, the first propagation signal comprises
Figure BDA0004161790370000125
A kind of->
Figure BDA0004161790370000126
The electronic device can then calculate the transfer function between the first sound-emitting unit and each near-field transfer region>
Figure BDA0004161790370000127
Transfer function between the second sound unit and each near field transfer region +.>
Figure BDA0004161790370000128
Similarly, the second propagation signal comprises +.>
Figure BDA0004161790370000129
The method comprises the steps of,
Figure BDA00041617903700001210
the electronic device can then calculate the transfer function between the first sound-emitting unit and each far-field transfer region>
Figure BDA00041617903700001211
Transfer function between the second sound unit and each far-field transfer region +.>
Figure BDA00041617903700001212
Wherein:
Figure BDA00041617903700001213
Figure BDA00041617903700001214
Figure BDA0004161790370000131
Figure BDA0004161790370000132
wherein F is fourier transform operation, and ref is a reference signal, which can be preset by a developer.
Alternatively, after obtaining the respective transfer functions, the electronic device may calculate respective impulse responses from the respective transfer functions in the following manner.
Wherein:
Figure BDA0004161790370000133
Figure BDA0004161790370000134
Figure BDA0004161790370000135
Figure BDA0004161790370000136
wherein, in the above formula,
Figure BDA0004161790370000137
representing the impulse response of the first sound generating unit to the i-th sample point in the near field propagation region,/for>
Figure BDA0004161790370000138
Representing the impulse response of the second sound unit to the ith sample point in the near field propagation region,/for>
Figure BDA0004161790370000139
Representing the impulse response of the first sound generating unit to the i-th sample point in the far-field propagation region,/>
Figure BDA00041617903700001310
Representing the impulse response of the second sound unit to the ith sampling point in the far-field propagation region, wherein the length of each impulse response convolution vector is n. The impulse response obtained by calculation considers the influence of the acoustic structure and the relative geometric relation of the sound unit, and contains the information of the actual propagation of the acoustic signal.
After each impulse response is obtained, the electronic device can also calculate a required first impulse response convolution vector and a second impulse response convolution vector according to each impulse response. For example, the electronic device calculates according to the following formula:
Figure BDA00041617903700001311
Figure BDA00041617903700001312
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA00041617903700001313
is the impulse response convolution vector of the test audio signal propagated by the first sound generating unit and the second sound generating unit reaching the ith sampling point in the near field propagation area; />
Figure BDA00041617903700001314
Is that the test audio signal transmitted by the first sound generating unit and the second sound generating unit reaches the source fieldImpulse response convolution vector of the ith sampling point in the propagation region; l is the discrete time and k is the current coefficient length of the first filter and the second filter.
The test audio signal is sent by both the first sound generating unit and the second sound generating unit, and in the application, the first impulse response convolution vector comprises an impulse response convolution vector of the test audio signal sent by the first sound generating unit reaching the near field propagation region and an impulse response convolution vector of the test audio signal sent by the second sound generating unit reaching the near field propagation region; the second impulse response convolution vector comprises an impulse response convolution vector when the test audio signal sent by the first sound generating unit reaches the far-field propagation region and an impulse response convolution vector when the test audio signal sent by the second sound generating unit reaches the far-field propagation region.
Step 503, obtaining the maximum energy contrast between the near field propagation region and the far field propagation region according to the first impulse response convolution vector and the second impulse response convolution vector.
Optionally, the manner of obtaining the maximum energy contrast between the near-field propagation region and the far-field propagation region by the electronic device according to the first impulse response convolution vector and the second impulse response convolution vector obtained by the calculation may be as follows:
the electronic equipment acquires a target feature vector according to the first impulse response convolution vector, the second impulse response convolution vector and a coefficient combination formula, wherein the coefficient combination formula is a combination equation between the working coefficient of the first filter and the working coefficient of the second filter, and the target feature vector is a feature vector corresponding to the maximum feature value of the coefficient combination formula; acquiring near field region energy of a near field propagation region according to the first impulse response convolution vector and the target feature vector; acquiring far field region energy of a far field propagation region according to the second impulse response convolution vector and the target feature vector; and acquiring the maximum energy contrast according to the near field region energy and the far field region energy.
The coefficient combination formula may be designed and set in the electronic device by a developer according to the first filter and the second filter in advance. Alternatively, the coefficient combination formula may be expressed as follows:
Figure BDA0004161790370000141
Where U is the identity matrix and delta is the regularization factor.
In one possible implementation manner, the electronic device brings the first impulse response convolution vector and the second impulse response convolution vector into a coefficient combination formula, and calculates a maximum eigenvalue of the coefficient combination formula; the feature vector corresponding to the maximum feature value of the coefficient combination formula is obtained, namely, the feature vector corresponding to the maximum feature value obtained by the coefficient combination formula is the target feature vector b required to be obtained in the step opt
Optionally, the computer device obtains near field region energy of the near field propagation region according to the first impulse response convolution vector and the target feature vector; e for near field region energy b Representation, E b The following may be possible:
Figure BDA0004161790370000142
the computer equipment acquires far-field region energy of the far-field propagation region according to the second impulse response convolution vector and the target feature vector; e for near field region energy d Representation, E d The following may be possible:
Figure BDA0004161790370000143
optionally, the computer device obtains an energy contrast equation based on the near field region energy and the far field region energy, the energy contrast being denoted by J (b).
Figure BDA0004161790370000151
Step 504, obtaining a first working coefficient of the first filter and a second working coefficient of the second filter according to the maximum energy contrast.
Optionally, in order to ensure that the acoustic signal in the far-field propagation region is as small as possible, the electronic device obtains the corresponding target feature vector b with the energy contrast as a cost function, with the energy contrast J (b) taking the maximum value opt . I.e. taking
Figure BDA0004161790370000152
According to the calculation mode, the first working coefficient of the first filter finally calculated by the electronic equipment is [ b ] opt (0),b opt (1)…b opt (k-1)]The electronic device finally calculates a second working coefficient of the second filter as [ b ] opt (k),b opt (k+1)…b opt (2k-1)]When the electronic device works the working coefficients of the first filter and the second filter with the calculated working coefficients, the energy contrast equation can be made to reach the maximum value, and the lowest signal energy in the far-field propagation region is realized.
In one possible implementation, a privacy level of a test audio signal is obtained; acquiring a target energy contrast corresponding to the privacy level according to the privacy level; the target energy contrast is determined as the maximum energy contrast. The obtaining of the first working coefficient of the first filter and the second working coefficient of the second filter according to the maximum energy contrast may be as follows: the electronic device brings the target energy contrast into an energy contrast equation, and obtains a first working coefficient of the first filter and a second working coefficient of the second filter. The electronic device can also acquire the privacy level of the test audio signal, wherein the privacy level can be edited and stored by a developer in advance, or the electronic device can autonomously judge the privacy level corresponding to the content by identifying the content of the test audio signal, and the electronic device acquires the corresponding target energy contrast according to the acquired privacy level. The electronic device may store a correspondence table between the privacy level and the target energy contrast in advance, and after obtaining the privacy level, obtain the corresponding target energy contrast by querying the correspondence table between the privacy level and the target energy contrast.
And when the first working coefficient of the first filter and the second working coefficient of the second filter are obtained according to the maximum energy contrast, taking the target energy contrast as the maximum energy contrast to be brought into an energy contrast equation, and obtaining the first working coefficient of the first filter and the second working coefficient of the second filter.
Optionally, the foregoing steps 501 to 504 illustrate one way for the electronic device to obtain the first working coefficient of the first filter and the second working coefficient of the second filter, and after obtaining the first working coefficient and the second working coefficient, adjust the working coefficient of the first filter to the first working coefficient, and adjust the working coefficient of the second filter to the second working coefficient.
It should be noted that, in the foregoing steps 501 to 504, the manner of acquiring the first propagation signal of the test audio signal played by the audio playing module in the near-field propagation area and the manner of acquiring the second propagation signal of the test audio signal in the far-field propagation area may be performed by a dedicated voice test device, where the voice test device sends the acquired data to the electronic device to perform the subsequent steps, or the acquired data may be uploaded to a server, and the calculation process may be performed by the server, where the server obtains the first working coefficient and the second working coefficient and then sends the first working coefficient to the electronic device to adjust the electronic device.
Step 505, adjust the working coefficient of the first filter to the first working coefficient, and adjust the working coefficient of the second filter to the second working coefficient.
Step 506, obtaining a target audio signal to be played by an audio playing module of the electronic device.
Optionally, in the case where the electronic device performs a voice call with another terminal device, a target audio signal sent by the other terminal device may be received, where the target audio signal is to be played by an audio playing module of the electronic device.
In step 507, the target audio signal is played through the first sound emitting unit and the target audio signal is played through the second sound emitting unit.
Optionally, through the calculation in steps 501 to 504, the electronic device applies the calculation result to the first filter and the second filter, so that the first filter operates with a first working coefficient, the second filter operates with a second working coefficient, after the target audio signal is played through the first sound generating unit and the target audio signal is played through the second sound generating unit, the target audio signal played by the first sound generating unit may continue to pass through the first filter, and the target audio signal played by the second sound generating unit may continue to pass through the second filter, thereby reducing signal energy in the far-field propagation area and reducing leakage.
It should be noted that, the audio playing module of the electronic device is also exemplified by including 2 pronunciation units, and in practical application, more pronunciation units may be included, and the data processing process is similar to the scheme and 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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of the 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 that between the far-field propagation area and the audio playing module. When the target audio signal is played, the working coefficient of each filter is determined according to the maximum energy contrast between the near-field propagation region and the far-field propagation region of the audio playing module, and the working coefficient of each filter works according to the calculated working coefficients, so that the signal energy in the far-field propagation region is the lowest, the signal leakage condition of the audio signal in the far-field propagation region 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 transfer function, the adjustment coefficients of the filters are calculated by maximizing the energy contrast of the near-field propagation region and the near-field propagation region, the amplitude and the phase of the sound signal can be more accurately adjusted, the sound signal leaked in the far field is ensured to be as small as possible, and the effect of call privacy is improved.
In addition, the method can obtain the target energy contrast corresponding to the privacy level according to the privacy level of the actual test audio signal, take the target energy contrast as the maximum energy contrast, and obtain the working coefficient of the corresponding filter, so that the amplitude and the phase of the sound signal are more flexible, the call privacy is improved, and the method meets the current scene requirement.
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. 7, a block diagram of an audio playing device according to an exemplary embodiment of the present application is shown. The audio playing device 700 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, 4, or 5. The audio playback apparatus 700 includes:
A signal acquisition module 701, configured to acquire a target audio signal to be played;
and the signal playing module 702 is configured to play the target audio signal through the audio playing module of the electronic device.
The audio playing module comprises at least two sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of a test audio signal in 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 that between the far-field propagation area and the audio playing module.
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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of the 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 that between the far-field propagation area and the audio playing module. When the target audio signal is played, the working coefficient of each filter is determined according to the maximum energy contrast between the near-field propagation region and the far-field propagation region of the audio playing module, and the working coefficient of each filter works according to the calculated working coefficients, so that the signal energy in the far-field propagation region is the lowest, the signal leakage condition of the audio signal in the far-field propagation region is reduced, and the confidentiality of the audio signal in the voice call process is improved.
Optionally, the apparatus further includes:
the first obtaining module is configured to obtain a working coefficient of each filter before the target audio signal is played by the audio playing module of the electronic device.
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;
the first obtaining unit is configured to obtain a first propagation signal of the test audio signal played by the audio playing module in the near-field propagation area, and obtain a second propagation signal of the test audio signal in the far-field propagation area;
the second acquisition unit is configured to acquire a maximum energy contrast between the near-field propagation region and the far-field propagation region according to the first propagation signal and the second propagation signal;
the third obtaining unit is configured to obtain, according to the maximum energy contrast ratio, a first working coefficient of the first filter and a second working coefficient of the second filter.
Optionally, the third obtaining unit includes: a first acquisition subunit and a second acquisition subunit;
The first obtaining subunit is configured to obtain, according to the first propagation signal and the second propagation signal, a first impulse response convolution vector and a second impulse response convolution vector, where the first impulse response convolution vector is an impulse response convolution vector when the test audio signal arrives in the near-field propagation region, and the second impulse response convolution vector is an impulse response convolution vector when the test audio signal arrives in the far-field propagation region;
the second obtaining subunit is configured to obtain, according to the first impulse response convolution vector and the second impulse response convolution vector, a maximum energy contrast between the near-field propagation region and the far-field propagation region.
Optionally, the second acquisition subunit is further configured to,
obtaining a target feature vector according to the first impulse response convolution vector, the second impulse response convolution vector and a coefficient combination equation, wherein the coefficient combination equation is a combination equation between the working coefficient of the first filter and the working coefficient of the second filter, and the target feature vector is a feature vector corresponding to the maximum feature value of the coefficient combination equation;
Acquiring near field region energy of the near field propagation region according to the first impulse response convolution vector and the target feature vector;
acquiring far field region energy of the far field propagation region according to the second impulse response convolution vector and the target feature vector;
and acquiring the maximum energy contrast according to the near field region energy and the far field region energy.
Optionally, the obtaining the target feature vector according to the first impulse response convolution vector, the second impulse response convolution vector and the coefficient combination equation includes:
bringing the first impulse response convolution vector and the second impulse response convolution vector into the coefficient combination equation, and calculating a maximum eigenvalue of the coefficient combination equation;
and obtaining a feature vector corresponding to the maximum feature value of the coefficient combination equation.
Optionally, the first obtaining unit includes:
a first dividing subunit, configured to divide the near-field propagation region into a plurality of near-field sub-regions, and divide the far-field propagation region into a plurality of far-field sub-regions;
a third acquisition subunit configured to acquire a first propagation signal of the test audio signal in each of the near-field sub-areas, and acquire a second propagation signal of the test audio signal in each of the far-field sub-areas;
The far field propagation areas and the near field propagation areas are divided in the same number, and the divided near field sub-areas are in one-to-one correspondence with the divided far field sub-areas.
Optionally, the electronic device further comprises a microphone, the third acquisition subunit is configured to,
collecting first propagation signals of the test audio signals in each near-field subarea through the microphone respectively; and respectively acquiring second propagation signals of the test audio signals in each far-near field sub-area through the microphone.
Optionally, the apparatus further includes:
the second acquisition module is used for acquiring 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;
the third acquisition module is used for acquiring target energy contrast corresponding to the privacy grade according to the privacy grade;
a first determination module for determining the target energy contrast as the maximum energy contrast.
Alternatively, the electronic device may be the terminal device in fig. 1, please refer to fig. 8, which illustrates a schematic structural diagram of a terminal device according to an exemplary embodiment of the present application. As shown in fig. 8, the terminal device includes a processor 810, a transceiver 820, and a display unit 870. Wherein the display unit 870 may comprise a display screen.
Optionally, the terminal device may also include a memory 830. The processor 810, the transceiver 820 and the memory 830 may communicate with each other through an internal connection path to transfer ranging data, the memory 830 is used to store a computer program, and the processor 810 is used to call and run the computer program from the memory 830.
The processor 810 may be combined with the memory 830 into a single processing device, more typically separate components, and the processor 810 is configured to execute program code stored in the memory 830 to perform the functions described above. In particular implementations, the memory 830 may also be integrated into the processor 810 or may be separate from the processor 810.
It will be appreciated that the terminal device shown in fig. 8 may include one or more processing units, such as: the processor 810 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 the processor 810 for storing instructions and data. In some embodiments, the memory in processor 810 is a cache memory. The memory may hold instructions or data that the processor 810 has just used or recycled. If the processor 810 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 810 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 810 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 810 with the transceiver 820. For example: the processor 810 communicates with the bluetooth module in the transceiver 820 through a UART interface to implement bluetooth functions.
The MIPI interface may be used to connect processor 810 with peripheral devices such as display unit 870. 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 810 and display unit 870 communicate via 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 810 with display unit 870, transceiver 820, 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.
Transceiver 820 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 wireless communication technology (near field communication, NFC), infrared technology (IR), etc. for application on a terminal device. Transceiver 820 may be one or more devices that integrate at least one communication processing module, for example, may include a bluetooth module.
Memory 830 may be used to store computer executable program code that includes instructions. Memory 830 may include a stored program area and a stored 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 830 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. The processor 810 performs various functional applications of the terminal device and data processing by executing instructions stored in the memory 830 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 850, an input unit 860, an audio circuit 880, a sensor 802, and the like.
A power supply 850 for providing power to various devices or circuits in the terminal device. Preferably, the power supply 850 may be logically connected to the processor 810 through a power management device, so that functions of managing charging, discharging, and power consumption are performed through the power management device.
The input unit 860 may be used 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 860 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 810, and can receive commands from the processor 810 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 860 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 870 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 870 may include a display panel, which may optionally 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 810 to determine the type of touch event, and then the processor 810 provides a corresponding visual output on the display panel according to the type of touch event.
The terminal device may also include at least one sensor 802, 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 880 may include speakers and microphones, providing an audio interface between the user and the terminal device. The audio circuit 880 may transmit the received electrical signal converted from audio data to a speaker, which converts the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 880 and converted into audio data, which are processed by the audio data output processor 810 to be transmitted to, for example, another terminal device via an RF circuit, or to be output to the memory 830 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 (12)

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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of a test audio signal in 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 that between the far-field propagation area and the audio playing module.
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:
and acquiring the working coefficient of each filter.
3. The method of claim 2, wherein the at least two filters comprise a first filter and a second filter, and wherein the obtaining the operating coefficients of each filter comprises:
acquiring a first propagation signal of a test audio signal played by the audio playing module in the near-field propagation region, and acquiring a second propagation signal of the test audio signal in the far-field propagation region;
acquiring the maximum energy contrast of the test audio signal between the near-field propagation region and the far-field propagation region according to the first propagation signal and the second propagation signal;
and acquiring a first working coefficient of the first filter and a second working coefficient of the second filter according to the maximum energy contrast.
4. The method of claim 3, wherein the obtaining the maximum energy contrast between the near field propagation region and the far field propagation region from the first propagation signal and the second propagation signal comprises:
Acquiring a first impulse response convolution vector and a second impulse response convolution vector according to the first propagation signal and the second propagation signal, wherein the first impulse response convolution vector is an impulse response convolution vector of the test audio signal reaching the near field propagation region, and the second impulse response convolution vector is an impulse response convolution vector of the test audio signal reaching the far field propagation region;
and obtaining the maximum energy contrast between the near-field propagation region and the far-field propagation region according to the first impulse response convolution vector and the second impulse response convolution vector.
5. The method of claim 4, wherein the obtaining the maximum energy contrast between the near field propagation region and the far field propagation region from the first impulse response convolution vector and the second impulse response convolution vector comprises:
obtaining a target feature vector according to the first impulse response convolution vector, the second impulse response convolution vector and a coefficient combination equation, wherein the coefficient combination equation is a combination equation between the working coefficient of the first filter and the working coefficient of the second filter, and the target feature vector is a feature vector corresponding to the maximum feature value of the coefficient combination equation;
Acquiring near field region energy of the near field propagation region according to the first impulse response convolution vector and the target feature vector;
acquiring far field region energy of the far field propagation region according to the second impulse response convolution vector and the target feature vector;
and acquiring the maximum energy contrast according to the near field region energy and the far field region energy.
6. The method of claim 5, wherein the obtaining the target feature vector from the first impulse response convolution vector, the second impulse response convolution vector, and a coefficient combination equation comprises:
bringing the first impulse response convolution vector and the second impulse response convolution vector into the coefficient combination equation, and calculating a maximum eigenvalue of the coefficient combination equation;
and obtaining a feature vector corresponding to the maximum feature value of the coefficient combination equation.
7. The method of any of claims 3 to 6, wherein the acquiring a first propagation signal of the test audio signal played by the audio playing module within the near-field propagation region and acquiring a second propagation signal of the test audio signal within the far-field propagation region comprises:
Dividing the near field propagation region into a plurality of near field sub-regions, and dividing the far field propagation region into a plurality of far field sub-regions;
acquiring a first propagation signal of the test audio signal in each near-field subarea, and acquiring a second propagation signal of the test audio signal in each far-field subarea;
the far field propagation areas and the near field propagation areas are divided in the same number, and the divided near field sub-areas are in one-to-one correspondence with the divided far field sub-areas.
8. The method of claim 7, wherein the electronic device further comprises a microphone, wherein the acquiring a first propagation signal of the test audio signal within each of the near-field sub-regions, and wherein the acquiring a second propagation signal of the test audio signal within each of the far-field sub-regions, comprises:
collecting first propagation signals of the test audio signals in each near-field subarea through the microphone respectively; and respectively acquiring second propagation signals of the test audio signals in each far-near field sub-area through the microphone.
9. The method according to any one of claims 3 to 6, further comprising, prior to said obtaining the first operating coefficient of the first filter and the second operating coefficient of the second filter:
Acquiring the privacy level of the test audio signal;
acquiring a target energy contrast corresponding to the privacy grade according to the privacy grade;
the target energy contrast is determined as the maximum energy contrast.
10. 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 signal 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 sound producing units and at least two filters, each sound producing unit is correspondingly connected with one filter, the working coefficient of each filter is determined according to the maximum energy contrast ratio of a test audio signal in 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 that between the far-field propagation area and the audio playing module.
11. 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-9.
12. 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 9.
CN202310348793.5A 2023-03-31 2023-03-31 Audio playing method and device, electronic equipment and storage medium Pending CN116346977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310348793.5A CN116346977A (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
CN202310348793.5A CN116346977A (en) 2023-03-31 2023-03-31 Audio playing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116346977A true CN116346977A (en) 2023-06-27

Family

ID=86882217

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN116346977A (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
CN111050250B (en) Noise reduction method, device, equipment and storage medium
CN111445901B (en) Audio data acquisition method and device, electronic equipment and storage medium
EP3618461A1 (en) Audio signal processing method and apparatus, terminal and storage medium
CN108335703B (en) Method and apparatus for determining accent position of audio data
US11315582B2 (en) Method for recovering audio signals, terminal and storage medium
WO2021114847A1 (en) Internet calling method and apparatus, computer device, and storage medium
US11284151B2 (en) Loudness adjustment method and apparatus, and electronic device and storage medium
CN112581358B (en) Training method of image processing model, image processing method and device
CN112965683A (en) Volume adjusting method and device, electronic equipment and medium
CN110248197B (en) Voice enhancement method and device
CN109243479B (en) Audio signal processing method and device, electronic equipment and storage medium
CN109102811B (en) Audio fingerprint generation method and device and storage medium
CN116346977A (en) Audio playing method and device, electronic equipment and storage medium
CN111223475B (en) Voice data generation method and device, electronic equipment and storage medium
CN111984222A (en) Method and device for adjusting volume, electronic equipment and readable storage medium
CN116320133A (en) Audio playing method and device, electronic equipment and storage medium
CN113409805A (en) Man-machine interaction method and device, storage medium and terminal equipment
CN112086102A (en) Method, apparatus, device and storage medium for extending audio frequency band
CN112133319A (en) Audio generation method, device, equipment and storage medium
CN111354378A (en) Voice endpoint detection method, device, equipment and computer storage medium
CN113920979B (en) Voice data acquisition method, device, equipment and computer readable storage medium
CN113192531B (en) Method, terminal and storage medium for detecting whether audio is pure audio
WO2022083213A1 (en) Image generation method and apparatus, and device and computer-readable medium
CN114936420A (en) Method and device for simulating vibration envelope of automobile power assembly, terminal and storage medium
CN110708582B (en) Synchronous playing method, device, electronic equipment and medium

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