Audio processing method and device, computer equipment and computer readable storage medium

By obtaining the motion state parameters between the virtual sound source and the target object, the audio is adjusted, and the problem that audio is not related to motion when the virtual sound source moves is solved, improving the realism of the sound effect.

CN119629566APending Publication Date: 2025-03-14NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411672249.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art In virtual scenes, the audio played when the virtual sound source moves has nothing to do with the movement of the sound source, resulting in a poor sense of reality of the sound effect.

Method used

By obtaining the target motion state parameters of the sound source object relative to the target object, determining the target adjustment parameters of the audio corresponding to the sound source object, and adjusting the audio based on these parameters, the target audio of the sound source object corresponding to the position of the target object is obtained.

Benefits of technology

Make the audio more in line with the sound changes in the real world, enhance the audio reality of the sound source object, and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629566A_ABST
    Figure CN119629566A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an audio processing method and device, computer equipment and a computer readable storage medium, target motion state parameters of a sound source object relative to a target object are obtained, and the target motion state parameters indicate that the sound source object and the target object are relatively close to or away from each other; determining a target adjustment parameter of an audio corresponding to the sound source object according to the target motion state parameter; and adjusting the audio according to the target adjustment parameter to obtain a target audio of the sound source object corresponding to the position of the target object. Based on the motion state parameters capable of indicating that the sound source object and the target object are relatively close to each other or far away from each other, the audio is adjusted, so that the audio better conforms to the sound change rule in the real world, and the sense of reality is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio technology, and in particular to an audio processing method, apparatus, computer device and computer-readable storage medium. Background Art

[0002] In the real world, the movement of objects will produce corresponding sounds. In some virtual scenes, corresponding audio will be played when the virtual sound source moves, making the virtual sound source more realistic. However, the played audio is usually unrelated to the movement of the sound source, which does not conform to the characteristics of sound propagation in the real world, resulting in poor realism of the sound effect. Summary of the invention

[0003] The embodiments of the present application provide an audio processing method, apparatus, computer device, and computer-readable storage medium, which can enhance the realism of the audio of a sound source object and improve the user experience.

[0004] An audio processing method provided in an embodiment of the present application includes:

[0005] Acquire a target motion state parameter of a sound source object relative to a target object, wherein the target motion state parameter indicates that the sound source object and the target object are relatively close to or relatively far away from each other;

[0006] Determining target adjustment parameters of the audio corresponding to the sound source object according to the target motion state parameters;

[0007] The audio is adjusted according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

[0008] Accordingly, an embodiment of the present application further provides an audio processing device, including:

[0009] An acquisition unit, configured to acquire a target motion state parameter of a sound source object relative to a target object, wherein the target motion state parameter indicates that the sound source object and the target object are relatively close to or relatively far away from each other;

[0010] a determining unit, configured to determine a target adjustment parameter of the audio corresponding to the sound source object according to the target motion state parameter;

[0011] An adjustment unit is used to adjust the audio according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

[0012] Correspondingly, an embodiment of the present application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any audio processing method provided in the embodiment of the present application.

[0013] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is loaded by a processor to execute any audio processing method provided in the embodiment of the present application.

[0014] The embodiment of the present application obtains the target motion state parameter of the sound source object relative to the target object, and the target motion state parameter indicates that the sound source object and the target object are relatively close or relatively far away; according to the target motion state parameter, the target adjustment parameter of the audio corresponding to the sound source object is determined; according to the target adjustment parameter, the audio is adjusted to obtain the target audio of the sound source object corresponding to the position of the target object. The embodiment of the present application adjusts the audio based on the motion state parameter that can indicate that the sound source object and the target object are relatively close or relatively far away, so that the audio is more in line with the law of sound changes in the real world and has a stronger sense of reality. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 is a flowchart of an audio processing method provided in an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of the mapping relationship provided in the embodiment of the present application;

[0018] Figure 3 is a schematic diagram of the relationship between the second adjustment parameter and the distance provided in an embodiment of the present application;

[0019] Figure 4 is a schematic diagram of an audio processing device provided in an embodiment of the present application;

[0020] Figure 5 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] 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 those skilled in the art without creative work are within the scope of protection of this application.

[0022] The embodiments of the present application provide an audio processing method, apparatus, computer device and computer readable storage medium. The audio processing apparatus can be integrated in a computer device, which can be a server or a terminal.

[0023] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.

[0024] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.

[0025] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0026] This embodiment will be described from the perspective of an audio processing device. The audio processing device may be integrated into a computer device, which may be a server or a terminal.

[0027] An audio processing method provided in an embodiment of the present application is as follows: Figure 1 As shown, the specific process of the audio processing method can be as follows:

[0028] 101. Obtain a target motion state parameter of a sound source object relative to a target object, where the target motion state parameter indicates whether the sound source object and the target object are relatively close to or relatively far away from each other.

[0029] Among them, the sound source object is a virtual object that can make sounds, such as virtual vehicles such as virtual cars and virtual ships, and virtual throwing objects such as virtual grenade launchers and virtual arrows. It can also be a virtual character (making footsteps), flying creatures (making sounds of flapping wings), leaves (making sounds when blown by the wind), game characters with super powers, etc.; when virtual cars and virtual ships are driving, there will be sounds produced by the running of the engine. The sound source object can make sounds by playing the sound effects corresponding to the sound source object. For example, when the virtual car is driving, the corresponding engine sound effects are played to simulate the real car driving scene; when the virtual insects are flying, the sound effects of flapping wings are played to simulate the sounds produced by the flying of real insects, etc.

[0030] The target object may be a virtual object related to the user, for example, a virtual game character controlled by the user or a protagonist of a story segment. On the terminal used by the user, the target audio of the sound source object corresponding to the position of the target object obtained in step 104 is played, so that the user can determine whether the target object and the sound source object are relatively close or relatively far away based on the target audio.

[0031] The target motion parameter may indicate whether the sound source object and the target object are relatively close or relatively far away from each other. The target motion parameter may be determined in advance according to the relative motion of the sound source object and the target object, or may be determined according to the real-time movement of the sound source object and the target object. For example, the target motion state parameter may be determined according to the real-time distance between the sound source object and the target object. That is, in one embodiment, the step of “obtaining the target motion state parameter of the sound source object relative to the target object” includes:

[0032] Obtaining a first distance between the sound source object and the target object at a first moment, and a second distance between the sound source object and the target object at a second moment;

[0033] Obtaining a distance change value between the sound source object and the target object at a first moment according to the first distance and the second distance;

[0034] The target motion state parameter of the sound source object relative to the target object at the first moment is determined according to the distance change value.

[0035] Among them, the first moment and the second moment can be different moments, and the first moment is earlier than the second moment. For example, the first moment can be the current processing moment, and the second moment can be 0.05 seconds before the first moment, or 0.3 seconds before the first moment, etc. It can be flexibly set according to the needs of the scene, which will not be elaborated here.

[0036] Since the first moment and the second moment are two different moments, according to the distance between the sound source object and the target object at the first moment and the second moment, it can be determined whether the sound source object and the target object are relatively close or relatively far away from the second moment to the first moment. Specifically, according to the positions of the sound source object and the target object at the first moment, the first distance between the sound source object and the target object can be determined. Similarly, according to the positions of the sound source object and the target object at the second moment, the second distance between the sound source object and the target object can be determined at the second moment.

[0037] Then, the difference between the first distance and the second distance is calculated to obtain the distance change value between the sound source object and the target object at the first moment, and the distance change value can indicate whether the distance between the sound source object and the target object at the first moment has increased or decreased compared to the second moment. For example, the first distance can be subtracted from the second distance to obtain the distance change value, and for another example, the second distance can be subtracted from the first distance to obtain the distance change value. The following is an example in which the distance change value is obtained by subtracting the first distance from the second distance.

[0038] If the distance change value is greater than 0, it means that compared with the second moment, the distance between the sound source object and the target object at the first moment has become smaller, that is, the sound source object and the target object are relatively close; if the distance change value is less than 0, it means that compared with the second moment, the distance between the sound source object and the target object at the first moment has become larger, that is, the sound source object and the target object are relatively far away; if the distance change value is equal to 0, it means that the distance between the sound source object and the target object at the first moment and the second moment remains unchanged, and it can be considered that the sound source object and the target object are in a relatively static state.

[0039] Therefore, the distance change values ​​of the first distance and the second distance can be used as target state parameters.

[0040] Optionally, a target state parameter can also be generated based on the distance change value. For example, if the distance change value is greater than 0, a first target state parameter is generated; if the distance change value is less than 0, a second target state parameter is generated; the first target state parameter and the second target state parameter can be two different target state parameters, which indicate two different motion states (relatively close or relatively far away) between the target object and the sound source object. Exemplarily, the two motion states of the sound source object and the target object being relatively far away and the sound source object and the target object being relatively close can be identified by 0 and 1, respectively.

[0041] Optionally, if the distance change value is equal to 0, a third target state parameter can be generated. The third target state parameter can be different from the first target state parameter and the second target state parameter. For example, if 0 and 1 are used to respectively identify the two motion states of the sound source object and the target object being relatively far away and the sound source object and the target object being relatively close, then 2 can be used to identify that the sound source object and the target object are relatively still, or other identifiers can be used as target state parameters. The specific parameters can be flexibly adjusted according to application needs and are not limited here.

[0042] In addition to determining whether the sound source object and the target object are relatively close or relatively far away based on the distance change value between the sound source object and the target object, it is also possible to determine whether the sound source object and the target object are relatively close or relatively far away based on the velocity direction and velocity magnitude of the sound source object and the target object. Specifically, a first approaching direction and a first moving away direction of the sound source object relative to the target object, and a second approaching direction and a second moving away direction of the target object relative to the sound source object can be determined. It can be understood that the first approaching direction points from the sound source object to the target object, the first moving away direction indicates the sound source object from the target object, the second approaching direction points from the target object to the sound source object, and the second moving away direction points from the sound source object to the target object.

[0043] The moving speed of the sound source object and the moving speed of the target object are obtained. If the sound source object has a speed component in a first approaching direction and the target object also has a speed component in a second approaching direction, it is determined that the sound source object is close to the target object.

[0044] If the sound source object has no velocity component in the first approaching direction and the target object has no velocity component in the second approaching direction, it is determined that the sound source object is far away from the target object.

[0045] If the sound source object has a velocity component in the first approaching direction, and the target object has no velocity component in the second approaching direction, then the sound source object is determined to be far away from or close to the target object according to the velocity component of the target object in the second approaching direction and the magnitude of the velocity component of the sound source object in the first approaching direction. Specifically, if the velocity component of the sound source object in the first approaching direction is greater than the velocity component of the target object in the second approaching direction, it is determined that the sound source object and the target object are relatively close; if the velocity component of the sound source object in the first approaching direction is less than the velocity component of the target object in the second approaching direction, it is determined that the sound source object and the target object are relatively far away.

[0046] If the sound source object has no velocity component in the first approaching direction, and the target object has a velocity component in the second approaching direction, then the sound source object is determined to be far away from or close to the target object according to the velocity component of the target object in the second approaching direction and the magnitude of the velocity component of the sound source object in the first moving away direction. Specifically, if the velocity component of the sound source object in the first moving away direction is greater than the velocity component of the target object in the second moving away direction, it is determined that the sound source object and the target object are relatively far away; if the velocity component of the sound source object in the first moving away direction is less than the velocity component of the target object in the second moving away direction, it is determined that the sound source object and the target object are relatively close.

[0047] In addition to the above cases, it can be determined that the sound source object and the target object are relatively stationary.

[0048] According to the fact that the sound source object and the target object are relatively close or relatively far away from each other, corresponding target state parameters are generated.

[0049] Since the first moving away direction and the first approaching direction are opposite directions, the sound source object either has a velocity component in the first moving away direction or has a velocity component in the first approaching direction. Similarly, the target object either has a velocity component in the second moving away direction or has a velocity component in the second approaching direction.

[0050] In one embodiment, the velocity component in the first away direction and the velocity component in the second away direction can be set to negative numbers, and the velocity component in the first approaching direction and the velocity component in the second approaching direction can be set to positive numbers, so as to determine whether the sound source object and the target object are relatively close or relatively far away based on the velocity component of the sound source object in the first away direction or the first approaching direction, and the velocity component of the target object in the second away direction and the second approaching direction.

[0051] Specifically, the velocity component of the sound source object in the first moving away direction or the velocity component of the first approaching direction and the velocity component of the target object in the second moving away direction or the velocity component of the target object in the second approaching direction can be added to obtain the relative velocity of the sound source object and the target object. If the relative velocity is greater than 0, it means that the sound source object and the target object are relatively close; if the relative velocity is less than zero, the sound source object and the target object are relatively far away; if the relative velocity is equal to zero, it can be determined that the sound source object and the target object are relatively stationary. The corresponding target state parameter can be determined according to the relative velocity. For example, 0, 1 and 2 can be used to represent that the sound source object and the target object are relatively close, relatively far away and relatively stationary, respectively. Then, when the relative velocity is greater than 0, the determined target state parameter is 0, when the relative velocity is less than 0, the determined target state parameter is 1, and when the relative velocity is equal to 0, the determined target state parameter is 2.

[0052] Optionally, the relative speed may be directly used as the target state parameter. In this case, the absolute value of the target state parameter may also indicate the moving speed of the sound source object relative to the target object.

[0053] 102. Determine target adjustment parameters of the audio corresponding to the sound source object according to the target motion state parameters.

[0054] In the real world, when the sound source object and the target object are relatively close or relatively far away from each other, the sound heard by the target object is different. For example, when the sound source object and the target object are relatively close, the tone received by the target object is higher than the tone emitted by the sound source object; when the sound source object and the target object are relatively far away from each other, the tone received by the target object is lower than the tone emitted by the sound source object.

[0055] Therefore, the audio properties of the audio may be adjusted according to the target motion state parameters. The audio properties may include properties such as frequency, pitch, volume, etc. Adjusting the audio properties of the audio may be adjusting at least one of the audio properties.

[0056] In the Doppler effect of sound, when the sound source and the listener move relative to each other, the pitch of the sound emitted by the sound source heard by the listener will change. Specifically, when the sound source approaches the listener, the frequency actually heard by the listener is higher than the pitch actually emitted by the sound source. Conversely, when the sound source moves away from the listener, the frequency actually heard by the listener is lower than the pitch actually emitted by the sound source. Therefore, the target adjustment parameter may be a pitch adjustment parameter for the audio pitch.

[0057] With respect to the audio properties of the audio, an adjustment parameter corresponding to whether the sound source object and the target object are relatively close, and another adjustment parameter corresponding to whether the sound source object and the target object are relatively far away can be pre-set. The target motion state parameter can indicate whether the sound source object and the target object are relatively close or relatively far away. Therefore, the corresponding target adjustment parameter can be determined based on the target motion state parameter.

[0058] Exemplarily, assuming that the audio attribute is pitch, the sound source object and the target object are relatively close and the corresponding adjustment parameter is 1000, and the sound source object and the target object are relatively far away and the corresponding adjustment parameter is -1000. If the target motion state parameter indicates that the sound source object and the target object are relatively close, the pitch of the audio is increased by 1000Hz; if the target motion state parameter indicates that the sound source object and the target object are relatively far away, the pitch of the audio is decreased by 1000Hz.

[0059] Assuming that the audio attribute is frequency, the adjustment parameter corresponds to the filtering range. When the sound source object and the target object are relatively close, the filtering range is 15kHz-20kHz. When the sound source object and the target object are relatively far away, the filtering range is 8kHz-20kHz. When the sound source object and the target object are relatively far away, more frequencies are filtered, so that when the sound source object and the target object are relatively close, the user can hear higher-frequency sounds, and when the sound source object and the target object are relatively close, the user can hear lower-frequency sounds, so that the user can judge by hearing whether the sound source object is relatively close to the sound source object or relatively far away from the sound source object.

[0060] In one embodiment, a mapping relationship between the motion state parameters and the adjustment parameters may be set, and a target adjustment parameter corresponding to the target motion state parameter may be determined according to the mapping relationship. That is, in one embodiment, the step of “determining the target adjustment parameter of the audio corresponding to the sound source object according to the target motion state parameter” includes:

[0061] Obtaining a mapping relationship between motion state parameters and adjustment parameters;

[0062] The target adjustment parameters corresponding to the audio under the target motion state parameters are determined according to the mapping relationship.

[0063] Among them, the mapping relationship includes the correspondence between at least two motion state parameters and at least two adjustment parameters, wherein the motion state parameters and the adjustment parameters can be one-to-one corresponding, or multiple motion state parameters can correspond to one adjustment parameter. For example, the distance change value between the sound source object and the target object is used as the target state parameter, and each distance change value interval in the mapping relationship can correspond to an adjustment parameter, which is equivalent to having multiple distance change values ​​corresponding to one adjustment parameter, or in the mapping relationship, each distance change value corresponds to an adjustment parameter, that is, the distance change value and the adjustment parameter correspond one-to-one.

[0064] According to the mapping relationship, the target adjustment parameters corresponding to the audio in the target motion state can be determined.

[0065] In one embodiment, a motion state parameter greater than 0 indicates that the sound source object and the target object are relatively far apart, and a motion state parameter less than 0 indicates that the sound source object and the target object are relatively close. Under this setting, the adjustment parameter corresponding to the motion state parameter greater than zero in the mapping relationship is larger than the adjustment parameter corresponding to the motion state parameter less than zero. A large adjustment parameter can enhance the audio properties, and a small adjustment parameter can weaken the audio properties.

[0066] If the distance change value is used as the target state parameter, since the positive or negative value of the distance change value can indicate whether the sound source object and the target object are relatively close or relatively far away, and since the faster they approach or the faster they move away, the larger the absolute value of the distance change value, the target state parameter can also indicate the relative approach speed or relative distance speed between the sound source object and the target object. Therefore, in one embodiment, the target motion state parameter also indicates the relative approach speed or relative distance speed between the sound source object and the target object.

[0067] In addition to using the distance change value as the target state parameter, which can indicate the relative approach speed or relative distance speed between the sound source object and the target object, there are also target state parameters determined in other ways that can indicate the relative approach speed or relative distance speed.

[0068] If the motion state parameter can also indicate the relative approach speed or relative distance speed between the sound source object and the target object, the relative approach speed and the relative distance speed can be combined to determine the adjustment parameters for the audio. For example, if the sound source object and the target object are relatively close, it can correspond to one adjustment parameter, and if the sound source object and the target object are relatively far away, it can correspond to another adjustment parameter. The relative approach speed and the relative distance speed can be used to weight the adjustment parameters to obtain the target adjustment parameters.

[0069] Optionally, in the mapping relationship between the motion state parameters and the adjustment parameters, the motion state parameters and the adjustment parameters correspond one to one, and the adjustment parameters may increase as the motion state parameters increase. For example, the mapping relationship may be as follows: Figure 2 shown.

[0070] 103. Adjust the audio according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

[0071] After determining the target adjustment parameters for the audio, the audio can be adjusted to obtain the target audio corresponding to the position of the target object. Adjusting the audio can be adjusting the audio attributes of the audio (for distinction, it can be referred to as the first audio attribute below). There can be one or more first audio attributes.

[0072] The target audio can be considered as the audio that creates the moving sound effect of the sound source object. For example, when a burning virtual projectile or a virtual car passes by the target object quickly, the target audio can create a moving sound effect in the form of a burning virtual projectile or a virtual car. Through the target audio, the user can determine whether the virtual projectile or the virtual car is relatively close to the target object or relatively far away from it.

[0073] In the game, based on the target audio, players can know whether the sound source object and the controlled virtual character are relatively close or far away, and whether they are approaching at a faster speed, approaching at a slower speed, moving away at a faster speed, or moving away at a slower speed. This can improve the game immersion, help players judge the game situation, reduce the energy of obtaining information through vision, and improve the player's gaming experience.

[0074] It is understandable that the target audio is played through the terminal corresponding to the target object. For example, if the target object is a virtual character operated by the user, the target audio is played through the terminal used by the user so that the user can determine whether the target object and the sound source object are relatively close, relatively far, or relatively still.

[0075] If the sound source object is controlled by another user, for example, the sound source object is a car driven by a virtual character operated by the user, since the sound source object is the object that emits the sound, the sound emitted by the sound source object heard by the user has nothing to do with whether the sound source object and the target object are relatively close or relatively far away. Therefore, the terminal used by the user does not play the target audio, but the initial audio that can be configured for the sound source object.

[0076] The target adjustment parameter may indicate the target audio and the amount of change of the audio in the first audio attribute. The first audio attribute of the audio is adjusted according to the target adjustment parameter. Specifically, the attribute value of the first audio attribute and the target adjustment parameter may be added to change the attribute value of the first audio attribute.

[0077] If the first audio attribute is pitch, the corresponding attribute value may be 10kHz, 5Hz, etc., the target adjustment parameter may be 51kHz, -500Hz, etc., and the pitch may be adjusted by adding the frequency in the audio to the target adjustment parameter to change the frequency of the audio so that the audio sounds higher in pitch. Optionally, if the sound source object and the target object are relatively still, the corresponding target motion state parameter may be 0, and the pitch may be adjusted based on 0, which may be considered to mean that when the sound source object and the target object are relatively still, the pitch of the audio remains unchanged.

[0078] In one embodiment, the motion state parameter may be a distance change value, and the first audio attribute of the audio may be controlled by an audio engine (such as Wwise). Specifically, an RTPC may be created in the audio engine according to the target motion state parameter, and the value range of the RTPC may be set according to the maximum and minimum values ​​of the target motion state parameter. A gradient time for controlling the first audio attribute in the process of changing from approaching to moving away may also be set, for example, 0.3 seconds.

[0079] After creating the RTPC, configure the relationship (i.e., mapping relationship) between the RTPC corresponding to the motion state parameter and the adjustment parameter of the first audio attribute in the audio engine, and create a new control curve at the audio level to let the RTPC corresponding to the motion state parameter control the first audio data of the audio. The curve can be as follows Figure 2 , Figure 2 In the example, an RTPC value of 1000 may correspond to a distance change value of 10 m. If the distance change value is the distance change value compared to 0.05 seconds before the current processing moment, then the corresponding speed is 10 m / 0.05 s, or 200 m / s.

[0080] In addition to adjusting the first audio attribute of the audio based on the motion state parameter, the second audio attribute of the audio may also be adjusted in combination with the position feature of the sound source object relative to the target object. The second audio attribute may be the same as or different from the first audio attribute. For example, the volume may be adjusted according to the relative distance between the sound source object and the target object. That is, in one embodiment, the audio processing method provided in the embodiment of the present application may further include the following steps:

[0081] Determining audio adjustment parameters of the target audio according to position characteristics of the sound source object relative to the target object;

[0082] The target audio is adjusted according to the audio adjustment parameters.

[0083] Among them, the position features may include the relative distance between the sound source object and the target object, the relative orientation of the sound source object and the target object, etc.; adjusting the target audio may be adjusting the second audio attribute of the target audio, and the second audio attribute may include volume, frequency, sound image and other attributes.

[0084] Based on the position characteristics of the sound source object relative to the target object, the adjustment parameters of the second audio attribute of the target audio are determined. The correspondence between the position characteristics and the adjustment parameters can be determined based on a pre-set mapping relationship, and the mapping relationship may include correspondences between multiple position characteristics and multiple adjustment parameters.

[0085] According to the adjustment parameter of the second audio attribute, the second audio attribute of the target audio is adjusted, for example, the volume may be increased or decreased.

[0086] In one embodiment, the audio adjustment parameter may include at least one of a volume adjustment parameter and a filtering range, the position feature may include a relative distance between a sound source object and a target object, and the volume adjustment parameter and / or the filtering range may be determined according to the relative distance. The step of “determining the audio adjustment parameter of the target audio according to the position feature of the sound source object relative to the target object” may include:

[0087] Determine a volume adjustment parameter corresponding to the target audio according to the relative distance between the sound source object and the target object, and / or determine a filtering range for the target audio;

[0088] The step of “adjusting the second audio attribute of the target audio according to the audio adjustment parameter” includes:

[0089] The volume of the target audio is adjusted according to the volume adjustment parameter, and / or the target audio is filtered based on the filtering range.

[0090] According to the relative distance between the sound source object and the target object, a volume adjustment parameter corresponding to the volume of the target audio is determined, and the volume of the target audio is adjusted according to the volume adjustment parameter, so that the volume of the target audio can change with the change of the relative distance between the sound source object and the target object.

[0091] According to the relative distance between the sound source object and the target object, the filtering range for the target audio is determined, and the target audio is filtered based on the filtering range, so that when the relative distance between the target object and the sound source object is different, the sound frequency that the user can hear is different.

[0092] Exemplarily, the relationship between the relative distance between the sound source object and the target object and the volume adjustment parameter, and the relationship between the relative distance between the sound source object and the target object and the filtering degree (ie, filtering range) can be as follows: Figure 3 shown.

[0093] As can be seen from the above, the embodiment of the present application obtains the target motion state parameters of the sound source object relative to the target object, and the target motion state parameters indicate whether the sound source object and the target object are relatively close or relatively far away; according to the target motion state parameters, the target adjustment parameters of the audio corresponding to the sound source object are determined; according to the target adjustment parameters, the audio is adjusted to obtain the target audio of the sound source object corresponding to the position of the target object. Based on the motion state parameters that can indicate whether the sound source object and the target object are relatively close or relatively far away, the audio is adjusted to make the audio more consistent with the law of sound changes in the real world and more realistic.

[0094] Based on the above embodiment, the following description will be given by taking the motion state parameter as the distance change value and adjusting the pitch of the audio based on the motion state parameter as an example.

[0095] Get the first distance between the sound source object and the target object at the first moment, and the second distance at the second moment. The first moment may be the current moment, and the second moment may be 0.05 seconds before the first moment. The first distance can be calculated based on the position of the sound source object at the first moment and the position information of the target object at the first moment, and the second distance can be calculated based on the position information of the sound source object at the second moment and the position information of the target object at the second moment.

[0096] The distance change value between the first distance and the second distance is calculated to obtain the target motion state parameter. Specifically, the distance change value between the sound source object and the target object at the first moment can be obtained by subtracting the first distance from the second distance.

[0097] According to the mapping relationship between the motion state parameters and the adjustment parameters corresponding to the pitch, the target adjustment parameters corresponding to the pitch under the target motion state parameters are determined. The mapping relationship can be as follows: Figure 2 As shown, based on Figure 2The curve shown can determine the target adjustment parameters corresponding to the target motion state parameters.

[0098] The pitch of the audio is adjusted according to the target adjustment parameter. Specifically, the original frequency of the audio and the target adjustment parameter are added to obtain the target audio. When the sound source object and the target object are relatively close, the motion state parameter is greater than 0, and the corresponding target adjustment parameter is greater than 0; when the sound source object and the target object are relatively far away from each other, the motion state parameter is less than 0, and the corresponding target adjustment parameter is less than 0. Therefore, the target audio adjusted based on the motion state parameter has an effect that when the sound source object and the target object are relatively close, the pitch is higher than the pitch of the original audio, and when the sound source object and the target object are relatively far away from each other, the pitch is lower than the pitch of the audio, which conforms to the Doppler effect, and the height of the pitch is also related to the relative speed of the sound source object and the target object.

[0099] Most sounds are not composed of a single frequency, but are composed of countless frequencies. Based on the target adjustment parameters, each frequency in the audio can be adjusted to obtain the target audio.

[0100] In the game, players can know whether the sound source object and the controlled virtual character are relatively close or far away, and whether they are approaching at a faster speed, approaching at a slower speed, moving away at a faster speed, or moving away at a slower speed based on the target audio. This can improve the game immersion and help players judge the game situation. It can also reduce the energy required to obtain information such as whether the sound source object and the target object are approaching, moving away, or stationary from each other through vision, thereby improving the player's gaming experience.

[0101] Furthermore, the volume of the audio may be adjusted according to the first distance between the sound source object and the target object at the first moment, and the adjusted audio has the characteristic that the closer the distance, the louder the volume, and the farther the distance, the louder the volume.

[0102] Optionally, the audio can also be filtered according to the first distance between the sound source object and the target object at the first moment. For example, different distances can correspond to different filtering ranges. Most sounds are not composed of a single frequency, but are composed of countless frequencies. Sound filtering can filter out certain frequency bands and retain only some frequency bands. For example, when someone is covered in a quilt and speaking, the timbre heard outside the quilt is obviously different, because some frequency bands have been filtered out of the sound. This filtering effect also occurs between the sound source and the listener, and will also change with distance. Therefore, filtering can be used to create a more realistic sense of distance in the audio.

[0103] In order to better implement the audio processing method provided in the embodiment of the present application, an audio processing device is also provided in one embodiment. The meanings of the terms are the same as those in the above audio processing method, and the specific implementation details can refer to the description in the method embodiment.

[0104] The audio processing device can be integrated into a computer device, such as Figure 4 As shown, the audio processing device may include: an acquisition unit 301, a determination unit 302 and an adjustment unit 303, which are specifically as follows:

[0105] (1) An acquisition unit 301 is used to acquire a target motion state parameter of a sound source object relative to a target object, wherein the target motion state parameter indicates whether the sound source object and the target object are relatively close to or relatively far away from each other.

[0106] In one embodiment, the acquisition unit 301 may also be used to:

[0107] Obtaining a first distance between the sound source object and the target object at a first moment, and a second distance between the sound source object and the target object at a second moment;

[0108] According to the first distance and the second distance, obtaining a distance change value between the sound source object and the target object at the first moment;

[0109] The target motion state parameter of the sound source object relative to the target object at the first moment is determined according to the distance change value.

[0110] In one embodiment, the acquisition unit 301 may also be used to:

[0111] The distance change value is determined as a target motion state parameter of the sound source object relative to the target object at the first moment.

[0112] (2) A determination unit 302, configured to determine a target adjustment parameter of the audio corresponding to the sound source object according to the target motion state parameter.

[0113] In one embodiment, the determining unit 302 may also be configured to:

[0114] Obtaining a mapping relationship between the motion state parameters and the adjustment parameters of the audio;

[0115] The target adjustment parameter corresponding to the audio under the target motion state parameter is determined according to the mapping relationship.

[0116] In one embodiment, the target adjustment parameter includes a pitch adjustment parameter.

[0117] In one embodiment, the target motion state parameter less than zero indicates that the sound source object is far away from the target object, and the target motion state parameter greater than zero indicates that the sound source object is close to the target object. The adjustment parameter corresponding to the motion state parameter greater than zero in the mapping relationship is greater than the adjustment parameter corresponding to the motion state parameter less than zero.

[0118] In one embodiment, the target motion state parameter further indicates a relative approaching speed between the sound source object and the target object, or a relative moving away speed between the sound source object and the target object.

[0119] In one embodiment, the adjustment parameter of the audio in the mapping relationship increases as the motion state parameter increases.

[0120] (3) an adjustment unit 303, configured to adjust the audio according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

[0121] In one embodiment, the audio processing device may include:

[0122] A parameter determination unit, used to determine the audio adjustment parameters of the target audio according to the position characteristics of the sound source object relative to the target object;

[0123] A parameter determination unit is used to adjust the target audio according to the audio adjustment parameters.

[0124] In one embodiment, the audio adjustment parameter includes at least one of a volume adjustment parameter and a filtering range, and the parameter determination unit may also be used to:

[0125] Determining a volume adjustment parameter corresponding to the volume of the target audio according to the relative distance between the sound source object and the target object, and / or determining a filtering range for the target audio;

[0126] The parameter determination unit can also be used to:

[0127] The volume of the target audio is adjusted according to the volume adjustment parameter, and / or the target audio is filtered based on the filtering range.

[0128] As can be seen from the above, the audio processing device of the embodiment of the present application obtains the target motion state parameter of the sound source object relative to the target object through the acquisition unit 301, and the target motion state parameter indicates that the sound source object and the target object are relatively close or relatively far away; the determination unit 302 determines the target adjustment parameter of the audio corresponding to the sound source object according to the target motion state parameter; the adjustment unit 303 adjusts the audio according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object. Based on the motion state parameter that can indicate that the sound source object and the target object are relatively close or relatively far away, the audio is adjusted and processed to make the audio more consistent with the law of sound changes in the real world and more realistic.

[0129] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal. Figure 5 As shown, Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. It will be understood by those skilled in the art that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0130] The processor 501 is the control center of the computer device 500. It uses various interfaces and lines to connect the various parts of the entire computer device 500, executes various functions of the computer device 500 and processes data by running or loading software programs and / or modules stored in the memory 502, and calling data stored in the memory 502, thereby monitoring the computer device 500 as a whole.

[0131] In the embodiment of the present application, the processor 501 in the computer device 500 will load instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:

[0132] Acquire a target motion state parameter of the sound source object relative to the target object, the target motion state parameter indicating whether the sound source object and the target object are relatively close or relatively far away;

[0133] Determining target adjustment parameters of the audio corresponding to the sound source object according to the target motion state parameters;

[0134] The audio is adjusted according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

[0135] The embodiment of the present application adjusts and processes the audio based on motion state parameters that can indicate whether the sound source object and the target object are relatively close or relatively far away, so that the audio is more in line with the sound change rules in the real world and has a stronger sense of reality.

[0136] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0137] Optional, such as Figure 5 As shown, the computer device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. The processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507, respectively. Those skilled in the art can understand that Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0138] The touch display screen 503 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 503 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of computer equipment, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive the command sent by the processor 501 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 503 can also be used as a part of the input unit 506 to realize the input function.

[0139] The radio frequency circuit 504 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.

[0140] The audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 505 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and converted into audio data, and then the audio data is output to the processor 501 for processing, and then sent to another computer device through the radio frequency circuit 504, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between an external headset and the computer device.

[0141] The input unit 506 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0142] The power supply 507 is used to supply power to various components of the computer device 500. Optionally, the power supply 507 can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 507 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0143] although Figure 5 Not shown, the computer device 500 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0144] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0145] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0146] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any audio processing method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

[0147] Acquire a target motion state parameter of the sound source object relative to the target object, the target motion state parameter indicating that the sound source object and the target object are relatively close or relatively far away;

[0148] Determining target adjustment parameters of the audio corresponding to the sound source object according to the target motion state parameters;

[0149] The audio is adjusted according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

[0150] The embodiment of the present application adjusts and processes the audio based on motion state parameters that can indicate whether the sound source object and the target object are relatively close or relatively far away, so that the audio is more in line with the sound change rules in the real world and has a stronger sense of reality.

[0151] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0152] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0153] The above is a detailed introduction to an audio processing method, device, computer equipment and computer storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An audio processing method, characterized in that: include: Acquire a target motion state parameter of a sound source object relative to a target object, wherein the target motion state parameter indicates that the sound source object and the target object are relatively close to or relatively far away from each other; Determining target adjustment parameters of the audio corresponding to the sound source object according to the target motion state parameters; The audio is adjusted according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

2. The method according to claim 1, characterized in that The step of determining a target adjustment parameter of the audio corresponding to the sound source object according to the target motion state parameter includes: Acquire a mapping relationship between a motion state parameter and an adjustment parameter of the audio; The target adjustment parameter corresponding to the audio under the target motion state parameter is determined according to the mapping relationship.

3. The method according to claim 2, characterized in that The target motion state parameter less than zero indicates that the sound source object is far away from the target object, and the target motion state parameter greater than zero indicates that the sound source object is close to the target object. The adjustment parameter corresponding to the motion state parameter greater than zero in the mapping relationship is greater than the adjustment parameter corresponding to the motion state parameter less than zero.

4. The method according to claim 2, characterized in that: The target motion state parameter further indicates a relative approaching speed between the sound source object and the target object, or a relative moving away speed between the sound source object and the target object.

5. The method according to claim 4, characterized in that The adjustment parameter of the audio in the mapping relationship increases as the motion state parameter increases.

6. The method according to claim 2, characterized in that The target adjustment parameters include pitch adjustment parameters.

7. The method according to any one of claims 1 to 6, characterized in that: The step of obtaining target motion state parameters of the sound source object relative to the target object includes: Acquire a first distance between the sound source object and the target object at a first moment, and a second distance between the sound source object and the target object at a second moment, wherein the second moment is earlier than the first moment; Obtaining a distance change value between the sound source object and the target object at a first moment according to the first distance and the second distance; A target motion state parameter of the sound source object relative to the target object at the first moment is determined according to the distance change value.

8. The method according to claim 7, characterized in that The determining, according to the distance change value, at the first moment, a target motion state parameter of the sound source object relative to the target object comprises: The distance change value is determined as a target motion state parameter of the sound source object relative to the target object at the first moment.

9. The method according to claim 1, characterized in that: The method further comprises: Determining an audio adjustment parameter of the target audio according to a position feature of the sound source object relative to the target object; The target audio is adjusted according to the audio adjustment parameter.

10. The method according to claim 9, characterized in that The audio adjustment parameter includes at least one of a volume adjustment parameter and a filtering range, and determining the audio adjustment parameter of the target audio according to the position feature of the sound source object relative to the target object includes: Determining a volume adjustment parameter corresponding to the target audio and / or determining a filtering range for the target audio according to a relative distance between the sound source object and the target object; The adjusting the target audio according to the audio adjustment parameter includes: The volume of the target audio is adjusted according to the volume adjustment parameter, and / or the target audio is filtered based on the filtering range.

11. An audio processing device, characterized in that: include: An acquisition unit, configured to acquire a target motion state parameter of a sound source object relative to a target object, wherein the target motion state parameter indicates that the sound source object and the target object are relatively close to or relatively far away from each other; a determining unit, configured to determine a target adjustment parameter of the audio corresponding to the sound source object according to the target motion state parameter; An adjustment unit is used to adjust the audio according to the target adjustment parameter to obtain the target audio of the sound source object corresponding to the position of the target object.

12. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the audio processing method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the audio processing method according to any one of claims 1 to 10.