montreal_forced_aligner/command_line/validate.py
def validate_corpus(args: Namespace, unknown_args: Optional[List[str]] = None) -> None:
    """
    Run the validation command

    Parameters
    ----------
    args: :class:`~argparse.Namespace`
        Command line arguments
    unknown_args: list[str]
        Optional arguments that will be passed to configuration objects
    """
    if args.acoustic_model_path:
        validator = PretrainedValidator(
            acoustic_model_path=args.acoustic_model_path,
            corpus_directory=args.corpus_directory,
            audio_directory=args.audio_directory,
            dictionary_path=args.dictionary_path,
            temporary_directory=args.temporary_directory,
            **PretrainedValidator.parse_parameters(args.config_path, args, unknown_args),
        )
    else:
        validator = TrainingValidator(
            corpus_directory=args.corpus_directory,
            audio_directory=args.audio_directory,
            dictionary_path=args.dictionary_path,
            temporary_directory=args.temporary_directory,
            **TrainingValidator.parse_parameters(args.config_path, args, unknown_args),
        )
    try:
        validator.validate()
    except Exception:
        validator.dirty = True
        raise
    finally:
        validator.cleanup()

    Run the validation command

    Parameters
    ----------
    args: :class:`~argparse.Namespace`
        Command line arguments
    unknown_args: list[str]
        Optional arguments that will be passed to configuration objects
    
Run the validation command
Parameters

:class:`~argparse.Namespace`
Command line arguments
unknown_args: list[str]
Optional arguments that will be passed to configuration objects
Run the validation command Parameters : class : ` ~argparse . Namespace ` Command line arguments unknown_args : list [ str ] Optional arguments that will be passed to configuration objects
def validate_corpus(args: Namespace, unknown_args: Optional[List[str]] = None) -> None:
    if args.acoustic_model_path:
        validator = PretrainedValidator(
            acoustic_model_path=args.acoustic_model_path,
            corpus_directory=args.corpus_directory,
            audio_directory=args.audio_directory,
            dictionary_path=args.dictionary_path,
            temporary_directory=args.temporary_directory,
            **PretrainedValidator.parse_parameters(args.config_path, args, unknown_args),
        )
    else:
        validator = TrainingValidator(
            corpus_directory=args.corpus_directory,
            audio_directory=args.audio_directory,
            dictionary_path=args.dictionary_path,
            temporary_directory=args.temporary_directory,
            **TrainingValidator.parse_parameters(args.config_path, args, unknown_args),
        )
    try:
        validator.validate()
    except Exception:
        validator.dirty = True
        raise
    finally:
        validator.cleanup()
def validate_corpus ( args : Namespace , unknown_args : Optional [ List [ str ] ] = None ) -> None : if args . acoustic_model_path : validator = PretrainedValidator ( acoustic_model_path = args . acoustic_model_path , corpus_directory = args . corpus_directory , audio_directory = args . audio_directory , dictionary_path = args . dictionary_path , temporary_directory = args . temporary_directory , ** PretrainedValidator . parse_parameters ( args . config_path , args , unknown_args ) , ) else : validator = TrainingValidator ( corpus_directory = args . corpus_directory , audio_directory = args . audio_directory , dictionary_path = args . dictionary_path , temporary_directory = args . temporary_directory , ** TrainingValidator . parse_parameters ( args . config_path , args , unknown_args ) , ) try : validator . validate ( ) except Exception : validator . dirty = True raise finally : validator . cleanup ( )
Run the validation command
Parameters
Run the validation command Parameters
"""
    Run the validation command

    Parameters
    ----------
    args: :class:`~argparse.Namespace`
        Command line arguments
    unknown_args: list[str]
        Optional arguments that will be passed to configuration objects
    """
args
Namespace
unknown_args
Optional[List[str]]