Audio processing method, device, electronic device and storage medium

By integrating an angle detection module in electronic devices, adjusting the phase and amplitude of the audio data collected by the true wireless stereo headphones, the problem of unstable sound and image position during recording is solved, and a better audio recording effect is achieved.

CN114422897BActive Publication Date: 2025-04-29GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210033108.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-04-29
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

When recording with true wireless stereo headphones, the recorded sound is prone to shaking, resulting in unstable sound and image position.

Method used

By integrating the angle detection module in the electronic device, the audio data collected by the first wireless headset and the second wireless headset and the rotation angle are obtained. If the rotation angle meets the preset change conditions, the phase and amplitude of the audio data are adjusted so that the audio image position matches the position at the initial acquisition.

Benefits of technology

It realizes that when the user's head rotates, the audio image position of the recorded sound is kept stable, avoiding shaking, and improving the audio recording effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114422897B_ABST
    Figure CN114422897B_ABST
Patent Text Reader

Abstract

This application discloses an audio processing method, apparatus, electronic device, and storage medium. The audio processing method is applied to an electronic device connected to a first wireless earphone and a second wireless earphone. At least one of the first and second wireless earphones includes an angle detection module. The method includes: acquiring first audio data collected by the first wireless earphone, second audio data collected by the second wireless earphone, and a rotation angle detected by the angle detection module; if the rotation angle meets a preset change condition, adjusting the phase and amplitude of the first and second audio data based on the rotation angle to match the sound image position corresponding to the first and second audio data with the target sound image position; and storing the first and second audio data after adjusting the phase and amplitude. This method can stabilize the sound image position and improve the audio recording effect when the electronic device records using wireless earphones.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and more specifically, to an audio processing method, device, electronic equipment and storage medium. Background Art

[0002] With the rapid advancement of science and technology and living standards, wireless headphones are becoming more and more widely used due to their portability and other features. Among them, True Wireless Stereo (TWS) headphones are more popular among users because they completely eliminate the trouble of wires and are more flexible in use. Current wireless headphones are usually equipped with microphones for collecting sound in recording scenarios. However, in related recording methods, the recorded sound is prone to shaking. Summary of the invention

[0003] In view of the above problems, the present application proposes an audio processing method, device, electronic device and storage medium.

[0004] In a first aspect, an embodiment of the present application provides an audio processing method, which is applied to an electronic device, wherein the electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset includes an angle detection module. The method includes: acquiring first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module; if the rotation angle meets a preset change condition, adjusting the phase and amplitude of the first audio data and the second audio data based on the rotation angle so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image position, and the target sound and image position is the sound and image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection; and storing the first audio data and the second audio data after adjusting the phase and amplitude.

[0005] In a second aspect, an embodiment of the present application provides an audio processing device, which is applied to an electronic device, wherein the electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset includes an angle detection module. The device includes: a data acquisition module, a data processing module and a data storage module, wherein the data acquisition module is used to acquire first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module; the data processing module is used to adjust the phase and amplitude of the first audio data and the second audio data based on the rotation angle if the rotation angle meets a preset change condition, so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image position, and the target sound and image position is the sound and image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection; the data storage module is used to store the first audio data and the second audio data after the phase and amplitude are adjusted.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the audio processing method provided in the first aspect above.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the audio processing method provided in the first aspect above.

[0008] The solution provided by the present application is that when an electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset is provided with an angle detection module, by obtaining the first audio data collected by the first wireless headset, the second audio data collected by the second wireless headset, and the rotation angle detected by the angle detection module, when the rotation angle meets the preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle, so that the sound image position corresponding to the first audio data and the second audio data matches the target sound image position, and the target sound image position is the sound image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection, and then the first audio data and the second audio data after adjusting the phase and amplitude are stored. Thus, the above method can be used to achieve the electronic device to stabilize the sound image position when using the first wireless headset and the second wireless headset for recording, so as to avoid the shaking feeling of the recorded sound caused by the rotation of the user's head, and improve the audio recording effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of a scenario involved in the audio processing method provided in an embodiment of the present application is shown.

[0011] Figure 2 A schematic diagram of another scenario involved in the audio processing method provided in an embodiment of the present application is shown.

[0012] Figure 3 A schematic diagram of another scenario involved in the audio processing method provided in an embodiment of the present application is shown.

[0013] Figure 4 A structural schematic diagram of a first wireless headset provided in an embodiment of the present application is shown.

[0014] Figure 5 A flow chart of an audio processing method according to an embodiment of the present application is shown.

[0015] Figure 6 A flow chart of an audio processing method according to another embodiment of the present application is shown.

[0016] Figure 7 A schematic diagram of a scenario for establishing a preset mapping relationship provided in an embodiment of the present application is shown.

[0017] Figure 8 A flowchart of step S230 in the audio processing method provided by another embodiment of the present application is shown.

[0018] Fig. 9 A flow chart of an audio processing method according to yet another embodiment of the present application is shown.

[0019] Fig.10 A flow chart of an audio processing method according to another embodiment of the present application is shown.

[0020] Fig.11 A schematic diagram showing a principle of an audio processing method provided in an embodiment of the present application is shown.

[0021] Fig.12 A block diagram of an audio processing device according to an embodiment of the present application is shown.

[0022] Fig.13 It is a block diagram of an electronic device according to an embodiment of the present application for executing the audio processing method according to an embodiment of the present application.

[0023] Fig.14 It is a storage unit of an embodiment of the present application for storing or carrying a program code for implementing the audio processing method according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0025] Electronic devices (such as smartphones, tablets, etc.) have become one of the most commonly used consumer electronic products in people's daily lives. With the development of wireless communication technology, wireless headphones are becoming more and more widely used when users use electronic devices to record because of their portability and other features. Among them, True Wireless Stereo (TWS) headphones have gradually increased their market share in the headphone market due to their excellent features such as being more comfortable to wear, easy to use, unobtrusive, and more compact and beautiful.

[0026] Binaural Audio is a recording technology that highly restores the real sense of hearing. It is equipped with microphones at the two ears of the artificial head to capture the sound reaching each ear, and the two signals can be reproduced at each ear. This reproduction is not suitable for mono playback, and it will not achieve the desired effect if played with a speaker, so headphones are usually used to completely isolate the sound signals received by the two ears. This approach allows the artificial head to completely reproduce what the audience hears.

[0027] When implementing binaural stereo recording, the microphones (Microphone, MIC) set on the two earphones of the TWS headset can be used to collect sound, which can achieve the effect of the above binaural recording technology. However, during the recording process, if the user wears the TWS headset and rotates it, the sound in the recording will shift, that is, the position of the sound and image will change, making the recorded sound shake.

[0028] In view of the above problems, the inventors have proposed the audio processing method, device, electronic device and storage medium provided in the embodiments of the present application, which can stabilize the sound and image position when the electronic device uses the first wireless headset and the second wireless headset for recording, thereby avoiding the shaking of the recorded sound caused by the user's head rotation and improving the audio recording effect. The specific audio processing method is described in detail in the subsequent embodiments.

[0029] The following first introduces the scenarios involved in the embodiments of the present application.

[0030] like Figure 1 As shown, in Figure 1 The scene shown includes an electronic device 100 and a headset 200, wherein a first wireless headset 200 and a second wireless headset ( Figure 1 (not shown) is in the wearing state shown in the figure.

[0031] As an implementation method, Figure 2 As shown, the electronic device 100 is connected to the first wireless headset 200, and the first wireless headset 200 is connected to the second wireless headset 300, that is, the first wireless headset 200 is a relay headset for the second wireless headset 300 and the electronic device 100, the first wireless headset 200 can be used as a master headset, and the second wireless headset 300 can be used as a slave headset. In this embodiment, when data is transmitted between the second wireless headset 200 and the electronic device 100, the first wireless headset 200 is used as a relay headset for data transmission, that is, the data transmitted between the two is transmitted through the first wireless headset 200.

[0032] As another embodiment, Figure 3 As shown, the electronic device 100 can be connected to the first wireless headset 200 and the second wireless headset 300 at the same time. The first wireless headset 200 and the second wireless headset 300 can directly transmit data with the electronic device 100.

[0033] In addition, at least one of the first wireless headset 200 and the second wireless headset 300 may include an angle detection module, and the angle detection module is used to detect the angle of the headset. Figure 4The first wireless headset 200 includes an angle detection module 210, which is used to detect the angle of the first wireless headset 200 to detect the rotation angle of the first wireless headset 200 when it is in a wearing state. The angle detection module 210 may include a gyroscope, an acceleration sensor, and the like.

[0034] In the embodiment of the present application, when the electronic device 100 performs recording through the first wireless headset 200 and the second wireless headset 300, the first audio data collected by the first wireless headset 200, the second audio data collected by the second wireless headset 300, and the rotation angle detected by the angle detection module are obtained. If the rotation angle satisfies the preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle, so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions, so that when the electronic device 100 uses the first wireless headset 200 and the second wireless headset 300 for recording, the sound and image position of the recorded sound can be kept stable, thereby avoiding the shaking of the recorded sound due to the rotation of the user's head, and improving the audio recording effect.

[0035] Optionally, the first wireless headset 200 and the second wireless headset 300 may both include an angle detection module so that the electronic device can accurately determine the rotation angle of the user's head based on the rotation angles detected by the first wireless headset 200 and the second wireless headset 300, and then accurately process the audio data collected by the first wireless headset 200 and the second wireless headset 300.

[0036] The audio processing method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0037] See also Figure 5 , Figure 5 FIG. 1 is a flow chart of an audio processing method provided by an embodiment of the present application. In a specific embodiment, the audio processing method is applied to Fig.12 The audio processing device 400 and the electronic device 100 ( Fig.13 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, an e-book, etc., which is not limited here. Figure 5 The process shown in the figure is described in detail, and the audio processing method may specifically include the following steps:

[0038] Step S110: acquiring first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module.

[0039] In the embodiment of the present application, when the electronic device is recording, the first wireless headset and the second wireless headset can be used to collect audio to achieve binaural stereo recording. The scene in which the electronic device is recording can be a scene in which the electronic device runs a recording application and records, or a scene in which a video shooting application is run and a video is shot. The specific scene in which the electronic device is recording can be unlimited.

[0040] In some embodiments, the electronic device may send an audio collection instruction to the first wireless headset and the second wireless headset when the first wireless headset and the second wireless headset meet a preset state, so as to instruct the first wireless headset and the second wireless headset to start collecting audio data. The preset state may be that the first wireless headset and the second wireless headset are in an awake state, and correspondingly, when the first wireless headset and the second wireless headset are in an awake state, if they receive the audio collection instruction sent by the electronic device, they can start audio collection.

[0041] In the embodiment of the present application, while the first wireless headset and the second wireless headset are collecting audio, the angle detection module can also be used to detect the rotation angle of the headset. At this time, the detected rotation angle can be used as the angle at which the sound source rotates relative to the wireless headset. Therefore, the detected rotation angle can be fed back to the electronic device, so that the electronic device processes the audio data collected by the first wireless headset and the second wireless headset according to the rotation angle fed back by the headset to ensure the stability of the sound image in the recorded sound. Among them, if only the first wireless headset of the first wireless headset and the second wireless headset is provided with an angle detection module, the first wireless headset can detect the rotation angle and feed the rotation angle back to the electronic device; if only the second wireless headset of the first wireless headset and the second wireless headset is provided with an angle detection module, the second wireless headset can detect the rotation angle and feed the rotation angle back to the electronic device; if both the first wireless headset and the second wireless headset are provided with an angle detection module, the rotation angle can be collected by at least one of the first wireless headset and the second wireless headset, and the rotation angle can be fed back to the electronic device by the first wireless headset.

[0042] Therefore, the electronic device can obtain the first audio data collected by the first wireless headset, the second audio data collected by the second wireless headset, and the rotation angle. The rotation angle can be the rotation angle detected during the collection of the first audio data and the second audio data, and the collection time of the first audio data is the same as the collection time of the second audio data. In an embodiment of the present application, the first audio data and the second audio data can be understood as audio data to be processed by the electronic device. When the first wireless headset and the second wireless headset are both directly connected to the electronic device, the electronic device can receive the first audio data from the first wireless headset, receive the second audio data from the second wireless headset, and receive the rotation angle from the wireless headset that detects the rotation angle in the first wireless headset and the second wireless headset.

[0043] In a possible implementation, the angle detection module may include a sensor capable of angle detection, such as a gyroscope or an acceleration sensor. Specifically, taking the gyroscope as an example, according to the axial stability of the gyroscope and the known preset posture of the wireless headset relative to the rotation axis of the gyroscope, when there is a difference between the posture of the wireless headset and the preset posture, and a movement in a certain direction of pitch, yaw or roll occurs, because the rotation axis of the gyroscope maintains an unchanged direction, it is detected that the angle relationship of the wireless headset relative to the rotation axis and the angle relationship of the preset posture relative to the rotation axis have changed, and the rotation angle of the headset can be determined.

[0044] In a possible implementation, audio data of a specified time length collected by the first wireless headset can be obtained from the audio data transmitted by the first wireless headset as the first audio data. Correspondingly, audio data of a specified time length can also be obtained from the audio data transmitted by the first wireless headset as the second audio data, and the acquisition time of the first audio data of the specified time length obtained is the same as the acquisition time of the second audio data of the specified time length. Optionally, the specified time length can be the time length corresponding to a frame of audio data, that is, a frame of audio data can be obtained from the audio data collected by the first wireless headset as the first audio data. Correspondingly, a frame of audio data can be obtained from the audio data collected by the second wireless headset as the second audio data. Moreover, the timestamp of the one frame of audio data obtained from the audio data collected by the first wireless headset and the timestamp of the one frame of audio data obtained from the audio data collected by the second wireless headset are the same. Thus, the acquisition timing corresponding to the obtained first audio data and the second audio data is the same, so that the subsequent electronic device can process the audio data of the two channels of the same timestamp to ensure the stability of the sound and image.

[0045] In an embodiment of the present application, the above-mentioned first audio data and second audio data can be transmitted in real time by the first wireless headset, that is, the first audio data and the second audio data are collected in real time. The first audio data and the second audio data can also be stored audio data transmitted by the first wireless headset, and it is only necessary to ensure that the corresponding rotation angle of the headset is stored.

[0046] Step S120: If the rotation angle satisfies a preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions, and the target sound and image positions are the sound and image positions corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection.

[0047] In an embodiment of the present application, an electronic device may pre-set and store a preset change condition, wherein the preset change condition is used as a basis for judging the angle change of the wireless headset to determine whether the audio data collected by the wireless headset needs to be processed to ensure the temperature of the sound and image position. Therefore, in this embodiment, the electronic device may compare the rotation angle with the preset change condition based on the received rotation angle to determine whether the rotation angle meets the preset change condition. Wherein, when it is determined that the received rotation angle meets the preset change condition, the first audio data and the second audio data may be processed to stabilize the sound and image position. Wherein, when it is determined that the received rotation angle does not meet the preset change condition, the received first audio data and the second audio data may not be processed, and the first audio data and the second audio data may be directly stored to generate an audio file.

[0048] As an implementable manner, the preset change condition may be a condition when the position of the sound source relative to the wireless headset changes when the wireless headset rotates. Optionally, the preset change condition may be that the rotation angle is greater than the preset angle, that is, when the above-mentioned rotation angle is greater than the preset angle, it is determined that the rotation angle meets the preset change condition, and the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle; if the rotation angle is not greater than the preset angle, it can be considered that the wireless headset is slightly shaking, so it is determined that the rotation angle does not meet the preset change condition. The specific value of the preset angle may not be limited, for example, it may be 3 degrees, 5 degrees, 7 degrees, etc. It should be noted that, of course, the specific preset change condition is not limited to this, for example, the preset change condition may also be that the rotation angle is within a preset angle range.

[0049] In an embodiment of the present application, if the electronic device determines that the rotation angle satisfies the preset change condition, it means that the sound image position corresponding to the audio data currently collected by the first wireless headset and the second wireless headset has changed, so the phase and amplitude of the first audio data and the second audio data can be adjusted based on the rotation angle, so that the sound image position corresponding to the first audio data and the second audio data matches the original sound image position, that is, the sound image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection, thereby ensuring that the electronic device will not cause the sound image position in the recorded sound to change due to the rotation of the user's head during the recording process. It can be understood that the phase and amplitude of the audio data determine the sound image position perceived by the user, so the phase and amplitude of the first audio data and the second audio data can be adjusted to ensure that the recorded sound is not affected by the rotation of the headset.

[0050] In some embodiments, the electronic device may store phases and amplitudes corresponding to audio data collected by the first wireless headset and the second wireless headset when the sound source is in different orientations relative to the first wireless headset and the second wireless headset; the electronic device may determine the corresponding adjusted phase and amplitude of the first audio data (i.e., the audio data to be collected by the first wireless headset) and the corresponding adjusted phase and amplitude of the second audio data (i.e., the audio data to be collected by the second wireless headset) according to the rotation angle and the corresponding relationship between the stored orientation and the phase and amplitude; then, the phase and amplitude of the first audio data are adjusted according to the phase and amplitude adjusted according to the first audio data, and the phase and amplitude of the second audio data are adjusted according to the phase and amplitude adjusted according to the second audio data, so as to offset the angle change and the amplitude deviation of the audio data of the two channels, so as to achieve the purpose of stabilizing the sound and image and avoid the shaking feeling.

[0051] In other embodiments, the electronic device can obtain historical audio data collected before the first wireless headset and the second wireless headset rotate by the above-mentioned rotation angle, and determine the phase and amplitude corresponding to the first historical audio data, as well as the phase and amplitude corresponding to the second historical audio data, based on the first historical audio data collected by the first wireless headset and the second historical audio data collected by the second wireless headset; then, the phase and amplitude of the first audio data are adjusted to the phase and amplitude corresponding to the first historical audio data, and the phase and amplitude of the second audio data are adjusted to the phase and amplitude corresponding to the second historical audio data, thereby ensuring that the phase and amplitude of the first audio data and the second audio data are consistent with the phase and amplitude of the previously collected audio data, so that the user will not feel that the sound and image position has changed in the recorded sound, avoiding the feeling of shaking.

[0052] Of course, the specific way in which the electronic device adjusts the phase and amplitude corresponding to the first audio data and the second audio data based on the rotation angle of the wireless headset is not limited. It only needs to ensure that the sound and image position corresponding to the collected audio data remains unchanged.

[0053] In some embodiments, the position of the sound source may change during the process of recording with an electronic device. In order to ensure the authenticity of the recorded sound, the electronic device may respond to the determination operation of the sound source position change input by the user, and use the time when the determination operation is detected as the time corresponding to the above-mentioned target sound and image position, that is, re-determine the time to start audio acquisition as the time when the determination operation is received, so as to ensure that after the sound source position itself changes, the sound image position can be stabilized when recording the sound of the sound source after the position change. The change in the sound source position may be the movement of the sound source or the change in the recording object, and the specific scenario may not be limited.

[0054] Step S130: storing the first audio data and the second audio data after adjusting the phase and amplitude.

[0055] In the embodiment of the present application, after the electronic device adjusts the phase and amplitude of the first audio data and the second audio data based on the rotation angle so that the sound image position corresponding to the first audio data and the second audio data matches the target sound image position, the first audio data and the second audio data after the phase and amplitude are adjusted can be stored. Storing the first audio data and the second audio data after the phase and amplitude are adjusted can be understood as storing the first audio data and the second audio data after the phase and amplitude are adjusted as recording data.

[0056] In some embodiments, in the process of determining the first audio data and the second audio data, the first audio data and the second audio data may be selected from the stored received audio data. In this case, after obtaining the first audio data and the second audio data after phase and amplitude adjustment, the first audio data and the second audio data without phase and amplitude adjustment can be deleted, or both can be retained.

[0057] In some embodiments, the electronic device may generate an audio file in a specified audio format after encoding or optimizing the first audio data and the second audio data based on the first audio data and the second audio data. The specified audio format may be MP3, WAV, FLC, etc., and the specific audio format may not be limited.

[0058] The audio processing method provided in the embodiment of the present application can be implemented in the process of an electronic device recording using a first wireless headset and a second wireless headset, by detecting the rotation angle of the wireless headset, and when the rotation angle meets a preset change condition, adjusting the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset, so that the sound and image position remains unchanged, thereby stabilizing the sound and image position, thereby avoiding the shaking of the recorded sound caused by the rotation of the user's head, and improving the audio recording effect.

[0059] See also Figure 6 , Figure 6 A flowchart of an audio processing method provided by another embodiment of the present application is shown. The audio processing method is applied to the above-mentioned electronic device, the electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset includes an angle detection module. Figure 6 The process shown in the figure is described in detail, and the audio processing method may specifically include the following steps:

[0060] Step S210: Acquire first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module.

[0061] In the embodiment of the present application, step S210 can refer to the contents of other embodiments and will not be repeated here.

[0062] Step S220: If the rotation angle meets the preset change condition, based on a preset mapping relationship, obtain the phase adjustment information and amplitude adjustment information corresponding to the rotation angle, and the preset mapping relationship includes the correspondence between the different positions of the sound source and the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset.

[0063] In an embodiment of the present application, a preset mapping relationship may be stored in the electronic device, and the preset mapping relationship includes a correspondence between different positions of the sound source and the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset. The different positions of the sound source refer to different positions of the sound source relative to the first wireless headset and the second wireless headset.

[0064] In some embodiments, a correspondence between multiple sound source orientations (the orientations of the sound sources relative to the first wireless headset and the second wireless headset) and the phases and amplitudes of the audio data collected by the first wireless headset and the second wireless headset can be established in advance, that is, a correspondence between each sound source orientation and the phase and amplitude of the audio data collected by the first wireless headset, and a correspondence between each sound source orientation and the phase and amplitude of the audio data collected by the second wireless headset, so as to obtain the above-mentioned preset mapping relationship.

[0065] See also Figure 7 , Figure 7 A schematic diagram of a scenario for establishing a preset mapping relationship provided in an embodiment of the present application is shown. Figure 7 As shown, the first wireless headset and the second wireless headset can be in a fixed position, and then a sound source point (single speaker) circles around the array to emit sound, and an audio collection is performed at an interval of N degrees (N≤10) (i.e., a standard position point), and the audio collection results of the first wireless headset and the second wireless headset are obtained 360 / N times, and then the audio collection results of the first wireless headset and the audio collection results of the second wireless headset are used to determine the corresponding relationship between the position of the sound source and the phase and amplitude of the audio data of the first wireless headset, and the corresponding relationship between the position of the sound source and the phase and amplitude of the audio data of the second wireless headset. Optionally, the first wireless headset and the second wireless headset can be worn on the user's head, and then a point sound source is used to circle the user's head, and the above method is used to obtain a preset mapping relationship.

[0066] Of course, there is no limitation on the specific method of establishing the above preset mapping relationship.

[0067] In some embodiments, see Figure 8 , based on a preset mapping relationship, obtaining the phase adjustment information and the amplitude adjustment information corresponding to the rotation angle may include:

[0068] Step S221: Based on the preset mapping relationship, obtain the phase difference between the phase corresponding to the first orientation and the phase corresponding to the second orientation for the first wireless headset and the second wireless headset respectively, and obtain the phase difference corresponding to the first wireless headset and the phase difference corresponding to the second wireless headset as phase adjustment information.

[0069] The first orientation is the position of the sound source relative to the first wireless headset and the second wireless headset when audio collection starts, and the second orientation is the position of the sound source relative to the first wireless headset and the second wireless headset after the first wireless headset and the second wireless headset are rotated by the rotation angle.

[0070] Optionally, the electronic device may obtain the initial audio data collected when the first wireless headset and the second wireless headset start audio collection; and determine the first position based on the initial audio data. The electronic device may perform Fourier transform on the initial audio data, convert the initial audio data into the frequency domain, and determine the phase and amplitude corresponding to the initial audio data according to the frequency domain data; and then use the above-mentioned preset mapping relationship to infer the position of the sound source when the first wireless headset and the second wireless headset start audio collection, that is, the first position.

[0071] After the electronic device determines the first orientation, the second orientation of the sound source relative to the first wireless headset and the second wireless headset after the rotation can be determined using the above rotation angle; then, according to the above mapping relationship, for the first wireless headset, the phase difference between the phase of the audio data corresponding to the first orientation and the phase of the audio data corresponding to the second orientation is determined, and the phase difference corresponding to the first wireless headset is obtained, and the phase difference is the phase adjustment information used to adjust the phase of the first audio data; and according to the above mapping relationship, for the second wireless headset, the phase difference between the phase of the audio data corresponding to the first orientation and the phase of the audio data corresponding to the second orientation is determined, and the phase difference corresponding to the second wireless headset is obtained, and the phase difference is the phase adjustment information used to adjust the phase of the second audio data.

[0072] Step S222: Based on the preset mapping relationship, obtain the amplitude difference between the amplitude corresponding to the first orientation and the amplitude corresponding to the second orientation for the first wireless headset and the second wireless headset respectively, and obtain the amplitude difference corresponding to the first wireless headset and the amplitude difference corresponding to the second wireless headset as amplitude adjustment information.

[0073] Similarly, the electronic device can determine the amplitude difference used to adjust the amplitude of the first audio data (i.e., the amplitude difference corresponding to the first wireless headset) and the amplitude difference used to adjust the amplitude of the second audio data (i.e., the amplitude difference corresponding to the second wireless headset) based on the preset mapping relationship.

[0074] Step S230: adjusting the phases of the first audio data and the second audio data based on the phase adjustment information.

[0075] In an embodiment of the present application, after the electronic device obtains the above-mentioned phase adjustment information and amplitude adjustment information, it can adjust the phase of the first audio data and the second audio data based on the phase adjustment information. Specifically, the phase difference corresponding to the first wireless headset in the phase adjustment information can be used to adjust the phase corresponding to the first audio data; and the phase difference corresponding to the second wireless headset in the phase adjustment information can be used to adjust the phase corresponding to the second audio data. Among them, the electronic device can convert the first audio data and the second audio data into the frequency domain, and then perform phase adjustment on the frequency domain data of the first audio data and the second audio data.

[0076] Step S240: Based on the amplitude adjustment information, the amplitudes of the first audio data and the second audio data are adjusted so that the sound image positions corresponding to the first audio data and the second audio data match the target sound image positions.

[0077] In an embodiment of the present application, after the electronic device obtains the above-mentioned phase adjustment information and amplitude adjustment information, it can also adjust the amplitude of the first audio data and the second audio data based on the amplitude adjustment information. Specifically, the amplitude difference corresponding to the first wireless headset in the amplitude adjustment information can be used to adjust the amplitude corresponding to the first audio data; and the amplitude difference corresponding to the second wireless headset in the amplitude adjustment information can be used to adjust the amplitude corresponding to the second audio data. Among them, the electronic device can convert the first audio data and the second audio data into the frequency domain, and then perform amplitude adjustment on the frequency domain data of the first audio data and the second audio data. Therefore, after the phase adjustment and amplitude adjustment are performed on the first audio data and the second audio data as above, the sound and image positions corresponding to the first audio data and the second audio data can be matched with the target sound and image positions, so that the sound and image positions of the recorded sound remain stable.

[0078] It should be noted that the execution order between step S240 and step S250 may not be limited, that is, the electronic device may first perform phase adjustment on the first audio data and the second audio data, and then perform amplitude adjustment on the first audio data and the second audio data; it may also first perform amplitude adjustment on the first audio data and the second audio data, and then perform phase adjustment on the first audio data and the second audio data; of course, it may also be possible to perform phase adjustment and amplitude adjustment on the first audio data and the second audio data in parallel.

[0079] Step S250: storing the first audio data and the second audio data after adjusting the phase and amplitude.

[0080] In the embodiment of the present application, step S250 can refer to the contents of the aforementioned embodiment and will not be described again here.

[0081] The audio processing method provided in the embodiment of the present application can be implemented in the process of an electronic device using a first wireless headset and a second wireless headset to record audio. By detecting the rotation angle of the wireless headset, and when the rotation angle meets a preset change condition, using the correspondence between the pre-obtained sound source orientation and the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset, adjustment information for adjusting the phase and amplitude of the collected audio data is determined, and then the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset are adjusted based on the adjustment information, so that the sound and image position can be accurately maintained unchanged, thereby stabilizing the sound and image position, and further avoiding the shaking of the recorded sound caused by the rotation of the user's head, thereby improving the audio recording effect.

[0082] See also Fig. 9 , Fig. 9 A flowchart of an audio processing method provided by another embodiment of the present application is shown. The audio processing method is applied to the above-mentioned electronic device, the electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset includes an angle detection module. Fig. 9 The process shown in the figure is described in detail, and the audio processing method may specifically include the following steps:

[0083] Step S310: Obtain first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module. The rotation angle includes a first rotation angle detected by the first wireless headset through the angle detection module, and a second rotation angle detected by the second wireless headset through the angle detection module.

[0084] In an embodiment of the present application, both the first wireless headset and the second wireless headset may include an angle detection module. When the electronic device uses the first wireless headset and the second wireless headset to record, the first wireless headset and the second wireless headset may be used to detect the rotation angle to accurately determine the rotation angle of the wireless headset. It is understandable that when the user uses the first wireless headset and the second wireless headset to record, the first wireless headset and the second wireless headset are usually carried by the same user, for example, the user wears them on the left ear and the right ear, so the rotation angle of the first wireless headset is usually the same as the rotation angle of the second wireless headset. Therefore, the first wireless headset and the second wireless headset may be used to detect the rotation angle to accurately determine the rotation angle of the wireless headset.

[0085] Step S320: Determine a third rotation angle based on the first rotation angle and the second rotation angle.

[0086] In an embodiment of the present application, the electronic device can determine a third rotation angle based on a first rotation angle detected by the angle detection module of the first wireless headset and a second rotation angle detected by the angle detection module of the second wireless headset. The third rotation angle can be regarded as the rotation angle when the user uses the first wireless headset and the second wireless headset.

[0087] As a possible implementation, the electronic device may obtain an average value of a first rotation angle detected by the first wireless headset and a second rotation angle detected by the second wireless headset, and use the average value as the third rotation angle.

[0088] As another possible implementation, the user may pre-evaluate the accuracy of the first rotation angle detected by the first wireless headset and the second rotation angle detected by the second wireless headset, and input the evaluation scores to the electronic device; the electronic device may set weight values ​​corresponding to the first wireless headset and the second wireless headset according to the evaluation scores, wherein the weight value corresponding to the first wireless headset and the weight value corresponding to the second wireless headset are 1, and the weight value corresponding to the first wireless headset is positively correlated with the above-mentioned evaluation score corresponding to the first wireless headset, and the weight value corresponding to the second wireless headset is positively correlated with the above-mentioned evaluation score corresponding to the second wireless headset; the electronic device may perform weighted summation of the first rotation angle and the second rotation angle according to the weight values ​​corresponding to the first wireless headset and the second wireless headset, thereby obtaining the sum as the third rotation angle.

[0089] Step S330: If the third rotation angle satisfies a preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions, and the target sound and image positions are the sound and image positions corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection.

[0090] In the embodiment of the present application, when the electronic device detects the rotation angle through the first wireless headset and the second wireless headset at the same time, it can determine whether it meets the preset change condition according to the third rotation angle determined above. If the third rotation angle meets the preset change condition, it means that the audio data collected by the first wireless headset and the second wireless headset needs to be processed to ensure the stability of the sound and image position, that is, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle so that the sound and image position corresponding to the first audio data and the second audio data matches the target sound and image position.

[0091] Step S340: storing the first audio data and the second audio data after adjusting the phase and amplitude.

[0092] In the embodiment of the present application, step S340 can refer to the contents of other embodiments and will not be repeated here.

[0093] The audio processing method provided in the embodiment of the present application, during the process of recording by the electronic device using the first wireless headset and the second wireless headset, the first wireless headset and the second wireless headset simultaneously detect the rotation angle to accurately determine the rotation angle when the user uses the first wireless headset and the second wireless headset, and when the rotation angle meets the preset change condition, the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset are adjusted based on the rotation angle, which can accurately achieve the unchanged sound and image position, thereby stabilizing the sound and image position, and further avoiding the shaking feeling of the recorded sound caused by the rotation of the user's head, thereby improving the audio recording effect.

[0094] See also Fig.10 , Fig.10 A flowchart of an audio processing method provided by another embodiment of the present application is shown. The audio processing method is applied to the above-mentioned electronic device, the electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset includes an angle detection module. Fig.10 The process shown in the figure is described in detail, and the audio processing method may specifically include the following steps:

[0095] Step S410: obtaining the wearing status of the first wireless headset and the second wireless headset.

[0096] In an embodiment of the present application, before the electronic device uses the first wireless headset and / or the second wireless headset to detect the rotation angle, it can detect whether the first wireless headset and the second wireless headset are in a wearing state, so as to determine whether to use the first wireless headset and the second wireless headset to detect the rotation angle according to the detection result. It can be understood that when the user uses the first wireless headset and the second wireless headset to record, the angle change of the first wireless headset and the second wireless headset is caused by the head rotation of the user when wearing the first wireless headset and the second wireless headset; and at least one of the first wireless headset and the second wireless headset includes an angle detection module. In the case where only one of the two is provided with an angle detection module, if the detected rotation angle is to be used to represent the first wireless headset and the second wireless headset, then the rotation angles of the first wireless headset and the second wireless headset should be the same, that is, the user wearing the first wireless headset and the second wireless headset on both ears can meet this situation. Therefore, the electronic device can detect whether the first wireless headset and the second wireless headset are in a wearing state.

[0097] In some embodiments, the first wireless headset and the second wireless headset may detect the wearing state in the same manner. A wearing detection module is provided on the housing of the wireless headset, and the wearing detection module is provided on a designated surface of the housing of the wireless headset, and the designated surface is the surface where the headphone head contacts the concha cavity of the human ear when the wireless headset is worn. Optionally, a black round hole may be provided on the designated surface, and a wearing detection module is installed in the round hole, and the wearing detection module may be a light sensor, which includes a light-emitting unit and a light-sensitive unit, and the light-emitting unit may be an LED lamp, and the LED lamp emits infrared light, which passes through the prism sheet on the round hole and radiates to the outside of the headset. If there is an opaque object blocking the front, most of the light will be reflected back, and the light-sensitive unit judges whether there is an object blocking according to the intensity of the reflected light, so as to infer whether it is in the wearing state. Similarly, the second wireless headset may also be provided with a wearing detector, and determine whether the wireless headset is in the wearing state based on the wearing detector. Of course, the specific type of the wearing detector may not be limited, and the wearing detector may also be a touch sensor, a pressure sensor, etc.

[0098] In this embodiment, a state threshold corresponding to the wearing detection module may be pre-set, and the detection value detected by the wearing detection module may be compared with the state threshold, and whether the wireless headset is in a wearing state may be determined based on the comparison result. For example, when the wearing detection module is a light sensor, the state threshold is a set light intensity threshold. If the light intensity detected by the light sensor is lower than the set light intensity threshold, it is determined that the wireless headset is in a wearing state; if the light intensity detected by the light sensor is greater than or equal to the set light intensity threshold, it is determined that the wireless headset is not in a wearing state. The wireless headset can feed back the determined wearing state information to the electronic device, so that the electronic device can know whether the wireless headset is in a wearing state.

[0099] Step S420: If the first wireless headset and the second wireless headset are both in a wearing state, an angle detection instruction is sent to at least one of the first wireless headset and the second wireless headset, where the angle detection instruction is used to instruct the detection of a rotation angle, and the detected rotation angle is transmitted to the electronic device.

[0100] In an embodiment of the present application, after detecting whether the first wireless headset and the second wireless headset are in a wearing state, the electronic device can control at least one of the first wireless headset and the second wireless headset to detect a rotation angle based on the detection result, if the first wireless headset and the second wireless headset are in a wearing state, so as to determine whether to process the audio data collected by the first wireless headset and the second wireless headset based on the detected rotation angle. Specifically, the electronic device can send an angle detection instruction to at least one of the first wireless headset and the second wireless headset, the angle detection instruction is used to instruct to detect the rotation angle, and transmit the detected rotation angle to the electronic device, so that the electronic device can subsequently obtain the detected rotation angle.

[0101] For example, see again Figure 1 , Figure 1 In the scene diagram shown, the first wireless headset 200 and the second wireless headset (not shown in the figure) are worn on the user's ears. At this time, the first headset 200 and the second wireless headset can detect that they are in a wearing state and feedback to the electronic device 100. The electronic device 100 can send an angle detection instruction to the first wireless headset 200 to instruct the first headset 200 to detect its rotation angle through the angle detection module.

[0102] Step S430: Acquire first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module.

[0103] Step S440: If the rotation angle satisfies a preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions, and the target sound and image positions are the sound and image positions corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection.

[0104] Step S450: storing the first audio data and the second audio data after adjusting the phase and amplitude.

[0105] In the embodiment of the present application, steps S430 to S450 may refer to the contents of other embodiments and will not be described in detail here.

[0106] The audio processing method provided in the embodiment of the present application is implemented to realize, when recording is performed using a first wireless headset and a second wireless headset, after determining that the first wireless headset and the second wireless headset connected to the electronic device are in a wearing state, performing rotation angle detection by at least one of the first wireless headset and the second wireless headset; subsequently, if the rotation angle meets a preset change condition, adjusting the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset so that the sound and image position remains unchanged, thereby stabilizing the sound and image position, thereby avoiding the shaking feeling of the recorded sound caused by the rotation of the user's head, and improving the audio recording effect.

[0107] Next, combine Fig.11 The audio processing method provided in the above embodiment is introduced.

[0108] like Fig.11 As shown, when the electronic device obtains the first audio data, the second audio data and the rotation angle, if the rotation angle meets the preset change condition, the first audio data can be converted into a digital signal through an analog-to-digital converter, and then subjected to Fourier transform to obtain frequency domain data; the frequency domain data is then adjusted in phase and amplitude using a calibration module; and then post-processed (such as gain adjustment and frequency processing) to form a first channel file. Similarly, the second audio data can be processed in the same way to form a second channel file, and the first channel file and the second channel file can constitute the audio file obtained by recording.

[0109] See also Fig.12 , which shows a structural block diagram of an audio processing device 400 provided in an embodiment of the present application. The audio processing device 400 uses the above-mentioned electronic device, which is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset includes an angle detection module. The audio processing device 400 includes: a data acquisition module 410, a data processing module 420, and a data storage module 430. Among them, the data acquisition module 410 is used to acquire the first audio data collected by the first wireless headset, the second audio data collected by the second wireless headset, and the rotation angle detected by the angle detection module; the data processing module 420 is used to adjust the phase and amplitude of the first audio data and the second audio data based on the rotation angle if the rotation angle meets the preset change condition, so that the sound and image position corresponding to the first audio data and the second audio data matches the target sound and image position, and the target sound and image position is the sound and image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection; the data storage module 430 is used to store the first audio data and the second audio data after adjusting the phase and amplitude.

[0110] In some embodiments, the data processing module 420 can be specifically used to: if the rotation angle satisfies a preset change condition, based on a preset mapping relationship, obtain phase adjustment information and amplitude adjustment information corresponding to the rotation angle, the preset mapping relationship including the correspondence between different positions of the sound source and the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset; based on the phase adjustment information, adjust the phase of the first audio data and the second audio data; based on the amplitude adjustment information, adjust the amplitude of the first audio data and the second audio data so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions.

[0111] As a possible implementation manner, the data processing module 420 may also be used to: based on the preset mapping relationship, obtain, for the first wireless headset and the second wireless headset, a phase difference between a phase corresponding to the first orientation and a phase corresponding to the second orientation, to obtain a phase difference corresponding to the first wireless headset and a phase difference corresponding to the second wireless headset as phase adjustment information; based on the preset mapping relationship, obtain, for the first wireless headset and the second wireless headset, an amplitude difference between an amplitude corresponding to the first orientation and an amplitude corresponding to the second orientation, to obtain an amplitude difference corresponding to the first wireless headset and an amplitude difference corresponding to the second wireless headset as amplitude adjustment information; wherein the first orientation is a position of a sound source relative to the first wireless headset and the second wireless headset when audio collection starts, and the second orientation is a position of a sound source relative to the first wireless headset and the second wireless headset after the first wireless headset and the second wireless headset are rotated by the rotation angle.

[0112] Optionally, the data processing module 420 can also be used to: before obtaining the phase difference between the phase corresponding to the first orientation and the phase corresponding to the second orientation for the first wireless headset and the second wireless headset respectively based on the preset mapping relationship, obtain initial audio data collected when the first wireless headset and the second wireless headset start audio collection; determine the first orientation based on the initial audio data.

[0113] In some embodiments, the data processing module 420 can be specifically used to: if the rotation angle is greater than a preset angle, adjust the phase and amplitude of the first audio data and the second audio data based on the rotation angle so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions.

[0114] In some embodiments, the rotation angle includes a first rotation angle detected by the first wireless headset through an angle detection module, and a second rotation angle detected by the second wireless headset through an angle detection module. The audio processing device 400 may also include an angle processing module. The angle processing module is used to determine a third rotation angle based on the first rotation angle and the second rotation angle. The data processing module 420 may be specifically used to: if the third rotation angle meets a preset change condition, adjust the phase and amplitude of the first audio data and the second audio data based on the rotation angle.

[0115] In some embodiments, the audio processing device 400 may further include a wearing detection module and an instruction sending module. The wearing detection module is used to obtain the wearing status of the first wireless headset and the second wireless headset before receiving the first audio data, the second audio data transmitted by the first wireless headset and the rotation angle detected by the angle detection module; the instruction sending module is used to send an angle detection instruction to at least one of the first wireless headset and the second wireless headset if both the first wireless headset and the wireless headset are in a wearing state, and the angle detection instruction is used to instruct to detect the rotation angle and transmit the detected rotation angle to the electronic device.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0117] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0118] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0119] In summary, the solution provided by the present application is that when an electronic device is connected to a first wireless headset and a second wireless headset, and at least one of the first wireless headset and the second wireless headset is provided with an angle detection module, by obtaining the first audio data collected by the first wireless headset, the second audio data collected by the second wireless headset, and the rotation angle detected by the angle detection module, when the rotation angle meets the preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the rotation angle, so that the sound and image position corresponding to the first audio data and the second audio data matches the target sound and image position, and the target sound and image position is the sound and image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection, and then the first audio data and the second audio data after adjusting the phase and amplitude are stored. Therefore, the above method can be used to achieve the stabilization of the sound and image position when the electronic device uses the first wireless headset and the second wireless headset for recording, so as to avoid the shaking feeling of the recorded sound caused by the rotation of the user's head, and improve the audio recording effect.

[0120] Please refer to Fig.13 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, an e-book, a laptop computer, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.

[0121] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0122] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.

[0123] Please refer to Fig.14 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0124] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An audio processing method, characterized in that: Applied to an electronic device, the electronic device is connected to a first wireless headset and a second wireless headset, at least one of the first wireless headset and the second wireless headset comprises an angle detection module, the method comprises: Acquire first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module, wherein the rotation angle includes a first rotation angle detected by the angle detection module of the first wireless headset and a second rotation angle detected by the angle detection module of the second wireless headset; Determining a third rotation angle based on the first rotation angle and the second rotation angle; If the third rotation angle satisfies a preset change condition, adjusting the phase and amplitude of the first audio data and the second audio data based on the third rotation angle so that the sound image position corresponding to the first audio data and the second audio data matches the target sound image position, where the target sound image position is the sound image position corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection; The first audio data and the second audio data after adjusting the phase and the amplitude are stored.

2. The method according to claim 1, characterized in that If the third rotation angle satisfies a preset change condition, adjusting the phase and amplitude of the first audio data and the second audio data based on the third rotation angle so that the sound image positions corresponding to the first audio data and the second audio data match the target sound image position, including: If the third rotation angle satisfies a preset change condition, obtaining phase adjustment information and amplitude adjustment information corresponding to the third rotation angle based on a preset mapping relationship, wherein the preset mapping relationship includes a correspondence between different positions of the sound source and the phase and amplitude of the audio data collected by the first wireless headset and the second wireless headset; Adjusting the phases of the first audio data and the second audio data based on the phase adjustment information; Based on the amplitude adjustment information, the amplitudes of the first audio data and the second audio data are adjusted so that the sound image positions corresponding to the first audio data and the second audio data match the target sound image positions.

3. The method according to claim 2, characterized in that The acquiring, based on a preset mapping relationship, phase adjustment information and amplitude adjustment information corresponding to the third rotation angle includes: Based on the preset mapping relationship, respectively, for the first wireless headset and the second wireless headset, obtain a phase difference between a phase corresponding to the first orientation and a phase corresponding to the second orientation, and obtain a phase difference corresponding to the first wireless headset and a phase difference corresponding to the second wireless headset as phase adjustment information; Based on the preset mapping relationship, respectively, for the first wireless headset and the second wireless headset, an amplitude difference between the amplitude corresponding to the first orientation and the amplitude corresponding to the second orientation is obtained to obtain the amplitude difference corresponding to the first wireless headset and the amplitude difference corresponding to the second wireless headset as amplitude adjustment information; The first orientation is the position of the sound source relative to the first wireless headset and the second wireless headset when audio collection starts, and the second orientation is the position of the sound source relative to the first wireless headset and the second wireless headset after the first wireless headset and the second wireless headset are rotated by the third rotation angle.

4. The method according to claim 3, characterized in that Before acquiring, for the first wireless headset and the second wireless headset respectively, a phase difference between a phase corresponding to the first orientation and a phase corresponding to the second orientation based on the preset mapping relationship, the method further includes: Acquire initial audio data collected when the first wireless headset and the second wireless headset start audio collection; Based on the initial audio data, the first position is determined.

5. The method according to claim 1, characterized in that If the third rotation angle satisfies a preset change condition, adjusting the phase and amplitude of the first audio data and the second audio data based on the third rotation angle so that the sound image positions corresponding to the first audio data and the second audio data match the target sound image position, including: If the third rotation angle is greater than a preset angle, the phase and amplitude of the first audio data and the second audio data are adjusted based on the third rotation angle so that the sound image positions corresponding to the first audio data and the second audio data match the target sound image position.

6. The method according to any one of claims 1 to 5, characterized in that: Before acquiring the first audio data collected by the first wireless headset, the second audio data collected by the second wireless headset, and the rotation angle detected by the angle detection module, the method further includes: Acquire the wearing status of the first wireless headset and the second wireless headset; If the first wireless headset and the second wireless headset are both in a wearing state, an angle detection instruction is sent to at least one of the first wireless headset and the second wireless headset, wherein the angle detection instruction is used to instruct detection of a rotation angle, and the detected rotation angle is transmitted to the electronic device.

7. An audio processing device, characterized in that: The device is applied to an electronic device, the electronic device is connected to a first wireless headset and a second wireless headset, at least one of the first wireless headset and the second wireless headset comprises an angle detection module, and the device comprises: a data acquisition module, a data processing module and a data storage module, wherein: The data acquisition module is used to acquire first audio data collected by the first wireless headset, second audio data collected by the second wireless headset, and a rotation angle detected by the angle detection module, wherein the rotation angle includes a first rotation angle detected by the first wireless headset through the angle detection module, and a second rotation angle detected by the second wireless headset through the angle detection module; The data processing module is used to determine a third rotation angle based on the first rotation angle and the second rotation angle; if the third rotation angle meets a preset change condition, the phase and amplitude of the first audio data and the second audio data are adjusted based on the third rotation angle, so that the sound and image positions corresponding to the first audio data and the second audio data match the target sound and image positions, and the target sound and image positions are the sound and image positions corresponding to the audio data collected when the first wireless headset and the second wireless headset start audio collection; The data storage module is used to store the first audio data and the second audio data after adjusting the phase and the amplitude.

8. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for adjusting audio frequency of terminal and terminal

    CN102064781A

  • Directional recording method and apparatus, and recording device

    CN106486147A

  • Audio Response Based on User Worn Microphones to Direct or Adapt Program Responses System and Method

    US20180014140A1