Package gmisclib :: Module xwaves_mark
[frames] | no frames]

Module xwaves_mark

source code

Read in .in files produced by ESPS xmark. Returns (header, data), where data is (time, word_or_phoneme, type), where type is 0 for words, 1 for phonemes. Times are guarenteed to be increasing inside the set of all words, and also inside the set of all phonemes. Word marks preceed the corresponding phoneme marks.

Functions
 
write(fd, hdr, data, SortData=1) source code
 
read(filename)
Read in .in files produced by ESPS xmark.
source code
 
mark_to_lab(data, ty)
This function lets you take a mixed list of word and phone labels, such as provided by xwaves_mark.read(), and will select out one or the other type.
source code
 
combine_2labs(whdr, wd, phdr, pd, utterance, TOL=0.001)
Combine two XLAB files into one XMARK file.
source code
Variables
  DecrTol = 0.004999
  PHONE = 1
  WORD = 0
  __doc__ = read.__doc__
  __package__ = 'gmisclib'

Imports: os, sys, die, types, DataError, NoSuchFileError, DataOutOfOrderError, BadFileFormatError, Error


Function Details

read(filename)

source code 

Read in .in files produced by ESPS xmark. Returns (header, data), where data is (time, word_or_phoneme, type), where type is 0 for words, 1 for phonemes. Times are guarenteed to be increasing inside the set of all words, and also inside the set of all phonemes. Word marks preceed the corresponding phoneme marks.

mark_to_lab(data, ty)

source code 

This function lets you take a mixed list of word and phone labels, such as provided by xwaves_mark.read(), and will select out one or the other type. Type is PHONE or WORD.

combine_2labs(whdr, wd, phdr, pd, utterance, TOL=0.001)

source code 

Combine two XLAB files into one XMARK file. It forces (within rounding errors) the words to enclose the phones.