def read_gmm_classifier(file): gen = YamldataGenerator(file) model_dict_yaml_reader = YamldataReader(gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) model_dict = read_model_dict(None, model_dict_yaml_reader) gmm_yaml_reader = YamldataReader(gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) gmm_mgr = read_gmm_mgr(None, yaml_reader=gmm_yaml_reader) return AdaptingGmmClassifier(gmm_mgr, model_dict.items())
def read_acoustic_model(file, log_domain=False): gen = YamldataGenerator(file) model_dict_yaml_reader = YamldataReader(gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) model_dict = read_model_dict(None, model_dict_yaml_reader) gmm_yaml_reader = YamldataReader(gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) gmm_mgr = read_gmm_mgr(None, yaml_reader=gmm_yaml_reader) hmm_yaml_reader = YamldataReader(gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) hmm_mgr = read_hmm_mgr(None, gmm_mgr, log_domain=log_domain, yaml_reader=hmm_yaml_reader) return model_dict, gmm_mgr, hmm_mgr
def read_gmm_classifier(file): gen = YamldataGenerator(file) model_dict_yaml_reader = YamldataReader( gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) model_dict = read_model_dict(None, model_dict_yaml_reader) gmm_yaml_reader = YamldataReader( gen, stream_type=OnyxTextReader.STREAM_TYPE, stream_version=OnyxTextReader.STREAM_VERSION) gmm_mgr = read_gmm_mgr(None, yaml_reader=gmm_yaml_reader) return AdaptingGmmClassifier(gmm_mgr, model_dict.items())