Sound effect generation method, device, readable medium and electronic device

By emitting rays in the virtual space scene to calculate the room size and reflection coefficient, the target reverberation sound effect is directly generated, which solves the problem of low efficiency in immersive sound effect generation in the existing technology, achieves more efficient immersive sound effect generation, and improves the user experience.

CN114979934BActive Publication Date: 2025-09-12BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210508041.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2025-09-12
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

The existing technology has low efficiency in generating immersive sound effects in terms of sound source motion perception and sound field environment perception, and the computational efficiency is not high, which cannot effectively improve the user's immersive experience.

Method used

By emitting rays in the virtual space scene at the sound effect receiving end, determining the incident direction according to the preset room shape, and directly using the reflection information to calculate the room size and average reflection coefficient, the target reverberation sound effect is generated, reducing the ray classification process and improving the calculation efficiency.

Benefits of technology

It improves the computational efficiency of sound effect generation, improves the efficiency and quality of immersive sound effect generation, and enhances the user's immersive experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114979934B_ABST
    Figure CN114979934B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a sound effect generation method, device, readable medium, and electronic device, the method comprising: obtaining a first position of a sound effect receiving end in a virtual space scene; emitting a first ray at the first position according to a plurality of incident directions determined by a preset room shape, the preset room shape being used to characterize the shape of a target room in which the first position is located in the virtual space scene; determining the room size and target average reflection coefficient of the target room according to reflection information of the first ray in each of the incident directions reflected in the target room; determining the reverberation time of the target room according to the room size and the target average reflection coefficient; processing the reverberation generator according to the reverberation time to generate a target reverberation sound effect, so as to send the target reverberation sound effect to the sound effect receiving end. The sound effect generation method disclosed in the present disclosure can improve the computational efficiency of generating reverberation sound effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of audio processing technology, and in particular, to a sound effect generation method, device, readable medium, and electronic device. Background Art

[0002] Immersive sound effects are a type of sound effect that makes the listener feel as if they are in the scene. Immersive sound effects can be applied to a variety of scenarios, such as VR (Virtual Reality) scenarios, AR (Augmented Reality) scenarios, and game scenarios, so that players or users can get a more realistic sense of presence in the scenario.

[0003] The perception of sound source movement and the sound field environment are important processing links for immersive sound effects and are also the links that most affect the experience. Therefore, it is very necessary to optimize the perception of sound source movement and the sound field environment. Summary of the Invention

[0004] This section is provided to briefly introduce the concepts that will be described in detail in the detailed description below. This section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a method for generating a sound effect, comprising:

[0006] Obtaining the first position of the sound effect receiving end in the virtual space scene;

[0007] emitting a first ray at the first position according to a plurality of incident directions determined by a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene;

[0008] determining a room size and a target average reflection coefficient of the target room according to reflection information of the first ray in each incident direction reflected in the target room;

[0009] determining the reverberation time of the target room according to the room size and the target average reflection coefficient;

[0010] The reverberation generator is processed according to the reverberation time to generate a target reverberation sound effect, so as to send the target reverberation sound effect to the sound effect receiving end.

[0011] In a second aspect, the present disclosure provides a sound effect generating device, comprising:

[0012] A first acquisition module is configured to acquire a first position of the sound effect receiving end in the virtual space scene;

[0013] a first transmitting module configured to transmit a first ray at the first position according to a plurality of incident directions determined by a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene;

[0014] a first determining module configured to determine a room size and a target average reflection coefficient of the target room according to reflection information of the first ray of each incident direction reflected in the target room;

[0015] a second determining module configured to determine the reverberation time of the target room according to the room size and the target average reflection coefficient;

[0016] The first generating module is configured to process the reverberation generator according to the reverberation time to generate a target reverberation sound effect, so as to send the target reverberation sound effect to the sound effect receiving end.

[0017] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.

[0018] In a fourth aspect, the present disclosure provides an electronic device, comprising:

[0019] a storage device having at least one computer program stored thereon;

[0020] At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method of the first aspect.

[0021] Through the above technical solution, a first ray is emitted at a first position using multiple incident directions determined based on a preset room shape. Since the incident direction of the first ray is its reflection direction after reflection, when the incident direction is determined, it is not necessary to classify the first ray according to its reflection direction. The room size and average reflection coefficient can be determined based on the reflection information of the first ray classified according to the reflection direction. The present disclosure directly determines the room size and average reflection coefficient based on the reflection information of the first ray reflected in the target room from each incident direction, eliminating the need to classify the first ray according to its reflection direction. This can greatly improve computational efficiency, thereby improving the overall efficiency of generating reverberant sound effects.

[0022] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:

[0024] Figure 1 The figure is a flowchart of a method for generating sound effects according to an exemplary embodiment of the present disclosure.

[0025] Figure 2 FIG. 4 is a schematic diagram showing the emission of a first ray according to an exemplary embodiment of the present disclosure.

[0026] Figure 3 The figure is a flowchart of a method for generating binaural direct sound effects according to an exemplary embodiment of the present disclosure.

[0027] Figure 4 The figure is a block diagram of a device for generating sound effects according to an exemplary embodiment of the present disclosure.

[0028] Figure 5 FIG. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0031] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0033] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0035] All actions of acquiring signals, information or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0036] As mentioned in the background art, the perception of sound source movement and the perception of the sound field environment are important processing links for immersive sound effects, and are also the links that most affect the experience. The perception of sound source movement can include the listener's perception of the sound source when there is an obstacle between the sound source and the listener, which can be understood as a sound barrier problem; the perception of the sound field environment can include the listener's perception of the environment when the room is switched or the listener's environment changes, which can be understood as a dynamic reverberation problem. In the related art, the sound effects generated by the technical solutions used to solve the sound barrier problem are not immersive, and the computational efficiency of the technical solutions used to solve the dynamic reverberation problem is low.

[0037] Figure 1 This is a flow chart of a sound effect generation method according to an exemplary embodiment of the present disclosure. The sound effect generation method can be applied to electronic devices, which may include mobile phones, tablet computers, laptop computers, and wearable devices. In some embodiments, the sound effect generation method is executed at preset time intervals. The preset time interval can be set according to actual needs, for example, 10ms, 20ms, or 30ms. Since the interval time is in milliseconds, it is equivalent to the sound effect generation method being executed in real time. Figure 1 As shown, the method includes the following steps.

[0038] Step 110: Obtain a first position of the sound effect receiving end in the virtual space scene.

[0039] In some embodiments, the sound effect receiving end may refer to a user (or player), for example, a user (or player) in a VR scene, an AR scene, or a game scene. A virtual space scene may be a virtual space (or game space) constructed for a user, in which the user can be displayed through a virtual object, for example, the user can be displayed through a game character controlled by the user. In some embodiments, the first position may refer to the position of the virtual object corresponding to the user in the virtual space scene.

[0040] Step 120 , emitting a first ray at a first position according to a plurality of incident directions determined by a preset room shape, where the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene.

[0041] In some embodiments, the virtual space scene may include multiple rooms, and the target room may be the room where the user's first position is located. In some embodiments, a preset room shape may be used to represent the shape of the target room, and the preset room shape may be pre-set based on actual needs. In some embodiments, the preset room shape may include, but is not limited to, a cuboid, a sphere, a dodecahedron, or an icosahedron. In some embodiments, the preset room shape may be set to a polyhedron, such as a dodecahedron or an icosahedron. By setting the preset room shape to a polyhedron, the accuracy of subsequent room size calculations may be improved.

[0042] In some embodiments, the multiple incident directions can be determined based on the dimensions used to determine the room size. For example, the preset room shape is a cuboid, and the dimensions used to determine the cuboid size include length, width, and height. Then, the multiple incident directions can be orthogonal directions of the cuboid, such as Figure 2 As shown, at this time, the first position (i.e. Figure 2 The first ray is emitted in the positive X-axis, negative X-axis, positive Y-axis, negative Y-axis), positive Z-axis, and negative Z-axis directions, with the user's position shown as the origin. For example, if the room shape is a sphere and the dimension used to determine the size of the sphere includes a radius, the multiple incident directions can be radial directions of the sphere. In this case, the first ray can be emitted in the radial direction of the sphere with the first position as the origin.

[0043] The present disclosure determines multiple incident directions according to the dimensions of a preset room shape, and emits a first ray according to the multiple incident directions. Since the first ray emitted according to the incident direction will be reflected back along the incident direction, and the incident direction is determined according to the dimensions of the preset room shape, the emitted first ray will be reflected on the reflection surface corresponding to the incident direction, and the reflection surface is a component surface of the preset room shape of the target room. Therefore, the reflection information of the first ray in each incident direction reflects the information of the corresponding reflection surface, and then the reflection information of the first ray in each incident direction can be used to determine the size or average reflection coefficient of the reflection surface of the target room corresponding to the incident direction.

[0044] Step 130 : Determine the room size and target average reflection coefficient of the target room according to the reflection information of the first ray of each incident direction reflected in the target room.

[0045] In some embodiments, the first ray may be a ray cluster, which may include multiple rays. In some embodiments, the reflection information may include a first reflection point of the first ray on a first component surface of the target room, and incident energy and reflected energy of the first ray.

[0046] In some embodiments, the room size and the target average reflection coefficient of the target room are determined based on the reflection information of the first ray of each incident direction reflected in the target room, including: clustering the first reflection points of the first ray of each incident direction on the first component surface of the target room to determine the room size of the target room, where the first component surface is the component surface of the target room in the virtual space scene; and determining the target average reflection coefficient of the target room based on the incident energy and reflected energy reflected by the first ray of each incident direction.

[0047] In some embodiments, the virtual space scene is composed of triangular faces or quadrilateral faces. Correspondingly, the target room in the virtual space scene may also be composed of triangular faces or quadrilateral faces. Therefore, the first component face may be a triangular face or a quadrilateral face.

[0048] In some embodiments, the sound effect generation method further includes: performing ray tracing based on the first ray and the first component surface of each incident direction to determine the first reflection path of the first ray reflected in the target room; and determining the first reflection point based on the first intersection of the first reflection path and the first component surface.

[0049] In some embodiments, ray tracing can be implemented using a ray library. Accordingly, the first ray and the first component surface can be input into the ray library for ray tracing to determine the first reflection path of the first ray in the target room. The ray library can be an EMBREE ray library. Specific details about the EMBREE ray library can be found in related art and are not further described here.

[0050] In some embodiments, a preset number of ray tracings can be performed based on the first ray and the first component surface in each incident direction. The preset number of times can include one or more times. By performing multiple ray tracings, as many intersection points of the reflection path and the first component surface as possible can be determined, thereby determining as many first reflection points as possible, thereby further improving the accuracy of subsequent calculations of the room size.

[0051] In some embodiments, clustering processing is performed based on the first reflection point of the first ray of each incident direction on the first component surface of the target room to determine the room size of the target room, including: for each first reflection point of the first ray of each incident direction on the first component surface of the target room, determining the size of the second component surface corresponding to the incident direction based on the distance between the first reflection point and the first position to obtain the size of each second component surface corresponding to each incident direction; and determining the room size based on the size of each second component surface corresponding to each incident direction.

[0052] For example, Figure 2 For example, the dimensions of the two side faces of the cuboid can be determined based on the distance between the first reflection point and the first position of the first ray in the positive and negative directions of the X-axis (the dimensions can be the lengths of the respective sides of the two side faces). Similarly, the dimensions of each of the six sides of the cuboid can be determined, and thus the dimensions of the room can be determined based on the dimensions of the six sides. In some embodiments, the room dimensions can be the lengths of the respective sides of a preset room shape of the target room.

[0053] In some embodiments, the size of the second component surface corresponding to the incident direction can be determined based on the average value of distances that meet a preset condition. The preset condition can be determined based on actual circumstances. For example, the preset condition can be that the distance is greater than a preset threshold, or the preset condition can be a preset ranking or ratio before the distances are sorted. Determining the size of the second component surface corresponding to the incident direction based on the average value of the distances is simple to operate and highly efficient.

[0054] In some embodiments, determining the size of the target room based on the first reflection point of each incident ray on the first component surface of the target room by clustering the first ray from each incident direction includes: performing K-Mean clustering on the first reflection point of each incident ray on the first component surface of the target room to determine the position of each second component surface of the target room; and determining the room size based on the position of each second component surface. In some embodiments, the second component surface is a component surface of a preset room shape of the target room. For example, if the preset room shape is a rectangular parallelepiped, the second component surface includes the six faces of the rectangular parallelepiped. Determining the room size through K-Mean clustering can improve the accuracy of the determined room size.

[0055] In some embodiments, the target average reflection coefficient of the target room is determined based on the incident energy and the reflected energy reflected by the first ray of each incident direction, including: determining the average reflection coefficient of each second component surface corresponding to each incident direction based on the incident energy and the reflected energy of the first ray of each incident direction, the second component surface being a component surface of the preset room shape of the target room; and determining the target average reflection coefficient of the target room based on the average reflection coefficient of each second component surface.

[0056] In some embodiments, the reflected energy of the first ray can be determined based on a preset reflection coefficient of the first component surface on which the first ray is reflected and the incident energy of the first ray. In some embodiments, the incident energy of the first ray is known when the ray is emitted, and the preset reflection coefficient of the first component surface is pre-set. The reflected energy of the first ray can be obtained by multiplying the incident energy of the first ray by the preset reflection coefficient of the first component surface on which the first ray is reflected.

[0057] In some embodiments, for the first ray of each incident direction, a weighted average can be taken based on the incident energy of each first ray to obtain an average incident energy; a weighted average can be taken based on the reflected energy of each first ray to obtain an average reflected energy; and based on the ratio of the average reflected energy to the average incident energy, an average reflection coefficient of the second component surface corresponding to the incident direction can be obtained to obtain the average reflection coefficient of each second component surface corresponding to each incident direction.

[0058] In some embodiments, when weighted averaging the incident energy and reflected energy, the weight corresponding to the first ray can be determined based on the area of ​​the first component surface on which the first ray reflects. For example, the larger the area, the greater the weight. In some embodiments, the average reflection coefficient of each second component surface can be summed to determine the target average reflection coefficient of the target room.

[0059] The present disclosure emits a first ray at a first position by emitting a plurality of incident directions determined according to a preset room shape. Since the incident direction of the first ray is its reflection direction after reflection, when the incident direction is determined, there is no need to classify the first ray according to its reflection direction (i.e., there is no need to classify the first ray reflected on the same reflection surface according to its reflection direction), so that the room size and average reflection coefficient are determined by the reflection information of the first ray classified according to the reflection direction. The present disclosure directly determines the room size and average reflection coefficient based on the reflection information of the first ray reflected in the target room from each incident direction, thereby reducing the process of classifying the first ray according to its reflection direction, greatly improving the calculation efficiency, and thus improving the efficiency of generating reverberation sound effects as a whole.

[0060] Step 140: Determine the reverberation time of the target room based on the room size and the average reflection coefficient.

[0061] In some embodiments, the reverberation time is the time taken for the average sound pressure level in the room to decay by 60 dB from the time the sound source stops emitting sound to the time the sound reaches a stable state. It can be represented by RT60. In some embodiments, the reverberation time can be determined by the following formula (1):

[0062]

[0063] Where T is the reverberation time, V is the volume of the room, and S is the internal surface area. Represents the average sound absorption coefficient.

[0064] For example, assuming the room dimensions are the lengths of each side of the target room's preset room shape, the target room's volume and internal surface area can be calculated using the room dimensions. Furthermore, since the sum of the average sound absorption coefficient and the average reflection coefficient is 1, the average sound absorption coefficient can be calculated using the average reflection coefficient. Therefore, by substituting the calculated room volume, internal surface area, and average sound absorption coefficient into the above formula (1), the reverberation time of the target room can be obtained.

[0065] Step 150 : Process the reverberation generator according to the reverberation time to generate a target reverberation sound effect, and send the target reverberation sound effect to the sound effect receiving end.

[0066] In some embodiments, the reverberation generator includes a binaural room impulse response and a feedforward delay network; the reverberation generator is processed according to the reverberation time to generate a target reverberation sound effect, including: adjusting the parameters of the binaural room impulse response according to the reverberation time to generate a first reverberation sound effect; adjusting the parameters of the feedforward delay network according to the reverberation time to generate a second reverberation sound effect; and performing mixing processing based on the first reverberation sound effect and the second reverberation sound effect to generate the target reverberation sound effect.

[0067] In some embodiments, a binaural room impulse response (BRIR) is used to describe the sound transmission process from a sound source to a sound effect receiving end, namely, at the listener's ears. The BRIR is related to the reverberation time and is measured data. Adjusting the parameters of the BRIR based on the reverberation time may include matching the reverberation time with the BRIR. For example, if the reverberation time is greater than the BRIR, the BRIR time is amplified; otherwise, the BRIR time is reduced to match the input reverberation time.

[0068] In some embodiments, matching the reverberation time to the binaural room impulse response may include, but is not limited to, performing temporal attenuation, time-domain attenuation, or frequency-domain attenuation of the binaural room impulse response through distributed convolution. In some embodiments, the binaural room impulse response may be obtained using a plurality of pre-set, previously acquired room convolution kernels. BRIRs of different orders may be selected based on computational resource constraints.

[0069] Since the distortion of the binaural room impulse response will affect the sound quality of the sound signal and reduce the listener's listening experience, the present disclosure can improve the sound quality of the generated first reverberation sound effect by adjusting the parameters of the binaural room impulse response according to the reverberation time.

[0070] In some embodiments, adjusting parameters of a feedforward delayed network (FDN) based on reverberation time may involve selecting filters within the FDN based on the reverberation time. The second reverberation effect generated by the FDN may be a later reverberation effect, which is more efficient. The first reverberation effect generated by the BRIR has higher sound quality. Therefore, the present disclosure utilizes both BRIR and FDN to generate a target reverberation effect, achieving both efficiency and a better reverberation effect.

[0071] It is worth noting that the present disclosure is not limited to generating target reverberation sound effects by combining BRIR and FDN. For example, target reverberation sound effects can also be generated using a spectral reverberation generation method based on reverberation time, by adjusting FDN parameters based on reverberation time, by adjusting BRIR parameters based on reverberation time, or by other reverberation generation methods that utilize reverberation time. For more information on spectral reverberation generation methods, please refer to the relevant art, and for more information on BRIR and FDN, please refer to the previous descriptions, which will not be elaborated here.

[0072] Figure 3 FIG. 1 is a flow chart of a method for generating binaural direct sound effects according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the method includes the following steps.

[0073] Step 310: Acquire a second position of the sound source in the virtual space scene.

[0074] In some embodiments, there may be multiple sound sources. A sound source refers to an object that can emit sound that is received by the sound effect receiving terminal. For example, it can be a non-player character in the game, a game character controlled by another player, or a sound-emitting object. For specific details about the virtual space scene, please refer to step 110 and its related description, and will not be repeated here.

[0075] Step 320: emit a second ray at a second position.

[0076] In some embodiments, the second ray may be a ray cluster, which may include multiple rays. In some embodiments, the second ray may be emitted within a preset range of the direction of the line connecting the sound source and the sound effect receiving end (i.e., the listener). Emitting the second ray within this preset range can improve the accuracy of the determined sound obstruction level and equivalent orientation.

[0077] Step 330 : Determine a second reflection point of the second ray on a first component surface of the target room according to the reflection of the second ray in the target room, where the first component surface is a component surface of the target room in the virtual space scene.

[0078] In some embodiments, determining a second reflection point of the second ray on a first component surface of the target room based on the second ray reflecting in the target room includes: performing ray tracing on the second ray and the first component surface to determine a second reflection path of the second ray reflecting in the target room; and determining the second reflection point based on a second intersection of the second reflection path and the first component surface. The specific details of determining the second reflection point are the same as those of determining the first reflection point. For details, refer to step 130 and its related description above and are not further elaborated here.

[0079] Step 340: Determine the degree of sound obstruction and the equivalent orientation of the sound source based on the intersection of the first line connecting the second reflection point and the sound source and the first component surface. The degree of sound obstruction reflects the degree to which the space between the sound source and the sound effect receiving end is obstructed, and the equivalent orientation reflects the position of the sound source perceived by the sound effect receiving end when the sound source is obstructed.

[0080] In some embodiments, based on the intersection between the first connecting line between the second reflection point and the sound source and the first component surface, it can be determined whether the second reflection point can reach the listener directly without obstacles. For example, if the first connecting line does not intersect with the first component surface, it indicates that the second reflection point of the first connecting line can reach the listener directly. Otherwise, it indicates that the second reflection point of the first connecting line cannot reach the listener directly.

[0081] In some embodiments, the degree of sound obstruction and the equivalent orientation of the sound source are determined based on the intersection between the second reflection point and the first connecting line of the sound source and the first component surface, including: determining the degree of sound obstruction based on the number of initial second reflection points corresponding to the first connecting line intersecting with the first component surface, and determining the equivalent orientation based on the position of the target second reflection point corresponding to the first connecting line that does not intersect with the first component surface.

[0082] In some embodiments, the greater the number of initial second reflection points corresponding to the first connecting line intersecting the first component surface, the lower the degree of obstruction between the sound source and the listener, and the lower the corresponding degree of sound obstruction. Conversely, the smaller the number, the higher the degree of sound obstruction. In some embodiments, a weighted operation can be performed based on the position of the target second reflection points corresponding to the first connecting line that does not intersect the first component surface to determine the equivalent orientation. For example, the position where the target second reflection points are concentrated can be determined as the equivalent orientation. By determining the equivalent orientation, it is possible to fit the phenomenon that the orientation of the sound source perceived by the listener changes when the sound source is blocked by an obstacle.

[0083] Step 350: Generate binaural direct sound effects based on the degree of sound obstruction and the equivalent orientation, and send the binaural direct sound effects to the sound effect receiving end, or send a mixed sound effect of the binaural direct sound effects and the target reverberation sound effects to the sound effect receiving end.

[0084] In some embodiments, binaural direct sound effects are generated based on the degree of sound obstruction and the equivalent orientation, including: attenuating the sound source according to the degree of sound obstruction to generate a target sound source; encoding and decoding the target sound source and the equivalent orientation to generate a binaural direct sound effect.

[0085] In some embodiments, attenuation can be achieved using a low-pass filter. For example, the parameters of the low-pass filter can be adjusted based on the degree of sound obstruction, such as to increase the suppression of high-frequency components. In some embodiments, the encoding process can be AmbiX encoding, and the decoding process can be AmbiX decoding. For details about AmbiX encoding and AmbiX decoding, please refer to the relevant literature and will not be further elaborated here.

[0086] The present disclosure replaces the actual orientation with an equivalent orientation, which changes the listener's perception of the sound source orientation, thereby generating binaural direct sound effects transmitted to the listener based on the equivalent orientation and the degree of sound obstruction, thereby improving the listener's sense of immersion in the sound source.

[0087] It is worth noting that the present disclosure is not limited to generating binaural direct sound effects through the above-mentioned scheme. For example, it is also possible to generate direct sound through HRTF (Head Related Transfer Function) or other methods of generating direct sound.

[0088] Figure 4 FIG. 1 is a block diagram of a sound effect generating device according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the apparatus 400 includes:

[0089] A first acquisition module 410 is configured to acquire a first position of the sound effect receiving end in the virtual space scene;

[0090] A first transmitting module 420 is configured to transmit a first ray at the first position according to a plurality of incident directions determined according to a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene;

[0091] A first determining module 430 is configured to determine a room size and a target average reflection coefficient of the target room according to reflection information of the first ray of each incident direction reflected in the target room;

[0092] A second determination module 440 is configured to determine the reverberation time of the target room according to the room size and the target average reflection coefficient;

[0093] The first generating module 450 is configured to process the reverberation generator according to the reverberation time to generate a target reverberation sound effect, and send the target reverberation sound effect to the sound effect receiving end.

[0094] In some embodiments, the first determining module 430 is further configured to:

[0095] performing clustering processing on a first reflection point of the first ray in each incident direction on a first component surface of the target room to determine the room size of the target room, where the first component surface is a component surface of the target room in the virtual space scene; and

[0096] The target average reflection coefficient of the target room is determined according to the incident energy and the reflected energy reflected by the first ray in each of the incident directions.

[0097] In some embodiments, the apparatus further comprises:

[0098] a third determining module, configured to perform ray tracing based on the first ray in each incident direction and the first component surface, to determine a first reflection path of the first ray reflected in the target room;

[0099] The fourth determining module is configured to determine the first reflection point according to a first intersection point between the first reflection path and the first component surface.

[0100] In some embodiments, the first determining module 430 is further configured to:

[0101] determining, based on the incident energy and the reflected energy of the first ray in each of the incident directions, an average reflection coefficient of each second component surface corresponding to each of the incident directions, the second component surface being a component surface of the preset room shape of the target room;

[0102] The target average reflection coefficient of the target room is determined according to the average reflection coefficient of each of the second component surfaces.

[0103] In some embodiments, the reverberation generator includes a binaural room impulse response and a feedforward delay network; the first generation module 450 is further configured to:

[0104] Adjusting parameters of the binaural room impulse response according to the reverberation time to generate a first reverberation sound effect;

[0105] Adjusting parameters of the feedforward delay network according to the reverberation time to generate a second reverberation sound effect;

[0106] The target reverberation sound effect is generated by performing mixing processing based on the first reverberation sound effect and the second reverberation sound effect.

[0107] In some embodiments, the apparatus further comprises:

[0108] A second acquisition module is configured to acquire a second position of the sound source in the virtual space scene;

[0109] a second transmitting module, configured to transmit a second ray at the second position;

[0110] a fifth determining module configured to determine, based on the reflection of the second ray on the target room, a second reflection point of the second ray on a first component surface of the target room, where the first component surface is a component surface of the target room in the virtual space scene;

[0111] a sixth determining module configured to determine a degree of sound obstruction and an equivalent orientation of the sound source based on an intersection between the second reflection point, a first line connecting the sound source, and the first component surface, wherein the degree of sound obstruction reflects the degree to which the space between the sound source and the sound effect receiving end is obstructed, and the equivalent orientation reflects the position of the sound source perceived by the sound effect receiving end when the sound source is obstructed;

[0112] The second generation module is configured to generate binaural direct sound effects according to the degree of sound obstruction and the equivalent orientation, so as to send the binaural direct sound effects to the sound effect receiving end, or to send a mixed sound effect of the binaural direct sound effects and the target reverberation sound effects to the sound effect receiving end.

[0113] In some embodiments, the sixth determining module is further configured to:

[0114] The degree of sound obstruction is determined based on the number of initial second reflection points corresponding to the first line intersecting the first component surface, and the equivalent orientation is determined based on the position of the target second reflection point corresponding to the first line not intersecting the first component surface.

[0115] In some embodiments, the fifth determining module is further configured to:

[0116] performing ray tracing based on the second ray and the first component surface to determine a second reflection path of the second ray reflected in the target room;

[0117] The second reflection point is determined according to a second intersection point of the second reflection path and the first component surface.

[0118] In some embodiments, the second generating module is further configured to:

[0119] performing attenuation processing on the sound source according to the degree of sound obstruction to generate a target sound source;

[0120] Encoding and decoding are performed according to the target sound source and the equivalent orientation to generate the binaural direct sound effect.

[0121] Reference below Figure 5 , which shows a schematic structural diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0122] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0123] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0124] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0125] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0126] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0127] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0128] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device is caused to: obtain a first position of a sound effect receiving end in a virtual space scene; emit a first ray at the first position according to multiple incident directions determined by a preset room shape, where the preset room shape is used to characterize the shape of a target room where the first position is located in the virtual space scene; determine the room size and target average reflection coefficient of the target room based on reflection information of the first ray in each of the incident directions reflected in the target room; determine the reverberation time of the target room based on the room size and the target average reflection coefficient; process the reverberation generator according to the reverberation time to generate a target reverberation sound effect, and send the target reverberation sound effect to the sound effect receiving end.

[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.

[0132] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0134] According to one or more embodiments of the present disclosure, Example 1 provides a method for generating a sound effect, including:

[0135] Obtaining the first position of the sound effect receiving end in the virtual space scene;

[0136] emitting a first ray at the first position according to a plurality of incident directions determined by a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene;

[0137] determining a room size and a target average reflection coefficient of the target room according to reflection information of the first ray in each incident direction reflected in the target room;

[0138] determining the reverberation time of the target room according to the room size and the target average reflection coefficient;

[0139] The reverberation generator is processed according to the reverberation time to generate a target reverberation sound effect, so as to send the target reverberation sound effect to the sound effect receiving end.

[0140] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining the room size and target average reflection coefficient of the target room based on reflection information of the first ray in each incident direction reflected in the target room includes:

[0141] performing clustering processing on a first reflection point of the first ray in each incident direction on a first component surface of the target room to determine the room size of the target room, where the first component surface is a component surface of the target room in the virtual space scene; and

[0142] The target average reflection coefficient of the target room is determined according to the incident energy and the reflected energy reflected by the first ray in each of the incident directions.

[0143] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the method further includes:

[0144] performing ray tracing based on the first ray in each incident direction and the first component surface to determine a first reflection path of the first ray reflected in the target room;

[0145] The first reflection point is determined according to a first intersection point between the first reflection path and the first component surface.

[0146] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein determining the target average reflection coefficient of the target room based on the incident energy and the reflected energy reflected by the first ray in each incident direction includes:

[0147] determining, based on the incident energy and the reflected energy of the first ray in each of the incident directions, an average reflection coefficient of each second component surface corresponding to each of the incident directions, the second component surface being a component surface of the preset room shape of the target room;

[0148] The target average reflection coefficient of the target room is determined according to the average reflection coefficient of each of the second component surfaces.

[0149] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the reverberation generator includes a binaural room impulse response and a feedforward delay network;

[0150] The processing of the reverberation generator according to the reverberation time to generate a target reverberation sound effect includes:

[0151] Adjusting parameters of the binaural room impulse response according to the reverberation time to generate a first reverberation sound effect;

[0152] Adjusting parameters of the feedforward delay network according to the reverberation time to generate a second reverberation sound effect;

[0153] The target reverberation sound effect is generated by performing mixing processing based on the first reverberation sound effect and the second reverberation sound effect.

[0154] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, further comprising:

[0155] Obtaining a second position of the sound source in the virtual space scene;

[0156] emitting a second ray at the second position;

[0157] determining, based on the reflection of the second ray in the target room, a second reflection point of the second ray on a first component surface of the target room, where the first component surface is a component surface of the target room in the virtual space scene;

[0158] Determining a sound obstruction degree and an equivalent orientation of the sound source based on an intersection between the second reflection point, a first line connecting the sound source, and the first component surface, wherein the sound obstruction degree reflects the degree of obstruction of the space between the sound source and the sound effect receiving end, and the equivalent orientation reflects the position of the sound source perceived by the sound effect receiving end when the sound source is obstructed;

[0159] According to the degree of sound obstruction and the equivalent orientation, a binaural direct sound effect is generated to send the binaural direct sound effect to the sound effect receiving end, or a mixed sound effect of the binaural direct sound effect and the target reverberation sound effect is sent to the sound effect receiving end.

[0160] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein determining the degree of sound obstruction and the equivalent orientation of the sound source based on the intersection of the second reflection point, the first connecting line of the sound source, and the first component surface includes:

[0161] The degree of sound obstruction is determined based on the number of initial second reflection points corresponding to the first line intersecting the first component surface, and the equivalent orientation is determined based on the position of the target second reflection point corresponding to the first line not intersecting the first component surface.

[0162] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 6, wherein determining a second reflection point of the second ray on a first component surface of the target room based on the reflection of the second ray in the target room includes:

[0163] performing ray tracing based on the second ray and the first component surface to determine a second reflection path of the second ray reflected in the target room;

[0164] The second reflection point is determined according to a second intersection point of the second reflection path and the first component surface.

[0165] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 6, wherein generating a binaural direct sound effect according to the degree of sound obstruction and the equivalent orientation includes:

[0166] performing attenuation processing on the sound source according to the degree of sound obstruction to generate a target sound source;

[0167] Encoding and decoding are performed according to the target sound source and the equivalent orientation to generate the binaural direct sound effect.

[0168] According to one or more embodiments of the present disclosure, Example 10 provides a sound effect generating device, including:

[0169] A first acquisition module is configured to acquire a first position of the sound effect receiving end in the virtual space scene;

[0170] a first transmitting module configured to transmit a first ray at the first position according to a plurality of incident directions determined by a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene;

[0171] a first determining module configured to determine a room size and a target average reflection coefficient of the target room according to reflection information of the first ray of each incident direction reflected in the target room;

[0172] a second determining module configured to determine the reverberation time of the target room according to the room size and the target average reflection coefficient;

[0173] The first generating module is configured to process the reverberation generator according to the reverberation time to generate a target reverberation sound effect, and send the target reverberation sound effect to the sound effect receiving end. It includes:

[0174] According to one or more embodiments of the present disclosure, Example 11 provides the apparatus of Example 10, wherein the first determining module is further configured to:

[0175] performing clustering processing on a first reflection point of the first ray in each incident direction on a first component surface of the target room to determine the room size of the target room, where the first component surface is a component surface of the target room in the virtual space scene; and

[0176] The target average reflection coefficient of the target room is determined according to the incident energy and the reflected energy reflected by the first ray in each of the incident directions.

[0177] According to one or more embodiments of the present disclosure, Example 12 provides the apparatus of Example 11, further comprising:

[0178] a third determining module, configured to perform ray tracing based on the first ray in each incident direction and the first component surface, to determine a first reflection path of the first ray reflected in the target room;

[0179] The fourth determining module is configured to determine the first reflection point according to a first intersection point between the first reflection path and the first component surface.

[0180] According to one or more embodiments of the present disclosure, Example 13 provides the apparatus of Example 11, wherein the first determining module is further configured to:

[0181] determining, based on the incident energy and the reflected energy of the first ray in each of the incident directions, an average reflection coefficient of each second component surface corresponding to each of the incident directions, the second component surface being a component surface of the preset room shape of the target room;

[0182] The target average reflection coefficient of the target room is determined according to the average reflection coefficient of each of the second component surfaces.

[0183] According to one or more embodiments of the present disclosure, Example 14 provides the apparatus of Example 10, wherein the reverberation generator includes a binaural room impulse response and a feedforward delay network; and the first generation module is further configured to:

[0184] Adjusting parameters of the binaural room impulse response according to the reverberation time to generate a first reverberation sound effect;

[0185] Adjusting parameters of the feedforward delay network according to the reverberation time to generate a second reverberation sound effect;

[0186] The target reverberation sound effect is generated by performing mixing processing based on the first reverberation sound effect and the second reverberation sound effect.

[0187] According to one or more embodiments of the present disclosure, Example 15 provides the apparatus of Example 10, further comprising:

[0188] A second acquisition module is configured to acquire a second position of the sound source in the virtual space scene;

[0189] a second transmitting module, configured to transmit a second ray at the second position;

[0190] a fifth determining module configured to determine, based on the reflection of the second ray on the target room, a second reflection point of the second ray on a first component surface of the target room, where the first component surface is a component surface of the target room in the virtual space scene;

[0191] a sixth determining module configured to determine a degree of sound obstruction and an equivalent orientation of the sound source based on an intersection between the second reflection point, a first line connecting the sound source, and the first component surface, wherein the degree of sound obstruction reflects the degree to which the space between the sound source and the sound effect receiving end is obstructed, and the equivalent orientation reflects the position of the sound source perceived by the sound effect receiving end when the sound source is obstructed;

[0192] The second generation module is configured to generate binaural direct sound effects according to the degree of sound obstruction and the equivalent orientation, so as to send the binaural direct sound effects to the sound effect receiving end, or to send a mixed sound effect of the binaural direct sound effects and the target reverberation sound effects to the sound effect receiving end.

[0193] According to one or more embodiments of the present disclosure, Example 16 provides the apparatus of Example 15, wherein the sixth determining module is further configured to:

[0194] The degree of sound obstruction is determined based on the number of initial second reflection points corresponding to the first line intersecting the first component surface, and the equivalent orientation is determined based on the position of the target second reflection point corresponding to the first line not intersecting the first component surface.

[0195] According to one or more embodiments of the present disclosure, Example 17 provides the apparatus of Example 15, wherein the fifth determining module is further configured to:

[0196] performing ray tracing based on the second ray and the first component surface to determine a second reflection path of the second ray reflected in the target room;

[0197] The second reflection point is determined according to a second intersection point of the second reflection path and the first component surface.

[0198] According to one or more embodiments of the present disclosure, Example 18 provides the apparatus of Example 15, wherein the second generating module is further configured to:

[0199] performing attenuation processing on the sound source according to the degree of sound obstruction to generate a target sound source;

[0200] Encoding and decoding are performed according to the target sound source and the equivalent orientation to generate the binaural direct sound effect.

[0201] According to one or more embodiments of the present disclosure, Example 19 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in any one of Examples 1-9 when executed by a processing device.

[0202] According to one or more embodiments of the present disclosure, Example 20 provides an electronic device, including:

[0203] a storage device having at least one computer program stored thereon;

[0204] At least one processing device is configured to execute the at least one computer program in the storage device to implement the steps of the method described in any one of Examples 1-9.

[0205] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0206] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0207] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. A sound effect generation method, characterized in that: include: Obtaining the first position of the sound effect receiving end in the virtual space scene; emitting a first ray at the first position according to a plurality of incident directions determined according to a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene; determining a room size and a target average reflection coefficient of the target room according to reflection information of the first ray in each incident direction reflected in the target room; determining the reverberation time of the target room according to the room size and the target average reflection coefficient; Processing the reverberation generator according to the reverberation time to generate a target reverberation sound effect; The method also includes: obtaining a second position of the sound source in the virtual space scene; emitting a second ray at the second position; determining a second reflection point of the second ray on a first component surface of the target room based on reflection of the second ray in the target room, the first component surface being a component surface of the target room in the virtual space scene; determining a degree of sound obstruction and an equivalent orientation of the sound source based on an intersection between the second reflection point, a first connecting line of the sound source, and the first component surface, the degree of sound obstruction reflecting the degree to which the space between the sound source and the sound effect receiving end is obstructed, and the equivalent orientation reflecting the position of the sound source perceived by the sound effect receiving end when the sound source is obstructed; generating a binaural direct sound effect based on the degree of sound obstruction and the equivalent orientation, and sending the binaural direct sound effect to the sound effect receiving end, or sending a mixed sound effect of the binaural direct sound effect and the target reverberation sound effect to the sound effect receiving end.

2. The sound effect generation method according to claim 1, wherein: Determining the room size and target average reflection coefficient of the target room according to reflection information of the first ray in each incident direction reflected in the target room includes: performing clustering processing on a first reflection point of the first ray in each incident direction on a first component surface of the target room to determine the room size of the target room, where the first component surface is a component surface of the target room in the virtual space scene; and The target average reflection coefficient of the target room is determined according to the incident energy and the reflected energy reflected by the first ray in each of the incident directions.

3. The sound effect generation method according to claim 2, characterized in that: The method further comprises: performing ray tracing based on the first ray in each incident direction and the first component surface to determine a first reflection path of the first ray reflected in the target room; The first reflection point is determined according to a first intersection point between the first reflection path and the first component surface.

4. The sound effect generation method according to claim 2, wherein: The determining the target average reflection coefficient of the target room according to the incident energy and the reflected energy reflected by the first ray in each incident direction includes: determining, based on the incident energy and the reflected energy of the first ray in each of the incident directions, an average reflection coefficient of each second component surface corresponding to each of the incident directions, the second component surface being a component surface of the preset room shape of the target room; The target average reflection coefficient of the target room is determined according to the average reflection coefficient of each of the second component surfaces.

5. The sound effect generation method according to claim 1, wherein: The reverberation generator includes a binaural room impulse response and a feedforward delay network; The processing of the reverberation generator according to the reverberation time to generate a target reverberation sound effect includes: Adjusting parameters of the binaural room impulse response according to the reverberation time to generate a first reverberation sound effect; Adjusting parameters of the feedforward delay network according to the reverberation time to generate a second reverberation sound effect; The target reverberation sound effect is generated by performing mixing processing based on the first reverberation sound effect and the second reverberation sound effect.

6. The sound effect generation method according to claim 1, wherein: The determining the degree of sound obstruction and the equivalent orientation of the sound source according to an intersection between a first line connecting the second reflection point and the sound source and the first component surface includes: The degree of sound obstruction is determined based on the number of initial second reflection points corresponding to the first line intersecting the first component surface, and the equivalent orientation is determined based on the position of the target second reflection point corresponding to the first line not intersecting the first component surface.

7. The sound effect generation method according to claim 1, wherein: Determining a second reflection point of the second ray on a first component surface of the target room according to the reflection of the second ray in the target room includes: performing ray tracing based on the second ray and the first component surface to determine a second reflection path of the second ray reflected in the target room; The second reflection point is determined according to a second intersection point of the second reflection path and the first component surface.

8. The sound effect generation method according to claim 1, wherein: Generating binaural direct sound effects according to the sound obstruction degree and the equivalent orientation includes: performing attenuation processing on the sound source according to the degree of sound obstruction to generate a target sound source; Encoding and decoding are performed according to the target sound source and the equivalent orientation to generate the binaural direct sound effect.

9. A sound effect generating device, characterized in that: include: A first acquisition module is configured to acquire a first position of the sound effect receiving end in the virtual space scene; a first transmitting module configured to transmit a first ray at the first position according to a plurality of incident directions determined by a preset room shape, wherein the preset room shape is used to represent a shape of a target room where the first position is located in the virtual space scene; a first determining module configured to determine a room size and a target average reflection coefficient of the target room according to reflection information of the first ray of each incident direction reflected in the target room; a second determining module configured to determine the reverberation time of the target room according to the room size and the target average reflection coefficient; A first generating module is configured to process the reverberation generator according to the reverberation time to generate a target reverberation sound effect; The device further comprises: A second acquisition module is configured to acquire a second position of the sound source in the virtual space scene; a second transmitting module, configured to transmit a second ray at the second position; A fifth determining module is configured to reflect the second ray in the target room according to the second ray. determining a second reflection point of the second ray on a first component surface of the target room, where the first component surface is a component surface of the target room in the virtual space scene; a sixth determining module configured to determine a degree of sound obstruction and an equivalent orientation of the sound source based on an intersection between the second reflection point, a first line connecting the sound source, and the first component surface, wherein the degree of sound obstruction reflects the degree to which the space between the sound source and the sound effect receiving end is obstructed, and the equivalent orientation reflects the position of the sound source perceived by the sound effect receiving end when the sound source is obstructed; The second generation module is configured to generate binaural direct sound effects according to the degree of sound obstruction and the equivalent orientation, and send the binaural direct sound effects to the sound effect receiving end, or send a mixed sound effect of the binaural direct sound effects and the target reverberation sound effects to the sound effect receiving end.

10. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having at least one computer program stored thereon; At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Reverberation detection method, device thereof and electronic equipment

    CN109168118A

  • Systems and methods for modifying room characteristics for spatial audio rendering over headphones

    CN111107482A