Methods, apparatus, electronic devices and storage media for determining filter coefficients

By tracing the reflection path of sound waves in a virtual room, obtaining and weighting the filter characteristic values ​​of the sound waves and the pickup, the problem that the filter coefficients in the existing technology cannot accurately construct the reverberation effect of the virtual room is solved, and the realistic reverberation effect of the virtual room is realized.

CN116264079BActive Publication Date: 2025-10-31GUANGZHOU KUGOU COMP TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111522589.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-10-31
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

Existing technologies cannot accurately construct the reverberation effect of a virtual room when determining filter coefficients, resulting in the virtual room filter failing to achieve a realistic reverberation effect.

Method used

By tracing the reflection path of sound waves in a virtual room, the filter characteristic values ​​of sound waves and microphones at various sound absorption frequencies are obtained, and then weighted summed to determine the filter coefficients of the target filter. Taking into account the reflective surface material and energy loss, the target filter is constructed to achieve the reverberation effect of the virtual room.

Benefits of technology

Accurately determining the filter coefficients enables the constructed filter to achieve the reverberation effect of a virtual room, thereby improving the realism of the virtual room model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116264079B_ABST
    Figure CN116264079B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, electronic device, and storage medium for determining filter coefficients, belonging to the field of audio processing technology. It includes: determining the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives, based on the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency; and determining the filter coefficients of a target filter based on the total energy filtering characteristic value of the microphone at each absorption frequency after all sound waves that can reach the microphone arrive. This disclosure determines the total energy filtering characteristic value of the microphone at each absorption frequency after all sound waves that can reach the microphone arrive, based on the sound wave filtering characteristic value at each absorption frequency and the energy filtering characteristic value of the microphone at each absorption frequency, and then accurately determines the filtering parameters of the target filter based on the total energy filtering characteristic value at each absorption frequency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of audio processing technology, and in particular to a method, apparatus, electronic device, and storage medium for determining filter coefficients. Background Technology

[0002] In the field of audio processing, in order to obtain audio with a specified reverb effect, it is necessary to determine the filter coefficients of the filter that can achieve the specified reverb effect.

[0003] Currently, the relevant technologies mainly use the following methods to determine the filter coefficients: construct a virtual room model that can achieve the specified reverberation effect, where each reflector in the virtual room has the same absorption coefficient for sound waves of different frequencies; when sound is emitted from the sound source in the virtual room, sound wave tracking technology is used to track each sound wave; after each sound wave reaches the microphone after a series of reflections, the filter coefficients of each sound wave are obtained; and the filter coefficients of all sound waves are linearly added together to obtain the filter coefficients corresponding to the virtual room.

[0004] However, to improve the realism of reverberation effects in virtual rooms, reflective surfaces within the virtual room model are modeled based on common real-world materials. For example, the floor in a virtual room might use the sound absorption coefficients of real wood flooring, tiles, and carpets. However, the sound absorption coefficients of real-world materials are frequency-dependent. For instance, the sound absorption coefficients of common wood flooring are: 0.04 at 125Hz, 0.04 at 250Hz, 0.03 at 500Hz, 0.03 at 1000Hz, 0.03 at 2000Hz, and 0.02 at 4000Hz. Therefore, the filtering coefficients obtained from related techniques are inaccurate, and filters constructed based on these coefficients cannot achieve the reverberation effect of a virtual room. Therefore, there is an urgent need for a method to determine filter coefficients, enabling filters constructed based on these determined coefficients to achieve the reverberation effect of a virtual room. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for determining filter coefficients, which can accurately determine the filter coefficients corresponding to a virtual room, enabling a filter constructed based on the determined filter coefficients to achieve the reverberation effect of the virtual room. The technical solution is as follows:

[0006] Firstly, a method for determining filter coefficients is provided, the method comprising:

[0007] For any sound wave emitted by a sound source in a virtual room, when the sound wave is reflected by multiple reflective surfaces of the virtual room and reaches the microphone, the sound wave filtering characteristic value of the sound wave at each sound absorption frequency and the energy filtering characteristic value of the microphone at each sound absorption frequency are obtained when the sound wave reaches the microphone.

[0008] The sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone is weighted and added to the energy filtering characteristic value of the microphone at the same absorption frequency to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives.

[0009] Based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room are determined.

[0010] In another embodiment of this disclosure, obtaining the sound wave filtering characteristic values ​​at various absorption frequencies when the sound wave reaches the microphone includes:

[0011] After the sound wave is emitted from the sound source, trace the reflection path of the sound wave;

[0012] Each time the sound wave is reflected by the reflective surface in the virtual room, the reflective surface filtering characteristic value at each sound absorption frequency is added to the sound wave filtering characteristic value at the same sound absorption frequency before the sound wave is reflected, to obtain the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the reflective surface.

[0013] When the sound wave is tracked to reach the microphone, the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the last reflecting surface is used as the sound wave filtering characteristic value at each sound absorption frequency when the sound wave reaches the microphone.

[0014] In another embodiment of this disclosure, before adding the reflective surface filtering characteristic value at each sound absorption frequency and the sound wave filtering characteristic value at the same sound absorption frequency before sound wave reflection to obtain the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the reflective surface, the method further includes:

[0015] Based on the material of the reflective surface, determine the sound absorption coefficient of the reflective surface at each sound absorption frequency;

[0016] Based on the sound absorption coefficient of the reflective surface at each sound absorption frequency, calculate the reflective surface filtering characteristic value of the reflective surface at each sound absorption frequency.

[0017] In another embodiment of this disclosure, calculating the reflective surface filtering characteristic value at each sound absorption frequency based on the sound absorption coefficient of the reflective surface at each sound absorption frequency includes:

[0018] The reflection coefficient of the reflective surface at each sound absorption frequency is determined based on the sound absorption coefficient of the reflective surface at each sound absorption frequency.

[0019] Based on the reflection coefficients of the reflective surface at various sound absorption frequencies, the following formula is used to calculate the reflective surface filtering characteristic values ​​at various sound absorption frequencies:

[0020]

[0021] Where, x n β represents the reflective surface filtering characteristic value of the reflective surface at the nth sound absorption frequency. n This represents the reflection coefficient of the reflective surface at the nth sound absorption frequency.

[0022] In another embodiment of this disclosure, before using the sound wave filtering characteristic values ​​at each sound absorption frequency after the sound wave is reflected by the last reflecting surface as the sound wave filtering characteristic values ​​at each sound absorption frequency when the sound wave reaches the pickup, the method further includes:

[0023] Based on the material of each reflective surface in the virtual room, determine the standardized sound absorption coefficient of each reflective surface;

[0024] Based on the standardized sound absorption coefficient of each reflective surface, determine the standardized reflection coefficient of each reflective surface;

[0025] When it is determined that the sound wave can reach the microphone based on the uniform reflection coefficient of each reflecting surface on the reflection path and the initial energy value of the sound wave, the step of taking the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the last reflecting surface as the sound wave filtering characteristic value at each sound absorption frequency when the sound wave reaches the microphone is executed.

[0026] In another embodiment of this disclosure, the step of weightedly adding the sound wave filtering characteristic value at each absorption frequency of the sound wave reaching the pickup with the energy filtering characteristic value of the pickup at the same absorption frequency to obtain the energy filtering characteristic value of the pickup at each absorption frequency after the sound wave arrives includes:

[0027] Based on the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency, the sound wave weight value and the microphone weight value corresponding to each absorption frequency are determined.

[0028] Based on the sound wave weight value and pickup weight value corresponding to each sound absorption frequency, the sound wave filtering characteristic value of the sound wave at each sound absorption frequency when it reaches the pickup is weighted and added to the energy filtering characteristic value of the pickup at the same sound absorption frequency, so as to obtain the energy filtering characteristic value of the pickup at each sound absorption frequency after the sound wave arrives.

[0029] In another embodiment of this disclosure, determining the filter coefficients of the target filter for achieving the reverberation effect of the virtual room based on the total energy filtering characteristic value of the pickup at each absorption frequency after each sound wave reaches the pickup includes:

[0030] The maximum total energy filtering characteristic value is obtained from the total energy filtering characteristic values ​​of the microphone at each sound absorption frequency;

[0031] Subtract the maximum total energy filter characteristic value from the total energy filter characteristic value corresponding to each sound absorption frequency to obtain the total energy filter characteristic difference value corresponding to each sound absorption frequency.

[0032] Each sound absorption frequency is determined as the center frequency of the target filter, and the total energy filtering characteristic difference corresponding to each sound absorption frequency is determined as the gain coefficient of the target filter.

[0033] In another embodiment of this disclosure, after determining the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room based on the total energy filtering characteristic value of the pickup at each absorption frequency after each sound wave that can reach the pickup arrives, the method further includes:

[0034] The target filter is constructed based on the center frequency and the gain coefficient;

[0035] Based on the target filter, the original audio signal is filtered to obtain an audio signal with the reverberation effect of the virtual room.

[0036] Secondly, an apparatus for determining filter coefficients is provided, the apparatus comprising:

[0037] The acquisition module is used to acquire, for any sound wave emitted by a sound source in a virtual room, when the sound wave is reflected by multiple reflective surfaces of the virtual room and reaches the microphone, the sound wave filtering characteristic value at each absorption frequency of the sound wave and the energy filtering characteristic value of the microphone at each absorption frequency of the sound wave when it reaches the microphone.

[0038] The addition module is used to perform a weighted addition of the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency, so as to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives.

[0039] The determination module is used to determine the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave that can reach the microphone arrives.

[0040] In another embodiment of this disclosure, the acquisition module is configured to track the reflection path of the sound wave after it is emitted from the sound source; each time the sound wave is reflected by a reflective surface in the virtual room, the reflective surface filtering characteristic value at each absorption frequency is added to the sound wave filtering characteristic value at the same absorption frequency before the sound wave is reflected, to obtain the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the reflective surface; when the sound wave is tracked to reach the microphone, the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the last reflective surface is used as the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone.

[0041] In another embodiment of this disclosure, the apparatus further includes:

[0042] The determining module is further configured to determine the sound absorption coefficient of the reflective surface at various sound absorption frequencies based on the material of the reflective surface.

[0043] The calculation module is used to calculate the reflective surface filtering characteristic value of the reflective surface at each sound absorption frequency based on the sound absorption coefficient of the reflective surface at each sound absorption frequency.

[0044] In another embodiment of this disclosure, the calculation module is configured to determine the reflection coefficient of the reflective surface at each sound absorption frequency based on the sound absorption coefficient of the reflective surface at each sound absorption frequency; and to calculate the reflective surface filtering characteristic value of the reflective surface at each sound absorption frequency using the following formula based on the reflection coefficient of the reflective surface at each sound absorption frequency:

[0045]

[0046] Where, x n β represents the reflective surface filtering characteristic value of the reflective surface at the nth sound absorption frequency. n This represents the reflection coefficient of the reflective surface at the nth sound absorption frequency.

[0047] In another embodiment of this disclosure, the determining module is further configured to determine the uniform sound absorption coefficient of each reflective surface based on the material of each reflective surface in the virtual room;

[0048] The determining module is also used to determine the uniform reflection coefficient of each reflective surface based on the uniform sound absorption coefficient of each reflective surface;

[0049] The acquisition module is further configured to, when it is determined that the sound wave can reach the microphone based on the unified reflection coefficient of each reflecting surface on the reflection path and the initial energy value of the sound wave, take the sound wave filtering characteristic value of the sound wave at each sound absorption frequency after being reflected by the last reflecting surface as the sound wave filtering characteristic value of the sound wave at each sound absorption frequency when it reaches the microphone.

[0050] In another embodiment of this disclosure, the addition module is used to determine the sound wave weight value and the pickup weight value corresponding to each absorption frequency based on the sound wave filtering characteristic value of the sound wave at each absorption frequency when it reaches the pickup and the energy filtering characteristic value of the pickup at the same absorption frequency; based on the sound wave weight value and the pickup weight value corresponding to each absorption frequency, the sound wave filtering characteristic value of the sound wave at each absorption frequency when it reaches the pickup and the energy filtering characteristic value of the pickup at the same absorption frequency are weighted and added together to obtain the energy filtering characteristic value of the pickup at each absorption frequency after the sound wave arrives.

[0051] In another embodiment of this disclosure, the determining module is configured to obtain the maximum total energy filtering characteristic value from the total energy filtering characteristic values ​​of the pickup at each absorption frequency; subtract the maximum total energy filtering characteristic value from the total energy filtering characteristic value corresponding to each absorption frequency to obtain the total energy filtering characteristic difference value corresponding to each absorption frequency; determine each absorption frequency as the center frequency of the target filter, and determine the total energy filtering characteristic difference value corresponding to each absorption frequency as the gain coefficient of the target filter.

[0052] In another embodiment of this disclosure, the apparatus further includes:

[0053] A construction module is used to construct the target filter based on the center frequency and the gain coefficient;

[0054] The processing module is used to filter the original audio signal based on the target filter to obtain an audio signal with the reverberation effect of the virtual room.

[0055] Thirdly, an electronic device is provided, the electronic device including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the method for determining filter coefficients as described in the first aspect.

[0056] Fourthly, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the at least one piece of program code being loaded and executed by a processor to implement the method for determining filter coefficients as described in the first aspect.

[0057] Fifthly, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for determining filter coefficients as described in the first aspect.

[0058] The beneficial effects of the technical solutions provided in this disclosure are:

[0059] By tracing the reflection path of sound waves from the sound source to the microphone, and based on the reflection surface filtering characteristic value of each reflecting surface at each absorption frequency, and the sound wave filtering characteristic value of the sound wave before reflection at each absorption frequency, the sound wave filtering characteristic value of the sound wave reaching the microphone at each absorption frequency is obtained. This sound wave filtering characteristic value of the sound wave reaching the microphone at each absorption frequency is a parameter that characterizes the filtering characteristics of the sound wave after considering the energy loss during the reflection process. Furthermore, based on the sound wave filtering characteristic value of each sound wave reaching the microphone at each absorption frequency and the energy filtering characteristic value of the microphone at each absorption frequency, the total energy filtering characteristic value of the microphone at each absorption frequency is determined. This total energy filtering characteristic value of the microphone at each absorption frequency can characterize the relationship between different absorption frequencies and filtering characteristics of the virtual room. Based on the total energy filtering characteristic value of the microphone at each absorption frequency, the filtering parameters of the target filter can be accurately determined, thereby enabling the target filter to achieve the reverberation effect of the virtual room. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart of a method for determining filter coefficients provided in an embodiment of this disclosure;

[0062] Figure 2This is a flowchart of another method for determining filter coefficients provided in this embodiment of the disclosure;

[0063] Figure 3 This is a schematic diagram of a device structure for determining filter coefficients provided in an embodiment of this disclosure;

[0064] Figure 4 A structural block diagram of an electronic device provided by an exemplary embodiment of the present disclosure is shown. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.

[0066] It is understood that the terms "each," "multiple," and "any," etc., used in the embodiments of this disclosure, include "multiple" (two or more), "each" (each of the corresponding multiples), and "any" (any one of the corresponding multiples). For example, multiple words include 10 words, and "each word" refers to each of the 10 words, while "any word" refers to any one of the 10 words.

[0067] This disclosure provides a method for determining filter coefficients; see [link to relevant documentation]. Figure 1 The method flow provided in this disclosure includes:

[0068] 101. For any sound wave emitted by a sound source in a virtual room, when the sound wave is reflected by multiple reflective surfaces of the virtual room and reaches the microphone, obtain the sound wave filtering characteristic value at each absorption frequency of the sound wave and the energy filtering characteristic value of the microphone at each absorption frequency when it reaches the microphone.

[0069] The virtual room is a model constructed based on the reverberation effect desired by the user. This virtual room simulates the propagation of sound waves within it. Based on the filtering characteristics of the sound waves reaching the microphone in the virtual room, the filtering coefficients of the target filter are determined. This target filter achieves the reverberation effect created by the virtual room. The unit of the sound wave filtering characteristic value is dB (decibels), and the unit of the energy filtering characteristic value is also dB (decibels).

[0070] In the field of audio processing, sound absorption frequency refers to the frequency of sound waves that a reflecting surface can absorb. Sound absorption frequencies typically include 62.5Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, and 16kHz, etc., and the sound absorption characteristics are different for different sound absorption frequencies.

[0071] 102. The sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone is weighted and added together with the energy filtering characteristic value of the microphone at the same absorption frequency to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives.

[0072] Based on the obtained acoustic wave filtering characteristic values ​​at various absorption frequencies of the sound wave arriving at the microphone and the acoustic wave filtering characteristic values ​​of the microphone at the same absorption frequency, the electronic device determines the acoustic wave weight value and the microphone weight value corresponding to each absorption frequency. Then, based on the acoustic wave weight value and the microphone weight value corresponding to each absorption frequency, the acoustic wave filtering characteristic values ​​at various absorption frequencies of the sound wave arriving at the microphone and the energy filtering characteristic values ​​of the microphone at the same absorption frequency are weighted and added together to obtain the energy filtering characteristic values ​​of the microphone at various absorption frequencies after the sound wave arrives.

[0073] For example, the sound wave filtering characteristic values ​​at absorption frequencies of 62.5Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, and 16kHz when reaching the microphone are -0.91dB, -0.91dB, -0.91dB, -1.94dB, -1.94dB, -1.94dB, -1.94dB, -0.91dB, and -0.91dB, respectively. The microphone's absorption frequencies at these frequencies are also different. The energy filtering characteristic values ​​at Hz are -1.82dB, -1.82dB, -1.82dB, -3.88dB, -3.88dB, -3.88dB, -1.82dB, and -1.82dB, respectively. Therefore, the electronic device determines the sound wave weight value corresponding to the sound absorption frequency of 62.5Hz as -0.91dB / (-0.91dB-1.82dB) = 1 / 3, and the pickup weight value corresponding to the sound absorption frequency of 62.5Hz as -1.82dB / (-0.91dB-1.82dB) = 2 / 3; the electronic device determines the sound wave weight value corresponding to the sound absorption frequency of 125Hz as -0.91dB / (-0.91dB-1.82dB) = 1 / 3, and the pickup weight value corresponding to the sound absorption frequency of 125Hz as -1.82dB / (-0.91dB-1.82dB) = 2 / 3. The microphone weighting value is -1.82dB / (-0.91dB-1.82dB) = 2 / 3; the electronic equipment determines the sound wave weighting value corresponding to the sound absorption frequency of 250Hz as -0.91dB / (-0.91dB-1.82dB) = 1 / 3, and the microphone weighting value corresponding to the sound absorption frequency of 250Hz as -1.82dB / (-0.91dB-1.82dB) = 2 / 3; the electronic equipment determines the sound wave weighting value corresponding to the sound absorption frequency of 500Hz as -1.94dB / (-1.94dB-3.88dB) = 1 / 3, and the microphone weighting value corresponding to the sound absorption frequency of 500Hz as -3.88dB / (-1.94dB-3.88dB) = 2 / 3; the electronic equipment determines the sound absorption frequency of 1kHz as... The sound wave weighting value corresponding to the Hz frequency is -1.94dB / (-1.94dB-3.88dB) = 1 / 3, and the microphone weighting value corresponding to the 1kHz absorption frequency is -3.88dB / (-1.94dB-3.88dB) = 2 / 3; the electronic equipment determines that the sound wave weighting value corresponding to the 2kHz absorption frequency is -1.94dB / (-1.94dB-3.88dB) = 1 / 3, and the microphone weighting value corresponding to the 2kHz absorption frequency is -3.88dB / (-1.94dB-3.88dB) = 2 / 3; the electronic equipment determines that the sound wave weighting value corresponding to the 4kHz absorption frequency is -1.94dB / (-1.94dB-3.88dB) = 1 / 3, and the microphone weighting value corresponding to the 4kHz absorption frequency is -3.88dB / (-1.94dB-3.88dB) = 2 / 3.The electronic equipment determines the sound wave weight value corresponding to the sound absorption frequency of 8 kHz as -0.91dB / (-0.91dB-1.82dB) = 1 / 3, and the microphone weight value corresponding to the sound absorption frequency of 8 kHz as -1.82dB / (-0.91dB-1.82dB) = 2 / 3; the electronic equipment determines the sound wave weight value corresponding to the sound absorption frequency of 16 kHz as -0.91dB / (-0.91dB-1.82dB) = 1 / 3, and the microphone weight value corresponding to the sound absorption frequency of 16 kHz as -1.82dB / (-0.91dB-1.82dB) = 2 / 3.

[0074] Based on the determined sound wave weight values ​​and pickup weight values ​​at different absorption frequencies, the electronic device obtains the following: The sound wave filtering characteristic value and energy filtering characteristic value at an absorption frequency of 62.5Hz are weighted and summed: 1 / 3*(-0.91dB) + 2 / 3*(-1.82dB). This yields the pickup's energy filtering characteristic value at an absorption frequency of 62.5Hz as -1.52dB. Similarly, the electronic device obtains the following: The sound wave filtering characteristic value and energy filtering characteristic value at an absorption frequency of 125Hz are weighted and summed: 1 / 3*(-0.91dB) + 2 / 3*(-1.82dB). -1.52dB; The electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 250Hz by weighted summing of the sound wave filtering characteristic value and the energy filtering characteristic value, i.e., 1 / 3*(-0.91dB) + 2 / 3*(-1.82dB), which is -1.52dB after the sound wave arrives. The electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 500Hz by weighted summing of the sound wave filtering characteristic value and the energy filtering characteristic value, i.e., 1 / 3*(-1.94dB) + 2 / 3*(-3.88dB), which is -3.23dB after the sound wave arrives. The electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 1K The sound wave filtering characteristic value and the energy filtering characteristic value at 1 kHz are weighted and added together, i.e., 1 / 3*(-1.94dB) + 2 / 3*(-3.88dB), to obtain the energy filtering characteristic value of the microphone at the absorption frequency of 1 kHz after the sound wave arrives, which is -3.23dB. The electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 2 kHz after the sound wave arrives by weighting and adding together, i.e., 1 / 3*(-1.94dB) + 2 / 3*(-3.88dB); the electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 4 kHz after the sound wave arrives by weighting and adding together, i.e., 1 / 3*(-1.94dB) + 2 / 3*(-3.88dB). The energy filtering characteristic value at Hz is -3.23dB; the electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 8kHz by weighted summing of the sound wave filtering characteristic value and the energy filtering characteristic value, i.e., 1 / 3*(-0.91dB)+2 / 3*(-1.82dB), which is -1.52dB after the sound wave arrives; the electronic device obtains the energy filtering characteristic value of the microphone at the absorption frequency of 16kHz by weighted summing of the sound wave filtering characteristic value and the energy filtering characteristic value, i.e., 1 / 3*(-0.91dB)+2 / 3*(-1.82dB), which is -1.52dB after the sound wave arrives.

[0075] 103. Based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, determine the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room.

[0076] The filter coefficients include the center frequency, gain coefficient, and quality factor. The electronic device uses the total energy filtering characteristic value of each sound wave reaching the microphone at each absorption frequency as the center frequency, and determines the gain coefficient based on the corresponding total energy filtering characteristic value. The quality factor can be set by technicians according to requirements, or it can be determined based on the individual absorption frequencies.

[0077] The method provided in this disclosure determines the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, based on the sound wave filtering characteristic value at each absorption frequency and the energy filtering characteristic value of the microphone at each absorption frequency. Then, based on the total energy filtering characteristic value at each absorption frequency, the filtering parameters of the target filter are accurately determined.

[0078] This disclosure provides a method for determining filter coefficients. Taking an electronic device executing this disclosure as an example, see [link to relevant documentation]. Figure 2 The method flow provided in this disclosure includes:

[0079] 201. Electronic equipment determines the reflective surface filtering characteristic values ​​of each reflective surface in a virtual room at each sound absorption frequency.

[0080] In audio processing, to obtain a specified reverberation effect that meets user requirements, a virtual room model can be constructed based on this desired reverberation effect. This virtual room model includes at least one reflective surface, and the materials of each reflective surface can be the same or different. When two reflective surfaces are made of the same material, they have the same sound absorption characteristics, meaning they have the same sound absorption coefficient for the same absorption frequency. When two reflective surfaces are made of different materials, they have different sound absorption characteristics, meaning they have different sound absorption coefficients for the same absorption frequency. The sound absorption coefficient is a coefficient characterizing the absorption characteristics of the reflected sound wave energy by the reflective surface.

[0081] The virtual room model is set as a shoebox room, that is, the virtual room has six reflective surfaces, and the six reflective surfaces are made of the same material (i.e. have the same sound absorption characteristics). Without considering scattering, the correspondence between the sound absorption frequency and the sound absorption coefficient of each of the six reflective surfaces of the virtual room can be seen in Table 1 below.

[0082] Table 1

[0083]

[0084]

[0085] To facilitate the management of the reflective surface filtering characteristic values ​​of each reflective surface in a virtual room at various sound absorption frequencies, electronic devices can create a reflective surface filtering characteristic table for each reflective surface, and then store the reflective surface filtering characteristic values ​​of each reflective surface at various sound absorption frequencies based on the reflective surface filtering characteristic table. The reflective surface filtering characteristic table characterizes the correspondence between each sound absorption frequency and the reflective surface filtering characteristic value, and reflects the filtering capability of the reflective surface itself. It is usually related to the material of the reflective surface; reflective surfaces of different materials have different reflective surface filtering characteristic tables, while reflective surfaces of the same material have the same reflective surface filtering characteristic table.

[0086] Taking any reflective surface as an example, when determining the reflective surface filtering characteristic values ​​at various sound absorption frequencies, electronic devices can use the following method:

[0087] 2011. Electronic equipment determines the sound absorption coefficient of the reflective surface at various sound absorption frequencies based on the material of the reflective surface.

[0088] In the field of audio processing, each material's reflective surface has specific sound absorption characteristics. Electronic devices obtain the sound absorption coefficient of a reflective surface at various absorption frequencies based on the sound absorption characteristics corresponding to the material of that reflective surface. For example, if the material of a certain reflective surface is the same as the material of the reflective surface of the virtual room in Table 1, then Table 1 can be used to represent the sound absorption coefficient of that reflective surface at various absorption frequencies.

[0089] 2012. Electronic equipment calculates the filtering characteristic value of the reflective surface at each sound absorption frequency based on the sound absorption coefficient of the reflective surface at each sound absorption frequency.

[0090] Without considering scattering, the sum of the absorption coefficient and reflection coefficient of the reflecting surface is 1. Electronic devices obtain the reflection coefficient of the reflecting surface at each absorption frequency by subtracting the absorption coefficient corresponding to each absorption frequency from 1. Then, based on the reflection coefficient of the reflecting surface at each absorption frequency, the formula is applied... Calculate the reflector filtering characteristic values ​​at various sound absorption frequencies. Where x n β represents the reflective surface filtering characteristic value of the reflective surface at the nth absorption frequency. n This represents the reflection coefficient of the reflecting surface at the nth absorption frequency.

[0091] The correspondence between the various sound absorption frequencies and sound absorption coefficients of the reflective surface is shown in Table 1. Based on Table 1, the correspondence between the various sound absorption frequencies and reflection coefficients of the reflective surface, as shown in Table 2, can be obtained. Based on the correspondence between the various sound absorption frequencies and reflection coefficients of the reflective surface shown in Table 2, the formula is applied. The correspondence between each sound absorption frequency of the reflective surface and the filter characteristic value of the reflective surface can be obtained, and Table 3 is obtained. Table 3 is the filter characteristic table of the reflective surface of the reflective surface.

[0092] Table 2

[0093]

[0094] Table 3

[0095]

[0096] 202. For any sound wave emitted by a sound source in a virtual room, the electronic device tracks the reflection path of the sound wave after it is emitted from the sound source.

[0097] When a sound source in the virtual room emits sound, the electronic device uses sound wave tracking technology to track each sound wave.

[0098] 203. Whenever a sound wave is reflected by a reflective surface in the virtual room, the electronic device adds the reflective surface filtering characteristic value at each sound absorption frequency to the sound wave filtering characteristic value at the same sound absorption frequency before the sound wave is reflected, to obtain the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the reflective surface.

[0099] To facilitate the management of acoustic filtering characteristic values ​​for each sound wave at various absorption frequencies, electronic devices can create an acoustic filtering characteristic table for each sound wave. This table characterizes the correspondence between each absorption frequency of the sound wave and its corresponding acoustic filtering characteristic value. The table records how the acoustic filtering characteristic values ​​at each absorption frequency of the sound wave change with reflection from the reflecting surface, further reflecting the filtering characteristics of the sound wave.

[0100] When the electronic device begins tracking each sound wave, the sound wave filtering characteristic value of each sound wave at different absorption frequencies is 0. At this time, the sound wave filtering characteristic table of each sound wave is in an initialization state. This initialized sound wave filtering characteristic table can be found in Table 4.

[0101] Table 4

[0102]

[0103]

[0104] Taking any sound wave emitted by the sound source as an example, whenever the sound wave is reflected by the reflective surface in the virtual room, the sound wave filtering characteristic value at each sound absorption frequency will change. The electronic device obtains the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the reflective surface by adding the reflective surface filtering characteristic value at each sound absorption frequency before the sound wave is reflected to the sound wave filtering characteristic value at the same sound absorption frequency.

[0105] In another embodiment of this disclosure, the electronic device can, based on the reflective surface filtering characteristic table of the reflective surface and the acoustic wave filtering characteristic table before sound wave reflection, add the reflective surface filtering characteristic value corresponding to each sound absorption frequency in the reflective surface frequency characteristic table of the reflective surface to the acoustic wave filtering characteristic value corresponding to the same sound absorption frequency in the acoustic wave filtering characteristic table before sound wave reflection, to obtain the reflected acoustic wave filtering characteristic value corresponding to each sound absorption frequency. Then, based on the reflected acoustic wave filtering characteristic value corresponding to each sound absorption frequency, the electronic device updates the acoustic wave filtering characteristic value corresponding to each sound absorption frequency in the acoustic wave filtering characteristic table before sound wave reflection, to obtain the acoustic wave filtering characteristic table after sound wave reflection.

[0106] Let Table W be the sound wave filtering characteristic table before reflection, Table P be the sound wave filtering characteristic table of the reflecting surface, and Table W' be the sound wave filtering characteristic table after reflection. After reflection, the electronic device adds the sound wave filtering characteristic value corresponding to each absorption frequency in Table W to the sound wave filtering characteristic value corresponding to the same absorption frequency in Table P, to obtain the sound wave filtering characteristic value corresponding to each absorption frequency in Table W', i.e., Xn(Table W') = Xn(Table W) + Xn(Table P), where the value of n can be from 1 to 9.

[0107] For example, after a sound wave is reflected from a wall for the first time, its sound wave filtering characteristic table will change from Table 4 to Table 5. After it is reflected from the wall for the second time, its sound wave filtering characteristic table will change from Table 5 to Table 6.

[0108] Table 5

[0109]

[0110]

[0111] Table 6

[0112]

[0113] 204. When the sound wave is tracked to reach the microphone, the electronic device uses the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the last reflecting surface as the sound wave filtering characteristic value at each absorption frequency when it reaches the microphone.

[0114] As sound waves propagate, their energy gradually attenuates after reflection by a reflective surface. When the energy of the sound wave falls below a certain energy threshold, it can no longer propagate forward. Because the reflection paths of the sound waves emitted from the sound source in the virtual room are different, the energy loss of each sound wave varies. Therefore, some sound waves emitted from the sound source in the virtual room can reach the microphone, while others cannot. This embodiment of the present disclosure performs statistical calculations on the sound waves that can reach the microphone, but does not perform statistical calculations on the sound waves that cannot reach the microphone. To more accurately determine the filter coefficients corresponding to the virtual room, when the electronic device tracks the sound waves using sound wave tracking technology, it needs to determine whether each sound wave can reach the microphone. The specific determination process is as follows:

[0115] 2041. The electronic device determines the uniform sound absorption coefficient of each reflective surface based on the material of each reflective surface in the virtual room.

[0116] Studies of equal loudness curves reveal that the human ear is most sensitive to sounds in the 1kHz–5kHz frequency range. Since the primary purpose of reverberation processing for audio signals is to obtain audio that meets user needs, electronic devices can, based on the auditory characteristics of the human ear, assign higher weights to the absorption coefficients corresponding to absorption frequencies in the 1kHz–5kHz range and lower weights to the absorption coefficients corresponding to absorption frequencies outside this range. For any reflective surface, the electronic device, based on the surface's material, obtains the correspondence between each absorption frequency and the absorption coefficient. Then, based on the weights corresponding to each absorption coefficient, it performs a weighted average calculation of the absorption coefficients at each absorption frequency to obtain the standardized absorption coefficient for that reflective surface. For example, the correspondence between the various sound absorption frequencies and the sound absorption coefficient of the reflective surface is shown in Table 1. The electronic device sets a weight of 0.7 for the sound absorption frequencies of 1kHz, 2kHz, and 4kHz, and a weight of 0.3 for the sound absorption frequencies of 62.5Hz, 125Hz, 250Hz, 500Hz, 8kHz, and 16kHz. Therefore, the standardized sound absorption coefficient of the reflective surface is:

[0117] [(0.2+0.2+0.2) / 3)*0.7]+[(0.1+0.1+0.1+0.2+0.1+0.1) / 6]*0.3=0.175.

[0118] 2042. The electronic device determines the uniform reflection coefficient of each reflective surface based on the uniform sound absorption coefficient of each reflective surface.

[0119] Without considering scattering, electronic devices use 1 minus the uniform absorption coefficient of the reflective surface to obtain the uniform reflection coefficient of each reflective surface. For example, if the uniform absorption coefficient of a reflective surface is 0.175, then the uniform reflection coefficient of that reflective surface is 0.825.

[0120] 2043. The electronic device obtains the initial energy value of the sound wave before reflection, and based on the initial energy value, whenever the sound wave is reflected by a reflecting surface, the electronic device calculates the energy value of the sound wave after reflection based on the uniform reflection coefficient of the reflecting surface. When the energy value of the sound wave after reflection is less than the energy threshold, the electronic device determines that the sound wave cannot reach the pickup.

[0121] When it is determined that the sound wave can reach the microphone based on the uniform absorption coefficient of each reflecting surface on the reflection path and the initial energy value of the sound wave, the electronic device uses the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the last reflecting surface as the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone.

[0122] 205. Electronic devices acquire the energy filtering characteristic values ​​of the microphone at various absorption frequencies when the sound reaches the microphone.

[0123] When sound waves are reflected by multiple reflective surfaces in the virtual room and reach the microphone, the electronic device will also acquire the energy filtering characteristic values ​​of the microphone at various absorption frequencies when the sound waves reach the microphone. It should be noted that the steps of acquiring the sound wave filtering characteristic values ​​at various absorption frequencies and acquiring the energy filtering characteristic values ​​of the microphone at various absorption frequencies can be performed simultaneously or sequentially, and this embodiment does not impose specific limitations on this.

[0124] 206. The electronic device performs a weighted summation of the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency, to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives.

[0125] The electronic device determines the sound wave weight value and the microphone weight value corresponding to each absorption frequency based on the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the microphone energy filtering characteristic value at the same absorption frequency. Then, based on the sound wave weight value and the microphone weight value corresponding to each absorption frequency, the electronic device performs a weighted sum of the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the microphone energy filtering characteristic value at the same absorption frequency to obtain the microphone energy filtering characteristic value at each absorption frequency after the sound wave arrives.

[0126] To facilitate the management of the energy filtering characteristic values ​​of the microphone at various absorption frequencies, the electronic device will create an energy filtering characteristic table for the microphone. This energy filtering characteristic table is used to characterize the correspondence between each absorption frequency and the energy filtering characteristic value. This energy filtering characteristic table can reflect the filtering characteristics of the sound waves arriving at the microphone at various absorption frequencies. As the number of sound waves arriving at the microphone increases, this energy filtering characteristic table will be continuously updated.

[0127] In another embodiment of this disclosure, based on the acoustic filtering characteristic table of the sound wave arriving at the microphone and the energy filtering characteristic table of the microphone, the electronic device performs a weighted summation of the acoustic filtering characteristic values ​​corresponding to each absorption frequency in the acoustic filtering characteristic table of the sound wave arriving at the microphone and the energy filtering characteristic values ​​corresponding to the same absorption frequency in the energy filtering characteristic table of the microphone, to obtain the energy filtering characteristic table of the microphone after the sound wave arrives. The specific steps are as follows:

[0128] 2061. Based on the acoustic filtering characteristic values ​​corresponding to each absorption frequency in the acoustic filtering characteristic table of the sound wave arriving at the microphone and the energy filtering characteristic values ​​corresponding to the same absorption frequency in the energy filtering characteristic table of the microphone, the electronic device determines the acoustic weight value and the microphone weight value corresponding to each absorption frequency.

[0129] The electronic device calculates the sum of the acoustic filtering characteristic values ​​corresponding to each absorption frequency in the acoustic filtering characteristic table of the sound wave reaching the microphone and the energy filtering characteristic values ​​corresponding to the same absorption frequency in the microphone's energy filtering characteristic table. Then, it calculates the ratio of the acoustic filtering characteristic values ​​corresponding to each absorption frequency in the acoustic filtering characteristic table to the sum of the characteristic values ​​corresponding to the same absorption frequency, thus obtaining the acoustic weight value corresponding to each absorption frequency. The electronic device also calculates the ratio of the energy filtering characteristic values ​​corresponding to each absorption frequency in the microphone's energy filtering characteristic table to the sum of the characteristic values ​​corresponding to the same absorption frequency, thus obtaining the microphone weight value corresponding to each absorption frequency. For any absorption frequency, let Z be the acoustic filtering characteristic value corresponding to that absorption frequency in the acoustic filtering characteristic table of the sound wave reaching the microphone, and S be the energy filtering characteristic value corresponding to that absorption frequency in the microphone's energy filtering characteristic table. Then, the acoustic weight value a1 corresponding to that absorption frequency is TZ / (Z+S), and the microphone weight value a2 corresponding to that absorption frequency is S / (Z+S).

[0130] 2062. Based on the sound wave weight value and pickup weight value corresponding to each sound absorption frequency, the electronic device performs a weighted summation of the sound wave filtering characteristic value corresponding to each sound absorption frequency in the sound wave filtering characteristic table when the sound wave reaches the pickup and the energy filtering characteristic value corresponding to the same sound absorption frequency in the energy filtering characteristic table of the pickup, so as to obtain the energy filtering characteristic value corresponding to each sound absorption frequency of the pickup after the sound wave arrives.

[0131] For any absorption frequency, the electronic device performs a weighted calculation by adding the sound wave weight value corresponding to that absorption frequency to the sound wave filtering characteristic value corresponding to that absorption frequency in the sound wave filtering characteristic table when the sound wave reaches the microphone, and then performs a weighted calculation by adding the microphone weight value corresponding to that absorption frequency to the energy filtering characteristic value corresponding to that absorption frequency in the microphone's energy filtering characteristic table. The two weighted calculation results are then added together to obtain the energy filtering characteristic value of the microphone corresponding to that absorption frequency after the sound wave arrives. Let the sound wave filtering characteristic table when the sound wave reaches the microphone be T1, and the microphone's energy filtering characteristic table be T2. Then, the energy filtering characteristic value corresponding to the nth absorption frequency of the microphone after the sound wave arrives is = Xn(T1)*a1 + Xn(T2)*a2.

[0132] 2063. Based on the energy filtering characteristic values ​​corresponding to each absorption frequency of the microphone after the sound wave arrives, the electronic device updates the energy filtering characteristic values ​​corresponding to each absorption frequency in the energy filtering characteristic table of the microphone to obtain the energy filtering characteristic table of the microphone after the sound wave arrives.

[0133] It should be noted that the above example uses one sound wave; the same method is used to track and calculate other sound waves. Once all sound waves that can reach the microphone have reached it, the electronic device can obtain the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, and then perform subsequent calculations using step 207 below.

[0134] 207. Based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, the electronic device determines the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room.

[0135] Based on the total energy filtering characteristic value of the microphone at each absorption frequency after the arrival of each sound wave, the electronic device obtains the maximum total energy filtering characteristic value from the total energy filtering characteristic values ​​at each absorption frequency. Then, it subtracts the maximum total energy filtering characteristic value from the total energy filtering characteristic value corresponding to each absorption frequency to obtain the total energy filtering characteristic difference for each absorption frequency. Next, the electronic device determines each absorption frequency as the center frequency of the target filter and uses the total energy filtering characteristic difference for each absorption frequency as the gain coefficient of the target filter. For example, if the sound absorption frequencies are 62.5Hz, 125Hz, 250Hz, 500Hz, 1K Hz, 2K Hz, 4K Hz, 8K Hz, and 16K Hz, then the center frequencies of the target filter are 62.5Hz, 125Hz, 250Hz, 500Hz, 1K Hz, 2K Hz, 4K Hz, 8K Hz, and 16K Hz. The total energy filtering characteristic difference corresponding to each sound absorption frequency is C[1], C[2], C[3], ..., C[9]. Then the gain coefficient of the target filter is C[1], C[2], C[3], ..., C[9].

[0136] In another embodiment of this disclosure, after determining the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room, the electronic device will also construct a target filter based on the center frequency and gain coefficient, and then filter the original audio signal based on the target filter to obtain an audio signal with the reverberation effect of the virtual room. For example, the electronic device constructs nine peaking biquad IIR filters based on center frequencies of 62.5Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, and 16kHz, Q value of 0.667, and gain coefficients C[1], C[2], C[3], ..., C[9]. Then, the nine filters are connected in series to form a filter group (the order of the nine filters in series connection does not affect the effect of the filter). When the electronic device uses the original audio signal of this filter group for filtering, it can output an audio signal with different sound absorption characteristics of the virtual room at different sound absorption frequencies.

[0137] The method provided in this disclosure traces the reflection path of sound waves from the sound source to the microphone. During the tracing process, based on the reflection surface filtering characteristic value of each reflecting surface at each absorption frequency, and the sound wave filtering characteristic value of the sound wave before reflection at each absorption frequency, the sound wave filtering characteristic value of the sound wave reaching the microphone at each absorption frequency is obtained. This sound wave filtering characteristic value of the sound wave reaching the microphone at each absorption frequency is a parameter that characterizes the filtering characteristics of the sound wave after considering the energy loss during the reflection process. Furthermore, based on the sound wave filtering characteristic value of each sound wave reaching the microphone at each absorption frequency and the energy filtering characteristic value of the microphone at each absorption frequency, the total energy filtering characteristic value of the microphone at each absorption frequency is determined. This total energy filtering characteristic value of the microphone at each absorption frequency can characterize the relationship between different absorption frequencies and filtering characteristics of the virtual room. Based on the total energy filtering characteristic value of the microphone at each absorption frequency, the filtering parameters of the target filter can be accurately determined, thereby enabling the target filter to achieve the reverberation effect of the virtual room.

[0138] See Figure 3 This disclosure provides an apparatus for determining filter coefficients, the apparatus comprising:

[0139] The acquisition module 301 is used to acquire the sound wave filtering characteristic value of the sound wave at each absorption frequency and the energy filtering characteristic value of the microphone at each absorption frequency for any sound wave emitted by a sound source in the virtual room when the sound wave is reflected by multiple reflective surfaces of the virtual room and reaches the microphone.

[0140] The summing module 302 is used to weight and sum the sound wave filtering characteristic value at each absorption frequency when the sound wave arrives at the pickup with the energy filtering characteristic value of the pickup at the same absorption frequency, so as to obtain the energy filtering characteristic value of the pickup at each absorption frequency after the sound wave arrives.

[0141] The determination module 303 is used to determine the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave that can reach the microphone arrives.

[0142] In another embodiment of this disclosure, the acquisition module 301 is used to track the reflection path of the sound wave after it is emitted from the sound source; whenever the sound wave is reflected by a reflective surface in the virtual room, the reflective surface filtering characteristic value at each absorption frequency is added to the sound wave filtering characteristic value at the same absorption frequency before the sound wave is reflected, to obtain the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the reflective surface; when the sound wave is tracked to reach the microphone, the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the last reflective surface is used as the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone.

[0143] In another embodiment of this disclosure, the device further includes:

[0144] The determination module 303 is also used to determine the sound absorption coefficient of the reflective surface at various sound absorption frequencies based on the material of the reflective surface.

[0145] The calculation module is used to calculate the filtering characteristic value of the reflective surface at each sound absorption frequency based on the sound absorption coefficient of the reflective surface at each sound absorption frequency.

[0146] In another embodiment of this disclosure, the calculation module is configured to determine the reflection coefficient of the reflective surface at each sound absorption frequency based on the sound absorption coefficient of the reflective surface at each sound absorption frequency; and to calculate the reflective surface filtering characteristic value at each sound absorption frequency using the following formula based on the reflection coefficient of the reflective surface at each sound absorption frequency:

[0147]

[0148] Where, x n β represents the reflective surface filtering characteristic value of the reflective surface at the nth absorption frequency. n This represents the reflection coefficient of the reflecting surface at the nth absorption frequency.

[0149] In another embodiment of this disclosure, the determining module 303 is further configured to determine the uniform sound absorption coefficient of each reflective surface based on the material of each reflective surface in the virtual room.

[0150] The determination module 303 is also used to determine the uniform reflection coefficient of each reflective surface based on the uniform sound absorption coefficient of each reflective surface;

[0151] The acquisition module 301 is also used to determine that the sound wave can reach the microphone based on the unified reflection coefficient of each reflection surface on the reflection path and the initial energy value of the sound wave, and to use the sound wave filtering characteristic value at each absorption frequency after the sound wave is reflected by the last reflection surface as the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone.

[0152] In another embodiment of this disclosure, the addition module 302 is used to determine the sound wave weight value and the microphone weight value corresponding to each absorption frequency based on the sound wave filtering characteristic value of the sound wave at each absorption frequency when it reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency; based on the sound wave weight value and the microphone weight value corresponding to each absorption frequency, the sound wave filtering characteristic value of the sound wave at each absorption frequency when it reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency are weighted and added together to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives.

[0153] In another embodiment of this disclosure, the determining module 303 is configured to obtain the maximum total energy filtering characteristic value from the total energy filtering characteristic values ​​of the pickup at each sound absorption frequency; subtract the maximum total energy filtering characteristic value from the total energy filtering characteristic value corresponding to each sound absorption frequency to obtain the total energy filtering characteristic difference value corresponding to each sound absorption frequency; determine each sound absorption frequency as the center frequency of the target filter, and determine the total energy filtering characteristic difference value corresponding to each sound absorption frequency as the gain coefficient of the target filter.

[0154] In another embodiment of this disclosure, the device further includes:

[0155] A building block is used to construct a target filter based on the center frequency and gain coefficient.

[0156] The processing module is used to filter the original audio signal based on the target filter to obtain an audio signal with a virtual room reverberation effect.

[0157] In summary, the apparatus provided in this disclosure traces the reflection path of sound waves from the sound source to the microphone. During the tracing process, based on the reflection surface filtering characteristic values ​​of each reflecting surface at various absorption frequencies, and the sound wave filtering characteristic values ​​of the sound wave before reflection at various absorption frequencies, it obtains the sound wave filtering characteristic values ​​of the sound wave reaching the microphone at various absorption frequencies. These sound wave filtering characteristic values ​​of the sound wave reaching the microphone are parameters that characterize the filtering characteristics of the sound wave, obtained after considering energy loss during the reflection process. Furthermore, based on the sound wave reaching the microphone... When each sound wave from the pickup reaches the microphone, the sound wave filtering characteristic value of each sound wave at each absorption frequency and the energy filtering characteristic value of the pickup at each absorption frequency are used to determine the total energy filtering characteristic value of the pickup at each absorption frequency. This total energy filtering characteristic value of the pickup at each absorption frequency can characterize the relationship between different absorption frequencies of the virtual room and the filtering characteristics. Based on the total energy filtering characteristic value of the pickup at each absorption frequency, the filtering parameters of the target filter can be accurately determined, so that the target filter can achieve the reverberation effect of the virtual room.

[0158] Figure 4This diagram illustrates a structural block diagram of an electronic device 400 provided in an exemplary embodiment of the present disclosure. Typically, device 400 includes a processor 401 and a memory 402.

[0159] Processor 401 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0160] Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 402 is used to store at least one instruction, which is executed by processor 401 to implement the method for determining filter coefficients provided in the method embodiments of this disclosure.

[0161] In some embodiments, the electronic device 400 may optionally include a peripheral device interface 403 and at least one peripheral device. The processor 401, memory 402, and peripheral device interface 403 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes a power supply 404.

[0162] Peripheral device interface 403 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 401 and memory 402. In some embodiments, processor 401, memory 402 and peripheral device interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 401, memory 402 and peripheral device interface 403 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0163] Power supply 404 is used to supply power to various components in electronic device 400. Power supply 404 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 404 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0164] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 400, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0165] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, which can be executed by a processor of electronic device 400 to perform the method for determining filter coefficients described above. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0166] This disclosure provides a computer-readable storage medium storing at least one line of program code, which is loaded and executed by a processor to implement a method for determining filter coefficients. The computer-readable storage medium can be non-transitory. For example, it can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, or an optical data storage device.

[0167] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements a method for determining filter coefficients.

[0168] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0169] The above description is merely an optional embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A method for determining filter coefficients, characterized in that, The method includes: For any sound wave emitted by a sound source in a virtual room, when the sound wave is reflected by multiple reflective surfaces of the virtual room and reaches the microphone, the sound wave filtering characteristic value of the sound wave at each sound absorption frequency and the energy filtering characteristic value of the microphone at each sound absorption frequency are obtained when the sound wave reaches the microphone. The sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone is weighted and added to the energy filtering characteristic value of the microphone at the same absorption frequency to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives. Based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room are determined.

2. The method according to claim 1, characterized in that, The step of obtaining the sound wave filtering characteristic values ​​at various absorption frequencies when the sound wave reaches the microphone includes: After the sound wave is emitted from the sound source, trace the reflection path of the sound wave; Each time the sound wave is reflected by the reflective surface in the virtual room, the reflective surface filtering characteristic value at each sound absorption frequency is added to the sound wave filtering characteristic value at the same sound absorption frequency before the sound wave is reflected, to obtain the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the reflective surface. When the sound wave is tracked to reach the microphone, the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the last reflecting surface is used as the sound wave filtering characteristic value at each sound absorption frequency when the sound wave reaches the microphone.

3. The method according to claim 2, characterized in that, Before adding the reflective surface filtering characteristic value at each sound absorption frequency to the sound wave filtering characteristic value at the same sound absorption frequency before reflection, to obtain the sound wave filtering characteristic value at each sound absorption frequency after reflection, the method further includes: Based on the material of the reflective surface, determine the sound absorption coefficient of the reflective surface at each sound absorption frequency; Based on the sound absorption coefficient of the reflective surface at each sound absorption frequency, calculate the reflective surface filtering characteristic value of the reflective surface at each sound absorption frequency.

4. The method according to claim 3, characterized in that, The step of calculating the reflective surface filtering characteristic value at each sound absorption frequency based on the sound absorption coefficient of the reflective surface includes: The reflection coefficient of the reflective surface at each sound absorption frequency is determined based on the sound absorption coefficient of the reflective surface at each sound absorption frequency. Based on the reflection coefficients of the reflective surface at various sound absorption frequencies, the following formula is used to calculate the reflective surface filtering characteristic values ​​at various sound absorption frequencies: Where, x n β represents the reflective surface filtering characteristic value of the reflective surface at the nth sound absorption frequency. n This represents the reflection coefficient of the reflective surface at the nth sound absorption frequency.

5. The method according to claim 2, characterized in that, Before using the sound wave filtering characteristic values ​​at various absorption frequencies after the sound wave is reflected by the last reflecting surface as the sound wave filtering characteristic values ​​at various absorption frequencies when the sound wave reaches the microphone, the method further includes: Based on the material of each reflective surface in the virtual room, determine the standardized sound absorption coefficient of each reflective surface; Based on the standardized sound absorption coefficient of each reflective surface, determine the standardized reflection coefficient of each reflective surface; When it is determined that the sound wave can reach the microphone based on the uniform reflection coefficient of each reflecting surface on the reflection path and the initial energy value of the sound wave, the step of taking the sound wave filtering characteristic value at each sound absorption frequency after the sound wave is reflected by the last reflecting surface as the sound wave filtering characteristic value at each sound absorption frequency when the sound wave reaches the microphone is executed.

6. The method according to claim 1, characterized in that, The step of weightedly adding the sound wave filtering characteristic value at each absorption frequency of the sound wave reaching the microphone with the energy filtering characteristic value of the microphone at the same absorption frequency to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives includes: Based on the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency, the sound wave weight value and the microphone weight value corresponding to each absorption frequency are determined. Based on the sound wave weight value and pickup weight value corresponding to each sound absorption frequency, the sound wave filtering characteristic value of the sound wave at each sound absorption frequency when it reaches the pickup is weighted and added to the energy filtering characteristic value of the pickup at the same sound absorption frequency, so as to obtain the energy filtering characteristic value of the pickup at each sound absorption frequency after the sound wave arrives.

7. The method according to claim 1, characterized in that, The process of determining the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room, based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, includes: The maximum total energy filtering characteristic value is obtained from the total energy filtering characteristic values ​​of the microphone at each sound absorption frequency; Subtract the maximum total energy filter characteristic value from the total energy filter characteristic value corresponding to each sound absorption frequency to obtain the total energy filter characteristic difference value corresponding to each sound absorption frequency. Each sound absorption frequency is determined as the center frequency of the target filter, and the total energy filtering characteristic difference corresponding to each sound absorption frequency is determined as the gain coefficient of the target filter.

8. The method according to claim 7, characterized in that, After determining the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room based on the total energy filtering characteristic value of the microphone at each absorption frequency after each sound wave reaches the microphone, the method further includes: The target filter is constructed based on the center frequency and the gain coefficient; Based on the target filter, the original audio signal is filtered to obtain an audio signal with the reverberation effect of the virtual room.

9. An apparatus for determining filter coefficients, characterized in that, The device includes: The acquisition module is used to acquire, for any sound wave emitted by a sound source in a virtual room, when the sound wave is reflected by multiple reflective surfaces of the virtual room and reaches the microphone, the sound wave filtering characteristic value at each absorption frequency of the sound wave and the energy filtering characteristic value of the microphone at each absorption frequency of the sound wave when it reaches the microphone. The addition module is used to perform a weighted addition of the sound wave filtering characteristic value at each absorption frequency when the sound wave reaches the microphone and the energy filtering characteristic value of the microphone at the same absorption frequency, so as to obtain the energy filtering characteristic value of the microphone at each absorption frequency after the sound wave arrives. The determination module is used to determine the filter coefficients of the target filter used to achieve the reverberation effect of the virtual room based on the total energy filtering characteristic value of the pickup at each sound absorption frequency after all sound waves arrive.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one piece of program code, which is loaded and executed by the processor to implement the method for determining filter coefficients as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method for determining filter coefficients as described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for determining filter coefficients as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Audio data generation method and device, data set construction method, medium and equipment

    CN112951199A

  • Method and apparatus for echo cancellation and echo cancellation program

    JP2004320204A