montreal_forced_aligner/models.py
def meta(self) -> MetaDict:
        """
        Metadata information for the acoustic model
        """
        default_features = {
            "feature_type": "mfcc",
            "use_energy": False,
            "frame_shift": 10,
            "snip_edges": True,
            "low_frequency": 20,
            "high_frequency": 7800,
            "sample_frequency": 16000,
            "allow_downsample": True,
            "allow_upsample": True,
            "pitch": False,
            "uses_cmvn": True,
            "uses_deltas": True,
            "uses_splices": False,
            "uses_voiced": False,
            "uses_speaker_adaptation": False,
            "silence_weight": 0.0,
            "fmllr_update_type": "full",
            "splice_left_context": 3,
            "splice_right_context": 3,
        }
        if not self._meta:
            meta_path = os.path.join(self.dirname, "meta.yaml")
            if not os.path.exists(meta_path):
                self._meta = {
                    "version": "0.9.0",
                    "architecture": "gmm-hmm",
                    "features": default_features,
                }
            else:
                with open(meta_path, "r", encoding="utf8") as f:
                    self._meta = yaml.safe_load(f)
                if self._meta["features"] == "mfcc+deltas":
                    self._meta["features"] = default_features
            if "phone_type" not in self._meta:
                self._meta["phone_type"] = "triphone"
            if "optional_silence_phone" not in self._meta:
                self._meta["optional_silence_phone"] = "sil"
            if "oov_phone" not in self._meta:
                self._meta["oov_phone"] = "spn"
            if "other_noise_phone" not in self._meta:
                self._meta["other_noise_phone"] = "sp"
            if "phone_set_type" not in self._meta:
                self._meta["phone_set_type"] = "UNKNOWN"
            self._meta["phones"] = set(self._meta.get("phones", []))
            if (
                "uses_speaker_adaptation" not in self._meta["features"]
                or not self._meta["features"]["uses_speaker_adaptation"]
            ):
                self._meta["features"]["uses_speaker_adaptation"] = os.path.exists(
                    os.path.join(self.dirname, "final.alimdl")
                )
            if (
                "uses_splices" not in self._meta["features"]
                or not self._meta["features"]["uses_splices"]
            ):
                self._meta["features"]["uses_splices"] = os.path.exists(
                    os.path.join(self.dirname, "lda.mat")
                )
                if self._meta["features"]["uses_splices"]:
                    self._meta["features"]["uses_deltas"] = False
        self.parse_old_features()
        return self._meta

        Metadata information for the acoustic model
        
Metadata information for the acoustic model
Metadata information for the acoustic model
def meta(self) -> MetaDict:
        default_features = {
            "feature_type": "mfcc",
            "use_energy": False,
            "frame_shift": 10,
            "snip_edges": True,
            "low_frequency": 20,
            "high_frequency": 7800,
            "sample_frequency": 16000,
            "allow_downsample": True,
            "allow_upsample": True,
            "pitch": False,
            "uses_cmvn": True,
            "uses_deltas": True,
            "uses_splices": False,
            "uses_voiced": False,
            "uses_speaker_adaptation": False,
            "silence_weight": 0.0,
            "fmllr_update_type": "full",
            "splice_left_context": 3,
            "splice_right_context": 3,
        }
        if not self._meta:
            meta_path = os.path.join(self.dirname, "meta.yaml")
            if not os.path.exists(meta_path):
                self._meta = {
                    "version": "0.9.0",
                    "architecture": "gmm-hmm",
                    "features": default_features,
                }
            else:
                with open(meta_path, "r", encoding="utf8") as f:
                    self._meta = yaml.safe_load(f)
                if self._meta["features"] == "mfcc+deltas":
                    self._meta["features"] = default_features
            if "phone_type" not in self._meta:
                self._meta["phone_type"] = "triphone"
            if "optional_silence_phone" not in self._meta:
                self._meta["optional_silence_phone"] = "sil"
            if "oov_phone" not in self._meta:
                self._meta["oov_phone"] = "spn"
            if "other_noise_phone" not in self._meta:
                self._meta["other_noise_phone"] = "sp"
            if "phone_set_type" not in self._meta:
                self._meta["phone_set_type"] = "UNKNOWN"
            self._meta["phones"] = set(self._meta.get("phones", []))
            if (
                "uses_speaker_adaptation" not in self._meta["features"]
                or not self._meta["features"]["uses_speaker_adaptation"]
            ):
                self._meta["features"]["uses_speaker_adaptation"] = os.path.exists(
                    os.path.join(self.dirname, "final.alimdl")
                )
            if (
                "uses_splices" not in self._meta["features"]
                or not self._meta["features"]["uses_splices"]
            ):
                self._meta["features"]["uses_splices"] = os.path.exists(
                    os.path.join(self.dirname, "lda.mat")
                )
                if self._meta["features"]["uses_splices"]:
                    self._meta["features"]["uses_deltas"] = False
        self.parse_old_features()
        return self._meta
def meta ( self ) -> MetaDict : default_features = { "feature_type" : "mfcc" , "use_energy" : False , "frame_shift" : 10 , "snip_edges" : True , "low_frequency" : 20 , "high_frequency" : 7800 , "sample_frequency" : 16000 , "allow_downsample" : True , "allow_upsample" : True , "pitch" : False , "uses_cmvn" : True , "uses_deltas" : True , "uses_splices" : False , "uses_voiced" : False , "uses_speaker_adaptation" : False , "silence_weight" : 0.0 , "fmllr_update_type" : "full" , "splice_left_context" : 3 , "splice_right_context" : 3 , } if not self . _meta : meta_path = os . path . join ( self . dirname , "meta.yaml" ) if not os . path . exists ( meta_path ) : self . _meta = { "version" : "0.9.0" , "architecture" : "gmm-hmm" , "features" : default_features , } else : with open ( meta_path , "r" , encoding = "utf8" ) as f : self . _meta = yaml . safe_load ( f ) if self . _meta [ "features" ] == "mfcc+deltas" : self . _meta [ "features" ] = default_features if "phone_type" not in self . _meta : self . _meta [ "phone_type" ] = "triphone" if "optional_silence_phone" not in self . _meta : self . _meta [ "optional_silence_phone" ] = "sil" if "oov_phone" not in self . _meta : self . _meta [ "oov_phone" ] = "spn" if "other_noise_phone" not in self . _meta : self . _meta [ "other_noise_phone" ] = "sp" if "phone_set_type" not in self . _meta : self . _meta [ "phone_set_type" ] = "UNKNOWN" self . _meta [ "phones" ] = set ( self . _meta . get ( "phones" , [ ] ) ) if ( "uses_speaker_adaptation" not in self . _meta [ "features" ] or not self . _meta [ "features" ] [ "uses_speaker_adaptation" ] ) : self . _meta [ "features" ] [ "uses_speaker_adaptation" ] = os . path . exists ( os . path . join ( self . dirname , "final.alimdl" ) ) if ( "uses_splices" not in self . _meta [ "features" ] or not self . _meta [ "features" ] [ "uses_splices" ] ) : self . _meta [ "features" ] [ "uses_splices" ] = os . path . exists ( os . path . join ( self . dirname , "lda.mat" ) ) if self . _meta [ "features" ] [ "uses_splices" ] : self . _meta [ "features" ] [ "uses_deltas" ] = False self . parse_old_features ( ) return self . _meta
Metadata information for the acoustic model
Metadata information for the acoustic model
"""
        Metadata information for the acoustic model
        """
self