Audio processing method, device, electronic device and storage medium

By collecting and mixing audio data on electronic devices, and processing it according to the spatial position of the target speaker relative to the device, the problem of scene sound and protagonist sound coverage during audio recording is solved, and clear and accurate matching of audio data is achieved.

CN113707165BActive Publication Date: 2024-09-17LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111046004.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-07
Publication Date
2024-09-17
Estimated Expiration
2041-09-07

AI Technical Summary

Technical Problem

During the audio recording process, it is difficult to cover the entire scene sound and record the protagonist's voice clearly at the same time. Especially when the device is far away from the protagonist, the protagonist's voice will become small or unclear.

Method used

By collecting the first audio data of the target speaker and the second audio data of the environment on the electronic device, and mixing them according to the spatial position of the target speaker relative to the device, it is ensured that the output audio data can cover the entire scene sound, It can also clearly output the voice of the protagonist.

Benefits of technology

It is possible to cover the sound of the entire scene during audio recording, and also record the protagonist's voice clearly, ensuring accurate matching of sound and spatial position, and improving the effect of audio recording.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113707165B
    Figure CN113707165B
Patent Text Reader

Abstract

The embodiment of the present application discloses an audio processing method, device, electronic device and storage medium. After the electronic device obtains the first audio data of the target speaker collected by the audio collection device worn by the target speaker and the second audio data of the environment where the target speaker is located collected by the electronic device, the first audio data is mixed with the second audio data according to the spatial position of the target speaker relative to the electronic device to obtain the target audio data; wherein, when the target audio data is output, the voice of the target speaker matches the spatial position. The accuracy of the spatial effect of the target speaker's voice in the target audio data is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the popularity of video recording and sharing, more and more people use portable devices (such as mobile phones, tablets, etc.) to shoot and share videos. However, the audio recording effect is not ideal when using portable devices to record audio / video. For example, when the device is close to the audio / video protagonist, the voice of the protagonist can be clearly recorded, but the recording cannot cover the entire large scene sound, that is, the recording cannot express the environment in which the protagonist is located. When the device is far away from the protagonist, the video recording can cover the sound of the entire scene, but due to the long distance, the protagonist's voice will be very small or unclear.

[0003] Therefore, how to cover the entire large scene sound and clearly record the voice of the protagonist during audio / video recording has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of this application is to provide an audio processing method, device, electronic device and storage medium, including the following technical solutions:

[0005] An audio processing method, used in an electronic device, comprising:

[0006] Obtaining first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device;

[0007] Obtaining a spatial position of the target speaker relative to the electronic device;

[0008] According to the spatial position, the first audio data is mixed into the second audio data to obtain target audio data; wherein when the target audio data is output, the voice of the target speaker matches the spatial position.

[0009] In the above method, preferably, the second audio data is obtained based on audio data collected by a microphone array of the electronic device;

[0010] The obtaining of the spatial position of the target speaker relative to the electronic device includes:

[0011] The spatial position of the target speaker relative to the electronic device is calculated based on the audio data collected by the microphone array.

[0012] In the above method, preferably, obtaining the spatial position of the target speaker relative to the electronic device includes:

[0013] Acquiring an image of the target speaker;

[0014] The image is processed to determine the spatial position of the target speaker relative to the electronic device.

[0015] In the above method, preferably, mixing the first audio data into the second audio data according to the spatial position comprises:

[0016] determining audio parameters of the first audio data in the electronic device according to the spatial position;

[0017] The first audio data is mixed into the second audio data according to the audio parameters.

[0018] In the above method, preferably, the spatial position includes: the orientation and distance of the target speaker relative to the electronic device;

[0019] The step of determining the audio parameters of the first audio data in the electronic device according to the spatial position includes:

[0020] Determining audio parameters of each audio channel of the first audio data in the second audio data according to the position and distance of the target speaker relative to the electronic device;

[0021] The mixing the first audio data into the second audio data according to the audio parameter comprises:

[0022] Corresponding to each audio channel of the second audio data, the first audio data is mixed into the audio channel according to an audio parameter corresponding to the audio channel.

[0023] In the above method, preferably, the audio parameter includes at least one of the following: sound pressure, phase, and delay.

[0024] In the above method, preferably, the step of obtaining the first audio data of the target speaker includes:

[0025] The first audio data sent by the audio collection device worn by the target speaker is received through a wireless transmission channel.

[0026] An audio processing device, used in electronic equipment, comprising:

[0027] An audio data acquisition module, used to obtain first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device;

[0028] A spatial position obtaining module, used to obtain the spatial position of the target speaker relative to the electronic device;

[0029] A data processing module is used to mix the first audio data into the second audio data according to the spatial position to obtain target audio data; wherein, when the target audio data is output, the voice of the target speaker matches the spatial position.

[0030] An electronic device, comprising:

[0031] Memory, used to store programs;

[0032] The processor is used to call and execute the program in the memory, and implement each step of the audio processing method as described above by executing the program.

[0033] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the audio processing method described in any one of the above items are implemented.

[0034] Through the above scheme, it can be known that the present application provides an audio processing method, device, electronic device and storage medium. After the electronic device obtains the first audio data of the target speaker collected by the audio collection device worn by the target speaker and the second audio data of the environment where the target speaker is located collected by the electronic device, the first audio data is mixed into the second audio data according to the spatial position of the target speaker relative to the electronic device to obtain the target audio data; wherein, when the target audio data is output, the voice of the target speaker matches the spatial position. Since the first audio data is collected by the audio collection device worn by the target speaker, the clarity of the first audio data is guaranteed, and the second audio data is collected by the electronic device, it can be guaranteed that the second audio data covers the entire large scene sound. According to the spatial position of the target speaker relative to the electronic device, after the first audio data is mixed into the second audio data, it is guaranteed that the mixed target audio data can not only cover the entire large scene sound, but also clearly output the voice of the target speaker, and, when the target audio data is output, the voice of the target speaker matches the spatial position, so as to ensure the accuracy of the spatial effect of the target speaker's voice in the target audio data. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A flowchart of an implementation of the audio processing method provided in an embodiment of the present application;

[0037] Figure 2 A flowchart for implementing mixing of first audio data into second audio data according to spatial position provided in an embodiment of the present application;

[0038] Figure 3a A flowchart of an implementation of an audio processing method based on a specific application scenario provided in an embodiment of the present application;

[0039] Figure 3b Provided for the embodiments of this application Figure 3a An example diagram of the relative position relationship between the protagonist and the electronic device in the game;

[0040] Figure 4 A schematic diagram of the structure of a speech processing device provided in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0042] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims and the above drawings are used to distinguish similar parts, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated herein. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] The audio processing method provided in the embodiment of the present application is used in an electronic device, which may be a portable electronic device, such as a smart phone, a tablet computer, etc. The electronic device can collect audio data.

[0045] like Figure 1 As shown, a flowchart of an implementation of the audio processing method provided in an embodiment of the present application may include:

[0046] Step S101: obtaining first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by an electronic device.

[0047] The audio collection device configured by the target speaker can be a wired / wireless headset or a wired / wireless microphone. Since it is worn by the target speaker, the target speaker's voice can be clearly recorded. Compared with the audio collection device worn by the target speaker, the electronic device is farther away from the target speaker, so the electronic device can record the sound of the target speaker's environment (i.e., the sound of the large scene).

[0048] The audio acquisition device can send the first audio data to the electronic device through a wired transmission channel (for example, a universal serial bus, etc.), or the audio acquisition device can send the first audio data to the electronic device through a wireless transmission channel (for example, Bluetooth, WiFi, etc.).

[0049] There can be only one target speaker or multiple target speakers. When there are multiple target speakers, each speaker wears an audio collection device.

[0050] Step S102: Obtaining the spatial position of the target speaker relative to the electronic device.

[0051] The spatial position of the target speaker relative to the electronic device may include at least one of the following: the orientation of the target speaker relative to the electronic device (i.e., the direction of the electronic device in which the target speaker is) and the distance of the target speaker relative to the electronic device (i.e., the distance between the target speaker and the electronic device).

[0052] The spatial position of the target speaker relative to the electronic device may be determined by a camera, or the spatial position of the target speaker relative to the electronic device may be determined by a microphone array.

[0053] When there are multiple target speakers, the spatial position of each target speaker relative to the electronic device is obtained.

[0054] Step S103: according to the above spatial position, the first audio data is mixed into the second audio data to obtain target audio data; wherein, when the target audio data is output, the voice of the target speaker matches the above spatial position.

[0055] When there are multiple target speakers, the first audio data of each target speaker is mixed into the second audio data according to the spatial position of each target speaker relative to the electronic device. That is, for the i-th target speaker, the first audio data of the i-th target speaker is mixed into the second audio data according to the spatial position of the i-th target speaker relative to the electronic device. In other words, when there are multiple target speakers, multiple first audio data will be mixed into the second audio data.

[0056] In addition, when mixing the first audio data into the second audio data, the first audio data and the second audio data can be time-aligned first, for example, based on the fact that the first audio data and the second audio data include the same audio signal (i.e., the words spoken by the target speaker, which are collected by both the audio collection device worn by the user and the microphone on the electronic device), and then, based on the above-mentioned spatial position, the first audio data is mixed into the second audio data.

[0057] In the embodiment of the present application, when the first audio data is mixed into the second audio data, the position of the audio collection device that collects the first audio data relative to the electronic device is taken into consideration, so that after the first audio data is mixed into the second audio data to obtain the target audio data, when the target audio data is output, the voice of the target speaker matches the spatial position of the audio collection device relative to the electronic device, which is specifically embodied as follows: assuming that the target speaker is 5 meters to the left of the electronic device, the target audio data obtained after the first audio data is mixed into the second audio data based on the solution of the present application, when output, makes people still feel that the target speaker is 5 meters to the left of the electronic device. If the spatial position of the audio collection device relative to the electronic device is not taken into consideration, but the first audio data is directly mixed into the second audio data, when the target audio data is output, it is possible to make people sound as if the target speaker is speaking at a position 10 meters above the electronic device.

[0058] Based on the present application, since the first audio data is collected by the audio collection device worn by the target speaker, the clarity of the first audio data is guaranteed, and the second audio data is collected by the electronic device, it can be guaranteed that the second audio data covers the entire large scene sound. According to the spatial position of the target speaker relative to the electronic device, the first audio data is mixed with the second audio data to ensure that the mixed target audio data can cover the entire large scene sound and clearly output the target speaker's voice. Moreover, when the target audio data is output, the target speaker's voice matches the spatial position, thereby ensuring the accuracy of the spatial effect of the target speaker's voice in the target audio data.

[0059] In an optional embodiment, the second audio data may be obtained based on audio data collected by a microphone array (including at least three microphones) of the electronic device.

[0060] Optionally, the second audio data may be 360-degree omnidirectional audio data collected by the electronic device through a microphone array, or may be left and right audio data of the electronic device collected by the microphone array, so that 3D stereo sound can be generated using the collected audio data. The left and right directions refer to the two sides of two parallel sides of the electronic device, for example, the left side refers to the outside of a long side (referred to as the first long side) of the electronic device in landscape mode, and the right side refers to the outside of another long side (referred to as the second long side) parallel to the first long side of the electronic device, or the left side refers to the outside of a short side (referred to as the first short side) of the electronic device in landscape mode, and the right side refers to the outside of another short side (referred to as the second short side) parallel to the first short side of the electronic device.

[0061] Optionally, a first receiving beam can be formed on the left side of the electronic device based on the microphone array, corresponding to the spatial range of the left side, and a second receiving beam can be generated on the right side of the electronic device, corresponding to the spatial range of the right side. Then, based on the first receiving beam, the signal of the sound source on the left side of the electronic device can be focused on, while the signal of the sound source other than the left side of the electronic device can be suppressed. Similarly, based on the second receiving beam, the signal of the sound source on the right side of the electronic device can be focused on, while the signal of the sound source other than the right side of the electronic device can be suppressed, thereby generating 3D stereo sound.

[0062] Optionally, the second audio data may be an audio signal collected directionally by left and right microphones of the electronic device. For example, the left microphone collects audio signals within a 60-degree range that spreads to the left with the left microphone as the center, and the right microphone collects audio signals within a 60-degree range that spreads to the right with the right microphone as the center.

[0063] In an optional embodiment, the method provided further includes determining a target speaker. A microphone array formed by multiple microphones on an electronic device determines a sound source relative to the spatial range of the electronic device, and the sound source may be one or more. The sound localization tracking engine of the electronic device determines the sound source that meets the predetermined condition as the target speaker for localization and tracking (i.e., recording the position change of the sound source that meets the condition) according to a predetermined condition. If the target speaker moves while speaking, the sound localization tracking engine continuously locates and records the target speaker, so that the first audio data collected by the audio collection device worn by the target speaker and subsequently mixed in the second audio data can also correspond to the corresponding part of the first audio data at each changing position in space. When the target audio data is output, the listener can perceive that the target speaker is moving and speaking in space. Among them, the predetermined condition includes at least one of the following: the volume parameter of the sound source exceeds the threshold; the sound quality parameter of the sound source exceeds the threshold; the volume is the largest among multiple sound sources; the sound quality is the best among multiple sound sources, etc.

[0064] Furthermore, the target speaker can also be determined through the camera of the electronic device. For example, during the video recording process, the target speaker is determined by the activated camera or / and the setting parameters (focus) for the activated camera. This is because the camera is aimed at the target speaker in the video recording scene. Specifically, the field of view (FOV) and acquisition direction of each of the multiple cameras integrated on the electronic device are pre-stored. If any camera is activated, the acquisition direction and acquisition range of the activated camera relative to the electronic device can be determined by querying the pre-stored field of view (FOV) and acquisition direction. The acquisition range and acquisition direction of the activated camera serve as indication information of the sound localization tracking engine. The sound localization tracking engine determines the target sound source as the target speaker based on the indication information; or, the sound localization tracking engine determines the sound source that meets the predetermined conditions as the target speaker based on the indication information.

[0065] In order to more accurately determine the target speaker, a more accurate direction and acquisition range can be further determined based on the setting parameters (focus) of the activated camera and the acquisition range and acquisition direction corresponding to the activated camera. The more accurate direction and acquisition range are provided as indication information of the sound positioning tracking engine.

[0066] In an optional embodiment, one implementation method of obtaining the spatial position of the target speaker relative to the electronic device may be:

[0067] The spatial position of the target speaker relative to the electronic device is calculated based on the audio data collected by the microphone array.

[0068] The direction of the target speaker can be identified based on the audio data collected by the microphone array. For example, if the recording protagonist is usually closest to the electronic device, the direction of the sound that meets the conditions can be determined as the direction of the target speaker. Once the direction of the target speaker is determined, the audio signal of the target speaker is also determined. The sound that meets the conditions can be a sound that meets at least one of the following conditions: the loudest volume, the best sound quality, etc.

[0069] Then, based on the time when the target speaker's voice reaches each microphone in the microphone array, the time delay of the target speaker's voice reaching any two microphones is determined. Combined with the position of each microphone in the microphone array and the relative position relationship between the microphones, the position of the target speaker relative to the electronic device can be calculated. Then, based on the position of the target speaker relative to the electronic device and the position of the electronic device, the distance between the target speaker and the electronic device can be determined.

[0070] The above-mentioned solution for obtaining the spatial position of the target speaker relative to the electronic device can be used in an audio recording process or a video recording process.

[0071] In the above embodiment, in the process of identifying the target speaker based on audio data, if the target speaker has someone else (not the recording protagonist) whose voice is louder than the target speaker, the target speaker will be switched to the person next to the target speaker, affecting the audio / video recording. Therefore, in order to avoid this problem, the solution can be further optimized. Optionally,

[0072] During the process of recording audio or video, when a new sound source that meets the conditions is detected, the focus direction of the image acquisition device is determined according to the image captured by the image acquisition device. If the focus direction is the same as the direction of the target speaker relative to the electronic device determined based on the audio data, it is prohibited to switch the target speaker to the new sound source. If the focus direction is different from the direction of the target speaker relative to the electronic device determined based on the audio data, the target speaker is switched to the new sound source. This avoids recording the voice of a person other than the main character.

[0073] In an optional embodiment, another implementation method of obtaining the spatial position of the target speaker relative to the electronic device may be:

[0074] The image of the target speaker (usually the person closest to the camera lens, or a pre-designated person) is collected. The image of the target speaker can be collected based on a binocular camera.

[0075] The image is processed to determine the spatial position of the target speaker relative to the electronic device. Based on the distance between the two cameras in the binocular camera, the focal length of the camera, and the position of the target speaker in the captured image, the distance of the target speaker relative to the electronic device can be determined, and based on the orientation of the camera in the electronic device and the orientation of the electronic device, the direction of the target speaker relative to the electronic device can be determined.

[0076] This method of obtaining the spatial position of the target speaker relative to the electronic device can also be used in the audio recording process, and of course it can also be used in the video recording process. Of course, in the audio recording process, since the user does not care about the video content, the image captured by the camera may not be displayed. Of course, in order to facilitate the user to use the electronic device, the image captured by one of the cameras may be displayed in a small window so that the user can determine who the current recording object is.

[0077] In an optional embodiment, it may also include:

[0078] In the process of recording audio or video, the target speaker can be determined from the speakers within the collection range of the image collection device. Based on this, the image collected by the image collection device can be used to monitor whether the target speaker changes (for example, whether it switches from target speaker A to target speaker B, etc.). When the change of the target speaker is detected, the direction of the changed target speaker relative to the electronic device is determined, and then the first audio data of the direction of the changed target speaker relative to the electronic device and the second audio data of the environment where the target speaker is located are collected to obtain the spatial position of the changed target speaker relative to the electronic device (which can be determined based on the microphone array or the camera). According to the spatial position, the first audio data of the changed target speaker is mixed with the second audio data collected by the electronic device to obtain the target audio data.

[0079] In an optional embodiment, a flowchart of implementing the mixing of the first audio data into the second audio data according to the spatial position is as follows: Figure 2 As shown, it may include:

[0080] Step S201: determining audio parameters of the first audio data in the electronic device according to the above spatial position.

[0081] The audio parameters of the first audio data in the electronic device refer to the audio parameters that the target speaker's voice should have when it is directly collected by the electronic device.

[0082] Optionally, the audio parameter may include but is not limited to at least one of the following: sound pressure, phase, and time delay. Among them, the sound pressure is related to the distance and represents the size of the sound, and the phase and time delay are related to both the distance and the direction and represent the direction of the sound source relative to the electronic device.

[0083] Usually, the audio data in the electronic device is divided into a left audio channel and a right audio channel, so the audio parameters of each audio channel of the first audio data in the second audio data can be determined according to the above spatial position. The audio parameters of each audio channel can include but are not limited to at least one of the several audio parameters listed above.

[0084] Optionally, the audio parameters of each audio channel of the first audio data in the second audio data may be determined according to the position and distance of the target speaker relative to the electronic device.

[0085] The sound pressure of each audio channel in the second audio data when the first audio data reaches the second audio data can be determined based on the distance of the target speaker relative to the electronic device and the distance between the two ears of the person (the distance can be the distance between the two ears of a human head model obtained in advance by statistical analysis of several people), wherein the greater the distance between the sound source and the human ear, the smaller the sound pressure, and the farther the distance between the sound source and the human ear, the greater the sound pressure; the phase and time delay of each audio channel in the second audio-visual data when the sound of the target speaker reaches the electronic device can be determined based on the distance and orientation of the target speaker relative to the electronic device.

[0086] Step S202: Mixing the first audio data into the second audio data according to the audio parameters.

[0087] Optionally, corresponding to each audio channel of the second audio data, the first audio data is mixed into the audio channel according to an audio parameter corresponding to the audio channel.

[0088] like Figure 3a-3b As shown, Figure 3a A flowchart of an implementation of an audio processing method based on a specific application scenario provided in an embodiment of the present application, Figure 3b Provided for the embodiments of this application Figure 3a An example diagram of the relative position relationship between the protagonist and the electronic device in the video is shown. In this example, a multi-person activity scene is filmed outdoors. In this scene, the protagonist (i.e., the person closest to the camera of the electronic device) wears a Bluetooth headset to give a dialogue, while an electronic device (at a certain distance from the protagonist) with a microphone array composed of multiple microphones (in this example, 3 mics, i.e., mic1, mic2, mic3) records the video of the activity scene. In this example, the three microphones are used to record scene sounds (usually 3D sounds) and to locate the protagonist. The sound tracking and positioning engine can be used to obtain the protagonist's positioning information (i.e., the protagonist's spatial position relative to the electronic device), and the automatic mixing engine can mix the dialogue sound into the large scene 3D sound based on the protagonist's positioning information.

[0089] Of course, the embodiments of the present application are not only applicable to outdoor scenes, but also to indoor scenes, not only to multi-person scenes, but also to scenes with only one person and noisy surroundings (for example, a person recording a video outdoors on a rainy day, etc.).

[0090] Corresponding to the method embodiment, the embodiment of the present application further provides a speech processing device. A structural schematic diagram of the speech processing device provided by the embodiment of the present application is as follows: Figure 4 As shown, it may include:

[0091] Audio data acquisition module 401, spatial position acquisition module 402 and data processing module 403; wherein,

[0092] The audio data acquisition module 401 is used to obtain first audio data of a target speaker and second audio data of the environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device;

[0093] The spatial position obtaining module 402 is used to obtain the spatial position of the target speaker relative to the electronic device;

[0094] The data processing module 403 is used to mix the first audio data into the second audio data according to the spatial position to obtain target audio data; wherein, when the target audio data is output, the voice of the target speaker matches the spatial position.

[0095] The audio processing device provided in the embodiment of the present application ensures the clarity of the first audio data because the first audio data is collected by the audio collection device worn by the target speaker, and the second audio data is collected by the electronic device, which can ensure that the second audio data covers the entire large scene sound. According to the spatial position of the target speaker relative to the electronic device, after the first audio data is mixed with the second audio data, it is ensured that the mixed target audio data can cover the entire large scene sound and can clearly output the target speaker's voice. Moreover, when the target audio data is output, the target speaker's voice matches the spatial position, thereby ensuring the accuracy of the spatial effect of the target speaker's voice in the target audio data.

[0096] In an optional embodiment, the second audio data is obtained according to audio data collected by a microphone array of the electronic device;

[0097] The spatial position acquisition module is specifically used for:

[0098] The spatial position of the target speaker relative to the electronic device is calculated based on the audio data collected by the microphone array.

[0099] In an optional embodiment, the spatial position obtaining module is specifically used for:

[0100] Acquiring an image of the target speaker;

[0101] The image is processed to determine the spatial position of the target speaker relative to the electronic device.

[0102] In an optional embodiment, the data processing module is specifically used for:

[0103] determining audio parameters of the first audio data in the electronic device according to the spatial position;

[0104] The first audio data is mixed into the second audio data according to the audio parameters.

[0105] In an optional embodiment, the spatial position includes: the orientation and distance of the target speaker relative to the electronic device;

[0106] When determining the audio parameters of the first audio data in the electronic device according to the spatial position, the spatial position obtaining module is used to:

[0107] Determining audio parameters of each audio channel of the first audio data in the second audio data according to the position and distance of the target speaker relative to the electronic device;

[0108] When the data processing module mixes the first audio data into the second audio data according to the audio parameter, it is used to:

[0109] Corresponding to each audio channel of the second audio data, the first audio data is mixed into the audio channel according to an audio parameter corresponding to the audio channel.

[0110] In an optional embodiment, the audio parameter includes at least one of the following: sound pressure, phase, and time delay.

[0111] In an optional embodiment, when obtaining the first audio data of the target speaker, the audio data obtaining module is used to:

[0112] The first audio data sent by the audio collection device worn by the target speaker is received through a wireless transmission channel.

[0113] Corresponding to the method embodiment, the present application also provides an electronic device, a structural schematic diagram of the electronic device is shown as follows Figure 5 As shown, it may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0114] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0115] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application, etc.;

[0116] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0117] The memory 3 stores a program, and the processor 1 can call the program stored in the memory 3, and the program is used to:

[0118] Obtaining first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device;

[0119] Obtaining a spatial position of the target speaker relative to the electronic device;

[0120] According to the spatial position, the first audio data is mixed into the second audio data to obtain target audio data; wherein when the target audio data is output, the voice of the target speaker matches the spatial position.

[0121] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0122] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0123] Obtaining first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device;

[0124] Obtaining a spatial position of the target speaker relative to the electronic device;

[0125] According to the spatial position, the first audio data is mixed into the second audio data to obtain target audio data; wherein when the target audio data is output, the voice of the target speaker matches the spatial position.

[0126] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0127] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0128] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0131] It should be understood that in the embodiments of the present application, the various embodiments and features can be combined with each other to solve the aforementioned technical problems.

[0132] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0133] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An audio processing method, used in an electronic device, the method comprising: Obtaining first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device; Obtaining a spatial position of the target speaker relative to the electronic device; According to the spatial position, the first audio data is mixed into the second audio data to obtain target audio data; wherein when the target audio data is output, the voice of the target speaker matches the spatial position.

2. The method according to claim 1, wherein the second audio data is obtained according to audio data collected by a microphone array of the electronic device; The obtaining of the spatial position of the target speaker relative to the electronic device includes: The spatial position of the target speaker relative to the electronic device is calculated based on the audio data collected by the microphone array.

3. The method according to claim 1 or 2, wherein obtaining the spatial position of the target speaker relative to the electronic device comprises: Acquiring an image of the target speaker; The image is processed to determine the spatial position of the target speaker relative to the electronic device.

4. The method according to claim 1, wherein mixing the first audio data into the second audio data according to the spatial position comprises: determining audio parameters of the first audio data in the electronic device according to the spatial position; The first audio data is mixed into the second audio data according to the audio parameters.

5. The method according to claim 4, wherein the spatial position comprises: The position and distance of the target speaker relative to the electronic device; The step of determining the audio parameters of the first audio data in the electronic device according to the spatial position includes: Determining audio parameters of each audio channel of the first audio data in the second audio data according to the position and distance of the target speaker relative to the electronic device; The mixing the first audio data into the second audio data according to the audio parameter comprises: Corresponding to each audio channel of the second audio data, the first audio data is mixed into the audio channel according to an audio parameter corresponding to the audio channel. The method according to claim 4 , wherein the audio parameter comprises at least one of the following: sound pressure, phase, and delay.

7. The method according to claim 1, wherein obtaining the first audio data of the target speaker comprises: The first audio data sent by the audio collection device worn by the target speaker is received through a wireless transmission channel.

8. An audio processing device, used in an electronic device, the device comprising: An audio data acquisition module, used to obtain first audio data of a target speaker and second audio data of an environment in which the target speaker is located; wherein the first audio data is collected by an audio collection device worn by the target speaker, and the second audio data is collected by the electronic device; A spatial position obtaining module, used to obtain the spatial position of the target speaker relative to the electronic device; A data processing module is used to mix the first audio data into the second audio data according to the spatial position to obtain target audio data; wherein, when the target audio data is output, the voice of the target speaker matches the spatial position.

9. An electronic device, comprising: Memory, used to store programs; A processor is used to call and execute the program in the memory, and implement the various steps of the audio processing method as described in any one of claims 1 to 7 by executing the program.

10. A readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the audio processing method according to any one of claims 1 to 7 are implemented.