WO2024088135A1 - Audio processing method, audio playback device, and computer readable storage medium - Google Patents

Audio processing method, audio playback device, and computer readable storage medium Download PDF

Info

Publication number
WO2024088135A1
WO2024088135A1 PCT/CN2023/125219 CN2023125219W WO2024088135A1 WO 2024088135 A1 WO2024088135 A1 WO 2024088135A1 CN 2023125219 W CN2023125219 W CN 2023125219W WO 2024088135 A1 WO2024088135 A1 WO 2024088135A1
Authority
WO
WIPO (PCT)
Prior art keywords
playback device
audio playback
angle
user
audio
Prior art date
Application number
PCT/CN2023/125219
Other languages
French (fr)
Chinese (zh)
Inventor
黎镭
郑进聪
Original Assignee
安克创新科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 安克创新科技股份有限公司 filed Critical 安克创新科技股份有限公司
Publication of WO2024088135A1 publication Critical patent/WO2024088135A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups

Definitions

  • the present application relates to the field of audio processing, and in particular to an audio processing method, an audio playback device, and a computer-readable storage medium.
  • Signals processed by the sound localization algorithm can simulate various spatial auditory effects.
  • the virtual speaker is the virtual sound source processed by the sound effect function, and the position of the virtual speaker is the position of the virtual sound source after the sound effect function is processed. Audio that has not been processed by the sound effect function does not show the spatial sound effect provided by the virtual speaker, but rather shows the sound effect in the head, that is, the listener feels the effect of the audio being played in the ear. Current sound effect processing cannot be flexibly adjusted according to the user's movement.
  • the present application mainly provides an audio processing method, an audio playback device and a computer-readable storage medium, which solves the problem in the prior art that the sound effect processing cannot be flexibly adjusted according to the movement of the user.
  • the first aspect of the present application provides an audio processing method, comprising: obtaining audio data to be processed from an audio playback device; wherein the audio playback device moves with the user; obtaining the positional relationship between the audio playback device and a preset reference point; wherein the preset reference point is determined based on the average distance between the audio playback device and the ground plane within a set time; based on the positional relationship, adjusting the position parameters between the audio playback device and at least one preset virtual speaker in a preset sound effect function so that the deviation of the at least one virtual speaker from the preset reference point in the vertical direction does not exceed a set deviation threshold; wherein the position parameters at least include a depression angle or elevation angle of the audio playback device relative to the at least one virtual speaker; after converting the audio data to be processed into data to be played using the sound effect function, controlling the audio playback device to play the data to be played.
  • the second aspect of the present application provides an audio playback device, the audio playback device comprising
  • the method comprises a processor and a memory coupled to each other; the memory stores a computer program, and the processor is used to execute the computer program to implement the steps of the audio processing method provided in the first aspect above.
  • the third aspect of the present application provides a computer-readable storage medium, which stores program data.
  • program data When the program data is executed by a processor, the steps of the audio processing method provided in the first aspect are implemented.
  • the beneficial effect of the present application is as follows: different from the prior art, the present application first obtains the audio data to be processed of the audio playback device, wherein the audio playback device moves with the user; then obtains the positional relationship between the audio playback device and a preset reference point, wherein the preset reference point is determined according to the average distance between the audio playback device and the ground plane within a set time, and then adjusts the position parameters between the audio playback device and the preset virtual speaker in the preset sound effect function based on the positional relationship, so that the deviation of the virtual speaker from the preset reference point in the vertical direction does not exceed the set deviation threshold, wherein the position parameters at least include the depression angle or elevation angle of the audio playback device relative to the virtual speaker, and finally, after converting the audio data to be processed into data to be played using the sound effect function, the audio playback device is controlled to play the data to be played.
  • the above method adjusts the position parameters in the sound effect function according to the change in the positional relationship between the audio playback device and the preset reference point as the audio playback device follows the movement of the user, and at least adjusts the pitch or elevation angle of the audio playback device relative to the virtual speaker. That is, in the process of the audio playback device following the movement of the user, the pitch and elevation angle of the virtual speaker relative to the user can be adjusted accordingly, so that the virtual speaker remains near the preset horizontal line and basically does not shake with the vertical shaking of the user, giving the user a virtual reality/augmented reality listening experience.
  • FIG1 is a schematic block diagram of a process of an audio processing method according to an embodiment of the present application.
  • FIG2 is a schematic diagram of an embodiment of the positional relationship between the audio playback device and a preset reference point of the present application
  • FIG3 is a plan view of an embodiment of the relative position relationship between the audio playback device and the virtual speaker of the present application
  • FIG4 is a schematic diagram of an embodiment of the positional relationship between the audio playback device and the virtual speaker in three-dimensional space of the present application
  • FIG5 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker according to an embodiment of the present application
  • FIG6 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker according to another embodiment of the present invention.
  • FIG7 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker according to another embodiment of the present application.
  • FIG8 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker in an embodiment of the present invention during accelerated linear movement;
  • FIG9 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker in an embodiment of the present invention during deceleration and linear movement;
  • FIG10 is a schematic diagram of the position relationship of a user's head rotation according to an embodiment of the present application.
  • FIG11 is a schematic diagram of the position relationship of another embodiment of the user's head rotation of the present application.
  • FIG12 is a schematic block diagram of the structure of an audio playback device according to an embodiment of the present application.
  • FIG13 is a schematic block diagram of the structure of another embodiment of the audio playback device of the present application.
  • FIG. 14 is a schematic block diagram of the structure of an embodiment of a computer-readable storage medium of the present application.
  • first and second in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • the features defined as “first” and “second” can explicitly or implicitly include at least one of the features.
  • the meaning of “multiple” is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
  • the terms “including” and “having” and any of their variations are intended to cover non-exclusive inclusions.
  • a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
  • FIG. 1 is a flowchart of an embodiment of the audio processing method of the present application. It should be noted that if there is substantially the same result, the present embodiment is not limited to the sequence of the process shown in FIG. 1 .
  • the present embodiment includes the following steps:
  • Step S11 obtaining the audio data to be processed from the audio playback device, and the audio playback device moves with the user.
  • the audio playback devices referred to in this article include but are not limited to wired headphones, wireless wearable devices, such as wireless headphones (headphones)
  • the audio playback device can establish a wired or wireless communication connection with the audio source device to receive the audio data to be processed from the audio source device.
  • the sound source device can be a wearable sound source device such as a mobile phone, a tablet computer, or a watch or bracelet.
  • the sound source device can store local audio data, or can obtain audio data through the network in an application or web page as audio data to be processed.
  • the audio data to be processed includes but is not limited to music audio data, e-book audio data, TV/movie audio, etc.
  • Step S12 Acquire the positional relationship between the audio playback device and a preset reference point.
  • the positional relationship between the audio playback device and the preset reference point may be a vertical moving direction and a vertical moving distance of the audio playback device relative to the preset reference point.
  • the vertical movement direction of the audio playback device relative to a preset reference point includes a vertical upward movement direction and a vertical downward movement direction.
  • the preset reference point is a point determined according to a reference horizontal plane, and moves along with the movement of the audio playback device. During the movement of the audio playback device, the horizontal distance between the preset reference point and the audio playback device is fixed.
  • the reference horizontal plane where the preset reference point is located is determined according to the average distance between the audio playback device and the ground plane within the set time. Specifically, the vertical movement distance between the audio playback device and the ground can be obtained at preset intervals. If the fluctuation amplitude of the vertical movement distance within the set time is less than the preset fluctuation amplitude, the average of the vertical movement distance within the set time can be determined as the average distance, and the preset reference point is determined based on the average distance and the sound effect function. Among them, the fluctuation amplitude of the vertical movement distance is determined according to the difference between the maximum value and the minimum value of the vertical movement distance obtained within the set time.
  • This step may include obtaining the positional relationship between the audio playback device and the preset reference point by detecting the vertical movement direction and movement distance of the audio playback device relative to the preset reference point.
  • the vertical movement direction of the audio playback device relative to the preset reference point includes upward movement and downward movement.
  • At least one of a gyroscope, an accelerometer, an ultra-wideband wireless communication positioning device, and a global positioning system can be used to detect the vertical moving direction and moving distance of the audio playback device relative to the reference horizontal plane.
  • the ultra-wideband wireless communication positioning technology uses the TOF (time difference of flight) principle for ranging, has the advantages of strong penetration, good anti-multipath effect, and can provide precise positioning accuracy, and is suitable for positioning, tracking and navigation of indoor stationary or moving objects.
  • FIG 2 is a schematic diagram of an embodiment of the positional relationship between the audio playback device and the preset reference point of the present application.
  • O represents the center point of the audio playback device
  • a and B are the positions of two preset reference points respectively.
  • the virtual speakers are respectively located on the preset reference points.
  • Step S13 adjusting the position parameters between the audio playback device and at least one preset virtual speaker in the preset sound effect function based on the position relationship, so that the deviation between the virtual speaker and the preset reference point in the vertical direction does not exceed a set deviation threshold.
  • HRTF Head Related Transfer Functions
  • ATF anatomical transfer function
  • the number of virtual speakers is at least one, for example, 1, 2 or more, and those skilled in the art may set the number as needed, and no further limitation is imposed here.
  • the head-related transfer function describes the transmission process of sound waves from the sound source to the two ears, which comprehensively considers the time difference of sound waves propagating from the sound source to the two ears, the binaural sound level difference caused by the shadow and scattering of the head on the sound waves when the sound source is not in the mid-vertical plane, the scattering and diffraction of sound waves by the human physiological structure (such as the head, auricle, and trunk, etc.), the dynamic factors and psychological factors that cause positioning confusion when the sound source is in the upper and lower or front and back mirror positions and in the mid-vertical plane.
  • various spatial auditory effects can be virtualized by retransmitting the signal processed by HRTF using headphones or speakers.
  • the virtual speaker is the virtual sound source processed by the sound effect function
  • the position of the virtual speaker is the position of the virtual sound source processed by the sound effect function.
  • the audio that has not been processed by the sound effect function does not show the virtual speaker, but is directly presented as the original audio.
  • the position parameter at least includes the depression angle or elevation angle of the audio playback device relative to the virtual speaker.
  • Figure 3 is a plan view of an embodiment of the relative position relationship between the audio playback device and the virtual speaker of the present application.
  • the depression angle between the center point O of the audio playback device and the virtual speaker C is ⁇
  • the elevation angle between the center point O of the audio playback device and the virtual speaker D is ⁇ .
  • the head-related transfer function can be simply expressed as HRTF (L, ⁇ 1, ⁇ 2), where ⁇ 1 represents the angle between the audio playback device and the virtual speaker in the horizontal direction, ⁇ 2 represents the depression angle or elevation angle between the audio playback device and the virtual speaker (that is, the angle between the audio playback device and the virtual speaker in the vertical direction, for example, when the virtual speaker is located above the audio playback device in the vertical direction, the vertical angle between the audio playback device and the virtual speaker is the elevation angle, and when the virtual speaker is located below the audio playback device in the vertical direction, the vertical angle between the audio playback device and the virtual speaker is the depression angle), and L is the distance parameter between the audio playback device and the virtual speaker.
  • the pitch angle or elevation angle of the audio playback device relative to at least one virtual speaker can be determined based on the vertical movement distance and vertical movement direction of the audio playback device relative to a preset reference point, and the preset horizontal distance between the audio playback device and at least one virtual speaker.
  • the vertical angle between the audio playback device and the virtual speaker can be determined as a depression angle or an elevation angle according to the vertical movement direction of the audio playback device relative to the preset reference point.
  • the vertical angle between the audio playback device and the virtual speaker is determined to be a depression angle
  • the vertical angle between the audio playback device and the virtual speaker is determined to be a depression angle
  • the vertical angle between the audio playback device and the virtual speaker is determined to be the depression angle.
  • the angle value of the depression or elevation angle of the audio playback device relative to at least one virtual speaker can be determined based on the vertical movement distance of the audio playback device relative to a preset reference point, and the preset horizontal distance between the audio playback device and at least one virtual speaker.
  • the distance parameter L and the horizontal angle ⁇ 1 are preset fixed values.
  • the audio playback device is represented as O in the figure, and the coordinate system Oxyz represents the coordinate system where the audio playback device is located. It is defined that the direction indicated by the x-axis is directly in front of it, the direction indicated by the z-axis is directly above it, and the direction indicated by the y-axis is directly to the left.
  • the angle ⁇ 1 of the left virtual speaker A from the center line directly in front of the audio playback device is 60 degrees. The same is true for the right virtual speaker B under the principle of symmetry.
  • the angle between the two virtual speakers is 120 degrees, and the distance and horizontal angle between the two virtual speakers and the audio playback device remain unchanged.
  • the pitch angle or elevation angle between the virtual speaker and the audio playback device will change with the shaking. For example, when shaking downward, the angle ⁇ 2 between the left virtual speaker A and the right virtual speaker B changes to an elevation angle of 30 degrees. Then the sound effect function corresponding to the left virtual speaker A is transformed into HRTF (-L, 60°, elevation angle 30 degrees), and the sound effect function corresponding to the right virtual speaker B is transformed into HRTF (+L, 60°, elevation angle 30 degrees), where the positive and negative signs are used to indicate the left and right positions of the virtual speakers relative to the audio playback device.
  • the depression angle or elevation angle is determined according to the following formula:
  • represents the pitch angle or elevation angle
  • l1 is the vertical moving distance of the audio playback device relative to the reference horizontal plane
  • l2 is the horizontal distance between the audio playback device and a virtual speaker.
  • the deviation between the virtual speaker and the preset reference point in the vertical direction may be the numerical distance between the virtual speaker generated after the sound effect processing and the corresponding preset reference point.
  • the complementary angle or complementary angle of the depression angle or elevation angle can be calculated based on the trigonometric function relationship and the known vertical movement distance between the audio playback device and the reference horizontal plane and the horizontal distance between the audio playback device and the virtual speaker, and then the depression angle or elevation angle can be obtained.
  • the same approach can also be applied to multi-channel audio sources. Limited by the Bluetooth transmission protocol, the audio that headphones can transmit now is all stereo audio. The industry can use upmix algorithms to reconstruct audio files from stereo to multi-channel (such as 5.1, etc.). In addition, the deep learning instrument separation method can be used to decompose stereo music files into music files covering different instruments. Multi-channel file. It can be understood that a multi-channel sound source can correspond to more than two virtual speakers. This method can also imitate the above method to set the distance parameters between each virtual speaker and the audio playback device according to actual needs, and determine the depression angle or elevation angle between each virtual speaker and the audio playback device according to the above implementation method, and then update the corresponding sound effect function.
  • step S13 it is possible to further determine whether the depression angle or elevation angle between the current position of the audio playback device and the virtual speaker exceeds a set depression angle threshold or elevation angle threshold.
  • the depression angle or elevation angle corresponding to all virtual speakers of the audio playback device is updated to 0° to obtain an updated sound effect function.
  • the audio playback device After converting the audio data to be processed into data to be played using the updated sound effect function, the audio playback device is controlled to play the data to be played (i.e., return to the sound effect shown in state 1), or the audio playback device is controlled to directly play the audio data to be processed, i.e., the audio data to be processed is not processed using the sound effect function.
  • the timing starts from the moment when the current depression angle or elevation angle is calculated, and the maintenance time of the actual depression angle or elevation angle is determined. If there is an actual depression angle or elevation angle between at least one virtual speaker and the audio playback device that is maintained for more than a set time within the set angle range determined by the current depression angle or elevation angle, the depression angle or elevation angle is updated to 0° to obtain an updated sound effect function.
  • the audio playback device is controlled to play the data to be played (i.e., return to the sound effect shown in state a), or the audio playback device is controlled to directly play the audio data to be processed (i.e., the audio data to be processed is not processed using the sound effect function). For example, after the user changes from a sitting position to a standing position, or from a standing position to a sitting position, etc., the sound effect can be moved back to the vicinity of the head within a set time.
  • the actual depression angle or elevation angle between the virtual speaker and the audio playback device can be detected in real time according to the above-mentioned implementation method, and the vertical movement distance and vertical movement direction are calculated in real time.
  • the set angle range determined by the current depression angle or elevation angle can be generated according to the set rules.
  • the set angle range is a range of about 5° of the current depression angle or elevation angle.
  • the set angle range can be expressed as: ⁇ -5° ⁇ +5°, where ⁇ represents the current depression angle or elevation angle.
  • the user may also wear the audio playback device to run or do other exercises, and the audio playback device follows the user. Then step S12 may also obtain the motion information of the audio playback device following the user, and step S13 may also adjust at least the horizontal angle parameter in the sound effect function according to the motion information.
  • the motion information at least includes the user's motion trajectory, real-time motion speed, and real-time acceleration; for example, whether the user is accelerating or decelerating in a motion scene, acceleration in an accelerating or decelerating state, turning information, etc.
  • the horizontal angle parameter referred to in this embodiment is the angle relationship between the audio playback device and the virtual speaker in the horizontal direction, specifically refers to the angle between the virtual speaker and the front of the audio playback device.
  • Figure 5 is a schematic diagram of the horizontal angle relationship between the audio playback device and the virtual speaker of an embodiment of the present application.
  • Figures 5 to 7 herein are all the positional relationships between the audio playback device and the virtual speaker in a top-down perspective.
  • the position of the audio playback device is represented as O. It can be understood that the audio playback device is worn by a person and moves together, and O can also be represented as the position of the user.
  • the virtual speakers A and B are respectively located on both sides of the audio playback device O.
  • an x-axis is defined with the audio playback device O as the reference position. The x-axis is directly in front of the audio playback device, and the y-axis is directly to the right of the audio playback device.
  • the xOy plane is the horizontal plane where the audio playback device is located.
  • the horizontal angle parameter between the virtual speaker A and the audio playback device O can be represented by the angle a formed by the line between the virtual speaker A and the audio playback device O and the x-direction.
  • the horizontal angle parameter between the virtual speaker B and the audio playback device O can be represented by the angle b formed by the line between the virtual speaker B and the audio playback device O and the x-axis.
  • the horizontal angle parameters corresponding to angles a and b in the sound effect function can be adjusted according to whether it is accelerated or decelerated, the acceleration in the accelerated or decelerated state, the turning information, etc., so as to adjust the horizontal angle of the virtual speaker that outputs the sound effect relative to the user's head.
  • the horizontal angle parameter is adjusted so that at least one virtual speaker is located in the opposite direction of the moving direction of the audio playback device.
  • the virtual speaker is located in the opposite direction of the moving direction of the audio playback device, that is, the horizontal angle formed by the line between the virtual speaker and the audio playback device and the front of the audio playback device is greater than 90 degrees.
  • the moving direction of the audio playback device is the direction in which the audio playback device follows the user. Please refer to Figures 5 and 6.
  • the x-axis direction is directly in front. If the user's moving direction is the x-axis direction, when accelerated movement is detected, the virtual speaker is adjusted to the opposite direction of the direction indicated by x (that is, adjusted to behind the user).
  • the horizontal angle parameter formed by the connection line between the virtual speakers A and B and the audio playback device O and the x-axis direction is adjusted from the initial a to b. For the user, if the user is currently moving in the direction indicated by x, the virtual speaker is adjusted to behind the user, so that the user has an auditory experience of "throwing the virtual sound source behind him".
  • the horizontal angle parameter and the acceleration of the accelerated movement are in a set linear relationship.
  • the linear relationship between the acceleration and the horizontal angle during accelerated movement can be preset.
  • the horizontal angle parameter can be determined based on the linear relationship between the acceleration and the horizontal angle parameter and the current acceleration value.
  • a correspondence table between the acceleration and the horizontal angle parameter can be determined based on the preset linear relationship. After determining the current acceleration, the horizontal angle parameter corresponding to the current acceleration is searched in the correspondence table. The horizontal angle parameter in the sound effect function is corrected using the found horizontal angle parameter.
  • the correspondence table between the acceleration and the horizontal angle parameter is shown in the following table. The table divides the acceleration into multiple acceleration ranges. Each acceleration value range corresponds to a corresponding horizontal angle parameter. The horizontal angle parameter corresponding to the acceleration range into which the current acceleration falls is used as the sound effect.
  • New horizontal angle parameter in the function is used as the sound effect.
  • the dual virtual speakers in each embodiment of this invention are symmetrically arranged, so in the case of acceleration and deceleration in a straight line, the virtual speakers are symmetrical with respect to the moving direction of the audio playback device, and their horizontal angle parameters remain the same.
  • the same method can also be applied to multi-channel sound sources. It can be understood that a multi-channel sound source can correspond to more than two virtual speakers. This method can also imitate the above method to set the linear relationship between the horizontal angle parameter of each virtual speaker and the acceleration according to actual needs, and no further restrictions are given here.
  • the horizontal angle parameter decreases, and/or, in response to the acceleration of the audio playback device decreasing, the horizontal angle parameter increases.
  • the linear relationship between the acceleration and the horizontal angle parameter during the accelerated movement can be generally expressed as follows: when the audio playback device is detected to be accelerated and the acceleration increases, the virtual speaker goes around behind the user, and the horizontal angle formed by the line between the audio playback device and the virtual speaker and the front of the audio playback device decreases, but is still greater than 90 degrees; when the audio playback device is detected to be accelerated and the acceleration decreases, the horizontal angle formed by the line between the audio playback device and the virtual speaker and the front of the audio playback device increases.
  • Figure 8 shows the change in the positional relationship between the audio playback device and the virtual speaker during the complete acceleration movement of the audio playback device in the x direction from the stationary moment t11 to t12 to t13 to t14 to t15, where O represents the center position of the audio playback device, and A and B are the two virtual speakers under the dual-source sound effect.
  • the speed v increases from 0 to v1
  • the acceleration a1 increases from 0 to the maximum acceleration a1 max
  • the virtual speaker moves from the ear to the back
  • the speed increases from v1 to v max
  • the acceleration a1 decreases from the maximum acceleration a1 max to 0, the horizontal angle formed by the line between the virtual speaker A and the audio playback device O and the front of the audio playback device O, as well as the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device O, both change from small to large, until the speed increases to the
  • the level is adjusted.
  • Angle parameters are set so that the virtual speaker is located in the moving direction of the audio playback device. That is, the horizontal angle formed by the line connecting the virtual speaker and the audio playback device and the front of the audio playback device is less than 90 degrees.
  • the x-axis direction is directly forward. If the user is moving in the x-axis direction, then when deceleration is detected, the virtual speaker is adjusted to the direction indicated by x. The horizontal angle between the lines connecting the virtual speakers A and B and the audio playback device O and the x-axis direction is adjusted from the initial a to c. For the user, if the user is currently moving in the direction indicated by x, the virtual speaker is adjusted to the front of the user, so that the user has an auditory experience of being "left behind" by the virtual sound source, which can prompt the user to speed up and chase the virtual sound source, thereby enhancing the sound effect interaction during movement.
  • the horizontal angle parameter and the acceleration of the decelerated movement are in a set linear relationship.
  • the linear relationship between the acceleration and the horizontal angle parameter during the decelerated movement can be preset.
  • the horizontal angle parameter can be determined based on the linear relationship between the acceleration and the horizontal angle parameter and the current acceleration value; in another embodiment, the correspondence table between the acceleration and the horizontal angle parameter can be determined based on the preset linear relationship. After determining the current acceleration, the horizontal angle parameter corresponding to the current acceleration is searched in the correspondence table, and the horizontal angle parameter in the sound effect function is corrected using the found horizontal angle parameter.
  • the correspondence table between the acceleration and the horizontal angle parameter is shown in the following table, which divides the acceleration into multiple acceleration ranges, and each acceleration value range corresponds to a corresponding horizontal angle parameter.
  • the horizontal angle parameter corresponding to the acceleration range into which the current acceleration falls is used as the new horizontal angle parameter in the sound effect function:
  • the dual virtual speakers are symmetrically arranged here. If the sound effect function corresponds to more than two virtual speakers, the linear relationship between the horizontal angle parameter of each virtual speaker and the acceleration can also be set according to actual needs.
  • the horizontal angle parameter in response to the gradual increase in the absolute value of the acceleration of the audio playback device during deceleration, increases; and/or, in response to the gradual decrease in the absolute value of the acceleration of the audio playback device during deceleration, the horizontal angle parameter decreases.
  • the linear relationship between the acceleration and the horizontal angle parameter during deceleration can be generally expressed as follows: when the audio playback device is detected to be decelerating and the acceleration increases, the virtual speaker moves around in front of the user, and the horizontal angle between the line between the audio playback device and the virtual speaker and the front of the audio playback device increases, but is still less than 90 degrees; when the audio playback device is detected to be accelerating and the acceleration decreases, the line between the audio playback device and the virtual speaker and the audio playback device increases. The horizontal angle in front of the device decreases, and when the acceleration reaches 0, the virtual speaker returns to the ear.
  • Figure 9 shows the change in the positional relationship between the audio playback device and the virtual speaker during the complete deceleration movement of the audio playback device from stationary moment t21 to t22 to t23 to t24 to t25 in the x direction, where O represents the center position of the audio playback device, and A and B are the two virtual speakers under the dual source sound effect.
  • the speed v decreases from the maximum speed v max to v2
  • the acceleration a2 increases from 0 to the maximum acceleration a2 max
  • the virtual speaker moves from the ear to the front of the body
  • the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device both increase from small to large, but are still less than 90 degrees.
  • the speed decreases from v2 to v3
  • the acceleration a2 decreases from the maximum acceleration a2 max to 0,
  • the horizontal angle formed by the line between the virtual speaker A and the audio playback device O and the front of the audio playback device O, and the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device both decrease from large to small, until the acceleration a2 becomes 0, and the virtual speaker returns to the ear.
  • the head rotation angle information detected in real time by the head tracking device set on the audio playback device is obtained; and according to the obtained head rotation angle information and the preset head rotation angle adjustment mechanism, the angle information of each of the at least two virtual speakers is adjusted.
  • the horizontal line connecting the virtual speaker on the left side of the user's head and the user is adjusted to reduce the angle with the user in front
  • the horizontal line connecting the virtual speaker on the right side of the user's head and the user is adjusted to increase the angle with the user in front
  • the horizontal line connecting the virtual speaker on the left side of the user's head and the user is adjusted to increase the angle with the user in front
  • X1, X2, and X3 are the front of the user's head
  • O is the position of the audio playback device and the user
  • the front of the user's head is the direction of X1.
  • this embodiment can adjust the horizontal angle of the virtual speaker relative to the audio playback device according to the acceleration of the audio playback device during acceleration/deceleration or the left and right rotation of the user's head, thereby changing the direction of the virtual speaker. position, enhancing the user's sense of presence.
  • Step S14 After converting the audio data to be processed into the data to be played using the sound effect function, the audio playback device is controlled to play the data to be played.
  • the previous step adjusts the position parameters between the audio playback device and the virtual speaker in the sound effect function to obtain the adjusted sound effect function.
  • This step uses the adjusted sound effect function to convert the audio data to be processed into playback data, and the audio playback device plays it.
  • this embodiment adjusts the position parameters in the sound effect function according to the motion information sensed by the audio playback device as the user moves, so as to adjust the pitch angle or elevation angle between the audio playback device and at least one virtual speaker.
  • the virtual speaker can basically be kept on a preset reference point, that is, the horizontal plane where the virtual speaker is located is basically kept unchanged, forming a sound field that is basically fixed relative to the external environment.
  • the user can perceive that the virtual speaker is basically fixed relative to the reference horizontal line and does not shake with the shaking of the head in the vertical direction, giving the audio a more vivid expression effect.
  • the audio playback device 100 includes an acquisition module 110, a parameter adjustment module 120, and an audio playback module 130, wherein the audio playback device moves with the user, the acquisition module 110 is used to acquire the audio data to be processed of the audio playback device, and to acquire the positional relationship between the audio playback device and a preset reference point; the parameter adjustment module 120 is used to adjust the positional parameters between the audio playback device and the virtual speaker in the sound effect function based on the positional relationship, so that the deviation between the virtual speaker after the audio playback device plays the processed audio and the preset reference point in the vertical direction does not exceed the set deviation threshold; wherein the positional parameters at least include the depression angle or elevation angle of the audio playback device relative to the virtual speaker; the audio playback module 130 is used to convert the audio data to be processed into the data to be played using the sound effect function, and control the audio playback device to play the data to be played.
  • the audio playback device 100 may further include a communication module (not shown), which is used to establish a wired or wireless communication connection with the audio source device to receive the audio data to be processed from the audio source device.
  • a communication module (not shown), which is used to establish a wired or wireless communication connection with the audio source device to receive the audio data to be processed from the audio source device.
  • the sound source device can be a wearable sound source device such as a mobile phone, a tablet computer, or a watch or bracelet.
  • the sound source device can store local audio data, or can obtain audio data through the network in an application or web page as audio data to be processed.
  • the audio data to be processed is, for example, music audio data, e-book audio data, TV/movie audio, etc.
  • the audio playback device 200 includes a processor 210 and a memory 220 coupled to each other, the memory 220 stores a computer program, and the processor 210 is used to execute the computer program to implement the audio processing method described in the above embodiments.
  • the memory 220 can be used to store program data and modules.
  • the processor 210 executes various functional applications and data processing by running the program data and modules stored in the memory 220.
  • the memory 220 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a parameter adjustment function, an audio conversion function, etc.), etc.; the data storage area may store data created according to the use of the audio playback device 200 (such as audio data to be processed, position relationship data, motion information data, etc.), etc.
  • the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 220 may also include a memory controller to provide the processor 210 with access to the memory 220.
  • the disclosed method and device can be implemented in other ways.
  • the various embodiments of the audio playback device 200 described above are only schematic.
  • the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
  • 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 present implementation scheme.
  • 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.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • FIG 14 is a schematic block diagram of the structure of an embodiment of a computer-readable storage medium of the present application.
  • the computer-readable storage medium 300 stores program data 310, and when the program data 310 is executed, the steps of the various embodiments of the audio processing method described above are implemented.
  • the computer-readable storage medium 300 can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Stereophonic System (AREA)

Abstract

An audio processing method, an audio playback device, and a computer-readable storage medium. The method comprises: acquiring audio data to be processed of an audio playback device, the audio playback device moving along with a user (S11); acquiring the positional relationship between the audio playback device and a preset datum point (S12), the preset datum point being determined according to the average distance within a set time between the audio playback device and the ground plane; on the basis of the positional relationship, adjusting a position parameter in a preset sound effect function with regard to the audio playback device and at least one virtual loudspeaker, so that the degree of deviation of the at least one virtual loudspeaker from the preset datum point in the vertical direction does not exceed a set deviation threshold (S13), the position parameter at least comprising the angle of depression or angle of elevation of the audio playback device with respect to the at least one virtual loudspeaker; and converting, by using the sound effect function, said audio data into data to be played, and the audio playback device playing back the data to be played (S14). Such method may adjust the sound effect on the basis of the movement of the users and offers the auditory feelings of virtual reality/augmented reality to the users.

Description

音频处理方法、音频播放设备及计算机可读存储介质Audio processing method, audio playback device and computer readable storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求享有于2022年10月27日提交的名称为“音频处理方法、音频播放设备及计算机可读存储介质”的中国专利申请2022113278541的优先权,该申请的全部内容通过引用并入本文中。This application claims priority to Chinese patent application 2022113278541, filed on October 27, 2022, entitled “Audio processing method, audio playback device and computer-readable storage medium”, the entire contents of which are incorporated herein by reference.
技术领域Technical Field
本申请涉及音频处理领域,特别是涉及一种音频处理方法、音频播放设备及计算机可读存储介质。The present application relates to the field of audio processing, and in particular to an audio processing method, an audio playback device, and a computer-readable storage medium.
背景技术Background technique
音效定位算法处理过的信号,可以虚拟出各种不同的空间听觉效果。虚拟扬声器即为经过音效函数处理后的虚拟音源,虚拟扬声器的位置为经过音效函数处理后虚拟音源位置。未经音效函数处理的音频则不表现出虚拟扬声器提供的空间音效,而是表现为头中音效,也即,听者感受到音频在耳中演奏的效果。目前的音效处理不能根据使用者的运动而灵活调整。Signals processed by the sound localization algorithm can simulate various spatial auditory effects. The virtual speaker is the virtual sound source processed by the sound effect function, and the position of the virtual speaker is the position of the virtual sound source after the sound effect function is processed. Audio that has not been processed by the sound effect function does not show the spatial sound effect provided by the virtual speaker, but rather shows the sound effect in the head, that is, the listener feels the effect of the audio being played in the ear. Current sound effect processing cannot be flexibly adjusted according to the user's movement.
发明内容Summary of the invention
本申请主要提供一种音频处理方法、音频播放设备及计算机可读存储介质,解决了现有技术中音效处理无法根据使用者的移动而灵活调整的问题。The present application mainly provides an audio processing method, an audio playback device and a computer-readable storage medium, which solves the problem in the prior art that the sound effect processing cannot be flexibly adjusted according to the movement of the user.
为解决上述技术问题,本申请第一方面提供了一种音频处理方法,包括:获取音频播放设备的待处理音频数据;其中,所述音频播放设备跟随使用者移动;获取所述音频播放设备与预设基准点之间的位置关系;其中,所述预设基准点根据设定时间内所述音频播放设备与地平面之间的平均距离确定;基于所述位置关系调整预设的音效函数中所述音频播放设备与预设的至少一个虚拟扬声器之间的位置参数,以使所述至少一个虚拟扬声器与所述预设基准点在竖直方向上的偏离度不超过设定偏离阈值;其中,所述位置参数至少包括所述音频播放设备相对于所述至少一个虚拟扬声器的俯角或仰角;利用所述音效函数将所述待处理音频数据转换为待播放数据后,控制所述音频播放设备播放所述待播放数据。To solve the above technical problems, the first aspect of the present application provides an audio processing method, comprising: obtaining audio data to be processed from an audio playback device; wherein the audio playback device moves with the user; obtaining the positional relationship between the audio playback device and a preset reference point; wherein the preset reference point is determined based on the average distance between the audio playback device and the ground plane within a set time; based on the positional relationship, adjusting the position parameters between the audio playback device and at least one preset virtual speaker in a preset sound effect function so that the deviation of the at least one virtual speaker from the preset reference point in the vertical direction does not exceed a set deviation threshold; wherein the position parameters at least include a depression angle or elevation angle of the audio playback device relative to the at least one virtual speaker; after converting the audio data to be processed into data to be played using the sound effect function, controlling the audio playback device to play the data to be played.
为解决上述技术问题,本申请第二方面提供了一种音频播放设备,所述音频播放设备包 括相互耦接的处理器和存储器;所述存储器中存储有计算机程序,所述处理器用于执行所述计算机程序以实现如上述第一方面提供的音频处理方法的步骤。In order to solve the above technical problems, the second aspect of the present application provides an audio playback device, the audio playback device comprising The method comprises a processor and a memory coupled to each other; the memory stores a computer program, and the processor is used to execute the computer program to implement the steps of the audio processing method provided in the first aspect above.
为解决上述技术问题,本申请第三方面提供了一种计算机可读存储介质,计算机可读存储介质存储有程序数据,所述程序数据被处理器执行时,实现上述第一方面提供的音频处理方法的步骤。In order to solve the above technical problems, the third aspect of the present application provides a computer-readable storage medium, which stores program data. When the program data is executed by a processor, the steps of the audio processing method provided in the first aspect are implemented.
本申请的有益效果是:区别于现有技术的情况,本申请首先获取音频播放设备的待处理音频数据,其中,音频播放设备跟随使用者移动;再获取音频播放设备与预设基准点之间的位置关系,其中,预设基准点根据设定时间内音频播放设备与地平面之间的平均距离确定,然后基于位置关系调整预设的音效函数中音频播放设备与预设的虚拟扬声器之间的位置参数,以使虚拟扬声器与预设基准点在竖直方向上的偏离度不超过设定偏离阈值,其中,位置参数至少包括音频播放设备相对于虚拟扬声器的俯角或仰角,最后利用音效函数将待处理音频数据转换为待播放数据后,控制音频播放设备播放待播放数据。上述方式根据音频播放设备跟随使用者移动而与预设基准点之间的位置关系变化调节音效函数中的位置参数,至少调音频播放设备相对于虚拟扬声器的俯角或仰角,也即,在音频播放设备跟随使用者移动的过程中,能够跟随调整虚拟扬声器相对于使用者的俯角和仰角,使得虚拟扬声器保持在预设的水平线上附近,基本不随使用者的竖直晃动而晃动,赋予用户虚拟现实/增强现实的听音感受。The beneficial effect of the present application is as follows: different from the prior art, the present application first obtains the audio data to be processed of the audio playback device, wherein the audio playback device moves with the user; then obtains the positional relationship between the audio playback device and a preset reference point, wherein the preset reference point is determined according to the average distance between the audio playback device and the ground plane within a set time, and then adjusts the position parameters between the audio playback device and the preset virtual speaker in the preset sound effect function based on the positional relationship, so that the deviation of the virtual speaker from the preset reference point in the vertical direction does not exceed the set deviation threshold, wherein the position parameters at least include the depression angle or elevation angle of the audio playback device relative to the virtual speaker, and finally, after converting the audio data to be processed into data to be played using the sound effect function, the audio playback device is controlled to play the data to be played. The above method adjusts the position parameters in the sound effect function according to the change in the positional relationship between the audio playback device and the preset reference point as the audio playback device follows the movement of the user, and at least adjusts the pitch or elevation angle of the audio playback device relative to the virtual speaker. That is, in the process of the audio playback device following the movement of the user, the pitch and elevation angle of the virtual speaker relative to the user can be adjusted accordingly, so that the virtual speaker remains near the preset horizontal line and basically does not shake with the vertical shaking of the user, giving the user a virtual reality/augmented reality listening experience.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。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 ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1是本申请音频处理方法一实施例的流程示意框图;FIG1 is a schematic block diagram of a process of an audio processing method according to an embodiment of the present application;
图2是本申请音频播放设备和预设基准点之间位置关系一实施例的示意图;FIG2 is a schematic diagram of an embodiment of the positional relationship between the audio playback device and a preset reference point of the present application;
图3是本申请音频播放设备与虚拟扬声器之间相对位置关系一实施例的平视图;FIG3 is a plan view of an embodiment of the relative position relationship between the audio playback device and the virtual speaker of the present application;
图4是本申请音频播放设备与虚拟扬声器之间在三维空间上的位置关系一实施例的示意图;FIG4 is a schematic diagram of an embodiment of the positional relationship between the audio playback device and the virtual speaker in three-dimensional space of the present application;
图5是本申请音频播放设备与虚拟扬声器一实施例的位置关系示意图;FIG5 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker according to an embodiment of the present application;
图6是本申请音频播放设备与虚拟扬声器另一实施例的位置关系示意图;FIG6 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker according to another embodiment of the present invention;
图7是本申请音频播放设备与虚拟扬声器又一实施例的位置关系示意图; FIG7 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker according to another embodiment of the present application;
图8是本申请加速直线移动过程中音频播放设备与虚拟扬声器一实施例的位置关系示意图;FIG8 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker in an embodiment of the present invention during accelerated linear movement;
图9是本申请减速直线移动过程中音频播放设备与虚拟扬声器一实施例的位置关系示意图;FIG9 is a schematic diagram of the positional relationship between an audio playback device and a virtual speaker in an embodiment of the present invention during deceleration and linear movement;
图10是本申请使用者头部转动一实施例的位置关系示意图;FIG10 is a schematic diagram of the position relationship of a user's head rotation according to an embodiment of the present application;
图11是本申请使用者头部转动另一实施例的位置关系示意图;FIG11 is a schematic diagram of the position relationship of another embodiment of the user's head rotation of the present application;
图12是本申请音频播放设备一实施例的结构示意框图;FIG12 is a schematic block diagram of the structure of an audio playback device according to an embodiment of the present application;
图13是本申请音频播放设备另一实施例的结构示意框图;FIG13 is a schematic block diagram of the structure of another embodiment of the audio playback device of the present application;
图14是本申请计算机可读存储介质一实施例的结构示意框图。FIG. 14 is a schematic block diagram of the structure of an embodiment of a computer-readable storage medium of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。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.
本申请中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、***、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first" and "second" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解是,本文所描述的实施例可以与其他实施例结合。Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
请参阅图1,图1是本申请音频处理方法一实施例的流程示意框图。需注意的是,若有实质上相同的结果,本实施例并不以图1所示的流程顺序为限。本实施例包括以下步骤:Please refer to FIG. 1 , which is a flowchart of an embodiment of the audio processing method of the present application. It should be noted that if there is substantially the same result, the present embodiment is not limited to the sequence of the process shown in FIG. 1 . The present embodiment includes the following steps:
步骤S11:获取音频播放设备的待处理音频数据,音频播放设备跟随使用者移动。Step S11: obtaining the audio data to be processed from the audio playback device, and the audio playback device moves with the user.
本文所指音频播放设备,包括但不限于有线耳机、无线可穿戴设备,如无线耳机(头戴 式耳机、半入耳式耳机、入耳式耳机等)和无线音频眼镜,音频播放设备可与音源设备建立有线或无线通信连接,以接收来自音源设备的待处理音频数据。The audio playback devices referred to in this article include but are not limited to wired headphones, wireless wearable devices, such as wireless headphones (headphones) In the present invention, the audio playback device can establish a wired or wireless communication connection with the audio source device to receive the audio data to be processed from the audio source device.
例如,音源设备可以是手机、平板电脑以及手表手环等可穿戴音源设备,音源设备可存储有本地音频数据,或者可通过网络在应用程序或网页上获取音频数据作为待处理音频数据,待处理音频数据包括但不限于是音乐音频数据、电子读物音频数据、电视/电影音频等。For example, the sound source device can be a wearable sound source device such as a mobile phone, a tablet computer, or a watch or bracelet. The sound source device can store local audio data, or can obtain audio data through the network in an application or web page as audio data to be processed. The audio data to be processed includes but is not limited to music audio data, e-book audio data, TV/movie audio, etc.
步骤S12:获取音频播放设备与预设基准点之间的位置关系。Step S12: Acquire the positional relationship between the audio playback device and a preset reference point.
其中,音频播放设备与预设基准点之间的位置关系,可以是音频播放设备相对于预设基准点的竖直移动方向和竖直移动距离。The positional relationship between the audio playback device and the preset reference point may be a vertical moving direction and a vertical moving distance of the audio playback device relative to the preset reference point.
音频播放设备相对于预设基准点的竖直移动方向,包括竖直向上的移动方向和竖直向下的移动方向。The vertical movement direction of the audio playback device relative to a preset reference point includes a vertical upward movement direction and a vertical downward movement direction.
其中,预设基准点为根据一基准水平面确定的点,并跟随音频播放设备的移动而移动,在音频播放设备的移动过程中,预设基准点与音频播放设备之间的水平距离固定。The preset reference point is a point determined according to a reference horizontal plane, and moves along with the movement of the audio playback device. During the movement of the audio playback device, the horizontal distance between the preset reference point and the audio playback device is fixed.
预设基准点所在基准水平面根据设定时间内音频播放设备与地平面之间的平均距离确定。具体来说,可每隔预设间隔时间获取音频播放设备与地面之间的竖直移动距离,若在设定时间内竖直移动距离波动幅度小于预设波动幅度,则可确定该设定时间内的竖直移动距离的均值以作为平均距离,基于该平均距离以及音效函数确定出预设基准点。其中,竖直移动距离波动幅度根据该设定时间内获取的竖直移动距离最大值与最小值之间的差值确定。The reference horizontal plane where the preset reference point is located is determined according to the average distance between the audio playback device and the ground plane within the set time. Specifically, the vertical movement distance between the audio playback device and the ground can be obtained at preset intervals. If the fluctuation amplitude of the vertical movement distance within the set time is less than the preset fluctuation amplitude, the average of the vertical movement distance within the set time can be determined as the average distance, and the preset reference point is determined based on the average distance and the sound effect function. Among them, the fluctuation amplitude of the vertical movement distance is determined according to the difference between the maximum value and the minimum value of the vertical movement distance obtained within the set time.
本步骤可包括通过检测音频播放设备相对于预设基准点的竖直移动方向和移动距离,来获得音频播放设备与预设基准点之间的位置关系。音频播放设备相对于预设基准点的竖直移动方向,包括向上移动和向下移动。This step may include obtaining the positional relationship between the audio playback device and the preset reference point by detecting the vertical movement direction and movement distance of the audio playback device relative to the preset reference point. The vertical movement direction of the audio playback device relative to the preset reference point includes upward movement and downward movement.
可利用陀螺仪、加速度计、超宽带无线通信定位仪、全球定位***中的至少一者检测音频播放设备相对于基准水平面的竖直移动方向和移动距离。其中,超宽带无线通信定位技术利用TOF(飞行时差)的原理进行测距,具有穿透力强、抗多径效果好、能提供精确定位精度等优点,适合应用于室内静止或者移动物体的定位跟踪与导航。At least one of a gyroscope, an accelerometer, an ultra-wideband wireless communication positioning device, and a global positioning system can be used to detect the vertical moving direction and moving distance of the audio playback device relative to the reference horizontal plane. Among them, the ultra-wideband wireless communication positioning technology uses the TOF (time difference of flight) principle for ranging, has the advantages of strong penetration, good anti-multipath effect, and can provide precise positioning accuracy, and is suitable for positioning, tracking and navigation of indoor stationary or moving objects.
请参阅图2,图2是本申请音频播放设备和预设基准点之间位置关系一实施例的示意图。图中以O表示音频播放设备的中心点,A、B分别为两个预设基准点的位置。在状态1处,虚拟扬声器分别位于预设基准点上,从状态1到状态2,音频播放设备相对于预设基准点的竖直移动方向为向上移动,音频播放设备的中心点O向上偏离预设基准点A、B所在水平面;从状态2到状态3,音频播放设备相对于预设基准点的竖直移动方向为向下移动,音频播放设备的中心点O向下偏离预设基准点A、B所在水平面。 Please refer to Figure 2, which is a schematic diagram of an embodiment of the positional relationship between the audio playback device and the preset reference point of the present application. In the figure, O represents the center point of the audio playback device, and A and B are the positions of two preset reference points respectively. In state 1, the virtual speakers are respectively located on the preset reference points. From state 1 to state 2, the vertical movement direction of the audio playback device relative to the preset reference point is upward movement, and the center point O of the audio playback device deviates upward from the horizontal plane where the preset reference points A and B are located; from state 2 to state 3, the vertical movement direction of the audio playback device relative to the preset reference point is downward movement, and the center point O of the audio playback device deviates downward from the horizontal plane where the preset reference points A and B are located.
步骤S13:基于位置关系调整预设的音效函数中音频播放设备与预设的至少一个虚拟扬声器之间的位置参数,以使虚拟扬声器与预设基准点在竖直方向上的偏离度不超过设定偏离阈值。Step S13: adjusting the position parameters between the audio playback device and at least one preset virtual speaker in the preset sound effect function based on the position relationship, so that the deviation between the virtual speaker and the preset reference point in the vertical direction does not exceed a set deviation threshold.
此处所提及的音效函数,例如是头相关传输函数(Head Related Transfer Functions,缩写:HRTF),又称为ATF(anatomical transfer function),是一种个性化空间音效算法。The sound effect function mentioned here, for example, Head Related Transfer Functions (HRTF), also known as ATF (anatomical transfer function), is a personalized spatial sound effect algorithm.
虚拟扬声器数量为至少一个,例如是1个、2个及以上,本领域技术人员可按需设置,此处不过多限定。The number of virtual speakers is at least one, for example, 1, 2 or more, and those skilled in the art may set the number as needed, and no further limitation is imposed here.
具体来说,头相关传输函数描述了声波从声源到双耳的传输过程,其综合考虑声波从声源传播到双耳的时间差、声源不在中垂面时因头部对声波的阴影和散射作用造成的双耳声级差、人的生理结构(如头、耳廓以及躯干等)对声波的散射与衍射作用、声源在上下或前后镜像位置以及在中垂面上造成定位混淆的动态因素以及心理因素等。在实际应用中,利用耳机或扬声器重发用HRTF处理过的信号,可以虚拟出各种不同的空间听觉效果。虚拟扬声器即为经过音效函数处理后的虚拟音源,虚拟扬声器的位置为经过音效函数处理后虚拟音源位置,未经音效函数处理的音频不表现出虚拟扬声器,而是直接以原始音频呈现。Specifically, the head-related transfer function describes the transmission process of sound waves from the sound source to the two ears, which comprehensively considers the time difference of sound waves propagating from the sound source to the two ears, the binaural sound level difference caused by the shadow and scattering of the head on the sound waves when the sound source is not in the mid-vertical plane, the scattering and diffraction of sound waves by the human physiological structure (such as the head, auricle, and trunk, etc.), the dynamic factors and psychological factors that cause positioning confusion when the sound source is in the upper and lower or front and back mirror positions and in the mid-vertical plane. In practical applications, various spatial auditory effects can be virtualized by retransmitting the signal processed by HRTF using headphones or speakers. The virtual speaker is the virtual sound source processed by the sound effect function, and the position of the virtual speaker is the position of the virtual sound source processed by the sound effect function. The audio that has not been processed by the sound effect function does not show the virtual speaker, but is directly presented as the original audio.
其中,位置参数至少包括音频播放设备相对于虚拟扬声器的俯角或仰角。请参阅图3,图3为本申请音频播放设备与虚拟扬声器之间相对位置关系一实施例的平视图。音频播放设备中心点O与虚拟扬声器C之间的俯角为α,音频播放设备中心点O与虚拟扬声器D之间的仰角为β。The position parameter at least includes the depression angle or elevation angle of the audio playback device relative to the virtual speaker. Please refer to Figure 3, which is a plan view of an embodiment of the relative position relationship between the audio playback device and the virtual speaker of the present application. The depression angle between the center point O of the audio playback device and the virtual speaker C is α, and the elevation angle between the center point O of the audio playback device and the virtual speaker D is β.
例如,头相关传输函数可简单表示为HRTF(L,θ1,θ2),其中,θ1表示音频播放设备与虚拟扬声器在水平方向上的角度,θ2表示音频播放设备与虚拟扬声器的俯角或仰角(即音频播放设备与虚拟扬声器在竖直方向上的角度,例如虚拟扬声器在竖直方向上位于音频播放设备的上方时,音频播放设备与虚拟扬声器之间的竖直角度为仰角,虚拟扬声器在竖直方向上位于音频播放设备的下方时,音频播放设备与虚拟扬声器之间的竖直角度为俯角),L为音频播放设备与虚拟扬声器之间的距离参数。For example, the head-related transfer function can be simply expressed as HRTF (L, θ1, θ2), where θ1 represents the angle between the audio playback device and the virtual speaker in the horizontal direction, θ2 represents the depression angle or elevation angle between the audio playback device and the virtual speaker (that is, the angle between the audio playback device and the virtual speaker in the vertical direction, for example, when the virtual speaker is located above the audio playback device in the vertical direction, the vertical angle between the audio playback device and the virtual speaker is the elevation angle, and when the virtual speaker is located below the audio playback device in the vertical direction, the vertical angle between the audio playback device and the virtual speaker is the depression angle), and L is the distance parameter between the audio playback device and the virtual speaker.
可选地,可根据音频播放设备相对于预设基准点的竖直移动距离和竖直移动方向,以及预设的音频播放设备相对于至少一个虚拟扬声器之间的水平距离,来确定音频播放设备相对于至少一个虚拟扬声器之间的俯角或仰角。Optionally, the pitch angle or elevation angle of the audio playback device relative to at least one virtual speaker can be determined based on the vertical movement distance and vertical movement direction of the audio playback device relative to a preset reference point, and the preset horizontal distance between the audio playback device and at least one virtual speaker.
其中,可根据音频播放设备相对于预设基准点的竖直移动方向确定音频播放设备相对于虚拟扬声器之间的竖直角度为俯角或仰角。在音频播放设备相对于预设基准点的向上移动至预设基准点上方时,确定音频播放设备相对于虚拟扬声器之间的竖直角度为俯角;在音频播 放设备相对于预设基准点的向下移动至预设基准点下方时,确定音频播放设备相对于虚拟扬声器之间的竖直角度为俯角。The vertical angle between the audio playback device and the virtual speaker can be determined as a depression angle or an elevation angle according to the vertical movement direction of the audio playback device relative to the preset reference point. When the audio playback device moves upward relative to the preset reference point to above the preset reference point, the vertical angle between the audio playback device and the virtual speaker is determined to be a depression angle; when the audio playback device moves upward relative to the preset reference point to above the preset reference point, the vertical angle between the audio playback device and the virtual speaker is determined to be a depression angle; When the audio playback device moves downward relative to the preset reference point to below the preset reference point, the vertical angle between the audio playback device and the virtual speaker is determined to be the depression angle.
其中,可根据音频播放设备相对于预设基准点的竖直移动距离,以及预设的音频播放设备相对于至少一个虚拟扬声器之间的水平距离,来确定音频播放设备相对于至少一个虚拟扬声器之间的俯角或仰角的角度值。Among them, the angle value of the depression or elevation angle of the audio playback device relative to at least one virtual speaker can be determined based on the vertical movement distance of the audio playback device relative to a preset reference point, and the preset horizontal distance between the audio playback device and at least one virtual speaker.
本实施例中,该距离参数L和水平角度θ1是预先设定的固定值。如图4所示,音频播放设备图中表示为O,坐标系Oxyz表示音频播放设备所在的坐标系,定义其正前方为x轴所指方向,正上方为z轴所指方向,正左方为y轴所指方向,左虚拟扬声器A离音频播放设备正前方的中心线的角度θ1为60度,对称原则下右虚拟扬声器B也同理,此情况下,两个虚拟扬声器的夹角为120度,两个虚拟扬声器与音频播放设备之间的距离和水平角度固定不变,虚拟扬声器与音频播放设备之间俯角或仰角才会随着抖动而变化,例如:往下抖动,左虚拟扬声器A和右虚拟扬声器B之间的角度θ2变化为仰角30度,则左虚拟扬声器A对应的音效函数变换为HRTF(-L,60°,仰角30度),右虚拟扬声器B对应的音效函数变换为HRTF(+L,60°,仰角30度),其中正负号用于指代虚拟扬声器相对于音频播放设备的左右方位。In this embodiment, the distance parameter L and the horizontal angle θ1 are preset fixed values. As shown in FIG. 4 , the audio playback device is represented as O in the figure, and the coordinate system Oxyz represents the coordinate system where the audio playback device is located. It is defined that the direction indicated by the x-axis is directly in front of it, the direction indicated by the z-axis is directly above it, and the direction indicated by the y-axis is directly to the left. The angle θ1 of the left virtual speaker A from the center line directly in front of the audio playback device is 60 degrees. The same is true for the right virtual speaker B under the principle of symmetry. In this case, the angle between the two virtual speakers is 120 degrees, and the distance and horizontal angle between the two virtual speakers and the audio playback device remain unchanged. The pitch angle or elevation angle between the virtual speaker and the audio playback device will change with the shaking. For example, when shaking downward, the angle θ2 between the left virtual speaker A and the right virtual speaker B changes to an elevation angle of 30 degrees. Then the sound effect function corresponding to the left virtual speaker A is transformed into HRTF (-L, 60°, elevation angle 30 degrees), and the sound effect function corresponding to the right virtual speaker B is transformed into HRTF (+L, 60°, elevation angle 30 degrees), where the positive and negative signs are used to indicate the left and right positions of the virtual speakers relative to the audio playback device.
在其中一实施例中,俯角或仰角根据下式确定:
In one embodiment, the depression angle or elevation angle is determined according to the following formula:
其中,α表示俯角或仰角,l1为音频播放设备相对于基准水平面之间的竖直移动距离,l2为音频播放设备相对于一个虚拟扬声器之间的水平距离。Wherein, α represents the pitch angle or elevation angle, l1 is the vertical moving distance of the audio playback device relative to the reference horizontal plane, and l2 is the horizontal distance between the audio playback device and a virtual speaker.
虚拟扬声器与预设基准点在竖直方向上的偏离度,可以是音效处理后生成的虚拟扬声器以相应预设基准点之间的数值距离。The deviation between the virtual speaker and the preset reference point in the vertical direction may be the numerical distance between the virtual speaker generated after the sound effect processing and the corresponding preset reference point.
在其他可行的实施方式中,还可先根据三角函数关系及已知的音频播放设备相对于基准水平面之间的竖直移动距离以及音频播放设备相对于虚拟扬声器之间的水平距离计算该俯角或仰角的补角或余角,进而得出该俯角或仰角的方式,均可视为是本申请角度参数的可替换方案,应视为落在本方案请求保护的范围内。In other feasible implementations, the complementary angle or complementary angle of the depression angle or elevation angle can be calculated based on the trigonometric function relationship and the known vertical movement distance between the audio playback device and the reference horizontal plane and the horizontal distance between the audio playback device and the virtual speaker, and then the depression angle or elevation angle can be obtained. These can be regarded as alternative solutions to the angle parameters of the present application and should be regarded as falling within the scope of protection requested by this solution.
同样的方式亦可应用于多声道音源,受限于蓝牙传输协议,现在耳机能传输的音频都是立体声音频,业界可以用upmix上混的算法将音频文件从立体声构建成多声道(如5.1等),另外还可以通过深度学习乐器分离的方法,可以把立体声的音乐文件拆解成涵盖不同乐器的 多声道文件。可以理解地,多声道音源可对应两个以上的虚拟扬声器,此种方式亦可仿照上述方式按照实际需求设置各虚拟扬声器与音频播放设备之间的距离参数,并根据上述实施方式确定各虚拟扬声器与音频播放设备之间的俯角或仰角,进而更新相应的音效函数。The same approach can also be applied to multi-channel audio sources. Limited by the Bluetooth transmission protocol, the audio that headphones can transmit now is all stereo audio. The industry can use upmix algorithms to reconstruct audio files from stereo to multi-channel (such as 5.1, etc.). In addition, the deep learning instrument separation method can be used to decompose stereo music files into music files covering different instruments. Multi-channel file. It can be understood that a multi-channel sound source can correspond to more than two virtual speakers. This method can also imitate the above method to set the distance parameters between each virtual speaker and the audio playback device according to actual needs, and determine the depression angle or elevation angle between each virtual speaker and the audio playback device according to the above implementation method, and then update the corresponding sound effect function.
可选地,在步骤S13之后,还可以进一步判断音频播放设备当前位置相对虚拟扬声器之间的俯角或仰角是否超过设定俯角阈值或仰角阈值,在存在至少一个虚拟扬声器与音频播放设备的当前位置之间的俯角或仰角超过设定俯角阈值或仰角阈值时,更新音频播放设备的所有虚拟扬声器对应的°俯角或仰角为0°以得到更新后的音效函数,利用更新后的音效函数将待处理音频数据转换为待播放数据后,控制音频播放设备播放待播放数据(即,回到状态1所示的音效),或者,控制音频播放设备直接播放待处理音频数据,即,不利用音效函数处理待处理音频数据。Optionally, after step S13, it is possible to further determine whether the depression angle or elevation angle between the current position of the audio playback device and the virtual speaker exceeds a set depression angle threshold or elevation angle threshold. When there is a depression angle or elevation angle between at least one virtual speaker and the current position of the audio playback device that exceeds the set depression angle threshold or elevation angle threshold, the depression angle or elevation angle corresponding to all virtual speakers of the audio playback device is updated to 0° to obtain an updated sound effect function. After converting the audio data to be processed into data to be played using the updated sound effect function, the audio playback device is controlled to play the data to be played (i.e., return to the sound effect shown in state 1), or the audio playback device is controlled to directly play the audio data to be processed, i.e., the audio data to be processed is not processed using the sound effect function.
在其中一实施例中,从计算出当前俯角或仰角的时刻开始计时,确定实际俯角或仰角的维持时间,若存在至少一个虚拟扬声器与音频播放设备之间的实际俯角或仰角在当前俯角或仰角确定的设定角度范围内维持超过设定时间,则更新俯角或仰角为0°以得到更新后的音效函数,利用更新后的音效函数将待处理音频数据转换为待播放数据后,控制音频播放设备播放待播放数据(即,回到状态a所示的音效),或者,控制音频播放设备直接播放待处理音频数据,(即,不利用音效函数处理待处理音频数据),例如,使用者从坐姿转换为站姿后,或从站姿转换为坐姿等姿态转换后,能够在设定时间内将音效移回头部附近。其中,虚拟扬声器与音频播放设备之间的实际俯角或仰角可根据上述实施方式实时检测竖直移动距离和竖直移动方向并实时计算得到。当前俯角或仰角确定的设定角度范围则可根据设定的规则生成,例如,设定角度范围为当前俯角或仰角的5°左右的范围,设定角度范围例如可表示为:φ-5°~φ+5°,其中,φ表示当前俯角或仰角。In one embodiment, the timing starts from the moment when the current depression angle or elevation angle is calculated, and the maintenance time of the actual depression angle or elevation angle is determined. If there is an actual depression angle or elevation angle between at least one virtual speaker and the audio playback device that is maintained for more than a set time within the set angle range determined by the current depression angle or elevation angle, the depression angle or elevation angle is updated to 0° to obtain an updated sound effect function. After the updated sound effect function is used to convert the audio data to be processed into the data to be played, the audio playback device is controlled to play the data to be played (i.e., return to the sound effect shown in state a), or the audio playback device is controlled to directly play the audio data to be processed (i.e., the audio data to be processed is not processed using the sound effect function). For example, after the user changes from a sitting position to a standing position, or from a standing position to a sitting position, etc., the sound effect can be moved back to the vicinity of the head within a set time. Among them, the actual depression angle or elevation angle between the virtual speaker and the audio playback device can be detected in real time according to the above-mentioned implementation method, and the vertical movement distance and vertical movement direction are calculated in real time. The set angle range determined by the current depression angle or elevation angle can be generated according to the set rules. For example, the set angle range is a range of about 5° of the current depression angle or elevation angle. The set angle range can be expressed as: φ-5°~φ+5°, where φ represents the current depression angle or elevation angle.
在其中一场景中,使用者还可佩戴音频播放设备进行跑步等运动,音频播放设备跟随,则步骤S12还可获取音频播放设备跟随使用者的运动信息,步骤S13中还可根据运动信息至少调整音效函数中的水平角度参数。In one of the scenarios, the user may also wear the audio playback device to run or do other exercises, and the audio playback device follows the user. Then step S12 may also obtain the motion information of the audio playback device following the user, and step S13 may also adjust at least the horizontal angle parameter in the sound effect function according to the motion information.
其中,运动信息至少包括使用者的运动轨迹、实时的运动速度、实时的加速度;例如是运动场景下的的加速与否、减速与否、加速或减速状态下的加速度、转弯信息等。Among them, the motion information at least includes the user's motion trajectory, real-time motion speed, and real-time acceleration; for example, whether the user is accelerating or decelerating in a motion scene, acceleration in an accelerating or decelerating state, turning information, etc.
本实施例所指水平角度参数,为音频播放设备与虚拟扬声器在水平方向上的角度关系,具体是指虚拟扬声器与音频播放设备正前方的角度。The horizontal angle parameter referred to in this embodiment is the angle relationship between the audio playback device and the virtual speaker in the horizontal direction, specifically refers to the angle between the virtual speaker and the front of the audio playback device.
请参阅图5,图5是本申请音频播放设备与虚拟扬声器一实施例的水平角度关系示意图。本文图5-图7均为音频播放设备与虚拟扬声器的在俯视视角下的位置关系,本实施例的音 频播放设备所在位置表示为O,可以理解的,音频播放设备被人佩戴一同移动,O也可表示为使用者的位置,虚拟扬声器A、B分别位于音频播放设备O的两侧,本实施例以音频播放设备O为基准位置定义一x方向的坐标轴,x轴即为音频播放设备的正前方,y轴所指为音频播放设备的正右方,xOy平面为音频播放设备所在水平面。音频播放设备被使用者正确佩戴时,x轴方向即为使用者的正前方,音频播放设备的正前方向x轴与使用者的正前方中心轴线重合,则虚拟扬声器A音频播放设备O之间的水平角度参数可以利用虚拟扬声器A与音频播放设备O之间连线与x方向所成角度a表示,同样地,虚拟扬声器B与音频播放设备O之间的水平角度参数可以利用虚拟扬声器B与耳音频播放设备O之间连线与x轴所成角度b表示。Please refer to Figure 5, which is a schematic diagram of the horizontal angle relationship between the audio playback device and the virtual speaker of an embodiment of the present application. Figures 5 to 7 herein are all the positional relationships between the audio playback device and the virtual speaker in a top-down perspective. The position of the audio playback device is represented as O. It can be understood that the audio playback device is worn by a person and moves together, and O can also be represented as the position of the user. The virtual speakers A and B are respectively located on both sides of the audio playback device O. In this embodiment, an x-axis is defined with the audio playback device O as the reference position. The x-axis is directly in front of the audio playback device, and the y-axis is directly to the right of the audio playback device. The xOy plane is the horizontal plane where the audio playback device is located. When the audio playback device is correctly worn by the user, the x-axis direction is directly in front of the user, and the x-axis in the front direction of the audio playback device coincides with the central axis directly in front of the user. Then, the horizontal angle parameter between the virtual speaker A and the audio playback device O can be represented by the angle a formed by the line between the virtual speaker A and the audio playback device O and the x-direction. Similarly, the horizontal angle parameter between the virtual speaker B and the audio playback device O can be represented by the angle b formed by the line between the virtual speaker B and the audio playback device O and the x-axis.
根据运动信息调整位置参数,可以根据加速与否、减速与否、加速或减速状态下的加速度、转弯信息等调节音效函数中对应于角度a、b的水平角度参数,以调整输出音效的虚拟扬声器相对于使用者头部的水平角度。By adjusting the position parameters according to the motion information, the horizontal angle parameters corresponding to angles a and b in the sound effect function can be adjusted according to whether it is accelerated or decelerated, the acceleration in the accelerated or decelerated state, the turning information, etc., so as to adjust the horizontal angle of the virtual speaker that outputs the sound effect relative to the user's head.
在其中一实施场景中,若运动信息表明音频播放设备跟随使用者加速移动,则调整该水平角度参数,以使得至少一个虚拟扬声器位于音频播放设备移动方向的相反方向上。其中,虚拟扬声器位于音频播放设备移动方向的相反方向上,即,虚拟扬声器与音频播放设备之间的连线,与音频播放设备正前方所成的水平角度大于90度。In one implementation scenario, if the motion information indicates that the audio playback device is moving with the user at an accelerated speed, the horizontal angle parameter is adjusted so that at least one virtual speaker is located in the opposite direction of the moving direction of the audio playback device. The virtual speaker is located in the opposite direction of the moving direction of the audio playback device, that is, the horizontal angle formed by the line between the virtual speaker and the audio playback device and the front of the audio playback device is greater than 90 degrees.
其中,音频播放设备的移动方向,即音频播放设备跟随使用者行进的方向。请结合参阅图5和图6,x轴方向为正前方,若使用者的行进方向为x轴方向,则在检测到加速移动时,则将虚拟扬声器调整到位于x所指的方向的相反方向上(即调整到使用者身后),虚拟扬声器A、B分别与音频播放设备O之间的连线,与x轴方向所成的水平角度参数由初始的a调整为b,对于使用者而言,若使用者当前是面朝x所指的方向运动,即是将虚拟扬声器调整到使用者的身后,使得使用者产生“将虚拟音源甩到了身后”的听觉感受。The moving direction of the audio playback device is the direction in which the audio playback device follows the user. Please refer to Figures 5 and 6. The x-axis direction is directly in front. If the user's moving direction is the x-axis direction, when accelerated movement is detected, the virtual speaker is adjusted to the opposite direction of the direction indicated by x (that is, adjusted to behind the user). The horizontal angle parameter formed by the connection line between the virtual speakers A and B and the audio playback device O and the x-axis direction is adjusted from the initial a to b. For the user, if the user is currently moving in the direction indicated by x, the virtual speaker is adjusted to behind the user, so that the user has an auditory experience of "throwing the virtual sound source behind him".
其中,加速移动情况下,水平角度参数与加速移动的加速度呈设定的线性关系。可预先设定加速移动时加速度与水平角度之间的线性关系,在检测到的运动信息表明音频播放设备加速移动时,则可根据加速度与水平角度参数之间的线性关系和当前加速度值,确定水平角度参数;在另一实施方式中,可根据预先设定的线性关系确定加速度与水平角度参数之间的对应关系表,在确定当前加速度后,在对应关系表中查找对应于当前加速度的水平角度参数,利用查找到的水平角度参数修正音效函数中的水平角度参数,加速度和水平角度参数之间的对应关系表如下表所示,该表将加速度分为多个加速度范围,每个加速度值范围对应一个相应的水平角度参数,将查找到的当前加速度落入的加速度范围对应的水平角度参数作为音效 函数中新的水平角度参数:
Among them, in the case of accelerated movement, the horizontal angle parameter and the acceleration of the accelerated movement are in a set linear relationship. The linear relationship between the acceleration and the horizontal angle during accelerated movement can be preset. When the detected motion information indicates that the audio playback device is accelerating, the horizontal angle parameter can be determined based on the linear relationship between the acceleration and the horizontal angle parameter and the current acceleration value. In another embodiment, a correspondence table between the acceleration and the horizontal angle parameter can be determined based on the preset linear relationship. After determining the current acceleration, the horizontal angle parameter corresponding to the current acceleration is searched in the correspondence table. The horizontal angle parameter in the sound effect function is corrected using the found horizontal angle parameter. The correspondence table between the acceleration and the horizontal angle parameter is shown in the following table. The table divides the acceleration into multiple acceleration ranges. Each acceleration value range corresponds to a corresponding horizontal angle parameter. The horizontal angle parameter corresponding to the acceleration range into which the current acceleration falls is used as the sound effect. New horizontal angle parameter in the function:
可以理解地,本文各实施例双虚拟扬声器对称设置,因此在直行加速减速移动情况下,虚拟扬声器相对于音频播放设备的移动方向为对称的,其水平角度参数保持相同。同样的方式亦可应用于多声道音源,可以理解地,多声道音源可对应两个以上的虚拟扬声器,此种方式亦可仿照上述方式按照实际需求设置各虚拟扬声器的水平角度参数与加速度之间的线性关系,此处不过多限定。It can be understood that the dual virtual speakers in each embodiment of this invention are symmetrically arranged, so in the case of acceleration and deceleration in a straight line, the virtual speakers are symmetrical with respect to the moving direction of the audio playback device, and their horizontal angle parameters remain the same. The same method can also be applied to multi-channel sound sources. It can be understood that a multi-channel sound source can correspond to more than two virtual speakers. This method can also imitate the above method to set the linear relationship between the horizontal angle parameter of each virtual speaker and the acceleration according to actual needs, and no further restrictions are given here.
在其中一实施例中,响应于音频播放设备加速移动的加速度增大,该水平角度参数减小,和/或,响应于音频播放设备加速移动的加速度减小,该水平角度参数增大。具体来说,加速移动时加速度与水平角度参数之间的线性关系大体上可表现为:在检测到音频播放设备加速移动且加速度增大时,虚拟扬声器绕到使用者身后,音频播放设备与虚拟扬声器之间的连线,与音频播放设备正前方所成的水平角度减小,但仍大于90度;在检测到音频播放设备加速移动且加速度减小时,音频播放设备与虚拟扬声器之间的连线,与音频播放设备正前方所成的水平角度增大。In one embodiment, in response to the acceleration of the audio playback device increasing, the horizontal angle parameter decreases, and/or, in response to the acceleration of the audio playback device decreasing, the horizontal angle parameter increases. Specifically, the linear relationship between the acceleration and the horizontal angle parameter during the accelerated movement can be generally expressed as follows: when the audio playback device is detected to be accelerated and the acceleration increases, the virtual speaker goes around behind the user, and the horizontal angle formed by the line between the audio playback device and the virtual speaker and the front of the audio playback device decreases, but is still greater than 90 degrees; when the audio playback device is detected to be accelerated and the acceleration decreases, the horizontal angle formed by the line between the audio playback device and the virtual speaker and the front of the audio playback device increases.
请参阅图8,图8表示在音频播放设备从静止时刻t11到t12到t13到t14到t15时刻的完整的朝向x方向的加速运动过程中,音频播放设备和虚拟扬声器之间的位置关系变化,其中O表示音频播放设备的中心位置,A、B分别是双音源音效下的两个虚拟扬声器。在t11到t12到t13之间,速度v从0增加至v1,加速度a1从0增加至最大加速度a1max,虚拟扬声器从耳边移动到身后,虚拟扬声器A与音频播放设备O之间的连线与音频播放设备O的正前方所成水平角度、以及虚拟扬声器B与音频播放设备O之间的连线与音频播放设备的正前方所成水平角度均由大变小,但仍大于90度;在t13到t14到t15之间,速度从v1增加至vmax,加速度a1从最大加速度a1max减小到0,虚拟扬声器A与音频播放设备O之间的连线与音频播放设备O的正前方所成水平角度、以及虚拟扬声器B与音频播放设备O之间的连线与音频播放设备的正前方所成水平角度均由小变大,直到速度增加到最大速度vmax,加速度a1变为0时,虚拟扬声器回到耳边。Please refer to Figure 8, which shows the change in the positional relationship between the audio playback device and the virtual speaker during the complete acceleration movement of the audio playback device in the x direction from the stationary moment t11 to t12 to t13 to t14 to t15, where O represents the center position of the audio playback device, and A and B are the two virtual speakers under the dual-source sound effect. During t11 to t12 to t13, the speed v increases from 0 to v1, the acceleration a1 increases from 0 to the maximum acceleration a1 max , the virtual speaker moves from the ear to the back, and the horizontal angle formed by the line between the virtual speaker A and the audio playback device O and the front of the audio playback device O, as well as the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device O, both change from large to small, but are still greater than 90 degrees; during t13 to t14 to t15, the speed increases from v1 to v max , the acceleration a1 decreases from the maximum acceleration a1 max to 0, the horizontal angle formed by the line between the virtual speaker A and the audio playback device O and the front of the audio playback device O, as well as the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device O, both change from small to large, until the speed increases to the maximum speed v max , the acceleration a1 becomes 0, and the virtual speaker returns to the ear.
在另一实施场景中,若运动信息表明音频播放设备跟随使用者减速移动,则调整该水平 角度参数,以使得虚拟扬声器位于音频播放设备的移动方向上。即,虚拟扬声器与音频播放设备的连线与音频播放数设备正前方所成的水平角度小于90度。In another implementation scenario, if the motion information indicates that the audio playback device is moving at a slower speed following the user, the level is adjusted. Angle parameters are set so that the virtual speaker is located in the moving direction of the audio playback device. That is, the horizontal angle formed by the line connecting the virtual speaker and the audio playback device and the front of the audio playback device is less than 90 degrees.
请结合参阅图5和图7,x轴方向为正前方,若使用者的行进方向为x轴方向,则在检测到减速移动时,则将虚拟扬声器调整到位于x所指的方向,虚拟扬声器A、B分别与音频播放设备O的连线,与x轴方向所成的水平角度由初始的a调整为c,对于使用者而言,若使用者当前是面朝x所指的方向运动,即是将虚拟扬声器调整到使用者的前面,使得使用者产生被虚拟音源“甩到了身后”的听觉感受,可以促使使用者加速追逐虚拟音源,增强运动中的音效互动。Please refer to Figure 5 and Figure 7. The x-axis direction is directly forward. If the user is moving in the x-axis direction, then when deceleration is detected, the virtual speaker is adjusted to the direction indicated by x. The horizontal angle between the lines connecting the virtual speakers A and B and the audio playback device O and the x-axis direction is adjusted from the initial a to c. For the user, if the user is currently moving in the direction indicated by x, the virtual speaker is adjusted to the front of the user, so that the user has an auditory experience of being "left behind" by the virtual sound source, which can prompt the user to speed up and chase the virtual sound source, thereby enhancing the sound effect interaction during movement.
可选地,水平角度参数与减速移动的加速度呈设定的线性关系。在其中一实施方式中,可预先设定减速移动时加速度与水平角度参数之间的线性关系,在检测到的运动信息表明音频播放设备减速移动时,则可根据加速度与水平角度参数之间的线性关系和当前加速度值,确定水平角度参数;在另一实施方式中,可根据预先设定的线性关系确定加速度与水平角度参数之间的对应关系表,在确定当前加速度后,在对应关系表中查找对应于当前加速度的水平角度参数,利用查找到的水平角度参数修正音效函数中的水平角度参数,加速度和水平角度参数之间的对应关系表如下表所示,该表将加速度分为多个加速度范围,每个加速度值范围对应一个相应的水平角度参数,将查找到的当前加速度落入的加速度范围对应的水平角度参数作为音效函数中新的水平角度参数:
Optionally, the horizontal angle parameter and the acceleration of the decelerated movement are in a set linear relationship. In one embodiment, the linear relationship between the acceleration and the horizontal angle parameter during the decelerated movement can be preset. When the detected motion information indicates that the audio playback device is decelerating, the horizontal angle parameter can be determined based on the linear relationship between the acceleration and the horizontal angle parameter and the current acceleration value; in another embodiment, the correspondence table between the acceleration and the horizontal angle parameter can be determined based on the preset linear relationship. After determining the current acceleration, the horizontal angle parameter corresponding to the current acceleration is searched in the correspondence table, and the horizontal angle parameter in the sound effect function is corrected using the found horizontal angle parameter. The correspondence table between the acceleration and the horizontal angle parameter is shown in the following table, which divides the acceleration into multiple acceleration ranges, and each acceleration value range corresponds to a corresponding horizontal angle parameter. The horizontal angle parameter corresponding to the acceleration range into which the current acceleration falls is used as the new horizontal angle parameter in the sound effect function:
同样地,此处双虚拟扬声器对称设置,若音效函数对应两个以上的虚拟扬声器,亦可按照实际需求设置各虚拟扬声器的水平角度参数与加速度之间的线性关系。Similarly, the dual virtual speakers are symmetrically arranged here. If the sound effect function corresponds to more than two virtual speakers, the linear relationship between the horizontal angle parameter of each virtual speaker and the acceleration can also be set according to actual needs.
在其中一实施例中,响应于音频播放设备减速移动的加速度绝对值逐渐增大,水平角度参数增大;和/或,响应于音频播放设备减速移动的加速度绝对值逐渐减小,水平角度参数减小。具体来说,减速移动时加速度与水平角度参数之间的线性关系大体上可表现为:在检测到音频播放设备减速移动且加速度增大时,虚拟扬声器绕到使用者身前,音频播放设备与虚拟扬声器之间的连线与音频播放设备正前方的水平角度增大,但仍小于90度;在检测到音频播放设备加速移动且加速度减小时,音频播放设备与虚拟扬声器之间的连线与音频播放 设备正前方的水平角度减小,加速度为0时,虚拟扬声器回到耳边。In one embodiment, in response to the gradual increase in the absolute value of the acceleration of the audio playback device during deceleration, the horizontal angle parameter increases; and/or, in response to the gradual decrease in the absolute value of the acceleration of the audio playback device during deceleration, the horizontal angle parameter decreases. Specifically, the linear relationship between the acceleration and the horizontal angle parameter during deceleration can be generally expressed as follows: when the audio playback device is detected to be decelerating and the acceleration increases, the virtual speaker moves around in front of the user, and the horizontal angle between the line between the audio playback device and the virtual speaker and the front of the audio playback device increases, but is still less than 90 degrees; when the audio playback device is detected to be accelerating and the acceleration decreases, the line between the audio playback device and the virtual speaker and the audio playback device increases. The horizontal angle in front of the device decreases, and when the acceleration reaches 0, the virtual speaker returns to the ear.
请参阅图9,图9表示在音频播放设备从静止时刻t21到t22到t23到t24到t25时刻朝向x方向的完整减速运动过程中,音频播放设备和虚拟扬声器之间的位置关系变化,其中O表示音频播放设备的中心位置,A、B分别是双音源音效下的两个虚拟扬声器。在t21到t22到t23之间,速度v从最大速度vmax减小至v2,加速度a2从0增加至最大加速度a2max,虚拟扬声器从耳边移动到身前,虚拟扬声器A与音频播放设备O之间的连线与音频播放设备O的正前方所成水平角度、以及虚拟扬声器B与音频播放设备O之间的连线与音频播放设备的正前方所成水平角度均由小变大,但仍小于90度,在t23到t24到t25之间,速度从v2减小至v3,加速度a2从最大加速度a2max减小到0,虚拟扬声器A与音频播放设备O之间的连线与音频播放设备O的正前方所成水平角度、以及虚拟扬声器B与音频播放设备O之间的连线与音频播放设备的正前方所成水平角度均由大减小,直到加速度a2变为0时,虚拟扬声器回到耳边。Please refer to Figure 9, which shows the change in the positional relationship between the audio playback device and the virtual speaker during the complete deceleration movement of the audio playback device from stationary moment t21 to t22 to t23 to t24 to t25 in the x direction, where O represents the center position of the audio playback device, and A and B are the two virtual speakers under the dual source sound effect. Between t21 to t22 to t23, the speed v decreases from the maximum speed v max to v2, the acceleration a2 increases from 0 to the maximum acceleration a2 max , the virtual speaker moves from the ear to the front of the body, the horizontal angle formed by the line between the virtual speaker A and the audio playback device O and the front of the audio playback device O, and the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device both increase from small to large, but are still less than 90 degrees. Between t23 to t24 to t25, the speed decreases from v2 to v3, the acceleration a2 decreases from the maximum acceleration a2 max to 0, the horizontal angle formed by the line between the virtual speaker A and the audio playback device O and the front of the audio playback device O, and the horizontal angle formed by the line between the virtual speaker B and the audio playback device O and the front of the audio playback device both decrease from large to small, until the acceleration a2 becomes 0, and the virtual speaker returns to the ear.
可选地,当检测到使用者的头部在左右转动时,即,检测到音频播放设备在左右转动时,获取设置在音频播放设备上的头部跟踪装置实时检测到的头部转动角度信息;并根据获取到的头部转动角度信息,以及预设的头部转动角度调整机制,调整至少两个虚拟扬声器各自的角度信息。具体来说,在获取到使用者头部向左边转动时,调整使用者头部左边的虚拟扬声器和使用者的水平连线,与使用者正前方的角度减小,并调整使用者头部右边的虚拟扬声器和使用者的水平连线,与使用者正前方的角度增大;在获取到使用者头部向右边转动时,调整使用者头部右边的虚拟扬声器和使用者的水平连线,与使用者正前方的角度减小,并调整使用者头部左边的虚拟扬声器和使用者的水平连线,与使用者正前方的角度增大。Optionally, when it is detected that the user's head is rotating left or right, that is, when it is detected that the audio playback device is rotating left or right, the head rotation angle information detected in real time by the head tracking device set on the audio playback device is obtained; and according to the obtained head rotation angle information and the preset head rotation angle adjustment mechanism, the angle information of each of the at least two virtual speakers is adjusted. Specifically, when it is detected that the user's head is rotating to the left, the horizontal line connecting the virtual speaker on the left side of the user's head and the user is adjusted to reduce the angle with the user in front, and the horizontal line connecting the virtual speaker on the right side of the user's head and the user is adjusted to increase the angle with the user in front; when it is detected that the user's head is rotating to the right, the horizontal line connecting the virtual speaker on the right side of the user's head and the user is adjusted to reduce the angle with the user in front, and the horizontal line connecting the virtual speaker on the left side of the user's head and the user is adjusted to increase the angle with the user in front.
请参阅图10-11,X1、X2、X3为使用者头部的正前方,O为音频播放设备和使用者的位置,在使用者头部转动之前,使用者头部的正前方为X1的方向。使用者头部向右转动至X2方向时,调整使用者头部右边的虚拟扬声器B和使用者O的水平连线,与使用者正前方X2方向之间的角度减小为a2,并调整使用者头部左边的虚拟扬声器A和使用者的水平连线,与使用者正前方X2的角度增大为a1;使用者头部向左转动至X3方向时,调整使用者头部右边的虚拟扬声器B和使用者O的水平连线,与使用者正前方X3方向之间的角度增大为a4,并调整使用者头部左边的虚拟扬声器A和使用者的水平连线,与使用者正前方X3的角度减小为a3。Please refer to Figures 10-11, X1, X2, and X3 are the front of the user's head, O is the position of the audio playback device and the user, and before the user's head turns, the front of the user's head is the direction of X1. When the user's head turns rightward to the direction of X2, the angle between the horizontal line connecting the virtual speaker B on the right side of the user's head and the user O and the direction of X2 in front of the user is reduced to a2, and the angle between the horizontal line connecting the virtual speaker A on the left side of the user's head and the user and the direction of X2 in front of the user is increased to a1; when the user's head turns leftward to the direction of X3, the angle between the horizontal line connecting the virtual speaker B on the right side of the user's head and the user O and the direction of X3 in front of the user is increased to a4, and the angle between the horizontal line connecting the virtual speaker A on the left side of the user's head and the user and the direction of X3 in front of the user is reduced to a3.
区别于现有技术,本实施例可根据音频播放设备的加速移动/减速移动中的加速度或者使用者头部左右转动调节虚拟扬声器相对于音频播放设备的水平角度,改变虚拟扬声器的方 位,提高使用者的临场感。Different from the prior art, this embodiment can adjust the horizontal angle of the virtual speaker relative to the audio playback device according to the acceleration of the audio playback device during acceleration/deceleration or the left and right rotation of the user's head, thereby changing the direction of the virtual speaker. position, enhancing the user's sense of presence.
步骤S14:利用音效函数将待处理音频数据转换为待播放数据后,控制音频播放设备播放待播放数据。Step S14: After converting the audio data to be processed into the data to be played using the sound effect function, the audio playback device is controlled to play the data to be played.
上一步骤调整音效函数中音频播放设备与虚拟扬声器之间的位置参数,得到调整后的音效函数,本步骤利用调整后的音效函数将待处理音频数据转换为播放数据,并由音频播放设备进行播放。The previous step adjusts the position parameters between the audio playback device and the virtual speaker in the sound effect function to obtain the adjusted sound effect function. This step uses the adjusted sound effect function to convert the audio data to be processed into playback data, and the audio playback device plays it.
区别于现有技术,本实施例根据音频播放设备随着使用者运动而感知到的运动信息调整音效函数中的位置参数,以调整音频播放设备与至少一个虚拟扬声器之间的俯角或仰角,即便在抖动状态下,也可以基本保持虚拟扬声器在预设基准点上,即,基本保持虚拟扬声器所在水平面不变,形成相对于外部环境基本固定的声场,用户在乘坐车辆等场景下能够感知虚拟扬声器相对于基准水平线基本固定,不随头部在竖直方向上的抖动而抖动,赋予音频更生动的表达效果。Different from the prior art, this embodiment adjusts the position parameters in the sound effect function according to the motion information sensed by the audio playback device as the user moves, so as to adjust the pitch angle or elevation angle between the audio playback device and at least one virtual speaker. Even in a shaking state, the virtual speaker can basically be kept on a preset reference point, that is, the horizontal plane where the virtual speaker is located is basically kept unchanged, forming a sound field that is basically fixed relative to the external environment. When the user is riding in a vehicle or other scenarios, the user can perceive that the virtual speaker is basically fixed relative to the reference horizontal line and does not shake with the shaking of the head in the vertical direction, giving the audio a more vivid expression effect.
请参阅图12,图12是本申请音频播放设备一实施例的结构示意框图。音频播放设备100包括获取模块110、参数调整模块120以及音频播放模块130,其中,音频播放设备跟随使用者移动,获取模块110用于获取音频播放设备的待处理音频数据,以及获取音频播放设备与预设基准点之间的位置关系;参数调整模块120用于基于位置关系调整音效函数中音频播放设备与虚拟扬声器之间的位置参数,以使音频播放设备播放处理后的虚拟扬声器与预设基准点在竖直方向上的偏离度不超过设定偏离阈值;其中,位置参数至少包括音频播放设备相对于虚拟扬声器的俯角或仰角;音频播放模块130用于利用音效函数将待处理音频数据转换为待播放数据,控制音频播放设备播放待播放数据。Please refer to FIG. 12, which is a schematic block diagram of the structure of an embodiment of the audio playback device of the present application. The audio playback device 100 includes an acquisition module 110, a parameter adjustment module 120, and an audio playback module 130, wherein the audio playback device moves with the user, the acquisition module 110 is used to acquire the audio data to be processed of the audio playback device, and to acquire the positional relationship between the audio playback device and a preset reference point; the parameter adjustment module 120 is used to adjust the positional parameters between the audio playback device and the virtual speaker in the sound effect function based on the positional relationship, so that the deviation between the virtual speaker after the audio playback device plays the processed audio and the preset reference point in the vertical direction does not exceed the set deviation threshold; wherein the positional parameters at least include the depression angle or elevation angle of the audio playback device relative to the virtual speaker; the audio playback module 130 is used to convert the audio data to be processed into the data to be played using the sound effect function, and control the audio playback device to play the data to be played.
其中,音频播放设备100还可包括通信模块(图未示出),通信模块用于与音源设备建立有线或无线通信连接,以接收来自音源设备的待处理音频数据。The audio playback device 100 may further include a communication module (not shown), which is used to establish a wired or wireless communication connection with the audio source device to receive the audio data to be processed from the audio source device.
例如,音源设备可以是手机、平板电脑以及手表手环等可穿戴音源设备,音源设备可存储有本地音频数据,或者可通过网络在应用程序或网页上获取音频数据作为待处理音频数据,待处理音频数据例如是音乐音频数据、电子读物音频数据等、电视/电影音频等。For example, the sound source device can be a wearable sound source device such as a mobile phone, a tablet computer, or a watch or bracelet. The sound source device can store local audio data, or can obtain audio data through the network in an application or web page as audio data to be processed. The audio data to be processed is, for example, music audio data, e-book audio data, TV/movie audio, etc.
关于处理执行的各步骤的具体方式请参照上述本申请音频处理方法实施例的各步骤的描述,在此不再赘述。For the specific methods of processing and executing each step, please refer to the description of each step in the above-mentioned embodiment of the audio processing method of the present application, which will not be repeated here.
请参阅图13,图13是本申请音频播放设备另一实施例的结构示意框图。该音频播放设备200包括相互耦接的处理器210和存储器220,存储器220中存储有计算机程序,处理器210用于执行计算机程序以实现上述各实施例所述的音频处理方法。 Please refer to Figure 13, which is a schematic block diagram of another embodiment of the audio playback device of the present application. The audio playback device 200 includes a processor 210 and a memory 220 coupled to each other, the memory 220 stores a computer program, and the processor 210 is used to execute the computer program to implement the audio processing method described in the above embodiments.
关于处理执行的各步骤的描述请参照上述本申请音频处理方法实施例的各步骤的描述,在此不再赘述。For the description of each step of the processing execution, please refer to the description of each step of the above-mentioned audio processing method embodiment of the present application, which will not be repeated here.
存储器220可用于存储程序数据以及模块,处理器210通过运行存储在存储器220的程序数据以及模块,从而执行各种功能应用以及数据处理。存储器220可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(比如参数调整功能、音频转换功能等)等;存储数据区可存储根据音频播放设备200的使用所创建的数据(比如待处理音频数据、位置关系数据、运动信息数据等)等。此外,存储器220可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器220还可以包括存储器控制器,以提供处理器210对存储器220的访问。The memory 220 can be used to store program data and modules. The processor 210 executes various functional applications and data processing by running the program data and modules stored in the memory 220. The memory 220 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a parameter adjustment function, an audio conversion function, etc.), etc.; the data storage area may store data created according to the use of the audio playback device 200 (such as audio data to be processed, position relationship data, motion information data, etc.), etc. In addition, the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 220 may also include a memory controller to provide the processor 210 with access to the memory 220.
在本申请的各实施例中,所揭露的方法、装置,可以通过其它的方式实现。例如,以上所描述的音频播放设备200的各实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In each embodiment of the present application, the disclosed method and device can be implemented in other ways. For example, the various embodiments of the audio playback device 200 described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。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 present implementation scheme.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
参阅图14,图14为本申请计算机可读存储介质一实施例的结构示意框图,计算机可读存储介质300存储有程序数据310,程序数据310被执行时实现如上述音频处理方法各实施例的步骤。Please refer to Figure 14, which is a schematic block diagram of the structure of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 300 stores program data 310, and when the program data 310 is executed, the steps of the various embodiments of the audio processing method described above are implemented.
关于处理执行的各步骤的描述请参照上述本申请音频处理方法实施例的各步骤的描述, 在此不再赘述。For the description of each step of the processing execution, please refer to the description of each step of the embodiment of the audio processing method of the present application. I will not go into details here.
计算机可读存储介质300可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium 300 can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
以上所述仅为本申请的实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。 The above description is only an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims (10)

  1. 一种音频处理方法,其特征在于,所述方法包括:An audio processing method, characterized in that the method comprises:
    获取音频播放设备的待处理音频数据;其中,所述音频播放设备跟随使用者移动;Acquire the audio data to be processed of the audio playback device; wherein the audio playback device moves with the user;
    获取所述音频播放设备与预设基准点之间的位置关系;其中,所述预设基准点根据设定时间内所述音频播放设备与地平面之间的平均距离确定;Acquire a positional relationship between the audio playback device and a preset reference point; wherein the preset reference point is determined according to an average distance between the audio playback device and the ground plane within a set time;
    基于所述位置关系调整预设的音效函数中所述音频播放设备与预设的至少一个虚拟扬声器之间的位置参数,以使所述至少一个虚拟扬声器与所述预设基准点在竖直方向上的偏离度不超过设定偏离阈值;其中,所述位置参数至少包括所述音频播放设备相对于所述至少一个虚拟扬声器的俯角或仰角;Adjusting the position parameters between the audio playback device and at least one preset virtual speaker in the preset sound effect function based on the position relationship so that the deviation of the at least one virtual speaker from the preset reference point in the vertical direction does not exceed a set deviation threshold; wherein the position parameters at least include a depression angle or an elevation angle of the audio playback device relative to the at least one virtual speaker;
    利用所述音效函数将所述待处理音频数据转换为待播放数据后,控制所述音频播放设备播放所述待播放数据。After the audio data to be processed is converted into data to be played using the sound effect function, the audio playback device is controlled to play the data to be played.
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述音频播放设备与预设基准点之间的位置关系,包括:The method according to claim 1, characterized in that the step of obtaining the positional relationship between the audio playback device and a preset reference point comprises:
    利用陀螺仪、加速度计、超宽带无线通信定位仪、全球定位***中的至少两者,检测所述音频播放设备相对于所述预设基准点的竖直移动方向和竖直移动距离。At least two of a gyroscope, an accelerometer, an ultra-wideband wireless communication locator, and a global positioning system are used to detect the vertical movement direction and vertical movement distance of the audio playback device relative to the preset reference point.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述位置关系调整预设的音效函数中所述音频播放设备与预设的至少一个虚拟扬声器之间的位置参数,包括:The method according to claim 2, characterized in that the adjusting the position parameters between the audio playback device and the at least one preset virtual speaker in the preset sound effect function based on the position relationship comprises:
    根据所述音频播放设备相对于所述预设基准点的竖直移动距离和竖直移动方向,以及预设的所述音频播放设备相对于所述至少一个虚拟扬声器之间的水平距离,确定所述音频播放设备相对于所述至少一个虚拟扬声器之间的俯角或仰角。The depression angle or elevation angle of the audio playback device relative to the at least one virtual speaker is determined based on the vertical movement distance and vertical movement direction of the audio playback device relative to the preset reference point, and the preset horizontal distance between the audio playback device and the at least one virtual speaker.
  4. 根据权利要求3所述的方法,其特征在于,所述俯角或仰角的角度值根据下式确定:
    The method according to claim 3, characterized in that the angle value of the depression angle or elevation angle is determined according to the following formula:
    其中,α表示所述俯角或仰角,l1为所述音频播放设备相对于所述预设基准点所在基准水平面之间的竖直移动距离,l2为所述音频播放设备相对于一个所述虚拟扬声器之间的水平距离。Wherein, α represents the depression angle or elevation angle, l1 is the vertical moving distance of the audio playback device relative to the reference horizontal plane where the preset reference point is located, and l2 is the horizontal distance between the audio playback device and one of the virtual speakers.
  5. 根据权利要求1所述的方法,其特征在于,所述基于所述位置关系调整预设的音效函数中所述音频播放设备与预设的至少一个虚拟扬声器之间的位置参数之后,还包括:The method according to claim 1, characterized in that after adjusting the position parameters between the audio playback device and the at least one preset virtual speaker in the preset sound effect function based on the position relationship, it also includes:
    在存在至少一个所述虚拟扬声器与所述音频播放设备的当前位置之间的俯角或仰角超过设定俯角阈值或仰角阈值时,控制所述音频播放设备直接播放所述待处理音频数据,或者, 更新所述音频播放设备的所有虚拟扬声器对应的俯角或仰角为0°以得到更新后的音效函数,利用所述更新后的音效函数将所述待处理音频数据转换为待播放数据后,控制所述音频播放设备播放所述待播放数据。When the depression angle or elevation angle between at least one of the virtual speakers and the current position of the audio playback device exceeds a set depression angle threshold or elevation angle threshold, the audio playback device is controlled to directly play the audio data to be processed, or, Update the pitch angle or elevation angle corresponding to all virtual speakers of the audio playback device to 0° to obtain an updated sound effect function, use the updated sound effect function to convert the audio data to be processed into data to be played, and then control the audio playback device to play the data to be played.
  6. 根据权利要求1所述的方法,其特征在于,所述基于所述位置关系调整预设的音效函数中所述音频播放设备与预设的至少一个虚拟扬声器之间的位置参数之后,还包括:The method according to claim 1, characterized in that after adjusting the position parameters between the audio playback device and the at least one preset virtual speaker in the preset sound effect function based on the position relationship, it also includes:
    从计算出当前俯角或仰角的时刻开始计时,若存在至少一个所述虚拟扬声器与所述音频播放设备之间的实际俯角或仰角在所述当前俯角或仰角确定的设定角度范围内维持超过设定时间,则控制所述音频播放设备直接播放所述待处理音频数据,或者,更新所述音频播放设备的所有虚拟扬声器对应的俯角或仰角为0°以得到更新后的音效函数,利用所述更新后的音效函数将所述待处理音频数据转换为待播放数据后,控制所述音频播放设备播放所述待播放数据。The timing starts from the moment when the current depression angle or elevation angle is calculated. If the actual depression angle or elevation angle between at least one of the virtual speakers and the audio playback device is maintained within the set angle range determined by the current depression angle or elevation angle for more than a set time, the audio playback device is controlled to directly play the audio data to be processed, or the depression angles or elevation angles corresponding to all virtual speakers of the audio playback device are updated to 0° to obtain an updated sound effect function. After converting the audio data to be processed into data to be played using the updated sound effect function, the audio playback device is controlled to play the data to be played.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, characterized in that the method further comprises:
    当检测到所述使用者的头部在左右转动时,获取设置在所述音频播放设备上的头部跟踪装置实时检测到的头部转动角度信息;When it is detected that the user's head is turning left and right, obtaining head rotation angle information detected in real time by a head tracking device disposed on the audio playback device;
    根据获取到的所述头部转动角度信息,以及预设的头部转动角度调整机制,调整所述至少一个虚拟扬声器各自的音效函数对应的水平角度信息。According to the acquired head rotation angle information and a preset head rotation angle adjustment mechanism, the horizontal angle information corresponding to the sound effect function of each of the at least one virtual speakers is adjusted.
  8. 根据权利要求7所述的方法,其特征在于,所述头部转动角度调整机制包括:The method according to claim 7, characterized in that the head rotation angle adjustment mechanism comprises:
    在获取到所述使用者头部向左边转动时,调整所述使用者头部左边的虚拟扬声器和所述使用者的水平连线,与所述使用者正前方之间的角度减小,并调整所述使用者头部右边的虚拟扬声器和所述使用者的水平连线,与所述使用者正前方之间的角度增大;When it is detected that the user's head is turned to the left, the horizontal line connecting the virtual speaker on the left side of the user's head and the user is adjusted to reduce the angle between the horizontal line connecting the virtual speaker on the right side of the user's head and the user and the front of the user, and the horizontal line connecting the virtual speaker on the right side of the user's head and the user is adjusted to increase the angle between the horizontal line connecting the virtual speaker on the right side of the user's head and the front of the user;
    在获取到所述使用者头部向右边转动时,调整所述使用者头部右边的虚拟扬声器和所述使用者的水平连线,与所述使用者正前方之间的角度减小,并调整所述使用者头部左边的虚拟扬声器和所述使用者的水平连线,与所述使用者正前方之间的角度增大。When it is detected that the user's head is turned to the right, the horizontal line connecting the virtual speaker on the right side of the user's head and the user is adjusted to reduce the angle between them and the front of the user, and the horizontal line connecting the virtual speaker on the left side of the user's head and the user is adjusted to increase the angle between them and the front of the user.
  9. 一种电子设备,其特征在于,所述电子设备包括相互耦接的处理器和存储器;所述存储器中存储有计算机程序,所述处理器用于执行所述计算机程序以实现如权利要求1-8中任一项所述方法的步骤。An electronic device, characterized in that the electronic device comprises a processor and a memory coupled to each other; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the method as described in any one of claims 1-8.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序数据,所述程序数据被处理器执行时实现如权利要求1-8中任一项所述方法的步骤。 A computer-readable storage medium, characterized in that the computer-readable storage medium stores program data, and when the program data is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
PCT/CN2023/125219 2022-10-27 2023-10-18 Audio processing method, audio playback device, and computer readable storage medium WO2024088135A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211327854.1 2022-10-27
CN202211327854.1A CN117956372A (en) 2022-10-27 2022-10-27 Audio processing method, audio playing device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2024088135A1 true WO2024088135A1 (en) 2024-05-02

Family

ID=90793322

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/125219 WO2024088135A1 (en) 2022-10-27 2023-10-18 Audio processing method, audio playback device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN117956372A (en)
WO (1) WO2024088135A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160134987A1 (en) * 2014-11-11 2016-05-12 Google Inc. Virtual sound systems and methods
CN109086029A (en) * 2018-08-01 2018-12-25 北京奇艺世纪科技有限公司 A kind of audio frequency playing method and VR equipment
CN112492097A (en) * 2020-11-26 2021-03-12 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and computer readable storage medium
CN112637755A (en) * 2020-12-22 2021-04-09 广州番禺巨大汽车音响设备有限公司 Audio playing control method, device and playing system based on wireless connection
CN113365191A (en) * 2021-06-04 2021-09-07 广州酷狗计算机科技有限公司 Music playing method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160134987A1 (en) * 2014-11-11 2016-05-12 Google Inc. Virtual sound systems and methods
CN109086029A (en) * 2018-08-01 2018-12-25 北京奇艺世纪科技有限公司 A kind of audio frequency playing method and VR equipment
CN112492097A (en) * 2020-11-26 2021-03-12 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and computer readable storage medium
CN112637755A (en) * 2020-12-22 2021-04-09 广州番禺巨大汽车音响设备有限公司 Audio playing control method, device and playing system based on wireless connection
CN113365191A (en) * 2021-06-04 2021-09-07 广州酷狗计算机科技有限公司 Music playing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN117956372A (en) 2024-04-30

Similar Documents

Publication Publication Date Title
US11770671B2 (en) Spatial audio for interactive audio environments
JP7275227B2 (en) Recording virtual and real objects in mixed reality devices
CN104041081B (en) Sound Field Control Device, Sound Field Control Method, Program, Sound Field Control System, And Server
US11778400B2 (en) Methods and systems for audio signal filtering
CN109691141B (en) Spatialization audio system and method for rendering spatialization audio
US11356795B2 (en) Spatialized audio relative to a peripheral device
JP7477734B2 (en) Enhancements for Audio Spatialization
US11221821B2 (en) Audio scene processing
WO2024088135A1 (en) Audio processing method, audio playback device, and computer readable storage medium
KR20160136716A (en) A method and an apparatus for processing an audio signal
EP4362503A1 (en) Spatial audio effect adjustment
US10735885B1 (en) Managing image audio sources in a virtual acoustic environment
JP2021527353A (en) Coherence control between low frequency channels
TW201914315A (en) Wearable audio processing device and audio processing method thereof
WO2024011937A1 (en) Audio processing method and system, and electronic device
KR20240049565A (en) Audio adjustments based on user electrical signals
JP2007166126A (en) Sound image presentation method and sound image presentation apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23881713

Country of ref document: EP

Kind code of ref document: A1