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

By constructing a filter bank to convert the audio signal sampling rate, the problem of high computational complexity in existing technologies is solved, and efficient and high-precision conversion of audio signal processing is achieved.

CN120748416BActive Publication Date: 2025-11-21CHENGDU CELIS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511233801.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-21
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing technologies have high computational complexity in the audio signal sampling rate conversion process, resulting in low processing efficiency and the possibility of failure.

Method used

By determining the conversion factor sequence and filter type of the audio signal, a filter identifier sequence is constructed, and filter banks are combined in sequence for sampling rate conversion, reducing the amount of data and processing complexity.

Benefits of technology

It improves the efficiency and accuracy of audio signal processing, reduces the data volume and processing complexity of each level of filter, and enhances the overall processing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120748416B_ABST
    Figure CN120748416B_ABST
Patent Text Reader

Abstract

The application relates to a processing method and device of an audio signal, computer equipment and a readable storage medium, and relates to the technical field of audio processing. The method comprises the following steps: acquiring an audio signal, and determining a current sampling rate and a target sampling rate of the audio signal; determining a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate; determining a filter type for the audio signal according to a filter constraint condition; constructing a filter identifier sequence for the audio signal according to the filter type; performing output conversion configuration on the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, so as to obtain a filter configuration result; combining filters at a local end in sequence based on the filter configuration result to obtain a filter group, and performing sampling rate conversion processing on the audio signal through the filter group, so as to obtain a target signal conforming to the target sampling rate; and the method is beneficial to improving the overall processing efficiency and processing precision of the audio signal.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of audio processing, and in particular to an audio signal processing method and device, computer equipment and a readable storage medium. BACKGROUND

[0002] Audio sampling rate conversion is a process of converting an audio signal from one sampling rate to another sampling rate. In the related art, for an up-sampled audio signal, low-pass filtering and phase compensation are performed on the up-sampled audio signal before down-sampling processing. However, the related processing method at least has the problem of increasing the computational complexity, which reduces the processing efficiency of the audio signal and even causes the audio signal processing to fail. SUMMARY

[0003] Therefore, it is necessary to provide an audio signal processing method and device, computer equipment, computer readable storage medium and computer program product capable of improving the processing efficiency of the audio signal.

[0004] In a first aspect, the present application provides an audio signal processing method, which comprises:

[0005] obtaining an audio signal and determining a current sampling rate and a target sampling rate of the audio signal;

[0006] determining a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, the conversion factor sequence including at least one conversion factor, the conversion factor being used to represent the data amount change of the input signal data after the conversion processing of the filter;

[0007] determining a filter type for the audio signal according to a filter constraint condition, the filter constraint condition being obtained based on at least one of an audio feature of the audio signal, a signal index feature corresponding to the target sampling rate, and an audio processing resource feature of a local end;

[0008] constructing a filter identifier sequence for the audio signal according to the filter type; the filter identifier sequence includes filter identifiers arranged in sequence and having the same number as the number of the conversion factors, the filter identifier being used to represent a filter belonging to the filter type at the local end;

[0009] performing output conversion configuration on the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, to obtain a filter configuration result;

[0010] The filters of the local end are combined in sequence based on the filter configuration result to obtain a filter bank, and the audio signal is subjected to sampling rate conversion processing through the filter bank to obtain a target signal conforming to the target sampling rate.

[0011] In one of the embodiments, the determining of the conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate comprises:

[0012] The interpolation factor and the decimation factor for the audio signal are determined based on the current sampling rate and the target sampling rate, and the conversion factor is obtained according to the interpolation factor and the decimation factor.

[0013] The conversion factor is combined to obtain the conversion factor sequence for the audio signal.

[0014] In one of the embodiments, the constructing of the filter identifier sequence for the audio signal according to the filter type comprises:

[0015] The factor number of the conversion factor included in the conversion factor sequence is determined.

[0016] The same number of filter identifiers as the factor number is determined based on the filter type.

[0017] The filter identifiers are combined to obtain the filter identifier sequence for the audio signal.

[0018] In one of the embodiments, the conversion factor comprises an interpolation factor and a decimation factor, the factor number comprises a first factor number of the interpolation factor and a second factor number of the decimation factor, and the filter type comprises an interpolation type and a decimation type.

[0019] The determining of the same number of filter identifiers as the factor number based on the filter type comprises:

[0020] The same number of first filter identifiers as the first factor number is determined based on the interpolation type.

[0021] The same number of second filter identifiers as the second factor number is determined based on the decimation type.

[0022] The same number of filter identifiers as the factor number is obtained according to the first filter identifiers and the second filter identifiers.

[0023] In one of the embodiments, the conversion factor comprises an interpolation factor and a decimation factor, and the filter type comprises an interpolation type and a decimation type.

[0024] The output conversion configuration is performed on the filter represented by the filter identifier in the filter identifier sequence according to the conversion factor in the conversion factor sequence, and a filter configuration result is obtained, including:

[0025] In the case where the interpolation factor represents a filter of the interpolation type that meets the trigger configuration condition, an output conversion configuration is performed on a first filter according to the interpolation factor, and a first configuration result is obtained, the first filter being a filter of the interpolation type represented by the filter identifier in the filter identifier sequence;

[0026] In the case where the extraction factor represents a filter of the extraction type that meets the trigger configuration condition, an output conversion configuration is performed on a second filter according to the extraction factor, and a second configuration result is obtained, the second filter being a filter of the extraction type represented by the filter identifier in the filter identifier sequence;

[0027] The filter configuration result is obtained according to the first configuration result and the second configuration result.

[0028] In one of the embodiments, the filter type includes an interpolation type and an extraction type;

[0029] The filter group is obtained by sequentially combining filters at the local end based on the filter configuration result, including:

[0030] The target filter at the local end and the filter cascade order of the target filter are determined according to the filter configuration result, the filter cascade order including a first cascade order of a first filter of the interpolation type in the target filter and a second cascade order of a second filter of the extraction type in the target filter;

[0031] The first filter is cascade-connected according to the first cascade order, and an interpolation filter group is obtained;

[0032] The second filter is cascade-connected according to the second cascade order, and an extraction filter group is obtained;

[0033] The interpolation filter group and the extraction filter group are connected in sequence, and a filter group is obtained.

[0034] In one of the embodiments, the sampling rate conversion processing of the audio signal is performed by the filter group, including:

[0035] The tap number of each target filter in the filter group is obtained;

[0036] The audio processing algorithm corresponding to each target filter is determined according to the tap number of each target filter.

[0037] The audio signal is subjected to a sampling rate conversion process based on a cascade order of the target filters and an audio processing algorithm corresponding to each of the target filters.

[0038] In a second aspect, the present application provides an audio signal processing device, which comprises:

[0039] An audio acquisition module is configured to acquire an audio signal and determine a current sampling rate and a target sampling rate of the audio signal.

[0040] A conversion factor sequence determination module is configured to determine a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, wherein the conversion factor sequence comprises at least one conversion factor, and the conversion factor is used to represent a data amount change of a filter after performing a conversion process on input signal data.

[0041] A filter type determination module is configured to determine a filter type for the audio signal according to a filter constraint condition, wherein the filter constraint condition is obtained based on at least one of an audio feature of the audio signal, a signal index feature corresponding to the target sampling rate, and an audio processing resource feature of a local end.

[0042] A filter identifier sequence determination module is configured to construct a filter identifier sequence for the audio signal according to the filter type, wherein the filter identifier sequence comprises filter identifiers arranged in sequence and having a same number as that of the conversion factors, and the filter identifiers are used to represent filters belonging to the filter type at the local end.

[0043] A filter configuration module is configured to perform output conversion configuration on the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, so as to obtain a filter configuration result.

[0044] An audio processing module is configured to combine filters at the local end in sequence based on the filter configuration result to obtain a filter group, and perform a sampling rate conversion process on the audio signal through the filter group, so as to obtain a target signal conforming to the target sampling rate.

[0045] In a third aspect, the present application provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the first aspect when executing the computer program.

[0046] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the first aspect.

[0047] In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the first aspect.

[0048] In the audio signal processing method, device, computer device, computer readable storage medium and computer program product provided by the present application, the audio signal processing method comprises the following steps: obtaining an audio signal, determining a current sampling rate and a target sampling rate of the audio signal; determining a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, the conversion factor sequence comprising at least one conversion factor, the conversion factor being used to represent a data amount change of the audio signal after being processed by a filter; determining a filter type for the audio signal according to a filter constraint condition, the filter constraint condition being obtained based on at least one of an audio feature of the audio signal, a signal index feature corresponding to the target sampling rate and an audio processing resource feature of a local end; constructing a filter identifier sequence for the audio signal according to the filter type, the filter identifier sequence comprising filter identifiers arranged in sequence and having the same number as the conversion factors, the filter identifier being used to represent a filter belonging to the filter type at the local end; performing output conversion configuration on the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, to obtain a filter configuration result; and combining the filters at the local end in sequence based on the filter configuration result to obtain a filter group, and performing sampling rate conversion processing on the audio signal by using the filter group to obtain a target signal conforming to the target sampling rate. It can be seen that, by using the current sampling rate and the target sampling rate of the audio signal to be processed, the present application can obtain the corresponding conversion factor sequence, determine the filter type that can be adapted and used in combination with the local end resource of the audio signal, and then obtain the filter group used for implementing the audio signal processing based on the determined conversion factor sequence and filter type, the filter group involving the cascade connection relationship of the filters and the conversion configuration of the filters. Finally, the audio signal is processed by the filters in the filter group in sequence to obtain the target signal conforming to the target sampling rate output by the filter group. In the audio signal processing method provided by the present application, the number of conversion factors is multiple based on the current sampling rate and the target sampling rate of the audio signal to be processed, which makes the corresponding filters also include multiple filters, and the sampling rate conversion of the audio signal is realized by the multiple filters connected in cascade, which is beneficial to reducing the data amount and processing complexity of the audio signal processed by each filter, thereby being beneficial to improving the efficiency and accuracy of the audio signal processed by each filter, and further being beneficial to improving the overall processing efficiency and processing accuracy of the audio signal. BRIEF DESCRIPTION OF DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the related art. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained from these drawings without creative effort.

[0050] Figure 1 An application environment diagram of the audio signal processing method in one embodiment;

[0051] Figure 2 A flowchart of the audio signal processing method in one embodiment;

[0052] Figure 3 A flowchart of a sub-step of the audio signal processing method in one embodiment;

[0053] Figure 4 A structural block diagram of the audio signal processing device in one embodiment;

[0054] Figure 5 An internal structure diagram of the computer device in one embodiment.

[0055] Explanation of reference signs:

[0056] 102-terminal, 104-server, 400-audio signal processing device, 41-audio acquisition module, 42-conversion factor sequence determination module, 43-filter type determination module, 44-filter identifier sequence determination module, 45-filter configuration module, 46-audio processing module. DETAILED DESCRIPTION

[0057] In order to make the purposes, technical solutions and advantages of the present application more clear, the following will further describe the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0058] It should be noted that the terms "first", "second" and the like used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" and any variations thereof used in the present application are intended to cover non-exclusive inclusion. The term "multiple" used in the present application refers to two and more than two. The term "and / or" used in the present application refers to one of the solutions, or any combination of multiple solutions.

[0059] The audio signal processing method provided by the embodiments of the present application can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. For example, the data storage system can be used to store information such as filter types and local audio processing resource characteristics. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0060] In one exemplary embodiment, such as Figure 2 As shown, an audio signal processing method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 201 to 206. Wherein:

[0061] Step 201: Acquire the audio signal and determine the current sampling rate and target sampling rate of the audio signal.

[0062] The acquired audio signal is the audio signal to be processed, specifically the audio signal to be converted in terms of audio sampling rate. The current sampling rate of the audio signal is the sampling rate of the audio signal to be converted; the target sampling rate is the sampling rate of the audio signal obtained after the sampling rate conversion. Here, both the current and target sampling rates of the audio signal are known, or can be obtained through analysis based on the audio signal itself, its storage device, or its final playback device. Either the current or target sampling rate can be an integer or not; this application does not impose any limitation on this.

[0063] For example, for an audio signal to be converted, after the audio signal is acquired, its current audio sampling rate and target audio sampling rate are first determined so that the filters to be used, the configuration information of each filter, and the connection relationship between the filters can be determined based on the current sampling rate and the target sampling rate.

[0064] Step 202, determining a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, the conversion factor sequence including at least one conversion factor, the conversion factor being used to represent the data amount change after the filter converts the input signal data.

[0065] The conversion factor sequence can include only one conversion factor or multiple conversion factors, which is not limited in the present application. The number of conversion factors can be determined based on the current sampling rate and the target sampling rate, and can be further determined in association with the number of filters included in the terminal, and can be further determined in combination with other factors (such as the audio processing resources of the terminal) in the case of demand. The conversion factor is used to represent the data amount change after the filter converts the input signal data. For example, in the case of a conversion factor of 3, it means that 1 signal data is input to the corresponding filter, and 3 signal data is output. For example, in the case of a conversion factor of 4, it means that 1 signal data is input to the corresponding filter, and 4 signal data is output. In addition, in the case of a conversion factor of 3, it can also mean that 3 signal data is input to the corresponding filter, and 1 signal data is output. In the case of a conversion factor of 5, it can also mean that 5 signal data is input to the corresponding filter, and 1 signal data is output.

[0066] For example, after the current sampling rate and the target sampling rate of the audio signal to be converted are determined, at least one conversion factor suitable for the audio signal can be obtained based on the numerical values of the current sampling rate and the target sampling rate, and then the conversion factor sequence corresponding to the audio signal can be composed based on these conversion factors.

[0067] Step 203, determining the filter type for the audio signal according to the filter constraint condition, the filter constraint condition being obtained based on at least one of the audio feature of the audio signal, the signal index feature corresponding to the target sampling rate, and the audio processing resource feature of the local terminal.

[0068] The filter type refers to the level of the filter, such as an A-level filter, a B-level filter, etc. The audio feature of the audio signal can include, for example, the signal spectrum, the signal bandwidth, the channel bandwidth, the signal frequency, etc. The signal index feature corresponding to the target sampling rate refers to the feature required by the target audio signal obtained after the sampling rate conversion, such as the signal-to-noise ratio, the passband ripple, etc. The audio processing resource feature of the local terminal can include, for example, the computing resources of the MCU (Microcontroller Unit), the storage resources of the storage unit, etc.

[0069] Exemplarily, when the sampling rate of the audio signal needs to be processed, at least one of the audio feature of the audio signal to be processed, the signal index feature required by the target audio signal, and the audio processing resource feature of the local source for audio processing can be acquired, and then the filter type of the filter required for the audio signal processing this time is determined based on at least one of the three.

[0070] Step 204, constructing a filter identification sequence for the audio signal according to the filter type; the filter identification sequence includes filter identifications arranged in sequence, and the number of the filter identifications is the same as the number of the conversion factors, and the filter identification is used to represent the filter of the local end belonging to the filter type.

[0071] Among them, the filter identification sequence includes the filter identification of the filter required for processing the audio data this time, and the filter identification may be, for example, the ID (Identity Document, unique code) of the filter, which is used to identify which specific filter corresponds to. The number of filter identifications included in the filter identification sequence is the same as the number of conversion factors corresponding to the audio signal to be processed.

[0072] Exemplarily, after determining the filter type that can be used for processing the audio signal, the filter type suitable for each conversion factor can be determined based on the conversion factor corresponding to the audio signal, and then the filter identification of each filter required to be used is determined, and the filter identification sequence is formed by combining each filter identification determined and matched with the number of conversion factors.

[0073] Step 205, according to the conversion factor in the conversion factor sequence, respectively output the conversion configuration for the filter represented by the filter identification in the filter identification sequence, and obtain the filter configuration result.

[0074] Exemplarily, after the conversion factor sequence and the filter identifier sequence corresponding to the audio signal to be processed are determined through the above steps, the conversion factors in the adaptive conversion factor sequence are matched with the filter identifiers in the filter identifier sequence to obtain the combination of the conversion factor and the filter identifier. In each combination of the conversion factor and the filter identifier, the conversion factor is used to configure the working function of the filter pointed to by the filter identifier. For example, when the conversion factor is 3, the working function of the filter to be configured is that, in the case of inputting one signal data, three signal data are output, or in the case of inputting three signal data, one signal data is output. For example, when the conversion factor is 5, the working function of the filter to be configured is that, in the case of inputting one signal data, five signal data are output, or in the case of inputting five signal data, one signal data is output. By one-to-one matching of each conversion factor in the conversion factor sequence with each filter identifier in the filter identifier sequence, the filter configuration result for the audio signal to be processed can be obtained.

[0075] In step 206, the filters of the local end are combined in sequence based on the filter configuration result to obtain a filter group, and the audio signal is subjected to sampling rate conversion processing through the filter group to obtain a target signal conforming to a target sampling rate.

[0076] The purpose of combining the filters of the local end in sequence is to determine the connection mode of the multiple filters used to process the audio signal, specifically, to determine the cascade connection mode of the multiple filters.

[0077] Exemplarily, after the filters required in the process of sampling rate conversion of the audio signal to be processed and the configuration information of each filter are determined, the electrical connection mode between the multiple filters can be further determined, specifically, the cascade connection mode. Then, based on the determined cascade connection mode, the multiple filters are connected in cascade to form a filter group. Then, the audio signal is subjected to ordered processing through each filter in the filter group, to obtain a target signal subjected to sampling rate conversion and finally output by the filter group. The target signal has a target sampling rate required by the audio data.

[0078] The method provided by the present application comprises the following steps: obtaining an audio signal, determining a current sampling rate and a target sampling rate of the audio signal, determining a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, the conversion factor sequence comprising at least one conversion factor, the conversion factor being used to represent the data amount change of the input signal data after the conversion processing of the filter, determining a filter type for the audio signal according to a filter constraint condition, the filter constraint condition being obtained based on at least one of the audio features of the audio signal, the signal index features corresponding to the target sampling rate, and the audio processing resource features of the local terminal, constructing a filter identifier sequence for the audio signal according to the filter type, the filter identifier sequence comprising filter identifiers arranged in sequence, the number of the filter identifiers being the same as the number of the conversion factors, the filter identifier being used to represent the filter belonging to the filter type, performing output conversion configuration on the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, obtaining a filter configuration result, and combining the filters of the local terminal in sequence based on the filter configuration result to obtain a filter group, and performing sampling rate conversion processing on the audio signal through the filter group to obtain a target signal conforming to the target sampling rate. It can be seen that, through the current sampling rate and the target sampling rate corresponding to the audio signal to be processed, the conversion factor sequence can be converted, the filter type that can be adapted and used can be determined in combination with the local terminal resources of the audio signal, and then based on the determined conversion factor sequence and filter type, the filter group for realizing the audio signal processing can be obtained, the filter group involves the cascade connection relationship of each filter and the conversion configuration of each filter, and finally the audio signal is processed by each filter in the filter group in a step-by-step manner to obtain the target signal conforming to the target sampling rate output by the filter group. In the method provided by the present application, the number of conversion factors is multiple based on the current sampling rate and the target sampling rate of the audio signal to be processed, which makes the corresponding filters also include multiple cases, and the sampling rate conversion of the audio signal is realized by the multiple cascade-connected filters, which is beneficial to reducing the data amount and processing complexity of each filter in processing the audio signal, thereby improving the efficiency and accuracy of each filter in processing the audio signal, and further improving the overall processing efficiency and processing accuracy of the audio signal.

[0079] It should be noted that the multiple filters configured in the terminal 102 of the above-mentioned embodiment can be multiple entity filters, and then the multiple entity filters are cascade-connected to form a filter group based on the demand, so that the audio signal is processed in an orderly manner by each entity filter in the entity filter group, and a target signal subjected to sampling rate conversion is obtained which is finally output by the entity filter group.

[0080] But the terminal 102 configured with multiple physical filters is only one optional embodiment provided by the present application, and the present application is not limited thereto. Alternatively, the terminal 102 can be configured with only one physical filter, and when multiple (multi-stage) filters are required to perform ordered processing on the audio signal stage by stage, the parameter control module of the filter can update the parameter configuration information of each stage of the filter; for example, when the same filter needs to implement 3-stage processing on the audio signal, 3 configuration information (first configuration information, second configuration information and third configuration information) corresponding to the 3-stage filter can be determined based on the filter configuration result; then, the parameter control module of the filter first configures the filter based on the first configuration information, to perform first sampling rate conversion processing on the received audio signal to be processed, to obtain a first sampling rate converted audio signal; further, the parameter control module of the filter configures the filter based on the second configuration information, to perform corresponding second sampling rate conversion processing on the first sampling rate converted audio signal, to obtain a second sampling rate converted audio signal; finally, the parameter control module of the filter configures the filter based on the third configuration information, to perform corresponding third sampling rate conversion processing on the second sampling rate converted audio signal, to obtain a third sampling rate converted audio signal, which is also the target signal conforming to the target sampling rate. In this embodiment, the terminal 102 can be configured with only one filter, and by multiplexing the one filter and configuring appropriate parameters for it in each use, the one filter can be used to implement multi-stage ordered processing on one audio signal.

[0081] In one exemplary embodiment, the above-mentioned determination of the conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate can specifically include: determining an interpolation factor and an extraction factor for the audio signal based on the current sampling rate and the target sampling rate, and obtaining the conversion factor according to the interpolation factor and the extraction factor; and combining the conversion factor to obtain the conversion factor sequence for the audio signal.

[0082] The conversion factor can only include an interpolation factor, or only include an extraction factor, or include both the interpolation factor and the extraction factor. The interpolation factor is used to represent that the data quantity of the input signal data processed by the adaptive filter is increased. The extraction factor is used to represent that the data quantity of the input signal data processed by the adaptive filter is reduced. In the case that the value of the interpolation factor is 1, the related audio data does not need to be processed in the quantity increasing or reducing manner, and therefore, the filter can not be adapted in the case that the value of the interpolation factor is 1. Correspondingly, in the case that the value of the extraction factor is 1, the related audio data does not need to be processed in the quantity increasing or reducing manner, and therefore, the filter can not be adapted in the case that the value of the extraction factor is 1. The conversion factor sequence can only include the interpolation factor, or only include the extraction factor, or include both the interpolation factor and the extraction factor.

[0083] For example, in the case that the current sampling rate and the target sampling rate of the audio signal to be processed are obtained, the interpolation factor and the extraction factor adapted to process the audio data can be determined based on the value of the current sampling rate and the value of the target sampling rate, and the conversion factor sequence adapted to process the audio data can be obtained based on the combination of the determined interpolation factor and the extraction factor.

[0084] An embodiment is provided, and the conversion factor sequence composed of the multiple conversion factors determined based on the current sampling rate and the target sampling rate of the audio signal can include multiple conversion factors. The number and the value of the conversion factors included in the multiple conversion factor sequences are the same, but the order of the multiple conversion factors in each conversion factor sequence can be different.

[0085] Another embodiment is also provided, and the conversion factor sequence composed of the multiple conversion factors determined based on the current sampling rate and the target sampling rate of the audio signal can be unique, and the order of the multiple conversion factors in the conversion factor sequence is the most optimal order that has been determined.

[0086] The most optimal conversion factor sequence can be determined based on at least one of a preset mode or a preset screening mode, and the preset mode and the preset screening mode are not limited in the present application. The user can select and set the determination mode of the most optimal conversion factor sequence based on the demand or the actual experience.

[0087] In the embodiment, the interpolation factor and the extraction factor are determined based on the current sampling rate and the target sampling rate of the audio signal to be processed, and then the conversion factor sequence suitable for the audio signal to be processed is obtained based on the combination of the determined interpolation factor and the extraction factor, so as to ensure the accuracy of the conversion factors included in the conversion factor sequence and the matching accuracy of the subsequent filter.

[0088] In one example embodiment, the application also provides a method for determining interpolation factors and decimation factors for an audio signal based on a current sampling rate and a target sampling rate, comprising: determining interpolation coefficients and decimation coefficients corresponding to the current sampling rate and the target sampling rate based on a simplest integer ratio of the current sampling rate and the target sampling rate; and obtaining at least one factor corresponding to each interpolation coefficient as at least one interpolation factor corresponding to the interpolation coefficient, and obtaining at least one factor corresponding to each decimation coefficient as at least one decimation factor corresponding to the decimation coefficient.

[0089] The at least one factor corresponding to each interpolation coefficient can or can not be the smallest factor, and the application does not make a specific limitation thereon; correspondingly, the at least one factor corresponding to each decimation coefficient can or can not be the smallest factor, and the application does not make a specific limitation thereon. Each conversion factor included in the conversion factor sequence can be arranged in order of values from small to large, for example.

[0090] In one example embodiment, the above-mentioned construction of the filter identification sequence for the audio signal according to the filter type specifically comprises: determining the factor number of the conversion factors included in the conversion factor sequence; determining the same number of filter identifications as the factor number based on the filter type; and combining the filter identifications to obtain the filter identification sequence for the audio signal.

[0091] The factor number refers to the number of conversion factors included in the conversion factor sequence.

[0092] For example, after the conversion factor sequence and the filter type adapted to the audio data are determined, the factor number of the conversion factors in the conversion factor sequence can be further obtained, and then a corresponding filter is adapted to each conversion factor based on the requirement, to determine the same number of filter identifications as the factor number, and finally the determined filter identifications are combined to obtain the filter identification sequence adapted to the audio signal.

[0093] One embodiment provides that the filter identification sequence determined based on the number of conversion factors adapted to the audio signal and the filter type can include multiple filter identification sequences; the number of filter identifications included in the multiple filter identification sequences and the filter type are the same, but the order of the multiple filter identifications in each filter identification sequence can be different.

[0094] Another embodiment provides that the filter identification sequence determined based on the number of conversion factors adapted to the audio signal and the filter type can be unique, and the order of the multiple filter identifications in the filter identification sequence is the most optimal order that has been determined.

[0095] The most preferred filter identification sequence can be determined based on at least one of a preset mode or a preset screening mode. The preset mode and the preset screening mode are not specifically limited herein, and a user can select and set the determination mode of the most preferred filter identification sequence based on requirements or actual experience.

[0096] In this embodiment, the filter identification sequence adapted to the audio data to be processed is determined by adapting the factor number and the filter type of the conversion factor of the audio data to be processed, so as to ensure that the number of filters corresponding to the determined filter identification is sufficient for processing the audio signal to be processed, and to ensure the matching effect of the conversion factor and the filter adapted to the audio signal.

[0097] In an exemplary embodiment, the conversion factor includes an interpolation factor and an extraction factor, and the factor number includes a first factor number of the interpolation factor and a second factor number of the extraction factor; and the filter type includes an interpolation type and an extraction type.

[0098] The first factor number is the number of interpolation factors adapted to the audio data to be processed, and the second factor number is the number of extraction factors adapted to the audio data to be processed; and either of the first factor number and the second factor number can have a value of 0. The interpolation type filter is an interpolation filter, which is used to increase the input data to output more data. The extraction type filter is an extraction filter, which is used to reduce the input data to output less data.

[0099] The conversion factor sequence can be combined based on the interpolation factor sequence and the extraction factor sequence in an embodiment, wherein each interpolation factor in the interpolation factor sequence can be arranged in order from small to large, each extraction factor in the extraction factor sequence can be arranged in order from small to large or from large to small, and then the two sequences are integrated in order of the interpolation factor sequence first and the extraction factor sequence second to obtain the conversion factor sequence.

[0100] The above determination of the filter identification with the same number of factors based on the filter type includes: determining a first filter identification with the same number of factors as the first factor number based on the interpolation type; determining a second filter identification with the same number of factors as the second factor number based on the extraction type; and obtaining the filter identification with the same number of factors based on the first filter identification and the second filter identification.

[0101] Exemplarily, after the interpolation factor and the decimation factor adapted to the audio signal to be processed are acquired, and the interpolation type and the decimation type of the filter adapted to the audio signal to be processed are acquired, a number of first filter identifiers equal to the number of the first factors (the number of the interpolation factors) can be determined based on the interpolation type, and a number of second filter identifiers equal to the number of the second factors (the number of the decimation factors) can be determined based on the decimation type, and then the first filter identifiers and the second filter identifiers are combined to obtain a number of filter identifiers equal to the number of the factors in the conversion factor sequence; the determined filter identifiers can be used to combine to obtain the filter identifier sequence adapted to the audio signal to be processed.

[0102] In the case that the number of the interpolation factors is 1 and the value of the interpolation factor is also 1, it is indicated that the interpolation processing is not needed for the audio signal to be processed, and thus the interpolation filter is not needed in the processing of the audio signal to be processed, and the corresponding first filter identifier is "empty". Correspondingly, in the case that the number of the decimation factors is 1 and the value of the decimation factor is also 1, it is indicated that the decimation processing is not needed for the audio signal to be processed, and thus the decimation filter is not needed in the processing of the audio signal to be processed, and the corresponding second filter identifier is "empty".

[0103] In the embodiment, the first filter identifier (the filter identifier of the interpolation filter) adapted to the audio signal to be processed is determined first, and then the second filter identifier (the filter identifier of the decimation filter) adapted to the audio signal to be processed is determined, and then a number of filter identifiers equal to the number of the factors in the conversion factor sequence adapted to the audio signal to be processed is obtained by combining the first filter identifier and the second filter identifier. The filter identifier of the interpolation filter and the filter identifier of the decimation filter are determined in steps, which is beneficial to improving the accuracy of all the filter identifiers adapted to the audio signal to be processed, and thus is beneficial to improving the accuracy of the target signal obtained by performing the sampling rate conversion on the audio signal to be processed.

[0104] In an example embodiment, the conversion factor includes an interpolation factor and an extraction factor, and the filter type includes an interpolation type and an extraction type; and the outputting the conversion configuration according to the conversion factor in the conversion factor sequence respectively to the filter represented by the filter identifier in the filter identifier sequence to obtain the filter configuration result includes: in a case where the interpolation factor represents the interpolation type filter that meets the configuration triggering condition, outputting the conversion configuration according to the interpolation factor to the first filter to obtain a first configuration result, the first filter being the interpolation type filter represented by the filter identifier in the filter identifier sequence; in a case where the extraction factor represents the extraction type filter that meets the configuration triggering condition, outputting the conversion configuration according to the extraction factor to the second filter to obtain a second configuration result, the second filter being the extraction type filter represented by the filter identifier in the filter identifier sequence; and obtaining the filter configuration result according to the first configuration result and the second configuration result.

[0105] In a case where the interpolation factor meets the configuration triggering condition, the interpolation factor represents the interpolation type filter that meets the configuration triggering condition; and in a case where the extraction factor meets the configuration triggering condition, the extraction factor represents the extraction type filter that meets the configuration triggering condition. In a case where the number of interpolation factors is 1 and the value of the interpolation factor is also 1, it is indicated that the interpolation processing is not needed for the audio signal to be processed, and therefore the interpolation filter is not used in the processing of the audio signal to be processed, and the corresponding first filter identifier can be empty. Correspondingly, in a case where the number of extraction factors is 1 and the value of the extraction factor is also 1, it is indicated that the extraction processing is not needed for the audio signal to be processed, and therefore the extraction filter is not used in the processing of the audio signal to be processed, and the corresponding second filter identifier can be empty.

[0106] It should be noted that in a case where the number of interpolation factors is 1 and the value of the interpolation factor is also 1, the interpolation filter is not used for processing the audio signal, which can reduce the number of filters used in the processing of the audio signal. Similarly, in a case where the number of extraction factors is 1 and the value of the extraction factor is also 1, the extraction filter is not used for processing the audio signal, which can reduce the number of filters used in the processing of the audio signal.

[0107] Exemplarily, in the case that the conversion factors in the conversion factor sequence simultaneously include interpolation factors and decimation factors, and the filter identifiers in the filter identifier sequence simultaneously involve interpolation type filters and decimation type filters, the interpolation type filters and the decimation type filters are configured respectively. Specifically, the interpolation type filters can be configured first, the decimation type filters can be configured first, or the two types of filters can be configured simultaneously, which is not limited in the present application.

[0108] Specifically, in the case that the interpolation factors indicate that the interpolation type filters meet the triggering configuration condition, i.e., the interpolation factors are not "1 in number and 1 in value", the output conversion configuration can be performed on each first filter (the interpolation type filter represented by the filter identifier in the filter identifier sequence) based on each interpolation factor involved, to obtain a first configuration result, which includes the combination of each interpolation factor and the corresponding first filter. In the case that the decimation factors indicate that the decimation type filters meet the triggering configuration condition, i.e., the decimation factors are not "1 in number and 1 in value", the output conversion configuration can be performed on each second filter (the decimation type filter represented by the filter identifier in the filter identifier sequence) based on each decimation factor involved, to obtain a second configuration result, which includes the combination of each decimation factor and the corresponding second filter. Finally, the first configuration result and the second configuration result are integrated to obtain the filter configuration result adapted to the audio signal to be processed.

[0109] In the embodiment, by configuring the interpolation factors for the interpolation filters and configuring the decimation factors for the decimation filters respectively, and then integrating the two configuration results, the configuration accuracy of the final filter configuration result can be improved, and the accuracy of the target signal obtained after the sampling rate conversion of the audio signal to be processed can be improved.

[0110] In the case that the conversion factor sequence determined in the above sequence is one, and the filter identifier sequence determined is one, each conversion factor in the conversion factor sequence is matched with each filter identifier in the filter identifier sequence in sequence, to obtain the final filter configuration result.

[0111] In the case that the conversion factor sequence determined in the above step is one, but the filter identifier sequence determined is multiple, one of the filter identifier sequences that is most suitable can be determined first, and then each conversion factor in the conversion factor sequence is combined with each filter identifier in the filter identifier sequence in sequence to obtain the final filter configuration result. Alternatively, each conversion factor in the conversion factor sequence can be combined with each filter identifier in the multiple filter identifier sequences in sequence to obtain multiple filter configuration sub-results, and then one of the final filter configuration results is selected from the multiple filter configuration sub-results.

[0112] In the case that the conversion factor sequence determined in the above step is multiple, but the filter identifier sequence determined is one, one of the conversion factor sequences that is most suitable can be determined first, and then each conversion factor in the conversion factor sequence is combined with each filter identifier in the filter identifier sequence in sequence. Alternatively, each filter identifier in the filter identifier sequence can be combined with each conversion factor in the multiple conversion factor sequences in sequence to obtain multiple filter configuration sub-results, and then one of the final filter configuration results is selected from the multiple filter configuration sub-results.

[0113] In the case that the conversion factor sequence determined in the above step is multiple, and the filter identifier sequence determined is multiple, one of the conversion factor sequences that is most suitable and one of the filter identifier sequences that is most suitable can be determined first, and then each conversion factor in the conversion factor sequence is combined with each filter identifier in the filter identifier sequence in sequence to obtain the final filter configuration result. Alternatively, each conversion factor in the multiple conversion factor sequences can be combined with each filter identifier in the multiple filter identifier sequences in sequence to obtain multiple filter configuration sub-results, and then one of the final filter configuration results is selected from the multiple filter configuration sub-results.

[0114] In an exemplary embodiment, the filter types include interpolation types and decimation types; and the filter bank is obtained by combining the filters at the local end in sequence based on the filter configuration result, which specifically includes: determining a target filter at the local end and a filter cascade order of the target filter according to the filter configuration result, the filter cascade order including a first cascade order of a first filter belonging to the interpolation types in the target filter and a second cascade order of a second filter belonging to the decimation types; cascading connecting the first filter according to the first cascade order to obtain an interpolation filter bank; cascading connecting the second filter according to the second cascade order to obtain a decimation filter bank; and connecting the interpolation filter bank and the decimation filter bank according to the order to obtain the filter bank.

[0115] Exemplarily, in a case that the target filter, which needs to participate in the sampling rate conversion on the audio data to be processed, is included in both the first filter of the interpolation type and the second filter of the decimation type among the plurality of filters of the local end according to the filter configuration result, a first cascade order of the first filter belonging to the interpolation type and a second cascade order of the second filter belonging to the decimation type can be determined respectively; and further, the related plurality of first filters are connected through the first cascade order to obtain an interpolation filter group, and the related plurality of second filters are connected through the second cascade order to obtain a decimation filter group, and finally the obtained interpolation filter group and the decimation filter group are connected in a sequence of the interpolation filter group in front and the decimation filter group behind to obtain a final filter group.

[0116] By setting the filter group connection sequence of the interpolation filter group in front and the decimation filter group behind, the audio signal is first interpolated and increased, and then decimated and reduced in the process of the sampling rate conversion on the audio signal to be processed, which is beneficial to improve the accuracy of the target signal obtained finally.

[0117] In the embodiment, the cascade connection sequence of each interpolation filter in the interpolation filter group and the cascade connection sequence of each decimation filter in the decimation filter group are determined first, and then the filter group is obtained in the connection sequence of the interpolation filter group in front and the decimation filter group behind, which can improve the cascade adaptation degree of the filter group obtained finally, and is further beneficial to improve the accuracy of the target signal obtained finally after the sampling rate conversion on the audio signal to be processed.

[0118] In an exemplary embodiment, please refer to Figure 3 The sampling rate conversion processing on the audio signal by the filter group includes steps 301-303, wherein: step 301, obtaining the tap number of each target filter in the filter group; step 302, determining the audio processing algorithm corresponding to each target filter according to the tap number of each target filter; and step 303, performing the sampling rate conversion processing on the audio signal by using each target filter based on the cascade order of each target filter and the audio processing algorithm corresponding to each target filter.

[0119] The tap number of the filter refers to the number of filter coefficients, which can be used to determine the related audio processing algorithm for processing the input data of the related filter.

[0120] Exemplarily, the number of taps of each target filter in the filter bank can be acquired first, and then the audio processing algorithm corresponding to each target filter can be determined based on the number of taps of each target filter and the filter type (interpolation filter and decimation filter) of each target filter, so that when the audio signal is transmitted to each target filter, each target filter can use the determined audio processing algorithm to process the corresponding audio signal to output the required audio processing result; that is, when the audio signal to be processed starts to be converted in sampling rate, the audio signal can be converted in sampling rate step by step based on the cascade order of each target filter and the audio processing algorithm corresponding to each target filter, to obtain the target signal finally completed in sampling rate conversion.

[0121] In the embodiment, by determining the audio processing algorithm adapted to each target filter based on the number of taps of each target filter, it is beneficial to ensure that each target filter can perform the most appropriate processing on the audio signal to output the required processing result when the audio signal is received by each target filter, and the accuracy of the target signal finally completed in sampling rate conversion can be improved.

[0122] For the audio signal processing method provided in the present application, several optional embodiments are provided as shown in Table 1 below, and Table 1 shows the relationship table of interpolation coefficient (Interpolation-1) and decimation coefficient (Decimation-1) when the input sampling rate (current sampling rate, Input Fs) and the output sampling rate (target sampling rate, Output Fs) are 48 KHz (kilohertz). The unit of Input Fs can also be KHz.

[0123] Table 1

[0124]

[0125] Further, Table 2 corresponding to Table 1 is provided, and Table 2 shows the relationship table between the input sampling rate, the output sampling rate, the conversion factor sequence and the filter identifier sequence corresponding to the above-mentioned embodiment. When the input sampling rate is 88.2 Hz, the corresponding "2245" in Interpolation is the four interpolation factors included in the interpolation factor sequence in the corresponding conversion factor sequence, the corresponding "147" in Decimation is the four decimation factors included in the decimation factor sequence in the corresponding conversion factor sequence, and the corresponding "ABAAC" in Interpolation and Decimation together is the filter identifier sequence corresponding thereto, wherein "ABAA" can be the filter identifier sequence of the interpolation filter included in the filter identifier sequence, and "C" can be the filter identifier sequence of the decimation filter included in the filter identifier sequence.

[0126] Wherein, A represents the A-stage filter, B represents the B-stage filter, C represents the C-stage filter, and D represents the D-stage filter, the A-stage filter and the B-stage filter are both interpolation filters, and the C-stage filter and the D-stage filter are both decimation filters.

[0127] Table 2

[0128]

[0129] The "feature" in Table 2 represents the result, "1 step no decim" means that one interpolation filter and zero decimation filter are needed, "1 step decim" means that one interpolation filter and one decimation filter are needed, "no step 1 decim" means that zero interpolation filter and one decimation filter are needed, "2 step no decim" means that two interpolation filters and zero decimation filter are needed, and "multi step decim" means that multiple interpolation filters and one (or multiple) decimation filter are needed. The 147 in the table can be split into "3 and 49", and two decimation filters can be used in this case.

[0130] Further provided is Table 3, which shows a reference factor table of the A-stage filter, the B-stage filter, the C-stage filter, and the D-stage filter.

[0131] Table 3

[0132]

[0133] Wherein, "dB" represents decibel.

[0134] The interpolation mentioned above is also called upsampling, which is achieved through a polyphase filter. The decimation here can be easily completed by selecting useful data from the total data. In order to reduce the taps of the Finite Impulse Response (FIR) filter, a multi-step filter is used.

[0135] Wherein, the conversion formula of the sampling rate can be Output Fs=(Input Fs×L) / M, L is an interpolation factor, and M is a decimation factor. The interpolation factor L: upsample through a polyphase filter, expand the signal bandwidth and insert zero values, followed by low-pass filtering to eliminate images. The decimation factor M: limit the bandwidth through an anti-aliasing filter, then decimate samples at intervals to avoid information loss.

[0136] For the several embodiments shown in Table 1 provided in the present application, the input sampling rate classification and processing strategy at least includes the following three types, wherein:

[0137] The first type is integer times interpolation (no decimation), for example, input Fs: 8 kHz, 16 kHz, 12 kHz, 24 kHz, and the processing strategy is: single-step interpolation directly matches 48 kHz. Specifically, 8 kHz is converted to 48 kHz by: interpolation factor value 6, marked as 6, and direct polyphase filtering is completed without decimation.

[0138] The second type is simple fractional times conversion (single interpolation + decimation), for example, input Fs: 32 kHz, 64 kHz, 96 kHz, and the processing strategy is: single-step interpolation and decimation are used to achieve ratio conversion. Specifically, 32 kHz is converted to 48 kHz by:

[0139] Interpolation 3 (32 kHz to 96 kHz, marked 3A): polyphase filtering suppresses image;

[0140] Decimation 2 (96 kHz to 48 kHz, marked 2C): anti-aliasing filtering and down-sampling.

[0141] The third type is complex fractional times conversion (multi-stage decomposition), for example, input Fs: 11.025 kHz, 22.05 kHz, 44.1 kHz, 88.2 kHz, and the processing strategy is: large ratio L / M decomposition into multiple small ratios to optimize filter complexity. Specifically, 11.025 kHz is converted to 48 kHz by:

[0142] Total ratio: L / M = 640 / 147 (i.e. 48 / 11.025 ≈ 4.3548 / 11.025 ≈ 4.35);

[0143] The decomposition steps include an interpolation stage and a decimation stage, wherein:

[0144] Interpolation stage: 640 = 5 x 128 640 = 5 x 128;

[0145] Interpolation 5 (11.025 to 55.125 kHz, marked 5A);

[0146] Interpolation 128 (55.125 to 7056 kHz, marked 4A, 4B, and multiple level combinations).

[0147] Decimation stage: 147 = 3 x 49 147 = 3 x 49;

[0148] Decimation 3 (7056 to 2352 kHz, marked 3C);

[0149] Decimation 49 (2352 to 48 kHz, marked 49C).

[0150] The corresponding advantages are that each filter only needs to process a small ratio, which greatly reduces the FIR tap number (such as 128 stages instead of 640 stages). Among them, the letter suffix (such as A, B, C) represents different filter configurations or stages. For example: 3A: interpolation factor 3, using the first stage of polyphase filter (A-stage filter). 2C: decimation factor 2, using the third stage of anti-aliasing filter (C-stage filter). The combination of numbers and letters (such as 4A, 5A) represents the decomposition steps of multi-stage interpolation / decimation.

[0151] Through the multi-stage interpolation and decimation strategy, the system can efficiently and flexibly convert any input sampling rate to a fixed 48kHz output while balancing computing resources and signal quality. The core design principles include: ratio decomposition: large ratio conversion to small integer ratio combination, reducing single-stage complexity; polyphase filter optimization: reducing interpolation calculation, improving real-time performance; anti-aliasing design: ensuring that the signal bandwidth is limited before decimation to avoid distortion.

[0152] The analysis of the polyphase filter for implementing sampling rate conversion in multi-stage interpolation includes the core process of multi-stage interpolation of the polyphase filter; multi-stage interpolation is implemented by cascading multiple polyphase filters, each stage corresponding to a different interpolation factor. The overall interpolation factor is the product of the interpolation factors of each stage. The following is divided according to the three-stage process provided by the user:

[0153] First stage: 3 times interpolation (phase = 3, tap = 8)

[0154] Input: original signal x(n), sampling rate Fs.

[0155] Output: interpolated signal y(n), sampling rate increased to 3Fs.

[0156] Implementation formula:

[0157] ;

[0158] ;

[0159] .

[0160] Key points include:

[0161] Each input sample generates 3 output samples (corresponding to the interpolation factor 3).

[0162] An 8-tap filter is used, and different phases (0, 1, 2) correspond to different coefficient groups hk_0, hk_1, hk_2, where k ranges from 0 to 7, used to suppress image frequencies.

[0163] History data storage: need to keep the previous 7 input samples (x(n-1) to x(n-7)) for calculation.

[0164] Second stage: 2x interpolation (phase=2, taps=6)

[0165] Input: First stage output y(n), sampling rate 3Fs.

[0166] Output: 2x interpolated signal z(n), sampling rate boosted to 6Fs.

[0167] Implementation formula:

[0168] ;

[0169] .

[0170] Key points include:

[0171] Interpolation factor 2, sampling rate doubled.

[0172] Use 6-tap filter, phase 0 and 1 correspond to different coefficients pk_0, pk_1 where k ranges from 0 to 5.

[0173] Cascade advantage: first stage has boosted sampling rate, second stage filter's transition band is wider, allowing lower order (6 taps vs. first stage's 8 taps).

[0174] Third stage: 4x interpolation (phase=4, taps=4)

[0175] Input: Second stage output z(n), sampling rate 6Fs.

[0176] Output: Final signal d(n), sampling rate boosted to 24Fs (total interpolation factor 3x2x4=24).

[0177] Implementation formula:

[0178] ;

[0179] ;

[0180] ;

[0181] .

[0182] Key points include:

[0183] Interpolation factor 4, sampling rate boosted to 24 times original frequency.

[0184] Use 4-tap filter, phase 0-3 correspond to coefficients ck_0 to ck_3 where k ranges from 0 to 3.

[0185] Decimation integration: if subsequent decimation is needed, anti-aliasing filter and decimation operations can be combined in the last stage.

[0186] Exemplarily, an embodiment of input 11.025 kHz conversion to output 48 kHz is provided, specifically: if 11.025 kHz is to be converted to 48 kHz, the total conversion ratio is 48 / 11.025≈4.3548 / 11.025≈4.35, which needs to be decomposed into multiple stages of interpolation and decimation, wherein:

[0187] Interpolation stage:

[0188] Interpolation 5 (11.025 to 55.125 kHz) to interpolation 128 (55.125 to 7056 kHz).

[0189] Multi-stage implementation: according to the provided three-stage process, the interpolation factor can be decomposed into smaller integers (e.g., 5 = 5, 128 = 2 × 2 × 2 × 2 × 8).

[0190] Decimation stage:

[0191] Decimation 3 (7056 to 2352 kHz) to decimation 49 (2352 to 48 kHz).

[0192] Combined decimation: after the last stage of interpolation filtering, decimation is directly performed, reducing the calculation steps.

[0193] Exemplarily, the advantages of multi-stage processing include reduced computational complexity, resource optimization, and flexible adaptation, wherein:

[0194] Reduced computational complexity, for example: single-stage 24 times interpolation: a 24-phase filter with extremely high tap number (e.g., 192 taps) needs to be designed, with extremely large calculation amount. Three-stage decomposition (3 × 2 × 4): the total tap number is only 8 + 6 + 4 = 18, significantly reducing the calculation amount (about 1 / 10 of the single-stage);

[0195] Resource optimization can involve multi-phase structure and historical data reuse, wherein: multi-phase structure: each stage only calculates non-zero input samples, avoiding zero-value multiplication (e.g., interpolation of zero values). Historical data reuse: the output of the intermediate stage is directly used as the input of the next stage, reducing storage requirements;

[0196] Flexible adaptation, for example: by adjusting the interpolation factors of each stage (e.g., 3, 2, 4 or 5, 128, 3), different input sampling rates can be adapted to the target output (e.g., 48 kHz). Decimation combination: anti-aliasing filtering and decimation are added in the last stage (e.g., from 24Fs decimation to 48 kHz), avoiding additional processing steps.

[0197] In summary, the multi-phase filter decomposes large-ratio sampling rate conversion into multiple small-ratio steps through staged interpolation and decimation, significantly optimizing computational efficiency and resource occupation. Key design points include:

[0198] Interpolation factor decomposition: choose small integer combination of product equal to total ratio (e.g. 3x2x4=24);

[0199] Polyphase filter design: use independent coefficient set for each stage, adapt current interpolation factor and signal bandwidth;

[0200] History data management: store necessary history samples, ensure filter continuity;

[0201] Decimation integration: combine anti-aliasing filter and decimation in the last stage, simplify the process.

[0202] The characteristics of the polyphase filter include: the output of the previous step is the input of the next step; one input, multiple outputs; the data to be stored includes FIR coefficients and history data, and the history data is the result of the intermediate filtering step. In the polyphase filter design, an independent coefficient set is used for each stage to adapt to the current interpolation factor and signal bandwidth, reduce the interpolation calculation amount, and improve the real-time performance.

[0203] In addition, for the filter constraint conditions involved in the present application, the filter constraint conditions include the audio characteristics (signal spectrum characteristics) of the audio signal, the signal index characteristics (performance indicators) corresponding to the target sampling rate, and the audio processing resource characteristics (resource constraints) of the local end. Further, Table 4, Table 5 and Table 6 are provided; wherein Table 4 shows information related to signal spectrum characteristics, Table 5 shows information related to performance indicators, and Table 6 shows information related to resource constraints.

[0204] Table 4

[0205]

[0206] Table 5

[0207]

[0208] Table 6

[0209]

[0210] Based on the above information, an embodiment of converting Bluetooth audio from 44.1kHz to 48kHz with resource constraints is provided, wherein:

[0211] Signal characteristics: bandwidth 20Hz-20kHz, need to keep full frequency band;

[0212] Resource constraints: RAM<2KB (kilobyte), MAC unit is limited; RAM is random access memory (random access memory), also known as "random memory"; MAC is the full name of Media Access Control, which means medium access control;

[0213] The decision process includes:

[0214] Primary interpolation: input 44.1 kHz corresponds to level A (wide transition band, Δf≥8.8 kHz); the physical meaning of Δf is the same level selection function, which is the transition band width;

[0215] Secondary interpolation: upsample to 88.2 kHz corresponds to level B (Δf≥8.8 kHz, taps≤6);

[0216] The extraction stage includes:

[0217] The main anti-aliasing needs to be considered, and the resources are insufficient, so level C is abandoned;

[0218] Level D (Δf≥7.2 kHz, taps=4) is used instead.

[0219] In summary, the final solution is: 5A (convert 44.1k to 220.5k) to 2B (convert 220.5k to 441k) to 2D (convert 441k to 220.5k) to 2D (convert 220.5k to 110.25k) to 2D (convert 110.25k to 55.125k) to 2D (convert 55.125k to 27.56k), which does not meet the requirements; The revised solution is: 5A to 2B×2 to 3C (main anti-aliasing) to 2D (final extraction).

[0220] In summary, the filter level selection needs to be balanced in three dimensions, including:

[0221] Spectrum dimension: level A: low sampling rate wide transition band; level C: high sampling rate strict anti-aliasing;

[0222] Resource dimension: level D: extremely limited resource scenario; level B: balance performance and complexity;

[0223] Performance dimension: SNR>90dB: forced C level;

[0224] Low latency: prefer A / D level;

[0225] Golden rule: interpolation chain: A to B to B…… (sampling rate increases, transition band decreases); extraction chain: C to D to D…… (sampling rate decreases, filter simplification).

[0226] It should be understood that, although the steps in the flowcharts involved in the embodiments described above are shown in the order of the step numbers, the steps are not necessarily executed in the order of the step numbers. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of the steps or stages is not necessarily sequential, but can be round-robin or alternating with other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.

[0227] Based on the same inventive concept, the embodiments of the present application also provide an audio signal processing device for implementing the above-mentioned audio signal processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more audio signal processing device embodiments provided below can refer to the limitations of the audio signal processing method described above, and will not be described here.

[0228] In one exemplary embodiment, as Figure 4As shown, a processing apparatus 400 of an audio signal is provided, comprising: an audio acquisition module 41, a conversion factor sequence determination module 42, a filter type determination module 43, a filter identifier sequence determination module 44, a filter configuration module 45 and an audio processing module 46, wherein: the audio acquisition module 41 is configured to acquire an audio signal and determine a current sampling rate and a target sampling rate of the audio signal; the conversion factor sequence determination module 42 is configured to determine a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, the conversion factor sequence comprising at least one conversion factor, the conversion factor being used to represent a data amount change of a filter after performing conversion processing on input signal data; the filter type determination module 43 is configured to determine a filter type for the audio signal according to a filter constraint condition, the filter constraint condition being obtained based on at least one of an audio feature of the audio signal, a signal index feature corresponding to the target sampling rate and an audio processing resource feature of a local end; the filter identifier sequence determination module 44 is configured to construct a filter identifier sequence for the audio signal according to the filter type; the filter identifier sequence comprises filter identifiers arranged in sequence and having a same number as that of the conversion factors, the filter identifier being used to represent a filter belonging to the filter type at the local end; the filter configuration module 45 is configured to perform output conversion configuration on the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, to obtain a filter configuration result; and the audio processing module 46 is configured to combine filters at the local end in sequence based on the filter configuration result to obtain a filter group, and perform sampling rate conversion processing on the audio signal through the filter group to obtain a target signal conforming to the target sampling rate.

[0229] In an example embodiment, the conversion factor sequence determination module 42 is configured to determine the conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate, and specifically configured to: determine an interpolation factor and an extraction factor for the audio signal based on the current sampling rate and the target sampling rate, and obtain the conversion factor according to the interpolation factor and the extraction factor; and combine the conversion factors to obtain the conversion factor sequence for the audio signal.

[0230] In an example embodiment, the filter identifier sequence determination module 44 is configured to construct the filter identifier sequence for the audio signal according to the filter type, and specifically configured to: determine a factor number of the conversion factors included in the conversion factor sequence; determine a same number of filter identifiers as the factor number based on the filter type; and combine the filter identifiers to obtain the filter identifier sequence for the audio signal.

[0231] In an example embodiment, the conversion factors include interpolation factors and decimation factors, the factor number includes a first factor number of the interpolation factors and a second factor number of the decimation factors, the filter types include interpolation types and decimation types, and the filter identification sequence determination module 44 is configured to determine a number of filter identifications equal to the factor number based on the filter types, and specifically configured to: determine a number of first filter identifications equal to the first factor number based on the interpolation types; determine a number of second filter identifications equal to the second factor number based on the decimation types; and obtain the number of filter identifications equal to the factor number according to the first filter identifications and the second filter identifications.

[0232] In an example embodiment, the conversion factors include interpolation factors and decimation factors, and the filter types include interpolation types and decimation types, and the filter configuration module 45 is configured to perform output conversion configuration on filters represented by filter identifications in the filter identification sequence according to the conversion factors in the conversion factor sequence to obtain the filter configuration result, and specifically configured to: perform output conversion configuration on a first filter according to an interpolation factor in a case where a filter of the interpolation type represented by the interpolation factor meets a trigger configuration condition to obtain a first configuration result, the first filter being a filter of the interpolation type represented by the filter identification in the filter identification sequence; perform output conversion configuration on a second filter according to a decimation factor in a case where a filter of the decimation type represented by the decimation factor meets a trigger configuration condition to obtain a second configuration result, the second filter being a filter of the decimation type represented by the filter identification in the filter identification sequence; and obtain the filter configuration result according to the first configuration result and the second configuration result.

[0233] In an example embodiment, the filter types include interpolation types and decimation types, and the audio processing module 46 is configured to combine filters of the local end in sequence based on the filter configuration result to obtain the filter bank, and specifically configured to: determine a target filter of the local end and a filter cascade order of the target filter according to the filter configuration result, the filter cascade order including a first cascade order of first filters of the interpolation type in the target filter and a second cascade order of second filters of the decimation type in the target filter; cascade connect the first filters according to the first cascade order to obtain an interpolation filter bank; cascade connect the second filters according to the second cascade order to obtain a decimation filter bank; and connect the interpolation filter bank and the decimation filter bank in sequence to obtain the filter bank.

[0234] In an exemplary embodiment, the audio processing module 46 is used to perform sampling rate conversion processing on the audio signal through a filter bank, specifically: obtaining the tap number of each target filter in the filter bank; determining the audio processing algorithm corresponding to each target filter based on the tap number of each target filter; and using each target filter, based on the cascade order of each target filter and the audio processing algorithm corresponding to each target filter, to perform sampling rate conversion processing on the audio signal.

[0235] Each module in the aforementioned audio signal processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware within or independently of the processor in a computer device, or stored in software within the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0236] In one exemplary embodiment, a computer device is provided, which may be a terminal or a server, and its internal structure diagram may be as follows. Figure 5 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as filter types. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection.

[0237] Furthermore, this application can use a terminal as the execution subject of the audio signal processing method, or a server as the execution subject of the audio signal processing method, or it can implement the audio signal processing method based on a combination of a terminal and a server.

[0238] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0239] In one exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory has a computer program stored therein, and the processor implements steps related to processing of an audio signal when executing the computer program.

[0240] In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, and the computer program implements steps related to processing of an audio signal when executed by a processor.

[0241] In one embodiment, a computer program product is provided, comprising a computer program, and the computer program implements steps related to processing of an audio signal when executed by a processor.

[0242] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the related data need to comply with the relevant provisions.

[0243] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0244] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0245] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method for processing audio signals, characterized in that, The method includes: Acquire an audio signal and determine the current sampling rate and target sampling rate of the audio signal; Based on the current sampling rate and the target sampling rate, a sequence of conversion factors for the audio signal is determined. The sequence of conversion factors includes at least one conversion factor, which is used to characterize the change in the amount of data after the filter performs conversion processing on the input signal data. The filter type for the audio signal is determined according to filter constraints, which are obtained based on at least one of the audio characteristics of the audio signal, the signal index characteristics corresponding to the target sampling rate, and the audio processing resource characteristics of the local end. A filter identifier sequence for the audio signal is constructed according to the filter type; the filter identifier sequence includes filter identifiers arranged in order, the number of which is the same as the number of conversion factors, and the filter identifiers are used to characterize filters at the local end that belong to the filter type; According to the conversion factors in the conversion factor sequence, output conversion configuration is performed on the filters represented by the filter identifiers in the filter identifier sequence to obtain filter configuration results; Based on the filter configuration results, the filters at the local end are combined in sequence to obtain a filter group, and the audio signal is processed by the sampling rate conversion through the filter group to obtain a target signal that meets the target sampling rate.

2. The method according to claim 1, characterized in that, Determining the conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate includes: Based on the current sampling rate and the target sampling rate, an interpolation factor and a decimation factor are determined for the audio signal, and a conversion factor is obtained based on the interpolation factor and the decimation factor. The conversion factors are combined to obtain a conversion factor sequence for the audio signal.

3. The method according to claim 1, characterized in that, The step of constructing a filter identifier sequence for the audio signal according to the filter type includes: Determine the number of factors included in the conversion factor sequence; Based on the filter type, determine the same number of filter identifiers as the number of factors; The filter identifiers are combined to obtain a filter identifier sequence for the audio signal.

4. The method according to claim 3, characterized in that, The conversion factor includes an interpolation factor and a decimation factor, and the number of factors includes a first number of interpolation factors and a second number of decimation factors; the filter type includes an interpolation type and a decimation type. The step of determining the number of filter identifiers that are the same as the number of factors based on the filter type includes: Based on the interpolation type, determine a first filter identifier with the same number as the first factor; Based on the extraction type, determine a second filter identifier with the same number as the second factor; Based on the first filter identifier and the second filter identifier, a number of filter identifiers equal to the number of factors are obtained.

5. The method according to claim 1, characterized in that, The conversion factor includes an interpolation factor and a decimation factor, and the filter type includes an interpolation type and a decimation type. The step of configuring the output conversion for each filter represented by a filter identifier in the filter identifier sequence according to the conversion factors in the conversion factor sequence to obtain the filter configuration result includes: When the interpolation factor indicates that the filter of the interpolation type meets the trigger configuration conditions, the output conversion configuration is performed on the first filter according to the interpolation factor to obtain the first configuration result. The first filter is the filter of the interpolation type represented by the filter identifier in the filter identifier sequence. When the decimation factor indicates that the filter of the decimation type meets the trigger configuration conditions, the output conversion configuration is performed on the second filter according to the decimation factor to obtain the second configuration result. The second filter is the filter of the decimation type represented by the filter identifier in the filter identifier sequence. Based on the first configuration result and the second configuration result, the filter configuration result is obtained.

6. The method according to claim 1, characterized in that, The filter types include interpolation type and decimation type; The step of sequentially combining the local filters to obtain a filter bank based on the filter configuration results includes: The target filter and the filter cascading order of the target filter are determined based on the filter configuration result. The filter cascading order includes the first cascading order of the first filter belonging to the interpolation type and the second cascading order of the second filter belonging to the decimation type in the target filter. The first filters are cascaded together according to the first cascade order to obtain an interpolation filter bank; The second filter is cascaded in the second cascade order to obtain a decimation filter bank. The interpolation filter group and the decimation filter group are connected in sequence to obtain a filter group.

7. The method according to claim 1, characterized in that, The step of performing sample rate conversion processing on the audio signal through the filter bank includes: Obtain the tap count of each target filter in the filter bank; Based on the number of taps of each of the target filters, determine the corresponding audio processing algorithm for each of the target filters; Using the target filters, and based on the cascade order of the target filters and the corresponding audio processing algorithms of each target filter, the audio signal is subjected to sampling rate conversion processing.

8. An audio signal processing apparatus, characterized in that, The device includes: An audio acquisition module is used to acquire audio signals and determine the current sampling rate and target sampling rate of the audio signals; A conversion factor sequence determination module is used to determine a conversion factor sequence for the audio signal based on the current sampling rate and the target sampling rate. The conversion factor sequence includes at least one conversion factor, which is used to characterize the change in the amount of data after the filter performs conversion processing on the input signal data. A filter type determination module is used to determine the filter type for the audio signal according to filter constraints, wherein the filter constraints are obtained based on at least one of the audio characteristics of the audio signal, the signal index characteristics corresponding to the target sampling rate, and the audio processing resource characteristics of the local end. A filter identifier sequence determination module is used to construct a filter identifier sequence for the audio signal according to the filter type; the filter identifier sequence includes filter identifiers arranged in order, the number of which is the same as the number of conversion factors, and the filter identifiers are used to characterize filters at the local end that belong to the filter type; The filter configuration module is used to perform output conversion configuration for the filters represented by the filter identifiers in the filter identifier sequence according to the conversion factors in the conversion factor sequence, and to obtain filter configuration results. The audio processing module is used to combine the local filters in sequence based on the filter configuration results to obtain a filter group, and to perform sampling rate conversion processing on the audio signal through the filter group to obtain a target signal that meets the target sampling rate.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Signal sampling rate conversion method and device, electronic equipment and storage medium

    CN118449522A

  • Sampling rate converter, sampling rate conversion method and communication system

    CN118476160A