Пример #1
0
    def __init__(self, model, alignername=aligners.DEFAULT_ALIGNER):
        """
        Constructor.

        @param model is the acoustic model directory name. It is expected
        to contain at least a file with name "hmmdefs". It can also contain:
            - tiedlist file;
            - monophones.repl file;
            - config file.
        Any other file will be ignored.
        @param alignername (str) The identifier name of the aligner.

        """
        # Options, must be fixed before to instantiate the aligner
        self._infersp = False

        # The acoustic model directory
        self._modeldir = model

        # The automatic alignment system, and the "basic".
        # The basic aligner is used:
        #   - when the track segment contains only one phoneme;
        #   - when the track segment does not contain phonemes.
        self.set_aligner(alignername)
        self._basicaligner = aligners.instantiate(None)
        self._instantiate_aligner()
Пример #2
0
    def _instantiate_aligner(self):
        """
        Instantiate self._aligner to the appropriate Aligner system.

        """
        self._aligner = aligners.instantiate( self._modeldir,self._alignerid )
        self._aligner.set_infersp( self._infersp )