Updated syllable duration function: now it also determines whether there is an onset or coda