def __post_init__()

in ultravox/tools/ds_tool/ds_tool.py [0:0]


    def __post_init__(self):
        if self.mfa_dictionary is None:
            self.mfa_dictionary = self.mfa_acoustic_model

        try:
            # Make sure the MFA environment is installed
            subprocess.run(["conda", "run", "-n", MFA_ENV_NAME, "echo"], check=True)
        except subprocess.CalledProcessError:
            raise Exception(
                "Please install the MFA environment using `just install_mfa` first."
            )

        if self.template.startswith("@"):
            with open(self.template[1:], "r") as template_file:
                self.template = template_file.read()