Audio processing method and device, electronic equipment and storage medium

By obtaining the information of the audio playback component and rendering it in azimuthly, the problem of inconsistent playback effects caused by different audio playback components is solved, and the consistency of playback effects between different devices is achieved, and the user's listening experience is improved.

CN120358434APending Publication Date: 2025-07-22BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410079899.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

Due to the different playback performance and sound field differences of different audio playback components, stereo music or sound surround video playback effects are inconsistent when switching devices or headphones, affecting the user's listening experience.

Method used

By obtaining the audio playback component information of the electronic device, rendering the audio data to be processed based on the component information, obtaining the target audio data, and playing the target audio data to adapt to the playback effect of the current audio playback component.

Benefits of technology

It realizes the consistency of playback effects among different audio playback components, and improves the audio data playback experience of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358434A_ABST
    Figure CN120358434A_ABST
Patent Text Reader

Abstract

The invention relates to an audio processing method and device, electronic equipment and a storage medium. The audio processing method comprises the following steps: acquiring component information of an audio playing component of the electronic equipment; performing azimuth rendering on the to-be-processed audio data based on the component information to obtain target audio data; and playing the target audio data. According to the method, the component information corresponds to the orientation rendering effect, so that the rendering effect can be matched with the audio playing component of the current electronic equipment, the preset playing effect is achieved when the target audio data is played, the playing effect difference caused by the audio playing component is eliminated, and the playing experience of the electronic equipment is improved. The target audio data has the same playing effect on different devices, and the audio data playing experience of the electronic device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of multimedia technologies, and in particular, to an audio processing method, apparatus, electronic device, and storage medium. Background Art

[0002] With the continuous development of electronic devices, more and more device types support playing music or videos. In order to bring users an immersive listening experience, when playing music or videos, a unified method is usually used to render audio to play stereo music or surround sound videos. However, due to the different playback performances and sound fields of different audio playback components, the playback effects of stereo music or surround sound videos will also be different. Therefore, when a user switches different audio playback components for playback, the playback effect will change, and it is also difficult for the user to adjust it by himself, which affects the user's listening effect. Summary of the Invention

[0003] To overcome the problems in the related art, the present disclosure provides an audio processing method, apparatus, electronic device, and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an audio processing method, the method comprising:

[0005] Obtaining component information of an audio playback component of an electronic device;

[0006] Based on the component information, performing azimuth rendering on the audio data to be processed to obtain target audio data;

[0007] Playing the target audio data.

[0008] In an exemplary embodiment, the performing azimuth rendering on the audio data to be processed based on the component information to obtain target audio data includes:

[0009] Obtaining audio track data of the audio data to be processed;

[0010] Based on the component information, performing azimuth rendering on the audio track data to obtain rendered audio track data;

[0011] Based on the rendered audio track data, obtaining the target audio data.

[0012] In an exemplary embodiment, the performing azimuth rendering on the audio track data based on the component information to obtain rendered audio track data includes:

[0013] Based on the component information, determining algorithm parameters of an audio positioning algorithm, where the algorithm parameters represent azimuth parameters of the target audio data;

[0014] Based on the algorithm parameters, use an audio localization algorithm to perform azimuth rendering on the audio track data to obtain the rendered audio track data.

[0015] In an exemplary embodiment, the step of using an audio localization algorithm to perform azimuth rendering on the audio track data based on the algorithm parameters to obtain the rendered audio track data includes:

[0016] Based on the algorithm parameters, determine an azimuth rendering coefficient, where the azimuth rendering coefficient includes a left-channel azimuth rendering coefficient and a right-channel azimuth rendering coefficient;

[0017] Based on the azimuth rendering coefficient, perform azimuth rendering on the audio track data to obtain the rendered audio track data.

[0018] In an exemplary embodiment, the audio localization algorithm includes a head-related transfer function;

[0019] The step of determining an azimuth rendering coefficient based on the algorithm parameters includes:

[0020] Based on the algorithm parameters, determine the complex sound pressure of the left channel, the complex sound pressure of the right channel, and the complex sound pressure of the reference center point of the target audio data;

[0021] Use the ratio of the complex sound pressure of the left channel to the complex sound pressure of the reference center point as the left-channel rendering coefficient;

[0022] Use the ratio of the complex sound pressure of the right channel to the complex sound pressure of the reference center point as the right-channel rendering coefficient.

[0023] In an exemplary embodiment, the step of performing azimuth rendering on the audio track data based on the azimuth rendering coefficient to obtain the rendered audio track data includes:

[0024] Obtain the audio spectrum of the audio track data;

[0025] Use the product of the audio spectrum and the left-channel azimuth rendering coefficient as the rendered left-channel spectrum;

[0026] Use the product of the audio spectrum and the right-channel azimuth rendering coefficient as the rendered right-channel spectrum;

[0027] Based on the rendered left-channel spectrum and the rendered right-channel spectrum, obtain the rendered audio track data.

[0028] In an exemplary embodiment, the method further includes:

[0029] Obtain the audio data to be played;

[0030] If the audio data to be played is the audio data after azimuth rendering, restore the audio data to be played to the audio data without azimuth rendering to obtain the audio data to be processed.

[0031] According to a second aspect of the present disclosure, there is provided an audio processing device, the device including:

[0032] An acquisition module, configured to acquire component information of an audio playback component of an electronic device;

[0033] A rendering module, configured to perform azimuth rendering on the audio data to be processed based on the component information to obtain target audio data;

[0034] A playback module, configured to play the target audio data.

[0035] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0036] A processor;

[0037] A memory for storing instructions executable by the processor;

[0038] Wherein, the processor is configured to execute the method described in the first aspect of the present disclosure.

[0039] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the method described in the first aspect of the present disclosure.

[0040] Adopting the above method of the present disclosure has the following beneficial effects: performing azimuth rendering on the audio data to be processed based on the component information, and the component information corresponds to the azimuth rendering effect, which can make the rendering effect adapt to the audio playback component of the current electronic device, so as to achieve a preset playback effect when playing the target audio data, eliminate the playback effect differences caused by the audio playback component, and realize that the target audio data has the same playback effect when played through different audio playback components, improving the audio data playback experience of the electronic device.

[0041] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.

[0043] Figure 1It is a flowchart of an audio processing method shown according to an exemplary embodiment;

[0044] Figure 2 It is a flowchart of an audio processing method shown according to an exemplary embodiment;

[0045] Figure 3 It is a flowchart of an audio processing method shown according to an exemplary embodiment;

[0046] Figure 4 It is a block diagram of an audio processing device shown according to an exemplary embodiment;

[0047] Figure 5 It is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0048] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0049] In some embodiments, when a user plays stereo music or surround sound video, due to the difference in the playback effect between headphones and the external speaker of the loudspeaker, there are also differences in the external playback effects of the speakers of different types of electronic devices, and there are also differences in the playback effects of different headphones. Therefore, if the user switches between headphone playback and external speaker playback, or switches different types of electronic devices for external playback, or switches different headphones for playback, there will be a problem of inconsistent playback effects, affecting the user's listening experience.

[0050] In the exemplary embodiments of the present disclosure, in order to overcome the problem of inconsistent playback effects in the related art, an audio processing method is provided, including: obtaining component information of an audio playback component of an electronic device; based on the component information, performing azimuth rendering on the audio data to be processed to obtain target audio data; playing the target audio data. This method performs azimuth rendering on the audio data to be processed based on the component information, and the component information corresponds to the azimuth rendering method, which can make the rendering effect adapt to the audio playback component of the current electronic device, so as to achieve a preset playback effect when playing the target audio data, eliminate the playback effect difference caused by the audio playback component, and realize that the target audio data has the same playback effect when played through different audio playback components, improving the audio data playback experience of the electronic device.

[0051] In an exemplary embodiment of the present disclosure, an audio processing method is provided. Figure 1 It is a flowchart of an audio processing method shown according to an exemplary embodiment, as Figure 1 shown, and includes the following steps:

[0052] Step S101, obtaining component information of an audio playback component of an electronic device;

[0053] Step S102, based on the component information, performing azimuth rendering on the audio data to be processed to obtain target audio data;

[0054] Step S103, playing the target audio data.

[0055] The audio processing method in the embodiments of the present disclosure is applied to an electronic device, and the electronic device includes electronic devices with audio playback functions such as mobile phones, tablets, personal computers, smart home devices, smart wearable devices, smart in-vehicle devices, smart displays, speakers, etc. The audio processing method in this embodiment can be used as the default audio playback method in the electronic device or as an optional audio playback method. In one example, corresponding playback options are set in the audio playback interface. When the user selects to turn on the corresponding option, music or video is played using the audio playback method in this embodiment. For example, a stereo playback effect option is set in the music playback interface or a sound surround playback effect option is set in the video playback interface.

[0056] In step S101, the audio playback component refers to the hardware structure in the electronic device for outputting audio data, and the audio playback component includes speakers and headphones. The component information refers to the information related to the audio playback component that affects the audio playback effect, including position information, quantity information, frequency response curve, etc. For example, the component information of the speaker includes the number of speakers, the distribution spacing of the speakers, and the frequency response curve of the speakers, and the component information of the headphones includes the frequency response curve of the headphones.

[0057] When the audio playback component of the electronic device is the hardware structure of the electronic device itself, such as a speaker, the component information is stored in the memory when the electronic device leaves the factory, and the component information can be directly obtained from the memory; when the audio playback component of the electronic device is an external device of the electronic device, such as headphones, when the external device is first connected to the electronic device, the electronic device sends a request message to the external device to request to obtain its component information. After receiving the component information sent by the external device, the device identifier of the external device is stored in correspondence with its component information in the memory for subsequent direct acquisition from the memory.

[0058] In step S102, the audio data to be processed represents audio data that has not undergone azimuth rendering, that is, the audio data to be processed is monophonic audio data, and the left-channel audio data is the same as the right-channel audio data, without a stereo effect in the listening experience. The target audio data represents audio data that has undergone azimuth rendering, which is stereophonic audio data, with a stereo effect in the listening experience, and the target audio data has a preset playback effect. Based on the component information, azimuth rendering is performed on the audio data to be processed. The component information corresponds to the azimuth rendering effect, which can make the rendering effect adapt to the current audio playback component and make the target audio data reach the preset playback effect, eliminating the playback effect differences caused by the audio playback component, so that the target audio data has the same playback effect when played through different audio playback components. When performing azimuth rendering on the audio data to be processed, any audio rendering method that can achieve spatial audio effects can be used. For example, the Head Related Transfer Function (HRTF) can be used to perform azimuth rendering on the audio data to be processed.

[0059] In some possible implementation manners, the audio data to be played is obtained. If the audio data to be played is audio data that has undergone azimuth rendering, through the inverse method of the azimuth rendering method, the audio data to be played is restored to audio data that has not undergone azimuth rendering to obtain the audio data to be processed.

[0060] In step S103, the target audio data is played using a stereophonic audio playback component, and a listening experience with a sense of azimuth can be experienced. For example, the target audio data is played through stereophonic headphones or stereophonic speakers.

[0061] In an exemplary embodiment of the present disclosure, the component information of the audio playback component of the electronic device is obtained. Based on the component information, azimuth rendering is performed on the audio data to be processed to obtain the target audio data. The component information corresponds to the azimuth rendering effect, which can make the rendering effect adapt to the audio playback component of the current electronic device, eliminate the playback effect differences caused by the audio playback component, so as to achieve a preset playback effect when playing the target audio data, eliminate the playback effect differences caused by the audio playback component, and realize that the target audio data has the same playback effect when played through different audio playback components, improving the audio data playback experience of the electronic device.

[0062] In an exemplary embodiment of the present disclosure, an audio processing method is provided. Figure 2 It is a flowchart of an audio processing method shown according to an exemplary embodiment, as Figure 2 shown, including the following steps:

[0063] Step S201, obtain the component information of the audio playback component of the electronic device;

[0064] Step S202, obtain the audio track data of the audio data to be processed;

[0065] Step S203, based on the component information, perform azimuth rendering on the audio track data to obtain the rendered audio track data;

[0066] Step S204, based on the rendered audio track data, obtain the target audio data;

[0067] Step S205, play the target audio data.

[0068] Among them, for the specific implementation manners of Step S201 and Step S205, refer to Step S101 and Step S103, which will not be elaborated here.

[0069] In Step S202, the audio track data, that is, the sound track data, represents a set of audio data of the same sound source. The same sound source can be the same object or the same source. The audio data in each audio track is independent and not affected by other audio tracks. For example, in music, the audio data of different objects is located in different audio tracks, including the audio track data corresponding to the human voice and the audio track data corresponding to each musical instrument. In a video, the audio data of different sources is located in different audio tracks, including the audio track data corresponding to music, the audio track data corresponding to the human voice, and the audio track data corresponding to other sounds other than the human voice.

[0070] If the audio track data is stored in the relevant information of the audio data to be processed, directly obtain the audio track data of the audio data to be processed from the audio data to be processed; if the audio track data is not stored in the relevant information of the audio data to be processed, perform audio division on the audio data to be processed through a deep learning neural network algorithm to obtain the audio track data. The number of audio tracks in the audio data to be processed is determined according to the actual situation, and can be one or multiple.

[0071] In Step S203, when the audio data to be processed includes multiple audio tracks, based on the component information, perform azimuth rendering on each audio track data therein to obtain multiple rendered audio track data; when the audio data to be processed includes one audio track, based on the component information, perform azimuth rendering on the audio track data to obtain the rendered audio track data.

[0072] In Step S204, when the audio data to be processed includes multiple audio tracks, combine the multiple rendered audio track data, that is, add the time-domain data of the multiple rendered audio track data, to obtain the target audio data; when the audio data to be processed includes one audio track, the rendered audio track data corresponding to the audio track data is the target audio data.

[0073] In an exemplary embodiment of the present disclosure, by obtaining the audio track data in the audio data to be processed and performing azimuth rendering on the audio track data, compared with performing azimuth rendering on the entire audio data to be processed, a better rendering effect can be achieved.

[0074] In an exemplary embodiment of the present disclosure, an audio processing method is provided. Figure 3 It is a flowchart of an audio processing method shown according to an exemplary embodiment, as Figure 3 shown, including the following steps:

[0075] Step S301, obtain the component information of the audio playback component of the electronic device;

[0076] Step S302, obtain the audio track data of the audio data to be processed;

[0077] Step S303, based on the component information, determine the algorithm parameters of the audio localization algorithm, where the algorithm parameters represent the azimuth parameters of the target audio data;

[0078] Step S304, based on the algorithm parameters, use the audio localization algorithm to perform azimuth rendering on the audio track data to obtain the rendered audio track data;

[0079] Step S305, based on the rendered audio track data, obtain the target audio data;

[0080] Step S306, play the target audio data.

[0081] Among them, for the specific implementation manners of steps S301 - S302 and steps S305 - S306, refer to steps S201 - S202 and steps S204 - S205, which will not be elaborated here.

[0082] In step S303, the audio localization algorithm is a preset algorithm, which represents any algorithm that can perform azimuth rendering on the audio data to be processed to make it have a spatial audio effect. The algorithm parameters represent the azimuth parameters used in the audio localization algorithm to characterize the target audio data, that is, the relative position of the target audio data with respect to the listener's position, where the listener's position is a preset value, preset according to the listening experience in different environments. For example, for music, the preset listener's position when expecting to obtain the listening experience in a professional recording studio is different from the listener's position when expecting to obtain the listening experience at a concert site. The mapping relationship between the component information and the algorithm parameters is pre - stored in the electronic device, which can be a mapping table or a mapping formula. After obtaining the component information of the electronic device, query the algorithm parameters corresponding to the component information in the mapping relationship.

[0083] In some possible embodiments, the mapping relationship table of component information and algorithm parameters is obtained from experimental data. First, the preset playback effect of the target audio data is determined, and the target audio data is played using different audio playback components. When the preset playback effect is achieved in the laboratory through an artificial head, the algorithm parameters corresponding to different audio playback components are determined, and the component information of the audio playback components is saved corresponding to the algorithm parameters, thereby obtaining the mapping relationship table.

[0084] In one example, when the audio localization algorithm is the head-related transfer function, the algorithm parameters include the distance length r of the target audio data relative to the listener's position, the horizontal angle θ of the target audio data relative to the listener's position, and the elevation angle of the target audio data relative to the listener's position In the electronic device, a mapping relationship table of component information and algorithm parameters as shown in Table 1 is pre-stored. The component information of each type of electronic device is respectively denoted as sub1, sub2, and sub3. According to the component information of the audio playback component of the electronic device, the corresponding algorithm parameters are obtained by querying in the mapping relationship table.

[0085] Table 1

[0086]

[0087] In step S304, the algorithm parameters are substituted into the audio localization algorithm, and the audio localization algorithm is used to perform azimuth rendering on the audio track data, thereby obtaining the rendered audio track data.

[0088] In some possible embodiments, based on the algorithm parameters, the audio localization algorithm is used to perform azimuth rendering on the audio track data to obtain the rendered audio track data, including the following steps:

[0089] S34-1, based on the algorithm parameters, determine the azimuth rendering coefficients, where the azimuth rendering coefficients include the left-channel azimuth rendering coefficient and the right-channel azimuth rendering coefficient.

[0090] In one example, when the audio localization algorithm is the head-related transfer function, based on the algorithm parameters, determine the left-channel complex sound pressure, the right-channel complex sound pressure, and the reference center-point complex sound pressure of the target audio data; use the ratio of the left-channel complex sound pressure to the reference center-point complex sound pressure as the left-channel rendering coefficient; use the ratio of the right-channel complex sound pressure to the reference center-point complex sound pressure as the right-channel rendering coefficient.

[0091] The real part and the imaginary part of the complex sound pressure respectively represent the amplitude information and the phase information of the target audio data. Under different algorithm parameters, the complex sound pressures generated by audio data of different frequencies are different. The complex sound pressure of the left channel represents the complex sound pressure generated in the left channel, the complex sound pressure of the right channel represents the complex sound pressure generated in the right channel, and the complex sound pressure of the reference center point represents the complex sound pressure generated at the reference center point, where the reference center point is the center point of the line connecting the left ear and the right ear. The calculation method of the complex sound pressure can adopt any existing complex sound pressure calculation method, and the present disclosure does not make any restrictions.

[0092] Denote the complex sound pressure of the left channel as Denote the complex sound pressure of the right channel as Denote the complex sound pressure of the reference center point as P o (r, f), then the left-channel azimuth rendering coefficient H L and the right-channel azimuth rendering coefficient H R are respectively expressed as:

[0093]

[0094]

[0095] where r represents the distance length of the target audio data relative to the listener's position, θ represents the horizontal angle of the target audio data relative to the listener's position, represents the elevation angle of the target audio data relative to the listener's position, and f represents the frequency of the target audio data.

[0096] S34-2. Based on the azimuth rendering coefficient, perform azimuth rendering on the audio track data to obtain the rendered audio track data.

[0097] In one example, obtain the audio spectrum of the audio track data; multiply the audio spectrum by the left-channel azimuth rendering coefficient as the rendered left-channel spectrum; multiply the audio spectrum by the right-channel azimuth rendering coefficient as the rendered right-channel spectrum; based on the rendered left-channel spectrum and the rendered right-channel spectrum, obtain the rendered audio track data.

[0098] The audio track data of the audio data to be processed is monophonic time-domain data. Through time-frequency conversion, for example, through the Fourier transform (Fast Fourier Transform, FFT), convert the time-domain data into frequency-domain data to obtain the audio spectrum of the audio track data in the frequency domain. Multiply the audio spectrum by the left-channel azimuth rendering coefficient H L to obtain the rendered left-channel spectrum, and multiply the audio spectrum by the right-channel azimuth rendering coefficient H RMultiply to obtain the rendered right-channel spectrum. Through frequency-time conversion, such as through the Inverse Fast Fourier Transform (iFFT), convert the frequency-domain data into time-domain data, convert the rendered left-channel spectrum into the rendered left-channel audio track data in the time domain, and convert the rendered right-channel spectrum into the rendered right-channel audio track data in the time domain. The rendered left-channel audio track data and the rendered right-channel audio track data constitute the rendered audio track data.

[0099] In some possible embodiments, the process of obtaining the rendered audio track data includes the following steps:

[0100] S1. Obtain the audio track data of the audio data to be played;

[0101] S2. If the audio track data is the audio data after azimuth rendering using the audio localization algorithm, obtain the initial algorithm parameters of the audio localization algorithm, where the initial algorithm parameters represent the azimuth parameters of the audio data to be played;

[0102] S3. Based on the component information, determine the target algorithm parameters of the audio localization algorithm, where the target algorithm parameters represent the azimuth parameters of the target audio data;

[0103] S4. Modify the initial algorithm parameters to the target algorithm parameters, and use the audio localization algorithm to re-perform azimuth rendering on the audio track data to obtain the rendered audio track data.

[0104] In an exemplary embodiment of the present disclosure, an audio processing device is provided. Figure 4 According to the block diagram of an audio processing device shown in an exemplary embodiment, as Figure 4 shown, the audio processing device includes:

[0105] An acquisition module 401, configured to acquire the component information of the audio playback component of the electronic device;

[0106] A rendering module 402, configured to perform azimuth rendering on the audio data to be processed based on the component information to obtain the target audio data;

[0107] A playback module 403, configured to play the target audio data.

[0108] In an exemplary embodiment, the rendering module 402 is further configured to:

[0109] Obtain the audio track data of the audio data to be processed;

[0110] Perform azimuth rendering on the audio track data based on the component information to obtain the rendered audio track data;

[0111] Obtain target audio data based on the rendered audio track data.

[0112] In one exemplary embodiment, the rendering module 402 is further configured to:

[0113] Determine algorithm parameters of the audio localization algorithm based on component information, where the algorithm parameters characterize the azimuth parameters of the target audio data;

[0114] Perform azimuth rendering on the audio track data using the audio localization algorithm based on the algorithm parameters to obtain the rendered audio track data.

[0115] In one exemplary embodiment, the rendering module 402 is further configured to:

[0116] Determine azimuth rendering coefficients based on the algorithm parameters, where the azimuth rendering coefficients include a left-channel azimuth rendering coefficient and a right-channel azimuth rendering coefficient;

[0117] Perform azimuth rendering on the audio track data based on the azimuth rendering coefficients to obtain the rendered audio track data.

[0118] In one exemplary embodiment, the audio localization algorithm includes a head-related transfer function;

[0119] The rendering module 402 is further configured to:

[0120] Determine the left-channel complex sound pressure, right-channel complex sound pressure, and reference center-point complex sound pressure of the target audio data based on the algorithm parameters;

[0121] Use the ratio of the left-channel complex sound pressure to the reference center-point complex sound pressure as the left-channel rendering coefficient;

[0122] Use the ratio of the right-channel complex sound pressure to the reference center-point complex sound pressure as the right-channel rendering coefficient.

[0123] In one exemplary embodiment, the rendering module 402 is further configured to:

[0124] Obtain the audio spectrum of the audio track data;

[0125] Use the product of the audio spectrum and the left-channel azimuth rendering coefficient as the rendered left-channel spectrum;

[0126] Use the product of the audio spectrum and the right-channel azimuth rendering coefficient as the rendered right-channel spectrum;

[0127] Obtain the rendered audio track data based on the rendered left-channel spectrum and the rendered right-channel spectrum.

[0128] In one exemplary embodiment, the acquisition module 401 is further configured to:

[0129] Obtain the audio data to be played;

[0130] If the audio data to be played is the audio data after azimuth rendering, restore the audio data to be played to the audio data without azimuth rendering to obtain the audio data to be processed.

[0131] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0132] Figure 5 It is a block diagram of an electronic device 500 shown according to an exemplary embodiment.

[0133] Referring to Figure 5 , the electronic device 500 may include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.

[0134] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0135] The memory 504 is configured to store various types of data to support the operation of the electronic device 500. Examples of these data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0136] The power supply component 506 provides power to various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 500.

[0137] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0138] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further includes a speaker for outputting audio signals.

[0139] The I / O interface 512 provides an interface between the processing component 502 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0140] The sensor component 514 includes one or more sensors for providing an assessment of the various aspects of the status of the electronic device 500. For example, the sensor component 514 can detect the on / off state of the electronic device 500, the relative positioning of components, such as the display and the keypad of the electronic device 500. The sensor component 514 can also detect a change in the position of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor component 514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 514 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 514 can further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0141] The communication component 516 is configured to facilitate communication between the electronic device 500 and other devices in a wired or wireless manner. The electronic device 500 can access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0142] In an exemplary embodiment, the electronic device 500 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0143] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the above instructions can be executed by a processor 520 of the electronic device 500 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0144] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute an audio processing method, and the method includes any of the above methods.

[0145] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0146] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. An audio processing method, characterized in that, The method includes: Obtaining component information of an audio playback component of an electronic device; Based on the component information, performing azimuth rendering on the audio data to be processed to obtain target audio data; Playing the target audio data.

2. The audio processing method according to claim 1, wherein The performing azimuth rendering on the audio data to be processed based on the component information to obtain target audio data includes: Obtaining audio track data of the audio data to be processed; Based on the component information, performing azimuth rendering on the audio track data to obtain the rendered audio track data; Based on the rendered audio track data, obtaining the target audio data.

3. The audio processing method according to claim 2, wherein The performing azimuth rendering on the audio track data based on the component information to obtain the rendered audio track data includes: Based on the component information, determining algorithm parameters of an audio localization algorithm, where the algorithm parameters represent azimuth parameters of the target audio data; Based on the algorithm parameters, using the audio localization algorithm to perform azimuth rendering on the audio track data to obtain the rendered audio track data.

4. The audio processing method according to claim 3, wherein The using the audio localization algorithm to perform azimuth rendering on the audio track data based on the algorithm parameters to obtain the rendered audio track data includes: Based on the algorithm parameters, determining azimuth rendering coefficients, where the azimuth rendering coefficients include a left-channel azimuth rendering coefficient and a right-channel azimuth rendering coefficient; Based on the azimuth rendering coefficients, performing azimuth rendering on the audio track data to obtain the rendered audio track data.

5. The audio processing method according to claim 4, wherein The audio localization algorithm includes a head-related transfer function; The determining azimuth rendering coefficients based on the algorithm parameters includes: Based on the algorithm parameters, determining a left-channel complex sound pressure, a right-channel complex sound pressure, and a reference center-point complex sound pressure of the target audio data; Taking the ratio of the left-channel complex sound pressure to the reference center-point complex sound pressure as the left-channel rendering coefficient; Taking the ratio of the right-channel complex sound pressure to the reference center-point complex sound pressure as the right-channel rendering coefficient.

6. The audio processing method according to claim 4, wherein The performing azimuth rendering on the audio track data based on the azimuth rendering coefficients to obtain the rendered audio track data includes: Obtaining an audio spectrum of the audio track data; Taking the product of the audio spectrum and the left-channel azimuth rendering coefficient as the rendered left-channel spectrum; Taking the product of the audio spectrum and the right-channel azimuth rendering coefficient as the rendered right-channel spectrum; Based on the rendered left-channel spectrum and the rendered right-channel spectrum, obtaining the rendered audio track data.

7. The audio processing method according to claim 1, characterized in that The method further includes: Obtaining audio data to be played; If the audio data to be played is audio data after azimuth rendering, restoring the audio data to be played to audio data without azimuth rendering to obtain the audio data to be processed.

8. An audio processing device, characterized in that, The apparatus includes: An obtaining module configured to obtain component information of an audio playback component of an electronic device; A rendering module configured to perform azimuth rendering on audio data to be processed based on the component information to obtain target audio data; A playing module configured to play the target audio data.

9. An electronic device, characterized in that, Including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1-7.