def test_alignable_from_temp(basic_corpus_txt_dir, basic_dict_path, generated_dir, default_feature_config): dictionary = Dictionary(basic_dict_path, os.path.join(generated_dir, 'basic')) dictionary.write() output_directory = os.path.join(generated_dir, 'basic') c = AlignableCorpus(basic_corpus_txt_dir, output_directory, use_mp=False) assert len(c.no_transcription_files) == 0 c.initialize_corpus(dictionary) default_feature_config.generate_features(c) assert c.get_feat_dim(default_feature_config) == 39 c = AlignableCorpus(basic_corpus_txt_dir, output_directory, use_mp=False) assert len(c.no_transcription_files) == 0 c.initialize_corpus(dictionary) default_feature_config.generate_features(c) assert c.get_feat_dim(default_feature_config) == 39
def test_stereo(basic_dict_path, stereo_corpus_dir, temp_dir, default_feature_config): temp = os.path.join(temp_dir, 'stereo') dictionary = Dictionary(basic_dict_path, os.path.join(temp, 'basic')) dictionary.write() d = AlignableCorpus(stereo_corpus_dir, temp) d.initialize_corpus(dictionary) default_feature_config.generate_features(d) assert d.get_feat_dim(default_feature_config) == 39
def test_basic(basic_dict_path, basic_corpus_dir, generated_dir, default_feature_config): dictionary = Dictionary(basic_dict_path, os.path.join(generated_dir, 'basic')) dictionary.write() output_directory = os.path.join(generated_dir, 'basic') c = AlignableCorpus(basic_corpus_dir, output_directory) c.initialize_corpus(dictionary) default_feature_config.generate_features(c) assert c.get_feat_dim(default_feature_config) == 39