Separate words in audio file

7 visualizaciones (últimos 30 días)
Michael Saniuk
Michael Saniuk el 14 de Mayo de 2017
Respondida: Michael Saniuk el 5 de Nov. de 2018
Hello, I am trying to separate words in an audio file, leaving only samples between red lines, with also having a variable with a border of each word:
I understand I can remove the silence between words using
envelope = imdilate(abs(y), true(1500, 1));
quietParts = envelope < 0.05;
y(quietParts) = [];
but this does leave me without knowing the boundary between each of these words.
  2 comentarios
Arthur Goodhart
Arthur Goodhart el 2 de Nov. de 2018
Did you ever work out how to do this?
Michael Saniuk
Michael Saniuk el 3 de Nov. de 2018
I posted this question 1.5 year ago but yes, I managed to do it myself.
[y, fs] = audioread(sprintf('test%d.wav', i));
envelope = imdilate(abs(y), true(1500, 1));
quietParts = envelope > 0.01;
beginning = strfind(quietParts',[0 1]);
ending = strfind(quietParts', [1 0]);
With this code you can get boundaries between words but also between noises and sometimes the word gets separated.
In order to concatenate fragments of word into one full word, I had to detect parts where where is a very small distance between them and remove their corresponding endings/begginings:
eg. [b1 e1] [b2 e2] [b3 e3] are from the same word,
distances between them are very small.
I concatenate them and now I have a full word [b1 e3]
The last thing that might annoy us are the boundaries of noise that we do not want to be treated as a word! In order to get rid of them I calculated minimal length of a word in my dictionary and counted it as a minimal length for a detected word to be counted as a word.

Iniciar sesión para comentar.

Respuesta aceptada

Michael Saniuk
Michael Saniuk el 5 de Nov. de 2018
Copying my comment to post it as an answer:
I posted this question 1.5 year ago but yes, I managed to do it myself.
[y, fs] = audioread(sprintf('test%d.wav', i));
envelope = imdilate(abs(y), true(1500, 1));
quietParts = envelope > 0.01;
beginning = strfind(quietParts',[0 1]);
ending = strfind(quietParts', [1 0]);
With this code you can get boundaries between words but also between noises and sometimes the word gets separated.
In order to concatenate fragments of word into one full word, I had to detect parts where where is a very small distance between them and remove their corresponding endings/begginings:
eg. [b1 e1] [b2 e2] [b3 e3] are from the same word,
distances between them are very small.
I concatenate them and now I have a full word [b1 e3]
The last thing that might annoy us are the boundaries of noise that we do not want to be treated as a word! In order to get rid of them I calculated minimal length of a word in my dictionary and counted it as a minimal length for a detected word to be counted as a word.

Más respuestas (1)

huda farooqui
huda farooqui el 1 de Nov. de 2018
I am facing the same problem .kindly help

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by