montreal_forced_aligner/models.py
def validate(self, dictionary: DictionaryMixin) -> None:
        """
        Validate this acoustic model against a pronunciation dictionary to ensure their
        phone sets are compatible

        Parameters
        ----------
        dictionary: :class:`~montreal_forced_aligner.dictionary.mixins.DictionaryMixin`
            DictionaryMixin  to compare phone sets with

        Raises
        ------
        :class:`~montreal_forced_aligner.exceptions.PronunciationAcousticMismatchError`
            If there are phones missing from the acoustic model
        """
        if isinstance(dictionary, G2PModel):
            missing_phones = dictionary.meta["phones"] - set(self.meta["phones"])
        else:
            missing_phones = dictionary.non_silence_phones - set(self.meta["phones"])
        if missing_phones:
            raise (PronunciationAcousticMismatchError(missing_phones))

        Validate this acoustic model against a pronunciation dictionary to ensure their
        phone sets are compatible

        Parameters
        ----------
        dictionary: :class:`~montreal_forced_aligner.dictionary.mixins.DictionaryMixin`
            DictionaryMixin  to compare phone sets with

        Raises
        ------
        :class:`~montreal_forced_aligner.exceptions.PronunciationAcousticMismatchError`
            If there are phones missing from the acoustic model
        
Validate this acoustic model against a pronunciation dictionary to ensure their
phone sets are compatible

Parameters



Raises
Validate this acoustic model against a pronunciation dictionary to ensure their phone sets are compatible Parameters Raises
def validate(self, dictionary: DictionaryMixin) -> None:
        if isinstance(dictionary, G2PModel):
            missing_phones = dictionary.meta["phones"] - set(self.meta["phones"])
        else:
            missing_phones = dictionary.non_silence_phones - set(self.meta["phones"])
        if missing_phones:
            raise (PronunciationAcousticMismatchError(missing_phones))
def validate ( self , dictionary : DictionaryMixin ) -> None : if isinstance ( dictionary , G2PModel ) : missing_phones = dictionary . meta [ "phones" ] - set ( self . meta [ "phones" ] ) else : missing_phones = dictionary . non_silence_phones - set ( self . meta [ "phones" ] ) if missing_phones : raise ( PronunciationAcousticMismatchError ( missing_phones ) )
Validate this acoustic model against a pronunciation dictionary to ensure their
phone sets are compatible
Validate this acoustic model against a pronunciation dictionary to ensure their phone sets are compatible
"""
        Validate this acoustic model against a pronunciation dictionary to ensure their
        phone sets are compatible

        Parameters
        ----------
        dictionary: :class:`~montreal_forced_aligner.dictionary.mixins.DictionaryMixin`
            DictionaryMixin  to compare phone sets with

        Raises
        ------
        :class:`~montreal_forced_aligner.exceptions.PronunciationAcousticMismatchError`
            If there are phones missing from the acoustic model
        """
self
dictionary
DictionaryMixin
class
`~montreal_forced_aligner.exceptions.PronunciationAcousticMismatchError`
If there are phones missing from the acoustic model
` ~montreal_forced_aligner . exceptions . PronunciationAcousticMismatchError ` If there are phones missing from the acoustic model