0
$\begingroup$

Let's say I have a sound file, I then compute the Spectrogram and segment each part of it. Assume that it is a recording of someone saying the word "Hello" and therefore, each piece is given like so:

0 -> H
1 -> E
2 -> L
3 -> L 
4 -> O

Now I want to calculate the duration of each of the parts/phonemes. Is there a way to do this? I was thinking, because I have the data, is it possible to just count the total number of elements and therefore calculate the time it takes?

Could anyone suggest any reading material that could potentially help me.

$\endgroup$
  • $\begingroup$ What do you mean by "I have the data"? $\endgroup$ – user7358 Feb 23 '14 at 22:36
  • $\begingroup$ @user7358 Hey, basically, I have the data that represents the extracted data. So in this case, I have the specific calls (these are 128 blocks of values) since I use N = 256 noverlap = 128 when computing the STFT. Any help or advice would be greatly appreciated. $\endgroup$ – Phorce Feb 23 '14 at 22:50
  • $\begingroup$ Since you know the sampling rate and overlap used in the STFT computation, you basically know the time in seconds from one "time pixel" to the next. So, count the number of "time pixels" for each of the 4 letters H,E,L,L,O and convert to seconds. For example: $f_s = 44.1kHz$, N=256 and 50% overlap, each time pixel is 128/44.1 ms. If your letter "H" lasts P pixels, then the time duration is $128/44.1 \times P$ milliseconds. $\endgroup$ – Atul Ingle Feb 24 '14 at 3:31
  • $\begingroup$ @Atul Ingle Thanks :) But, what would $P$ be in this respect? $\endgroup$ – Phorce Feb 24 '14 at 11:36
  • $\begingroup$ You can count the number of "time pixels" for an individual letter/phoneme in the spectrogram. That's P. $\endgroup$ – Atul Ingle Feb 24 '14 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.