CN114071315A - Audio processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114071315A
CN114071315A CN202111300349.3A CN202111300349A CN114071315A CN 114071315 A CN114071315 A CN 114071315A CN 202111300349 A CN202111300349 A CN 202111300349A CN 114071315 A CN114071315 A CN 114071315A
Authority
CN
China
Prior art keywords
audio
loudspeaker
target
audio signal
speaker
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
CN202111300349.3A
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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202111300349.3A priority Critical patent/CN114071315A/en
Publication of CN114071315A publication Critical patent/CN114071315A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/20Arrangements for obtaining desired frequency or directional characteristics
    • H04R1/32Arrangements for obtaining desired frequency or directional characteristics for obtaining desired directional characteristic only
    • H04R1/323Arrangements for obtaining desired frequency or directional characteristics for obtaining desired directional characteristic only for loudspeakers
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/003Changing voice quality, e.g. pitch or formants
    • G10L21/007Changing voice quality, e.g. pitch or formants characterised by the process used
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters

Abstract

The embodiment of the application discloses an audio processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring position information of a target user relative to each loudspeaker in a plurality of loudspeakers; determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information; compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker; and controlling each loudspeaker to play audio according to the corresponding target audio signal. The initial audio signals of different speakers are compensated, so that the sound signals emitted by the different speakers can enter human ears simultaneously, and the sound emitted by the different speakers has the same audio effect, so that the audio playing effect of the human ears is finally improved.

Description

Audio processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of audio processing technologies, and in particular, to an audio processing method and apparatus, an electronic device, and a storage medium.
Background
In the related art, a speaker is provided on a playback device, and playback of the speaker is implemented by using an algorithm for the speaker, so that the human ear can hear a corresponding sound effect.
However, in an actual usage scenario, the position of the user may change, so that the position of the human ear also changes, the sound signal entering the human ear also changes, so that the sound effect heard by the human ear also changes, and finally the audio playing effect of the playing device is poor.
Disclosure of Invention
The embodiment of the application provides an audio processing method and device, electronic equipment and a storage medium. The audio processing method can improve the audio playing effect of the electronic equipment with the multiple loudspeakers.
In a first aspect, an embodiment of the present application provides an audio processing method, including:
acquiring position information of a target user relative to each loudspeaker in a plurality of loudspeakers;
determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information;
compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker;
and controlling each loudspeaker to play audio according to the corresponding target audio signal.
In a second aspect, an embodiment of the present application provides an audio processing apparatus, including:
an acquisition module for acquiring position information of a target user relative to each of a plurality of speakers;
a determining module, configured to determine, according to the position information, an audio compensation parameter corresponding to each speaker in the plurality of speakers;
the compensation module is used for compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameter to obtain a target audio signal corresponding to each loudspeaker;
and the playing module is used for controlling each loudspeaker to play audio according to the corresponding target audio signal.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory storing executable program code, and a processor coupled to the memory; the processor calls the executable program codes stored in the memory to execute the steps in the audio processing method provided by the embodiment of the application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in the audio processing method provided by the embodiment of the present application.
In the embodiment of the application, the electronic equipment acquires the position information of a target user relative to each loudspeaker in a plurality of loudspeakers; determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information; compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker; and controlling each loudspeaker to play audio according to the corresponding target audio signal. The initial audio signals of different speakers are compensated, so that the sound signals emitted by the different speakers can enter human ears simultaneously, and the sound emitted by the different speakers has the same audio effect, so that the audio playing effect of the human ears is finally improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart of an audio processing method according to an embodiment of the present application.
Fig. 2 is a second flowchart of an audio processing method according to an embodiment of the present application.
Fig. 3 is a schematic view of a scenario for determining location information according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an audio processing apparatus according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, a speaker is provided on a playback device, and playback of the speaker is implemented by using an algorithm for the speaker, so that the human ear can hear a corresponding sound effect.
However, in an actual usage scenario, the position of the user may change, so that the position of the human ear also changes, the sound signal entering the human ear also changes, so that the sound effect heard by the human ear also changes, and finally the audio playing effect of the playing device is poor.
In order to solve the technical problem, embodiments of the present application provide an audio processing method, an apparatus, an electronic device, and a storage medium. The audio processing method can be applied to electronic equipment with multiple speakers, such as televisions, computers, smart phones, sound boxes, tablet computers and other electronic equipment with multiple speakers.
Referring to fig. 1, fig. 1 is a first flow chart of an audio processing method according to an embodiment of the present disclosure. The audio processing method may specifically include the steps of:
110. positional information of a target user relative to each of a plurality of speakers is obtained.
In some embodiments, before the electronic device obtains the position information of the target user relative to the plurality of speakers, the electronic device may identify the user, for example, obtain face information of the user through a camera, determine whether the user is the target user according to the face information of the user, for example, perform matching between the face information of the user and a preset face information base, and if the matching is successful, determine whether the user is the target user.
For another example, the electronic device may determine whether the user is the target user by recognizing a voice of the user when speaking, for example, by recognizing a voiceprint of the user, then matching the voiceprint of the user with a preset voiceprint information base, and if the matching is successful, determining that the user is the target user.
In some embodiments, when only one user plays audio or video using the electronic device, the user is directly determined as the target user without identifying the user's identity.
In some embodiments, the electronic device is provided with a plurality of speakers, and when the user is in the vicinity of the electronic device, the electronic device can acquire position information of the target user relative to each of the plurality of speakers. For example, the electronic device is provided with a camera, a depth sensor, a laser sensor, and other sensors, and the sensors can acquire a spatial position of the user relative to the electronic device, and then determine position information of the user relative to each of the plurality of speakers according to the spatial position. Wherein, the target user has corresponding position information relative to each loudspeaker because the distribution positions of the loudspeakers on the electronic device are different.
In some embodiments, a preset position is set on the electronic device, a sensor is set on the preset position, a first distance and a first angle between the target user and the preset position on the electronic device are obtained through the sensor, then a corresponding second distance between the preset position and each speaker is obtained, and finally position information of the target user relative to each speaker in the plurality of speakers is determined according to the first distance, the first angle and the second distance.
120. And determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information.
Since the distribution positions of the plurality of speakers on the electronic device are different, the position information of the target user with respect to each speaker is different. In the process of hearing the stereo effect by human ears, the main influence factors include the binaural time difference and binaural pressure difference when the sound reaches the human ears from the speakers, so that the audio signals corresponding to each speaker need to be adjusted, and the sounds emitted by different speakers have the same or close time and sound pressure when reaching the human ears, thereby forming the stereo effect.
In an application scenario, the speaker a is far away from the target user, the speaker B is near to the target user, and if the speaker a and the speaker B emit sounds simultaneously, the time for the sound emitted by the speaker a to reach the human ear is longer than the time for the sound emitted by the speaker B to reach the human ear. Then, a binaural time difference is generated in the human ear, which results in a poor audio experience for the target user to hear, and a problem of sound non-synchronization may occur.
Considering that the plurality of speakers are distributed at different positions on the electronic device, the electronic device may determine, according to the position information, an audio compensation parameter corresponding to each speaker of the plurality of speakers, where the audio compensation parameter includes a delay parameter. The delay parameter may be used to control the time for sound emitted by the speaker to propagate to the human ear.
In some embodiments, the electronic device may calculate a first time length for each speaker to emit sound to the target user according to the location information, then calculate a sound delay difference between every two speakers according to the first time length, and finally determine a delay parameter corresponding to each speaker according to the sound delay difference.
In some application scenarios, the speaker a is far away from the target user, and the speaker B is near to the target user, if the energies of the sound signals emitted by the speaker a and the speaker B are the same, since the speaker a is far away from the target user, the sound emitted by the speaker a must have energy loss in the process of propagation, and finally, the energy of the sound emitted by the speaker a propagating to the human ear is lower than the energy of the sound emitted by the speaker B propagating to the human ear, so that the situation that the sound of the target user is big on one side of two ears and small on the other side of two ears is formed.
Considering that the plurality of speakers are distributed at different positions on the electronic device, the electronic device may determine, according to the position information, an audio compensation parameter corresponding to each speaker of the plurality of speakers, where the audio compensation parameter includes a magnitude parameter. The amplitude parameter may compensate or attenuate the amplitude of the sound signal of the initial audio signal corresponding to the speaker.
In some embodiments, the electronic device calculates, according to the position information, an attenuation amplitude of the sound emitted by each speaker to the target user, and then determines, according to the attenuation amplitude, an amplitude parameter corresponding to each speaker.
130. And compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker.
In some embodiments, the electronic device may compensate the initial audio signal corresponding to each speaker according to a delay parameter in the audio compensation parameters, so as to obtain a target audio signal corresponding to each speaker.
For example, the time length of sound emitted by the speaker a propagating to the human ear is 50 milliseconds, the time length of sound emitted by the speaker B propagating to the human ear is 30 milliseconds, at this time, the delay parameters corresponding to the speaker a and the speaker B respectively can be determined according to the sound delay difference of 20 milliseconds, and the electronic device controls the time length of sound emitted by the speaker a and the time length of sound emitted by the speaker B reaching the human ear to be the same or close to each other according to the delay parameters corresponding to the speaker a and the speaker B respectively. Thereby forming a better stereo effect.
In some embodiments, the electronic device may compensate the initial audio signal corresponding to each speaker according to a magnitude parameter in the audio compensation parameters, so as to obtain a target audio signal corresponding to each speaker.
For example, the electronic device may determine a first intensity value of an initial audio signal of the speaker, then derive a second intensity value of the audio signal when the audio signal is transmitted into the ear of the user according to the position information of the user, and determine the attenuation level of the sound transmitted to the target user according to the first intensity value and the second intensity value.
The electronic device may then determine that the attenuation magnitude corresponds to a preset range, and if the attenuation magnitude is within the first preset range, it is indicated that the attenuation magnitude is not very high, and no processing may be performed. If the attenuation amplitude is in the second preset range, the attenuation amplitude is high, and the amplitude gain processing can be performed on the initial audio signal according to the amplitude parameter.
In some embodiments, if the attenuation amplitude corresponding to the speaker a is higher and the attenuation amplitude corresponding to the speaker B is lower, the initial audio signal corresponding to the speaker a may be subjected to amplitude enhancement processing according to the amplitude parameter, and the initial audio signal corresponding to the speaker B may be subjected to amplitude attenuation processing according to the amplitude parameter. So that the sound emitted by speaker a and the sound emitted by speaker B are of the same amplitude as they travel to the human ear. Thereby forming a better stereophonic effect in the human ear.
In some embodiments, the electronic device may compensate the audio signal of each speaker using the delay parameter and the amplitude parameter to obtain the target audio signal.
In some embodiments, in the process of adjusting the initial audio signal corresponding to each speaker, the electronic device may obtain an initial audio parameter of the initial audio signal corresponding to each speaker, then adjust the initial audio parameter according to the audio compensation parameter to obtain a target audio parameter corresponding to each speaker, and finally generate the target audio signal according to the target audio parameter.
140. And controlling each loudspeaker to play audio according to the corresponding target audio signal.
In consideration of the difference in the positions of the plurality of speakers in the electronic apparatus, for example, the positions of the speakers may be different in the upper, lower, left, and right positions. It is contemplated that the speakers may be oriented differently, such as facing forward, downward, and rearward, and possibly sideways. When a plurality of speakers produce sound, the sound is produced by reflection in nature in a non-advanced sound production state, and the influence of the reflection on each frequency band of the sound is inconsistent, so that the sound quality of the sound produced by different speakers is influenced.
In order to solve this problem, in some embodiments, the electronic device may perform equalization processing on the target audio signal corresponding to each speaker to obtain an equalized target audio signal, and then control each speaker to play audio according to the equalized target audio signal.
In the process of equalizing the target audio signal corresponding to each speaker, the target audio signal equalization compensation may be performed according to the characteristics of the sound emitted by each speaker, for example, if some speakers mainly emit low-frequency audio, the equalization parameters corresponding to the low-frequency audio may be used. Some speakers emit primarily mid-range audio, and equalization parameters corresponding to the mid-range audio may be used. Therefore, the target audio signals corresponding to different loudspeakers are equalized. The sound played by the electronic equipment finally is transmitted to human ears, and the electronic equipment has good tone quality and stereo effect.
In the embodiment of the application, the electronic equipment acquires the position information of a target user relative to each loudspeaker in a plurality of loudspeakers; determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information; compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker; and controlling each loudspeaker to play audio according to the corresponding target audio signal. The initial audio signals of different speakers are compensated, so that the sound signals emitted by the different speakers can enter human ears simultaneously, and the sound emitted by the different speakers has the same audio effect, so that the audio playing effect of the human ears is finally improved.
For a more detailed understanding of the audio processing method provided in the embodiment of the present application, please refer to fig. 2, and fig. 2 is a second flowchart of the audio processing method provided in the embodiment of the present application. The audio processing method may include the steps of:
201. a first distance and a first angle between a target user and a preset position on the electronic equipment are obtained.
In some embodiments, the electronic device is provided with a plurality of speakers, and when the user is in the vicinity of the electronic device, the electronic device can acquire position information of the target user relative to each of the plurality of speakers. For example, the electronic device is provided with a camera, a depth sensor, a laser sensor, and other sensors, and the sensors can acquire a spatial position of the user relative to the electronic device, and then determine position information of the user relative to each of the plurality of speakers according to the spatial position. Wherein, the target user has corresponding position information relative to each loudspeaker because the distribution positions of the loudspeakers on the electronic device are different.
Specifically, please refer to fig. 3, in which fig. 3 is a schematic view of a scene for determining location information according to an embodiment of the present disclosure.
Wherein the electronic device includes a camera a1, a speaker a2, and a speaker A3, the camera a1 may be determined as a preset location on the electronic device, and the camera a1 may determine a first distance S1 and a first angle B1 between the target user and the preset location.
202. And acquiring a corresponding second distance between the preset position and each loudspeaker.
In some embodiments, the second distance between the preset position and each speaker may be predetermined, for example, the corresponding second distance between the preset position and each speaker may be manually measured already at the time of manufacturing the electronic device.
For example, as shown in fig. 3, the distance from the speaker a2 to the preset position is S2, and the distance from the speaker A3 to the preset position is S3.
203. And determining the position information of the target user relative to each loudspeaker in the plurality of loudspeakers according to the first distance, the first angle and the second distance.
Referring to fig. 3, for example, if the first distance S1 and the first angle B1 are known, and S4 is the distance from the target user a4 perpendicular to the electronic device, the vertical distance S4 and the side length S5 corresponding to the first angle B1 can be determined according to a trigonometric function.
When the second distance S2 and the side length S5 are known, the side length S6 can be determined, and when the side length S6 and the vertical distance S4 are known, the distance between the target user a4 and the speaker a2 and the corresponding angle information can be determined from the trigonometric function. Thereby determining the position information of the target user relative to speaker a 2.
In the case of determining the vertical distance S4, the side length S5, and the second distance S3, the distance between the target user a4 and the speaker A3 and the corresponding angle information can be determined according to the trigonometric function. Thereby determining the position information of the target user relative to speaker a 3.
204. And calculating a first time length of sound emitted by each loudspeaker to the target user according to the position information, and calculating the sound delay difference between every two loudspeakers according to the first time length.
For example, when the first time period during which the sound emitted from the speaker a propagates to the human ear is 50 milliseconds and the first time period during which the sound emitted from the speaker B propagates to the human ear is 30 milliseconds, the sound delay difference between the speaker a and the speaker B is determined to be 20 milliseconds.
Similarly, the first time length corresponding to each loudspeaker can be determined in this way, and the sound delay difference between every two loudspeakers can be determined.
205. And determining a delay parameter corresponding to each loudspeaker according to the sound delay difference.
In some embodiments, the delay parameter corresponding to each speaker, for example, the delay parameter corresponding to each sound delay difference corresponding to two speakers, may be determined in a preset lookup table according to the sound delay difference. Then, the corresponding delay parameter of each loudspeaker is determined.
206. And calculating the attenuation amplitude of the sound emitted by each loudspeaker to the target user according to the position information.
For example, the electronic device may determine a first intensity value of an initial audio signal of the speaker, then derive a second intensity value of the audio signal when the audio signal is transmitted into the ear of the user according to the position information of the user, and determine the attenuation level of the sound transmitted to the target user according to the first intensity value and the second intensity value.
207. And determining the amplitude parameter corresponding to each loudspeaker according to the attenuation amplitude.
The electronic device may determine that the attenuation amplitude corresponds to a preset range, and if the attenuation amplitude is within a first preset range, it indicates that the attenuation amplitude is not very high, and no processing may be performed. If the attenuation amplitude is in the second preset range, the attenuation amplitude is high, and the amplitude gain processing can be performed on the initial audio signal according to the amplitude parameter.
In some embodiments, if the attenuation amplitude corresponding to the speaker a is higher and the attenuation amplitude corresponding to the speaker B is lower, the initial audio signal corresponding to the speaker a may be subjected to amplitude enhancement processing according to the amplitude parameter, and the initial audio signal corresponding to the speaker B may be subjected to amplitude attenuation processing according to the amplitude parameter. So that the sound emitted by speaker a and the sound emitted by speaker B are of the same amplitude as they travel to the human ear. Thereby forming a better stereophonic effect in the human ear.
208. And compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker.
In some embodiments, in the process of adjusting the initial audio signal corresponding to each speaker, the electronic device may obtain an initial audio parameter of the initial audio signal corresponding to each speaker, then adjust the initial audio parameter according to the audio compensation parameter to obtain a target audio parameter corresponding to each speaker, and finally generate the target audio signal according to the target audio parameter.
For example, the occurrence time of the speaker may be adjusted according to the delay parameter, and the amplitude of the sound signal may be adjusted according to the amplitude parameter.
209. And carrying out equalization processing on the target audio signal corresponding to each loudspeaker to obtain an equalized target audio signal.
For example, in the process of equalizing the target audio signal corresponding to each speaker, the target audio signal equalization compensation may be performed according to the characteristics of the sound emitted by each speaker, for example, if some speakers mainly emit low-frequency audio, the equalization parameters corresponding to the low-frequency audio may be used. Some speakers emit primarily mid-range audio, and equalization parameters corresponding to the mid-range audio may be used. Therefore, the target audio signals corresponding to different loudspeakers are equalized. The sound played by the electronic equipment finally is transmitted to human ears, and the electronic equipment has good tone quality and stereo effect.
210. And controlling each loudspeaker to play audio according to the corresponding equalization target audio signal.
After the equalization target audio signal corresponding to each speaker is obtained, the electronic device can control the plurality of speakers to play the corresponding audio, so that the audio has good tone quality and stereo effect when being spread to human ears.
In some embodiments, the position of the user may change, and when the position of the user changes, the audio signal corresponding to each speaker may be recalculated. Thereby enabling the audio played by the plurality of speakers to have a stereo effect.
In the embodiment of the application, the electronic device obtains a corresponding second distance between the preset position and each speaker by obtaining a first distance and a first angle between the target user and the preset position on the electronic device, and determines the position information of the target user relative to each speaker in the plurality of speakers according to the first distance, the first angle and the second distance. And then calculating a first time length of sound emitted by each loudspeaker to a target user according to the position information, calculating a sound delay difference between every two loudspeakers according to the first time length, and determining a delay parameter corresponding to each loudspeaker according to the sound delay difference. And calculating the attenuation amplitude of the sound emitted by each loudspeaker to the target user according to the position information, and determining the amplitude parameter corresponding to each loudspeaker according to the attenuation amplitude.
And finally, compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker, wherein the audio compensation parameters comprise a delay parameter and an amplitude parameter. And finally, controlling each loudspeaker to play audio according to the corresponding equalized target audio signal. The initial audio signals of different speakers are compensated, so that the sound signals emitted by the different speakers can enter human ears simultaneously, and the sound emitted by the different speakers has the same audio effect, so that the audio playing effect of the human ears is finally improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an audio processing apparatus according to an embodiment of the present disclosure. The audio processing device is applied to an electronic device, the electronic device comprises a plurality of loudspeakers, and the audio processing device comprises:
an obtaining module 310 is configured to obtain position information of the target user with respect to each of the plurality of speakers.
The obtaining module 310 is further configured to obtain a first distance and a first angle between the target user and a preset position on the electronic device; acquiring a corresponding second distance between the preset position and each loudspeaker; and determining the position information of the target user relative to each loudspeaker in the plurality of loudspeakers according to the first distance, the first angle and the second distance.
A determining module 320, configured to determine, according to the position information, an audio compensation parameter corresponding to each speaker in the plurality of speakers.
The determining module 320 is further configured to calculate a first time duration for each speaker to emit sound to the target user according to the location information; calculating the sound delay difference between every two loudspeakers according to the first time length; and determining a delay parameter corresponding to each loudspeaker according to the sound delay difference.
The determining module 320 is further configured to calculate, according to the position information, an attenuation amplitude of the sound emitted by each speaker to the target user; and determining the amplitude parameter corresponding to each loudspeaker according to the attenuation amplitude.
The compensation module 330 is configured to compensate the initial audio signal corresponding to each speaker according to the audio compensation parameter, so as to obtain a target audio signal corresponding to each speaker.
The compensation module 330 is further configured to obtain an initial audio parameter of an initial audio signal corresponding to each speaker; adjusting the initial audio parameters according to the audio compensation parameters to obtain target audio parameters corresponding to each loudspeaker; and generating the target audio signal according to the target audio parameter.
The playing module 340 is configured to control each speaker to play audio according to the corresponding target audio signal.
The playing module 340 is further configured to perform equalization processing on the target audio signal corresponding to each speaker to obtain an equalized target audio signal; and controlling each loudspeaker to play audio according to the corresponding equalization target audio signal.
In the embodiment of the application, the electronic equipment acquires the position information of a target user relative to each loudspeaker in a plurality of loudspeakers; determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information; compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker; and controlling each loudspeaker to play audio according to the corresponding target audio signal. The initial audio signals of different speakers are compensated, so that the sound signals emitted by the different speakers can enter human ears simultaneously, and the sound emitted by the different speakers has the same audio effect, so that the audio playing effect of the human ears is finally improved.
Accordingly, embodiments of the present application also provide an electronic device, as shown in fig. 5, which may include an input unit 401, a display unit 402, a memory 403 including one or more computer-readable storage media, a sensor 405, a processor 404 including one or more processing cores, and a power supply 406. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the input unit 401 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, in one particular embodiment, input unit 401 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction 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 sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 404, and can receive and execute commands sent by the processor 404. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 401 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 402 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 402 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 404 to determine the type of touch event, and then the processor 404 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 5 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The memory 403 may be used for storing software programs and modules, and the processor 404 executes various functional applications and data processing by operating the software programs and modules stored in the memory 403. The memory 403 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 403 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, or other volatile solid state storage device. Accordingly, the memory 403 may also include a memory controller to provide the processor 404 and the input unit 401 access to the memory 403.
The electronic device may also include at least one sensor 405, such as a light sensor, motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the motion sensor is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of an electronic device, vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
The processor 404 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 403 and calling data stored in the memory 403, thereby performing overall monitoring of the electronic device. Optionally, processor 404 may include one or more processing cores; preferably, the processor 404 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 404.
The electronic device also includes a power supply 406 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 404 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 406 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 404 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 403 according to the following instructions, and the processor 404 runs the application programs stored in the memory 403, so as to implement various functions:
acquiring position information of a target user relative to each loudspeaker in a plurality of loudspeakers;
determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information;
compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker;
and controlling each loudspeaker to play audio according to the corresponding target audio signal.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the audio processing methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring position information of a target user relative to each loudspeaker in a plurality of loudspeakers;
determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information;
compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker;
and controlling each loudspeaker to play audio according to the corresponding target audio signal.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any audio processing method provided in the embodiments of the present application, beneficial effects that can be achieved by any audio processing method provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The foregoing describes in detail an audio processing method, an audio processing apparatus, an electronic device, and a storage medium provided in the embodiments of the present application, and specific examples are applied in the present application to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An audio processing method applied to an electronic device, the electronic device including a plurality of speakers, the audio processing method comprising:
acquiring position information of a target user relative to each loudspeaker in a plurality of loudspeakers;
determining an audio compensation parameter corresponding to each loudspeaker in the plurality of loudspeakers according to the position information;
compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameters to obtain a target audio signal corresponding to each loudspeaker;
and controlling each loudspeaker to play audio according to the corresponding target audio signal.
2. The audio processing method of claim 1, wherein the obtaining of the position information of the target user relative to each of the plurality of speakers comprises:
acquiring a first distance and a first angle between a target user and a preset position on the electronic equipment;
acquiring a corresponding second distance between the preset position and each loudspeaker;
and determining the position information of the target user relative to each loudspeaker in the plurality of loudspeakers according to the first distance, the first angle and the second distance.
3. The audio processing method of claim 1, wherein the audio compensation parameter comprises a delay parameter, and wherein the determining the audio compensation parameter corresponding to each of the plurality of speakers according to the position information comprises:
calculating a first time length of each loudspeaker for emitting sound to a target user according to the position information;
calculating the sound delay difference between every two loudspeakers according to the first time length;
and determining a delay parameter corresponding to each loudspeaker according to the sound delay difference.
4. The audio processing method of claim 1, wherein the audio compensation parameter comprises a magnitude parameter, and wherein determining the audio compensation parameter for each of the plurality of speakers according to the position information comprises:
calculating the attenuation amplitude of the sound emitted by each loudspeaker to the target user according to the position information;
and determining the amplitude parameter corresponding to each loudspeaker according to the attenuation amplitude.
5. The audio processing method according to any one of claims 1 to 4, wherein compensating the initial audio signal corresponding to each speaker according to the audio compensation parameter to obtain the target audio signal corresponding to each speaker comprises:
acquiring initial audio parameters of initial audio signals corresponding to each loudspeaker;
adjusting the initial audio parameters according to the audio compensation parameters to obtain target audio parameters corresponding to each loudspeaker;
and generating the target audio signal according to the target audio parameter.
6. The audio processing method according to any one of claims 1 to 4, wherein the controlling each speaker to play audio according to the corresponding target audio signal comprises:
equalizing the target audio signal corresponding to each loudspeaker to obtain an equalized target audio signal;
and controlling each loudspeaker to play audio according to the corresponding equalization target audio signal.
7. An audio processing apparatus applied to an electronic device including a plurality of speakers, comprising:
an acquisition module for acquiring position information of a target user relative to each of a plurality of speakers;
a determining module, configured to determine, according to the position information, an audio compensation parameter corresponding to each speaker in the plurality of speakers;
the compensation module is used for compensating the initial audio signal corresponding to each loudspeaker according to the audio compensation parameter to obtain a target audio signal corresponding to each loudspeaker;
and the playing module is used for controlling each loudspeaker to play audio according to the corresponding target audio signal.
8. The audio processing apparatus of claim 7, wherein the compensation module is configured to:
acquiring initial audio parameters of initial audio signals corresponding to each loudspeaker;
adjusting the initial audio parameters according to the audio compensation parameters to obtain target audio parameters corresponding to each loudspeaker;
and generating the target audio signal according to the target audio parameter.
9. An electronic device, comprising:
a memory storing executable program code, a processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform the steps in the audio processing method according to any of claims 1 to 6.
10. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the audio processing method according to any one of claims 1 to 6.
CN202111300349.3A 2021-11-04 2021-11-04 Audio processing method and device, electronic equipment and storage medium Pending CN114071315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111300349.3A CN114071315A (en) 2021-11-04 2021-11-04 Audio processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111300349.3A CN114071315A (en) 2021-11-04 2021-11-04 Audio processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114071315A true CN114071315A (en) 2022-02-18

Family

ID=80273901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111300349.3A Pending CN114071315A (en) 2021-11-04 2021-11-04 Audio processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114071315A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116389982A (en) * 2023-05-19 2023-07-04 零束科技有限公司 Audio processing method, device, electronic equipment and storage medium
CN116744187A (en) * 2022-09-30 2023-09-12 荣耀终端有限公司 Speaker control method and device
CN117119358A (en) * 2023-10-17 2023-11-24 武汉市聚芯微电子有限责任公司 Compensation method and device for sound image offset side, electronic equipment and storage equipment
CN116744187B (en) * 2022-09-30 2024-04-26 荣耀终端有限公司 Speaker control method and device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1883228A (en) * 2003-11-21 2006-12-20 雅马哈株式会社 Array speaker device
WO2010012186A1 (en) * 2008-07-28 2010-02-04 深圳华为通信技术有限公司 A speaker array device and a drive method thereof
WO2011034706A2 (en) * 2009-09-21 2011-03-24 Microsoft Corporation Volume adjustment based on listener position
WO2014077374A1 (en) * 2012-11-16 2014-05-22 ヤマハ株式会社 Audio signal processing device, position information acquisition device, and audio signal processing system
CN106028226A (en) * 2016-05-27 2016-10-12 北京奇虎科技有限公司 Sound playing method and equipment
CN106412287A (en) * 2016-09-27 2017-02-15 广东小天才科技有限公司 Volume adjusting method and device
CN106817667A (en) * 2016-11-30 2017-06-09 努比亚技术有限公司 One kind realizes stereosonic method, device and mobile terminal
US20180146290A1 (en) * 2016-11-23 2018-05-24 Harman Becker Automotive Systems Gmbh Individual delay compensation for personal sound zones
CN108834030A (en) * 2018-09-28 2018-11-16 广州小鹏汽车科技有限公司 A kind of vehicle interior sound field adjusting method and audio system
CN109862503A (en) * 2019-01-30 2019-06-07 北京雷石天地电子技术有限公司 A kind of method and apparatus of loudspeaker delay adjust automatically
JP2020022114A (en) * 2018-08-02 2020-02-06 日本電信電話株式会社 Sound collection loudspeaker, method therefor, and program
CN111800713A (en) * 2020-06-12 2020-10-20 瑞声科技(新加坡)有限公司 Signal nonlinear compensation method and device, electronic equipment and storage medium
CN112866894A (en) * 2019-11-27 2021-05-28 北京小米移动软件有限公司 Sound field control method and device, mobile terminal and storage medium
EP3843422A2 (en) * 2019-12-27 2021-06-30 Harman International Industries, Incorporated Systems and methods for adjusting activity control parameters

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1883228A (en) * 2003-11-21 2006-12-20 雅马哈株式会社 Array speaker device
WO2010012186A1 (en) * 2008-07-28 2010-02-04 深圳华为通信技术有限公司 A speaker array device and a drive method thereof
WO2011034706A2 (en) * 2009-09-21 2011-03-24 Microsoft Corporation Volume adjustment based on listener position
CN102577433A (en) * 2009-09-21 2012-07-11 微软公司 Volume adjustment based on listener position
WO2014077374A1 (en) * 2012-11-16 2014-05-22 ヤマハ株式会社 Audio signal processing device, position information acquisition device, and audio signal processing system
CN106028226A (en) * 2016-05-27 2016-10-12 北京奇虎科技有限公司 Sound playing method and equipment
CN106412287A (en) * 2016-09-27 2017-02-15 广东小天才科技有限公司 Volume adjusting method and device
US20180146290A1 (en) * 2016-11-23 2018-05-24 Harman Becker Automotive Systems Gmbh Individual delay compensation for personal sound zones
CN106817667A (en) * 2016-11-30 2017-06-09 努比亚技术有限公司 One kind realizes stereosonic method, device and mobile terminal
JP2020022114A (en) * 2018-08-02 2020-02-06 日本電信電話株式会社 Sound collection loudspeaker, method therefor, and program
CN108834030A (en) * 2018-09-28 2018-11-16 广州小鹏汽车科技有限公司 A kind of vehicle interior sound field adjusting method and audio system
CN109862503A (en) * 2019-01-30 2019-06-07 北京雷石天地电子技术有限公司 A kind of method and apparatus of loudspeaker delay adjust automatically
CN112866894A (en) * 2019-11-27 2021-05-28 北京小米移动软件有限公司 Sound field control method and device, mobile terminal and storage medium
EP3843422A2 (en) * 2019-12-27 2021-06-30 Harman International Industries, Incorporated Systems and methods for adjusting activity control parameters
CN111800713A (en) * 2020-06-12 2020-10-20 瑞声科技(新加坡)有限公司 Signal nonlinear compensation method and device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116744187A (en) * 2022-09-30 2023-09-12 荣耀终端有限公司 Speaker control method and device
CN116744187B (en) * 2022-09-30 2024-04-26 荣耀终端有限公司 Speaker control method and device
CN116389982A (en) * 2023-05-19 2023-07-04 零束科技有限公司 Audio processing method, device, electronic equipment and storage medium
CN117119358A (en) * 2023-10-17 2023-11-24 武汉市聚芯微电子有限责任公司 Compensation method and device for sound image offset side, electronic equipment and storage equipment
CN117119358B (en) * 2023-10-17 2024-01-19 武汉市聚芯微电子有限责任公司 Compensation method and device for sound image offset side, electronic equipment and storage equipment

Similar Documents

Publication Publication Date Title
CN114071315A (en) Audio processing method and device, electronic equipment and storage medium
CN106489130A (en) For making audio balance so that the system and method play on an electronic device
CN109086027B (en) Audio signal playing method and terminal
CN108008858B (en) Terminal control method and mobile terminal
CN109616135B (en) Audio processing method, device and storage medium
US9276541B1 (en) Event-based presentation and processing of content
CN109089192B (en) Method for outputting voice and terminal equipment
WO2021139535A1 (en) Method, apparatus and system for playing audio, and device and storage medium
CN110401898B (en) Method, apparatus, device and storage medium for outputting audio data
WO2022083711A1 (en) Electronic device, and control method and control apparatus therefor
CN111385714A (en) Method for determining voice coil temperature of loudspeaker, electronic device and storage medium
US20220232320A1 (en) Receiver control method and device, and electronic device
CN113542963B (en) Sound mode control method, device, electronic equipment and storage medium
CN109085985B (en) Sound production control method, sound production control device, electronic device, and storage medium
CN108681413B (en) Control method of display module and mobile terminal
CN111078186A (en) Playing method and electronic equipment
CN107911777B (en) Processing method and device for return-to-ear function and mobile terminal
KR102580521B1 (en) Electronic apparatus and method of adjusting sound volume thereof
CN110677770B (en) Sound production control method, electronic device, and medium
CN111049972B (en) Audio playing method and terminal equipment
CN110031860B (en) Laser ranging method and device and mobile terminal
CN109348366B (en) Method for adjusting volume by using electrical parameters and mobile terminal
CN111652100A (en) Fingerprint identification module, electronic equipment and control method and control device thereof
CN108418961B (en) Audio playing method and mobile terminal
CN113990363A (en) Audio playing parameter adjusting method and device, electronic equipment and storage 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