How to read a particular phoneme generated using htk mlf file in Matlab. I want to access the particular time duration of phoneme in MLF file. For example if the phoneme segment is 200000 800000 dh
I want to read the wave file at 0.2 ms to 0.8 ms
1
votes
2 Answers
1
votes
You can read the file as a whole, and cut segments you need
[signal, fs] = wavread('file.wav')
start_sample = fs * 200000 / 1000000
end_sample = fs * 800000 / 1000000
phoneme_signal = signal(start_sample:end_sample)
You can also specify the range in wavread if you know the frequency already:
start_sample = fs * 200000 / 1000000
end_sample = fs * 800000 / 1000000
[phoneme_signal, fs] = wavread('file.wav', [start_sample, end_sample])