フィルターのクリア

Separate words in audio file

3 ビュー (過去 30 日間)
Michael Saniuk
Michael Saniuk 2017 年 5 月 14 日
回答済み: Michael Saniuk 2018 年 11 月 5 日
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 件のコメント
Arthur Goodhart
Arthur Goodhart 2018 年 11 月 2 日
Did you ever work out how to do this?
Michael Saniuk
Michael Saniuk 2018 年 11 月 3 日
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.

サインインしてコメントする。

採用された回答

Michael Saniuk
Michael Saniuk 2018 年 11 月 5 日
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.

その他の回答 (1 件)

huda farooqui
huda farooqui 2018 年 11 月 1 日
I am facing the same problem .kindly help

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by