Azzera filtri
Azzera filtri

Simulink Audio Processing: Audio Envelop Separation

3 visualizzazioni (ultimi 30 giorni)
Weiyi Zhang
Weiyi Zhang il 13 Dic 2023
Risposto: Brahmadev il 27 Dic 2023
I am very new to Simulink, and I am wondering whether the following can be done automated: given an audio signal, a Hilbert transform is done to extract the evelop out of the audio signal. Since it is an speech signal, you can distinguish each syllable by the amplitude. I want to have a system that can break the envelop or the original signal into segments separated at each syllable (or roughly when the amplitude falls back to almost 0). I hope the following image could make the question a bit more clear.
The steps: I loaded audio into matlab workspace. Then used From Workspace to import to simulink, goes through the Hilbert Filter.

Risposte (1)

Brahmadev
Brahmadev il 27 Dic 2023
You can break the audio signal into syllables by creating an envelope, threshold the signal and then segment the output into the requires syllables. It can be done by using Simulink blocks such as Relational operator, switch, etc.
After creating the envelope, a MATLAB function block can be used to detect the points where the signal is crossing the threshold and breaking the audio signal into smaller segments which each contain one syllable. See example code below:
function Segments = thresholdingMatlabFunction(y)
% Define threshold
threshold = 0.25;
% Defining index boundaries of syllables starting with the first boundary
% as index = 1
syllable_boundaries = [1];
% Creating a minimum length of the syllable so that a random threshold
% cross does not affect our data
min_length = 500;
% mark indices where it is crossing the threshold and has not crossed the
% threshold in the previous <min_length> samples
for i = 1:length(y)
if (y(i) <= threshold) && (i-syllable_boundaries(end)>min_length)
syllable_boundaries = [syllable_boundaries i];
end
end
Segments = syllable_boundaries;
end
Further, this 'MATLAB function block' can be modified to output according to the need.
Hope this helps in resolving your query!

Categorie

Scopri di più su Applications in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by