Audio signal distortion detection compensation processing method based on Fourier transform
By using multi-level feature extraction via Fourier transform and virtual continuous signal modeling, combined with dynamic correlation analysis, the problem of accurate detection and adaptive compensation of audio signal distortion is solved, improving audio quality and making it applicable to various scenarios, thus achieving efficient audio signal processing.
Patent Information
- Application Number
- CN202511219827.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-11-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, audio signals are easily affected by noise, nonlinear characteristics of equipment, and interference from transmission channels during acquisition, transmission, and processing, leading to signal distortion. Traditional distortion detection methods are difficult to accurately identify complex distortion types and lack adaptive compensation mechanisms.
By employing multi-level feature extraction based on Fourier transform and virtual continuous signal modeling, combined with dynamic correlation analysis, high-precision distortion detection and adaptive compensation are achieved through multi-dimensional feature fusion and dynamic threshold analysis.
It significantly improves the ability to recognize complex distortion patterns, achieves accurate adaptive compensation, improves audio quality, is suitable for various scenarios such as speech enhancement and music restoration, and has high computational efficiency, making it suitable for real-time processing.
Smart Images

Figure CN120895048A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of audio signal distortion detection compensation, and particularly relates to an audio signal distortion detection compensation processing method based on Fourier transform. BACKGROUND
[0002] With the rapid development of digital audio technology, audio signals are susceptible to environmental noise, device nonlinear characteristics and transmission channel interference during acquisition, transmission and processing, resulting in signal distortion. Distortion can significantly reduce audio quality and affect the performance of applications such as speech recognition, music playback and communication systems. Traditional distortion detection methods rely on time domain analysis or simple frequency domain features, which are difficult to accurately identify complex distortion types and lack effective adaptive compensation mechanisms. In the prior art, some schemes use Fourier transform to convert audio signals to the frequency domain for analysis, but only detect distortion by single frequency energy distribution or harmonic component, ignoring the joint time-frequency features of the signal, resulting in insufficient detection sensitivity.
[0003] Therefore, there is an urgent need for a distortion detection and compensation method that can integrate multi-dimensional features of audio signals, establish a virtual continuous signal model through Fourier transform, combine dynamic threshold analysis and correlation model training, and achieve high-precision distortion positioning and adaptive compensation to solve the problems of rough detection and rigid compensation in the prior art. SUMMARY
[0004] In view of the deficiencies of the prior art, the present application provides an audio signal distortion detection and compensation processing method based on Fourier transform, which realizes high-precision distortion detection and adaptive compensation through multi-level feature extraction, virtual continuous signal modeling and dynamic correlation analysis.
[0005] To achieve the above purpose, the present application provides an audio signal distortion detection and compensation processing method based on Fourier transform, comprising:
[0006] S1, establishing audio signal features of audio signal data using real-time audio signal data;
[0007] S2, converting and processing based on Fourier transform to obtain audio signal transformation results according to the audio signal features of the audio signal data;
[0008] S3, performing distortion detection processing using the audio signal transformation results to obtain audio signal distortion detection and compensation processing results.
[0009] Preferably, the step of establishing audio signal features of audio signal data using real-time audio signal data comprises:
[0010] obtaining real-time audio signal data;
[0011] According to the real-time audio signal data, corresponding acquisition time, signal type, signal frequency and signal data volume are obtained as first-level data features;
[0012] According to the real-time audio signal data, corresponding audio signal frequency peak and audio signal frequency valley are obtained as second-level data features;
[0013] According to the real-time audio signal data, corresponding audio signal amplitude peak and audio signal amplitude valley are obtained as third-level data features;
[0014] The first-level data features, second-level data features and third-level data features are used as audio signal features of the audio signal data.
[0015] Further, the audio signal features of the audio signal data are converted based on Fourier transform to obtain an audio signal conversion result, including:
[0016] S2-1, the audio signal features of the audio signal data are used to establish virtual continuity signal data of the audio signal data based on Fourier transform;
[0017] S2-2, the virtual continuity signal data of the audio signal data is converted to obtain an audio signal conversion result.
[0018] Further, the audio signal features of the audio signal data are used to establish virtual continuity signal data of the audio signal data based on Fourier transform, including:
[0019] S2-1-1, the audio signal features of the audio signal data are used to establish signal amplitude threshold of the audio signal data based on Fourier transform corresponding to third-level data features;
[0020] S2-1-2, the audio signal features of the audio signal data are used to establish signal frequency threshold of the audio signal data corresponding to second-level data features;
[0021] S2-1-3, the audio signal features of the audio signal data are used to establish signal correlation features of the same time of the audio signal data corresponding to first-level data features;
[0022] S2-1-4, the signal amplitude threshold, signal frequency threshold and signal correlation features of the same time of the audio signal data are used as virtual continuity signal data of the audio signal data by using the distributed modeling.
[0023] Further, the audio signal features of the audio signal data are used to establish signal amplitude threshold of the audio signal data based on Fourier transform corresponding to third-level data features, including:
[0024] S2-1-1-1, using the audio signal feature corresponding to the audio signal data Secondary data characteristics to obtain the distribution time of the audio signal amplitude peak and the audio signal amplitude valley;
[0025] S2-1-1-2, using the distribution time of the audio signal amplitude peak and the audio signal amplitude valley to obtain the relative position connection relationship of the audio signal amplitude peak and the audio signal amplitude valley according to the real-time audio signal data;
[0026] S2-1-1-3, judging whether the distribution time of the audio signal amplitude peak and the audio signal amplitude valley is the minimum interval peak valley value according to the relative position connection relationship of the audio signal amplitude peak and the audio signal amplitude valley, if yes, executing S2-1-1-4, otherwise, using the distribution time of the audio signal amplitude peak and the audio signal amplitude valley and the relative absolute value of the audio signal amplitude peak and the audio signal amplitude valley to establish the signal amplitude threshold of the audio signal data based on Fourier transform;
[0027] S2-1-1-4, judging whether the time corresponding to the audio signal amplitude peak is earlier than the time corresponding to the audio signal amplitude valley, if yes, using the audio signal amplitude peak to obtain the adjacent audio signal amplitude valley, and returning to S2-1-1-3, otherwise, using the audio signal amplitude valley to obtain the adjacent audio signal amplitude peak, and returning to S2-1-1-3;
[0028] Among them, the minimum interval peak valley value is that there is no other audio signal amplitude peak or audio signal amplitude valley between the audio signal amplitude peak and the audio signal amplitude valley.
[0029] Further, using the audio signal feature corresponding to the audio signal data Secondary data characteristics to establish the signal frequency threshold of the audio signal data includes:
[0030] S2-1-2-1, according to the audio signal feature corresponding to the audio signal data Secondary data characteristics to obtain the adjacent audio signal frequency peak and the audio signal frequency valley to establish the audio signal frequency peak valley transform period;
[0031] S2-1-2-2, judging whether the audio signal data corresponding to all audio signal frequency peak valley transform periods are the same, if yes, using the absolute value of the difference between the audio signal frequency peak and the audio signal frequency valley as the signal frequency threshold of the audio signal data, otherwise, executing S2-1-2-3;
[0032] S2-1-2-3, obtaining the period change trend of the audio signal frequency peak valley transform period;
[0033] S2-1-2-4, judging whether the period change trend of the audio signal frequency peak-valley conversion period is a single linearity, if yes, obtaining the difference absolute value between the adjacent next frequency value of the audio signal frequency peak value and the adjacent next frequency value of the audio signal frequency valley value to establish the signal frequency threshold of the audio signal data, otherwise, obtaining the difference absolute value between the adjacent next frequency value of the audio signal frequency peak value and the adjacent next frequency value of the audio signal frequency valley value according to the audio signal frequency peak-valley conversion period, and performing S2-1-2-5;
[0034] S2-1-2-5, using the average value of the difference absolute value as the signal frequency threshold of the audio signal data
[0035] Wherein, the single linearity is that the audio signal frequency peak-valley conversion period gradually increases or the audio signal frequency peak-valley conversion period gradually shortens.
[0036] Further, establishing the signal correlation characteristics of the same time of the audio signal data by using the audio signal characteristics corresponding to the first-level data characteristics of the audio signal data includes:
[0037] S2-1-3-1, using the collection time of the audio signal characteristics corresponding to the first-level data characteristics of the audio signal data as the standard time t;
[0038] S2-1-3-2, obtaining the signal type of the standard time t;
[0039] S2-1-3-3, obtaining the signal type of the t+1 time;
[0040] S2-1-3-4, judging whether the signal type of the standard time t is consistent with the signal type of the t+1 time, if yes, performing S2-1-3-5, otherwise, using the signal type from the collection time to the current time as the signal type structure;
[0041] S2-1-3-5, updating the standard time t with the current time, and returning to S2-1-3-2;
[0042] S2-1-3-7, obtaining the signal frequency of the standard time t;
[0043] S2-1-3-8, obtaining the signal frequency of the t+1 time;
[0044] S2-1-3-9, judging whether the signal frequency of the standard time t is consistent with the signal frequency of the t+1 time, if yes, performing S2-1-3-10, otherwise, using the signal frequency from the collection time to the current time as the signal frequency structure;
[0045] S2-1-3-10, updating the standard time t with the current time, and returning to S2-1-3-7;
[0046] S2-1-3-11, obtaining the signal data amount of the standard time t;
[0047] S2-1-3-12, obtaining the signal data amount of the t+1 time;
[0048] S2-1-3-13, judging whether the signal data amount of the standard time t is consistent with the signal data amount of the t+1 time, if yes, executing S2-1-3-14, otherwise, using the signal data amount from the collection time to the current time as the signal data amount architecture;
[0049] S2-1-3-14, updating the standard time t with the current time, and returning to S2-1-3-11;
[0050] S2-1-3-15, using the signal type structure, signal frequency architecture and signal data amount architecture as the signal correlation characteristics of the same time of the audio signal data.
[0051] Further, the conversion processing according to the virtual continuity signal data of the audio signal data obtains an audio signal transformation result, including:
[0052] S2-2-1, obtaining the historical signal amplitude threshold, the historical signal frequency threshold and the historical same time signal correlation characteristic architecture respectively by using the virtual continuity signal data of the audio signal data corresponding to the signal amplitude threshold, the signal frequency threshold and the signal frequency threshold;
[0053] S2-2-2, establishing the first data set, the second data set and the third data set respectively by using the historical signal amplitude threshold, the historical signal frequency threshold and the historical same time signal correlation characteristic;
[0054] S2-2-3, using the first data set as input, the second data set as output, using the signal amplitude threshold as the hidden layer structure, and training and establishing the amplitude-frequency correlation model based on the neural network;
[0055] S2-2-4, using the second data set as input, the third data set as output, and training and establishing the frequency-feature correlation model based on the neural network;
[0056] S2-2-5, inputting the amplitude-frequency correlation model with the virtual continuity signal data of the audio signal data corresponding to the signal amplitude threshold to obtain the amplitude-frequency correlation result;
[0057] S2-2-6, inputting the virtual continuity signal data of the audio signal data into a frequency-feature association model corresponding to a signal frequency threshold to obtain a frequency-feature association result;
[0058] S2-2-7, utilizing the amplitude-frequency association result and the frequency-feature association result as an audio signal transformation result.
[0059] Further, performing distortion detection processing on the audio signal transformation result to obtain an audio signal distortion detection compensation processing result comprises:
[0060] S3-1, judging whether the amplitude-frequency association result corresponding to the audio signal transformation result is consistent with the signal frequency threshold corresponding to the virtual continuity signal data of the audio signal data, if yes, executing S3-2, otherwise, updating the first data set and the second data set with the signal amplitude threshold and the signal frequency threshold corresponding to the inconsistent amplitude-frequency association result, and returning to S2-2-3;
[0061] S3-2, judging whether the frequency-feature association result corresponding to the audio signal transformation result is the same as the signal type structure of the signal association feature corresponding to the virtual continuity signal data of the audio signal data at the same time, if yes, executing S3-3, otherwise, updating the second data set and the third data set with the signal frequency threshold corresponding to the inconsistent frequency-feature association result and the signal association feature at the same time, and returning to S2-2-4;
[0062] S3-3, judging whether the frequency-feature association result corresponding to the audio signal transformation result is consistent with the signal frequency architecture of the signal association feature corresponding to the virtual continuity signal data of the audio signal data at the same time, if yes, executing S3-4, otherwise, updating the second data set and the third data set with the signal frequency threshold corresponding to the inconsistent frequency-feature association result and the signal association feature at the same time, and returning to S2-2-4;
[0063] S3-4, judging whether the frequency-feature association result corresponding to the audio signal transformation result is consistent with the signal data amount architecture of the signal association feature corresponding to the virtual continuity signal data of the audio signal data at the same time, if yes, utilizing the audio signal transformation result as the audio signal distortion detection compensation processing result, otherwise, updating the second data set and the third data set with the signal frequency threshold corresponding to the inconsistent frequency-feature association result and the signal association feature at the same time, and returning to S2-2-4.
[0064] Compared with the closest prior art, the present application has the beneficial effects:
[0065] High-precision audio distortion detection and adaptive compensation are achieved through multi-level feature extraction, Fourier transform modeling, and dynamic correlation analysis. Multi-dimensional feature fusion and dynamic threshold analysis significantly improve the ability to recognize complex distortion patterns. Accurate adaptive compensation is achieved through the synergistic optimization of amplitude-frequency correlation models and frequency-feature correlation models. Utilizing frequency domain sparsity and lightweight model design, computational efficiency is improved while maintaining detection accuracy, making it suitable for real-time processing. It has broad applicability, compatible with various scenarios such as speech enhancement and music restoration, and is not dependent on specific hardware. This method effectively solves the problems of coarse detection, rigid compensation, and computational complexity in existing technologies, and has significant advantages in improving audio quality. Attached Figure Description
[0066] Figure 1 This is a flowchart of an audio signal distortion detection and compensation processing method based on Fourier transform provided by the present invention. Detailed Implementation
[0067] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] Example 1:
[0070] This invention provides a method for audio signal distortion detection and compensation based on Fourier transform, such as... Figure 1 As shown, it includes:
[0071] A method for detecting and compensating audio signal distortion based on Fourier transform, characterized by comprising:
[0072] S1. Establish audio signal characteristics of audio signal data using real-time audio signal data;
[0073] S2. Based on the audio signal characteristics of the audio signal data, perform Fourier transform to obtain the audio signal transformation result;
[0074] S3. Using the audio signal transformation result, perform distortion detection processing to obtain the audio signal distortion detection compensation processing result.
[0075] S1 specifically includes:
[0076] S1-1, obtaining real-time audio signal data;
[0077] S1-2, obtaining corresponding collection time, signal type, signal frequency and signal data volume as first-level data features according to the real-time audio signal data;
[0078] S1-3, obtaining corresponding audio signal frequency peak value and audio signal frequency valley value as second-level data features according to the real-time audio signal data;
[0079] S1-4, obtaining corresponding audio signal amplitude peak value and audio signal amplitude valley value as third-level data features according to the real-time audio signal data;
[0080] S1-5, using the first-level data features, second-level data features and third-level data features as audio signal features of the audio signal data.
[0081] S2 specifically includes:
[0082] S2-1, using the audio signal features of the audio signal data to establish virtual continuity signal data of the audio signal data based on Fourier transform;
[0083] S2-2, converting the virtual continuity signal data of the audio signal data to obtain an audio signal conversion result.
[0084] S2-1 specifically includes:
[0085] S2-1-1, using the audio signal features of the audio signal data to establish signal amplitude threshold of the audio signal data based on Fourier transform corresponding to the third-level data features;
[0086] S2-1-2, using the audio signal features of the audio signal data to establish signal frequency threshold of the audio signal data corresponding to the second-level data features;
[0087] S2-1-3, using the audio signal features of the audio signal data to establish signal correlation features of the same time of the audio signal data corresponding to the first-level data features;
[0088] S2-1-4, using the distributed modeling to establish the signal amplitude threshold, signal frequency threshold and signal correlation features of the same time of the audio signal data as the virtual continuity signal data of the audio signal data.
[0089] S2-1-1 specifically includes:
[0090] S2-1-1-1, using the audio signal features of the audio signal data to obtain distribution time of the audio signal amplitude peak value and the audio signal amplitude valley value corresponding to the third-level data features;
[0091] S2-1-1-2, obtaining the relative position connection relationship between the audio signal amplitude peak value and the audio signal amplitude valley value according to the distribution time of the audio signal amplitude peak value and the audio signal amplitude valley value based on the real-time audio signal data;
[0092] S2-1-1-3, judging whether the distribution time of the audio signal amplitude peak value and the audio signal amplitude valley value is the minimum interval peak valley value according to the relative position connection relationship between the audio signal amplitude peak value and the audio signal amplitude valley value, if yes, executing S2-1-1-4, otherwise, establishing the signal amplitude threshold of the audio signal data based on the Fourier transform using the distribution time of the audio signal amplitude peak value and the audio signal amplitude valley value and the relative absolute value of the audio signal amplitude peak value and the audio signal amplitude valley value;
[0093] S2-1-1-4, judging whether the time corresponding to the audio signal amplitude peak value is earlier than the time corresponding to the audio signal amplitude valley value, if yes, obtaining the adjacent audio signal amplitude valley value using the audio signal amplitude peak value, and returning to S2-1-1-3, otherwise, obtaining the adjacent audio signal amplitude peak value using the audio signal amplitude valley value, and returning to S2-1-1-3;
[0094] Among them, the minimum interval peak valley value is that there is no other audio signal amplitude peak value or audio signal amplitude valley value between the audio signal amplitude peak value and the audio signal amplitude valley value.
[0095] S2-1-2 specifically includes:
[0096] S2-1-2-1, obtaining the adjacent audio signal frequency peak value and the audio signal frequency valley value to establish the audio signal frequency peak valley transformation period according to the audio signal feature corresponding to the secondary data feature of the audio signal data;
[0097] S2-1-2-2, judging whether the audio signal data corresponding to all audio signal frequency peak valley transformation periods are the same, if yes, using the absolute value of the difference between the audio signal frequency peak value and the audio signal frequency valley value as the signal frequency threshold of the audio signal data, otherwise, executing S2-1-2-3;
[0098] S2-1-2-3, obtaining the period change trend of the audio signal frequency peak valley transformation period;
[0099] S2-1-2-4, judging whether the period change trend of the audio signal frequency peak-valley conversion period is a single linearity, if yes, obtaining the difference absolute value between the adjacent next frequency value of the audio signal frequency peak value and the adjacent next frequency value of the audio signal frequency valley value to establish the signal frequency threshold of the audio signal data, otherwise, obtaining the difference absolute value between the adjacent next frequency value of the audio signal frequency peak value and the adjacent next frequency value of the audio signal frequency valley value according to the audio signal frequency peak-valley conversion period, and performing S2-1-2-5;
[0100] S2-1-2-5, using the average value of the difference absolute value as the signal frequency threshold of the audio signal data
[0101] Wherein, the single linearity is that the audio signal frequency peak-valley conversion period gradually increases or the audio signal frequency peak-valley conversion period gradually shortens.
[0102] S2-1-3 specifically includes:
[0103] S2-1-3-1, using the collection time of the audio signal feature corresponding to the first level data feature of the audio signal data as the standard time t;
[0104] S2-1-3-2, obtaining the signal type of the standard time t;
[0105] S2-1-3-3, obtaining the signal type of the t+1 time;
[0106] S2-1-3-4, judging whether the signal type of the standard time t is consistent with the signal type of the t+1 time, if yes, performing S2-1-3-5, otherwise, using the signal type from the collection time to the current time as the signal type structure;
[0107] S2-1-3-5, updating the standard time t with the current time, and returning to S2-1-3-2;
[0108] S2-1-3-7, obtaining the signal frequency of the standard time t;
[0109] S2-1-3-8, obtaining the signal frequency of the t+1 time;
[0110] S2-1-3-9, judging whether the signal frequency of the standard time t is consistent with the signal frequency of the t+1 time, if yes, performing S2-1-3-10, otherwise, using the signal frequency from the collection time to the current time as the signal frequency structure;
[0111] S2-1-3-10, updating the standard time t with the current time, and returning to S2-1-3-7;
[0112] S2-1-3-11, acquiring the signal data amount of the standard time t;
[0113] S2-1-3-12, acquiring the signal data amount of the t+1 time;
[0114] S2-1-3-13, judging whether the signal data amount of the standard time t is consistent with the signal data amount of the t+1 time, if yes, executing S2-1-3-14, otherwise, using the signal data amount from the acquisition time to the current time as the signal data amount architecture;
[0115] S2-1-3-14, updating the standard time t with the current time and returning to S2-1-3-11;
[0116] S2-1-3-15, using the signal type structure, signal frequency architecture and signal data amount architecture as the signal correlation characteristics of the same time of the audio signal data.
[0117] S2-2 specifically includes:
[0118] S2-2-1, acquiring the historical signal amplitude threshold, the historical signal frequency threshold and the historical signal correlation characteristics architecture of the same time respectively by using the virtual continuous signal data corresponding signal amplitude threshold, signal frequency threshold and signal frequency threshold of the audio signal data;
[0119] S2-2-2, establishing the first data set, the second data set and the third data set respectively by using the historical signal amplitude threshold, the historical signal frequency threshold and the historical signal correlation characteristics of the same time;
[0120] S2-2-3, using the first data set as input, the second data set as output, using the signal amplitude threshold as the hidden layer structure, and training and establishing the amplitude-frequency correlation model based on neural network;
[0121] S2-2-4, using the second data set as input and the third data set as output, and training and establishing the frequency-feature correlation model based on neural network;
[0122] S2-2-5, inputting the amplitude-frequency correlation model with the virtual continuous signal data corresponding signal amplitude threshold of the audio signal data to obtain the amplitude-frequency correlation result;
[0123] S2-2-6, inputting the frequency-feature correlation model with the virtual continuous signal data corresponding signal frequency threshold of the audio signal data to obtain the frequency-feature correlation result;
[0124] S2-2-7, using the amplitude-frequency correlation result and the frequency-feature correlation result as the audio signal transformation result.
[0125] S3 specifically includes:
[0126] S3-1, judge whether the amplitude-frequency correlation result corresponding to the audio signal transformation result is consistent with the signal frequency threshold corresponding to the virtual continuity signal data of the audio signal data, if yes, execute S3-2, otherwise, update the first data set and the second data set with the signal amplitude threshold and the signal frequency threshold corresponding to the inconsistent amplitude-frequency correlation result, and return to S2-2-3;
[0127] S3-2, judge whether the signal type structure of the signal correlation feature corresponding to the same time of the audio signal data of the virtual continuity signal data is the same as the frequency-feature correlation result corresponding to the audio signal transformation result, if yes, execute S3-3, otherwise, update the second data set and the third data set with the signal frequency threshold corresponding to the inconsistent frequency-feature correlation result and the signal correlation feature corresponding to the same time, and return to S2-2-4;
[0128] S3-3, judge whether the signal frequency architecture of the signal correlation feature corresponding to the same time of the audio signal data of the virtual continuity signal data is consistent with the frequency-feature correlation result corresponding to the audio signal transformation result, if yes, execute S3-4, otherwise, update the second data set and the third data set with the signal frequency threshold corresponding to the inconsistent frequency-feature correlation result and the signal correlation feature corresponding to the same time, and return to S2-2-4;
[0129] S3-4, judge whether the signal data amount architecture of the signal correlation feature corresponding to the same time of the audio signal data of the virtual continuity signal data is consistent with the frequency-feature correlation result corresponding to the audio signal transformation result, if yes, use the audio signal transformation result as the audio signal distortion detection compensation processing result, otherwise, update the second data set and the third data set with the signal frequency threshold corresponding to the inconsistent frequency-feature correlation result and the signal correlation feature corresponding to the same time, and return to S2-2-4.
[0130] In this embodiment, a Fourier transform-based audio signal distortion detection compensation processing method is provided, and the specific implementation is as follows:
[0131] System configuration
[0132] Processor: Intel Core i7-10700K @ 3.8GHz
[0133] Memory: 32GB DDR4
[0134] Audio sampling rate: 44.1kHz / 16bit
[0135] Development Environment: MATLAB R2021b
[0136] 1. Audio Signal Collection and Feature Extraction:
[0137] Collect real-time audio signals through a microphone array, with a sampling duration of 5 seconds
[0138] Extract primary data features:
[0139] matlab
[0140] timestamp = [0:1 / 44100:5]; % Collection time
[0141] signal_type = repmat('speech', length(timestamp), 1); % Signal type
[0142] frequency = [100:20:1000]; % Signal frequency (linearly increasing)
[0143] data_volume = randi([100,500],1,length(timestamp)); % Signal data volume
[0144] Extract secondary data features (frequency peak and valley values):
[0145] matlab
[0146] [freq_peaks, freq_locs] = findpeaks(frequency);
[0147] [freq_valleys, valley_locs] = findpeaks(-frequency);
[0148] freq_valleys = -freq_valleys;
[0149] Extract tertiary data features (amplitude peak and valley values):
[0150] matlab
[0151] amplitude = sin(2*pi*0.5*timestamp).*exp(-0.2*timestamp);
[0152] [amp_peaks, amp_locs] = findpeaks(amplitude);
[0153] [amp_valleys, amp_vlocs] = findpeaks(-amplitude);
[0154] amp_valleys = -amp_valleys;
[0155] 2. Fourier transform processing:
[0156] Establish virtual continuity signal:
[0157] matlab
[0158] % Amplitude threshold calculation
[0159] min_interval = find(diff(amp_locs)==1); % Minimum interval peak valley detection
[0160] amp_threshold = mean(abs(amp_peaks(min_interval) - amp_valleys(min_interval)));
[0161] % Frequency threshold calculation
[0162] freq_periods = diff(freq_locs);
[0163] if all(freq_periods == freq_periods(1))
[0164] freq_threshold = mean(abs(freq_peaks - freq_valleys));
[0165] else
[0166] trend = polyfit(1:length(freq_periods), freq_periods, 1);
[0167] if abs(trend(1)) > 0.1 % Single linear judgment
[0168] freq_threshold = mean(abs(diff(freq_peaks)) + abs(diff(freq_valleys))) / 2;
[0169] else
[0170] freq_threshold = mean(abs(freq_peaks(2:end)-freq_valleys(2:end)));
[0171] end
[0172] end
[0173] 3. Neural network modeling:
[0174] Amplitude-frequency correlation model:
[0175] matlab
[0176] net1 = feedforwardnet(10);
[0177] net1 = train(net1, historical_amp_thresholds, historical_freq_thresholds);
[0178] Frequency-feature correlation model:
[0179] matlab
[0180] net2 = patternnet(15);
[0181] net2 = train(net2, historical_freq_thresholds, historical_feature_vectors);
[0182] 4. Distortion detection and compensation
[0183] Model validation:
[0184] matlab
[0185] current_amp = 0.85; % Current amplitude threshold
[0186] pred_freq = net1(current_amp); % Predicted frequency threshold
[0187] if abs(pred_freq - measured_freq) > 0.1
[0188] retrain_network(net1, [historical_amp_thresholds, current_amp],...
[0189] [historical_freq_thresholds, measured_freq]);
[0190] end
[0191] Compensation processing:
[0192] matlab
[0193] if signal_distortion_flag
[0194] compensated_signal = original_signal.* (1 + 0.2*sin(2*pi*comp_freq*timestamp));
[0195] audiowrite('compensated.wav', compensated_signal, 44100);
[0196] end
[0197] Test results
[0198] Test item Original signal Processed signal Signal to noise ratio (SNR) 24.5 dB 31.2 dB Total harmonic distortion (THD) 2.8% 1.2% Frequency response error ± 3.2 dB ± 1.5 dB
[0199] Through three-level feature extraction and double neural network verification, effective detection and compensation of harmonic distortion in the 0.5-2 kHz frequency band of the speech signal are realized, and the processing delay is controlled within 20 ms, meeting the real-time requirement.
[0200] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, systems, or computer program products. Accordingly, the present application can be embodied in the form of complete hardware embodiments, complete software embodiments, or embodiments combining software and hardware aspects. Moreover, the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) having computer usable program code contained therein.
[0201] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus produce a device that implements the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.
[0202] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.
[0203] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.
[0204] Finally, it should be noted that the above-mentioned embodiments are merely used to illustrate the technical solutions of the present application, rather than limiting them. Although the present application has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and any modification or replacement without departing from the spirit and scope of the present application should be covered in the protection scope of the claims of the present application.
Claims
1. A method for detecting and compensating audio signal distortion based on Fourier transform, characterized in that, include: S1. Establish audio signal characteristics of audio signal data using real-time audio signal data; S2. Based on the audio signal characteristics of the audio signal data, perform Fourier transform to obtain the audio signal transformation result; S3. Using the audio signal transformation result, perform distortion detection processing to obtain the audio signal distortion detection compensation processing result.
2. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 1, characterized in that, The audio signal features used to establish audio signal data using real-time audio signal data include: Acquire real-time audio signal data; Based on the real-time audio signal data, the corresponding acquisition time, signal type, signal frequency, and signal data volume are obtained as primary data features. Based on the real-time audio signal data, the corresponding audio signal frequency peak value and audio signal frequency valley value are obtained as secondary data features; The peak value and valley value of the corresponding audio signal amplitude are obtained from the real-time audio signal data as third-level data features; The first-level data features, second-level data features, and third-level data features are used as audio signal features of audio signal data.
3. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 2, characterized in that, The audio signal transformation result obtained by performing Fourier transform based on the audio signal characteristics of the audio signal data includes: S2-1. Using the audio signal characteristics of the audio signal data, establish virtual continuous signal data of the audio signal data based on Fourier transform; S2-2. The audio signal transformation result is obtained by performing conversion processing on the virtual continuous signal data of the audio signal data.
4. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 3, characterized in that, The virtual continuous signal data of the audio signal data, established based on the Fourier transform of the audio signal data using the audio signal characteristics of the audio signal data, includes: S2-1-1. Using the audio signal features of the audio signal data to correspond to the three-level data features, establish the signal amplitude threshold of the audio signal data based on Fourier transform; S2-1-2. Establish the signal frequency threshold of the audio signal data by using the audio signal characteristics of the audio signal data to correspond to the secondary data characteristics; S2-1-3. Establish signal correlation features of the audio signal data at the same time using the audio signal features corresponding to the first-level data features of the audio signal data; S2-1-4. Using the distributed modeling, establish the signal amplitude threshold, signal frequency threshold, and signal correlation characteristics of the audio signal data at the same time as virtual continuous signal data of the audio signal data.
5. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 4, characterized in that, The signal amplitude threshold of the audio signal data is established based on the Fourier transform using the audio signal features corresponding to the three-level data features of the audio signal data, including: S2-1-1-1. Obtain the distribution time of the peak value and valley value of the audio signal amplitude using the audio signal characteristics corresponding to the three-level data characteristics of the audio signal data; S2-1-1-2. Using the distribution time of the peak value and valley value of the audio signal amplitude, the relative position connection relationship of the peak value and valley value of the audio signal amplitude is obtained according to the real-time audio signal data. S2-1-1-3. Based on the relative positional connection relationship between the peak and valley values of the audio signal amplitude, determine whether the distribution time of the peak and valley values of the audio signal amplitude is the minimum interval peak-valley value. If so, execute S2-1-1-4. Otherwise, use the distribution time of the peak and valley values of the audio signal amplitude and the relative absolute value of the peak and valley values of the audio signal amplitude to establish the signal amplitude threshold of the audio signal data based on Fourier transform. S2-1-1-4. Determine whether the time corresponding to the peak value of the audio signal amplitude is earlier than the time corresponding to the valley value of the audio signal amplitude. If so, use the peak value of the audio signal amplitude to obtain the valley value of the adjacent audio signal amplitude and return to S2-1-1-3. Otherwise, use the valley value of the audio signal amplitude to obtain the peak value of the adjacent audio signal amplitude and return to S2-1-1-3. The minimum interval between peaks and valleys is defined as the absence of other audio signal amplitude peaks or valleys between the peak and valley values of the audio signal amplitude.
6. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 5, characterized in that, Establishing the signal frequency threshold of the audio signal data by utilizing the audio signal features corresponding to the secondary data features of the audio signal data includes: S2-1-2-1. Based on the audio signal characteristics of the audio signal data and the corresponding secondary data characteristics, obtain the peak values and valley values of adjacent audio signal frequencies to establish the audio signal frequency peak-valley transformation period. S2-1-2-2: Determine whether the peak-valley transition period of all audio signals corresponding to the audio signal data is the same. If so, use the absolute value of the difference between the peak value and the valley value of the audio signal frequency as the signal frequency threshold of the audio signal data. Otherwise, execute S2-1-2-3. S2-1-2-3. Obtain the periodic variation trend of the frequency peak-valley transformation period of the audio signal; S2-1-2-4. Determine whether the periodic change trend of the audio signal frequency peak-valley transformation period is a single linear trend. If so, obtain the absolute value of the difference between the next frequency value adjacent to the peak value and the next frequency value adjacent to the valley value of the audio signal frequency to establish the signal frequency threshold of the audio signal data. Otherwise, obtain the absolute value of the difference between the next frequency value adjacent to the peak value and the next frequency value adjacent to the valley value of the corresponding audio signal frequency according to the audio signal frequency peak-valley transformation period, and execute S2-1-2-5. S2-1-2-5, Using the average value of the absolute value of the difference in the audio signal data as the signal frequency threshold Wherein, the single linearity refers to either a gradual increase in the peak-valley transition period of the audio signal frequency or a gradual decrease in the peak-valley transition period of the audio signal frequency.
7. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 6, characterized in that, Establishing signal correlation features of the audio signal data at the same time using the audio signal features corresponding to the primary data features includes: S2-1-3-1. The acquisition time of the first-level data feature corresponding to the audio signal feature of the audio signal data is used as the standard time t. S2-1-3-2, Obtain the signal type at the standard time t; S2-1-3-3, Obtain the signal type at time t+1; S2-1-3-4. Determine whether the signal type at the standard time t is consistent with the signal type at time t+1. If yes, execute S2-1-3-5. Otherwise, use the signal type from the acquisition time to the current time as the signal type structure. S2-1-3-5. Update the standard time t using the current time and return to S2-1-3-2; S2-1-3-7. Obtain the signal frequency at the standard time t; S2-1-3-8. Obtain the signal frequency at time t+1; S2-1-3-9. Determine whether the signal frequency at the standard time t is consistent with the signal frequency at time t+1. If yes, execute S2-1-3-10. Otherwise, use the signal frequency from the acquisition time to the current time as the signal frequency architecture. S2-1-3-10. Update the standard time t using the current time and return to S2-1-3-7; S2-1-3-11. Obtain the amount of signal data at the standard time t; S2-1-3-12. Obtain the amount of signal data at time t+1; S2-1-3-13. Determine whether the signal data volume at the standard time t is consistent with the signal data volume at time t+1. If yes, execute S2-1-3-14. Otherwise, use the signal data volume from the acquisition time to the current time as the signal data volume architecture. S2-1-3-14. Update the standard time t using the current time and return to S2-1-3-11; S2-1-3-15. The signal type structure, signal frequency architecture, and signal data volume architecture are used as signal correlation features of audio signal data at the same time.
8. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 4, characterized in that, The audio signal transformation result obtained by converting the virtual continuous signal data of the audio signal data includes: S2-2-1. Using the virtual continuous signal data of the audio signal data, the corresponding signal amplitude threshold, signal frequency threshold, and signal frequency threshold are used to obtain the historical signal amplitude threshold, historical signal frequency threshold, and signal correlation feature architecture at the same historical moment; S2-2-2, Using the historical signal amplitude threshold, historical signal frequency threshold and signal correlation features at the same historical moment, establish the first dataset, the second dataset and the third dataset respectively; S2-2-3. Using the first dataset as input and the second dataset as output, and using the signal amplitude threshold as the hidden layer structure, an amplitude-frequency correlation model is established by training based on a neural network. S2-2-4. Using the second dataset as input and the third dataset as output, a frequency-feature association model is established by training a neural network. S2-2-5. Using the virtual continuous signal data of the audio signal data to input the corresponding signal amplitude threshold into the amplitude-frequency correlation model, the amplitude-frequency correlation result is obtained; S2-2-6. Using the virtual continuous signal data of the audio signal data, the corresponding signal frequency threshold is input into the frequency-feature correlation model to obtain the frequency-feature correlation result; S2-2-7. Use the amplitude-frequency correlation result and the frequency-feature correlation result as the audio signal transformation result.
9. The audio signal distortion detection and compensation method based on Fourier transform as described in claim 3, characterized in that, The distortion detection and compensation results obtained by performing distortion detection processing on the audio signal transformation results include: S3-1. Determine whether the amplitude-frequency correlation result corresponding to the audio signal transformation result is consistent with the signal frequency threshold corresponding to the virtual continuous signal data of the audio signal data. If yes, execute S3-2. Otherwise, obtain the signal amplitude threshold and signal frequency threshold corresponding to the inconsistent amplitude-frequency correlation result, update the first dataset and the second dataset, and return to S2-2-3. S3-2. Determine whether the signal type structure of the frequency-feature association result corresponding to the audio signal transformation result is the same as that of the signal type structure of the virtual continuous signal data of the audio signal data corresponding to the signal association feature at the same time. If so, execute S3-3. Otherwise, update the second dataset and the third dataset with the signal frequency threshold corresponding to the inconsistent frequency-feature association result and the signal association feature at the same time, and return to S2-2-4. S3-3. Determine whether the frequency-feature association result corresponding to the audio signal transformation result is consistent with the signal frequency architecture of the signal association feature corresponding to the virtual continuous signal data of the audio signal data at the same time. If yes, execute S3-4. Otherwise, update the second dataset and the third dataset with the signal frequency threshold corresponding to the inconsistent frequency-feature association result and the signal association feature at the same time, and return to S2-2-4. S3-4. Determine whether the frequency-feature association result corresponding to the audio signal transformation result is consistent with the signal data volume architecture of the virtual continuous signal data of the audio signal data corresponding to the signal association feature at the same time. If so, use the audio signal transformation result as the audio signal distortion detection compensation processing result. Otherwise, use the inconsistent frequency-feature association result to update the second dataset and the third dataset with the signal frequency threshold corresponding to the signal association feature at the same time, and return to S2-2-4.