Buildin phonemes and words indices for frames.