Matlab Interface to HTK for Bioacoustic
Matlab
Switch branches/tags
Clone or download
Latest commit e7f3535 May 16, 2017
Permalink
Failed to load latest commit information.
Tutorial_diving_petrel add information in readme and tutorial files May 15, 2017
.gitignore formatting of readme file May 15, 2017
GetHTKCoeffFromSong.m set up Dec 4, 2015
LICENSE Initial commit Dec 4, 2015
README.md formatting May 16, 2017
check_label.m added a function to check all the label files in a directory and summ… Feb 7, 2017
check_labeldir.m fix call of check_label inside check_labeldir Feb 7, 2017
compare_TextGrid.m Fix label comparisonwhen comparing Nov 5, 2016
compare_label.m add an option to keep mlf file when doing recognition, useful for tes… Mar 22, 2017
createcffile.m set up Dec 4, 2015
createcffile_grammar.m set up Dec 4, 2015
createcffile_mixt.m various bug fixes Mar 23, 2016
createcffiledist.m set up Dec 4, 2015
createcffileetree.m set up Dec 4, 2015
createsongfromwav.m set up Dec 4, 2015
createtrainlistHMM.m set up Dec 4, 2015
dopwdist.m set up Dec 4, 2015
encodeWavlist.m added control on frequency bandwidth of files when encoding + correct… Mar 9, 2017
extract_wav.m set up Dec 4, 2015
getsyllabiseparameter.m set up Dec 4, 2015
initialiseHMM.m remove setstr() and replace them by char() Mar 9, 2017
is_octave.m add function to detect if Octave or Matlab is running (audioread not … Dec 7, 2015
label2mlf.m set up Dec 4, 2015
mlf2label.m set up Dec 4, 2015
mlf2song.m avoid potential infinite loop problem with (while 1) Mar 22, 2017
mlf2textGrid.m set up Dec 4, 2015
msecondtostring.m set up Dec 4, 2015
plot_Label.m add information in readme and tutorial files May 15, 2017
plot_TextGrid.m set up Dec 4, 2015
raven2mlf.m set up Dec 4, 2015
readhtk.m updated version of voicebox routine to read in and out HTK files Mar 9, 2017
readmfcc.m set up Dec 4, 2015
recognise_HTK.m fix some issues with the automatic splitting of input files Mar 20, 2017
recognizeHMM.m avoid potential infinite loop problem with (while 1) Mar 22, 2017
reencode_song.m set up Dec 4, 2015
runall.m set up Dec 4, 2015
song2label.m added control on frequency bandwidth of files when encoding + correct… Mar 9, 2017
song2table.m include filenames in the confusion matrix csv file Nov 2, 2016
song2textGrid.m set up Dec 4, 2015
song_fill_seq.m set up Dec 4, 2015
summarize_label.m summarize multiple label file into one Mar 18, 2016
syllabise.m set up Dec 4, 2015
syltable_bins.m add confusion matrix output to compare_label.m Mar 16, 2016
textGrid2label.m added a function to check all the label files in a directory and summ… Feb 7, 2017
textGrid2mlf.m set up Dec 4, 2015
trainHMM.m set up Dec 4, 2015
train_HTK.m added control on frequency bandwidth of files when encoding + correct… Mar 9, 2017
writehtk.m updated version of voicebox routine to read in and out HTK files Mar 9, 2017

README.md

matlabHTK

Matlab/Octave Interface to HTK for Bioacoustic


MatlabHTK requires HTK (http://htk.eng.cam.ac.uk/) installed on system

MatlabHTK uses VOICEBOX speech processing toolbox MATLAB routines to read/write HTK binary files (http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html)


How to cite

Please use: Ranjard, L., Reed, B. S., Landers, T. J., Rayner, M. J., Friesen, M. R., Sagar, R. L. and Dunphy, B. J. (2016). MatlabHTK: A simple interface for bioacoustic analyses using hidden Markov models. Methods in Ecology and Evolution. doi:10.1111/2041-210X.12688


Function documentation

The calls to HTK functions are indicated.

train_HTK()

  • Process manually annotated sound recording files (Raven, Praat or Audacity) and convert to format readable to HTK (.mlf)
  • Create directories and configuration files for HTK parameters (config, hmmprototype, configvar.txt, dict.txt, gram.txt, wavlist.txt, trainlist.txt, uniksequencetxt.mat)
  • Extract the annotated sound signals and compute the window sound parameter values (HCopy)
  • For each sound category, train a HMM using HTK function (HInit, HCompV, HRest)
  • Clean up temporary files

recognise_HTK()

  • Check the hidden Markov model network (HParse, HSGen)
  • For each file in the argument directory, perform recognition using the set of HMM (HVite)
  • Convert recognition file to label file
  • Save recognition result summary to a .csv file for postprocessing
  • Clean up temporary files

compare_label()

  • Compare the annotation similarity between two label files for the same sound file
  • Conduct a randomization test to assess significance of the similarity score
  • Write a confusion matrix for the first input label file to the second input label file

plot_label()

  • Plot histogram of activity for a given input label
  • Consecutive time windows are considered and the proportion of the total window duration annotated as the input label is plotted
  • Output a csv file indicating the proportions of each time window annotated as the input label