Example #1
0
    def __init__(self, modeldir):
        """
        Constructor.

        HviteAligner aligns one inter-pausal unit.

        @param modeldir (str) the acoustic model file name

        """
        BaseAligner.__init__(self, modeldir)
        self._outext = DEFAULT_EXT_OUT
Example #2
0
    def __init__(self, modeldir):
        """
        Constructor.

        BasicAlign aligns one inter-pausal unit with the same duration
        for each phoneme. It selects the shortest in case of variants.

        @param modeldir (str) the acoustic model file name

        """
        BaseAligner.__init__(self, modeldir)
        self._outext = DEFAULT_EXT_OUT
Example #3
0
    def __init__(self, modeldir):
        """
        JuliusAligner is able to align one audio segment that can be:
            - an inter-pausal unit,
            - an utterance,
            - a sentence...
        no longer that a few seconds.

        Things needed to run JuliusAligner:

        To perform speech segmentation with Julius, three "models" have to be
        prepared. The models should define the linguistic property of the
        language: recognition unit, audio properties of the unit and the
        linguistic constraint for the connection between the units.
        Typically the unit should be a word, and you should give Julius these
        models below:

        1. "Acoustic model", which is a stochastic model of input waveform
        patterns, typically per phoneme. Format is HTK-ASCII model.

        2. "Word dictionary", which defines vocabulary.

        3. "Language model", which defines syntax level rules that defines the
        connection constraint between words. It should give the constraint for
        the acceptable or preferable sentence patterns. It can be:
            * either a rule-based grammar,
            * or probabilistic N-gram model.

        This class automatically construct the word dictionary and the language
        model from both:
            - the tokenization of speech,
            - the phonetization of speech.

        If outext is set to "palign", JuliusAligner will use a grammar and
        it will produce both phones and words alignments.
        If outext is set to "walign", JuliusAligner will use a slm and will
        produce words alignments only.

        @param modelfildir (str) the acoustic model file name

        """
        BaseAligner.__init__(self, modeldir)
        self._outext = DEFAULT_EXT_OUT