montreal_forced_aligner/models.py
def generate_path(cls, root: str, name: str, enforce_existence: bool = True) -> Optional[str]:
        """
        Generate a path for a given model from the root directory and the name of the model

        Parameters
        ----------
        root: str
            Root directory for the full path
        name: str
            Name of the model
        enforce_existence: bool
            Flag to return None if the path doesn't exist, defaults to True

        Returns
        -------
        str
           Full path in the root directory for the model
        """
        for ext in cls.extensions:
            path = os.path.join(root, name + ext)
            if os.path.exists(path) or not enforce_existence:
                return path
        return None

        Generate a path for a given model from the root directory and the name of the model

        Parameters
        ----------
        root: str
            Root directory for the full path
        name: str
            Name of the model
        enforce_existence: bool
            Flag to return None if the path doesn't exist, defaults to True

        Returns
        -------
        str
           Full path in the root directory for the model
        
Generate a path for a given model from the root directory and the name of the model
Parameters

str
Root directory for the full path
name: str
Name of the model
enforce_existence: bool
Flag to return None if the path doesn't exist, defaults to True

Returns

str
Full path in the root directory for the model
Generate a path for a given model from the root directory and the name of the model Parameters str Root directory for the full path name : str Name of the model enforce_existence : bool Flag to return None if the path doesn ' t exist defaults to True Returns str Full path in the root directory for the model
def generate_path(cls, root: str, name: str, enforce_existence: bool = True) -> Optional[str]:
        for ext in cls.extensions:
            path = os.path.join(root, name + ext)
            if os.path.exists(path) or not enforce_existence:
                return path
        return None
def generate_path ( cls , root : str , name : str , enforce_existence : bool = True ) -> Optional [ str ] : for ext in cls . extensions : path = os . path . join ( root , name + ext ) if os . path . exists ( path ) or not enforce_existence : return path return None
Generate a path for a given model from the root directory and the name of the model
Parameters
Generate a path for a given model from the root directory and the name of the model Parameters
"""
        Generate a path for a given model from the root directory and the name of the model

        Parameters
        ----------
        root: str
            Root directory for the full path
        name: str
            Name of the model
        enforce_existence: bool
            Flag to return None if the path doesn't exist, defaults to True

        Returns
        -------
        str
           Full path in the root directory for the model
        """
cls
root
str
name
str
enforce_existence
bool