load novo phoneset.
This commit is contained in:
parent
b87a81eb9d
commit
3500a8cdf0
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,9 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
## important ##
|
||||||
|
.acoustic_model/forced_alignment_novo.py
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
Binary file not shown.
@ -28,11 +28,13 @@ stimmen_transcription_ = pd.ExcelFile(default.stimmen_transcription_xlsx)
|
|||||||
phonelist_novo70_ = pd.ExcelFile(default.phonelist_novo70_xlsx)
|
phonelist_novo70_ = pd.ExcelFile(default.phonelist_novo70_xlsx)
|
||||||
df = pd.read_excel(phonelist_novo70_, 'list')
|
df = pd.read_excel(phonelist_novo70_, 'list')
|
||||||
|
|
||||||
translation_key = dict()
|
|
||||||
for ipa, novo70 in zip(df['IPA_simple'], df['novo70_simple']):
|
|
||||||
if not pd.isnull(ipa):
|
|
||||||
print('{0}:{1}'.format(ipa, novo70))
|
|
||||||
translation_key[ipa] = novo70
|
|
||||||
|
|
||||||
#df = pd.read_excel(stimmen_transcription, 'check')
|
## novo phoneset
|
||||||
|
#translation_key = dict()
|
||||||
|
## *_simple includes columns which has only one phone in.
|
||||||
|
#for ipa, novo70 in zip(df['IPA_simple'], df['novo70_simple']):
|
||||||
|
# if not pd.isnull(ipa):
|
||||||
|
# print('{0}:{1}'.format(ipa, novo70))
|
||||||
|
# translation_key[ipa] = novo70
|
||||||
|
#phonelist_novo70 = np.unique(list(df['novo70_simple']))
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import os
|
|||||||
#default_hvite_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data', 'htk', 'config.HVite')
|
#default_hvite_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data', 'htk', 'config.HVite')
|
||||||
|
|
||||||
cygwin_dir = r'C:\cygwin64\home\Aki\acoustic_model'
|
cygwin_dir = r'C:\cygwin64\home\Aki\acoustic_model'
|
||||||
kaldi_dir = r'C:\OneDrive\WSL\kaldi-trunk\egs\fame\s5'
|
|
||||||
#config_hcopy = os.path.join(cygwin_dir, 'config', 'config.HCopy')
|
#config_hcopy = os.path.join(cygwin_dir, 'config', 'config.HCopy')
|
||||||
#config_train = os.path.join(cygwin_dir, 'config', 'config.train')
|
#config_train = os.path.join(cygwin_dir, 'config', 'config.train')
|
||||||
config_hvite = os.path.join(cygwin_dir, 'config', 'config.HVite')
|
config_hvite = os.path.join(cygwin_dir, 'config', 'config.HVite')
|
||||||
@ -30,11 +30,16 @@ repo_dir = r'C:\Users\Aki\source\repos'
|
|||||||
ipa_xsampa_converter_dir = os.path.join(repo_dir, 'ipa-xsama-converter')
|
ipa_xsampa_converter_dir = os.path.join(repo_dir, 'ipa-xsama-converter')
|
||||||
forced_alignment_module_dir = os.path.join(repo_dir, 'forced_alignment')
|
forced_alignment_module_dir = os.path.join(repo_dir, 'forced_alignment')
|
||||||
|
|
||||||
fame_dir = r'C:\OneDrive\WSL\kaldi-trunk\egs\fame\s5\corpus'
|
WSL_dir = r'C:\OneDrive\WSL'
|
||||||
|
fame_dir = os.path.join(WSL_dir, 'kaldi-trunk', 'egs', 'fame')
|
||||||
|
fame_s5_dir = os.path.join(fame_dir, 's5')
|
||||||
|
fame_corpus_dir = os.path.join(fame_dir, 'corpus')
|
||||||
|
|
||||||
experiments_dir = r'c:\OneDrive\Research\rug\experiments'
|
experiments_dir = r'c:\OneDrive\Research\rug\experiments'
|
||||||
stimmen_transcription_xlsx = os.path.join(experiments_dir, 'stimmen', 'data', 'Frisian Variants Picture Task Stimmen.xlsx')
|
stimmen_transcription_xlsx = os.path.join(experiments_dir, 'stimmen', 'data', 'Frisian Variants Picture Task Stimmen.xlsx')
|
||||||
stimmen_data_dir = os.path.join(experiments_dir, 'stimmen', 'data')
|
stimmen_data_dir = os.path.join(experiments_dir, 'stimmen', 'data')
|
||||||
phonelist_friesian_txt = os.path.join(experiments_dir, 'friesian', 'acoustic_model', 'config', 'phonelist_friesian.txt')
|
phonelist_friesian_txt = os.path.join(experiments_dir, 'friesian', 'acoustic_model', 'config', 'phonelist_friesian.txt')
|
||||||
phonelist_novo70_xlsx = os.path.join(experiments_dir, 'Nederlandse phonesets_aki.xlsx')
|
|
||||||
|
novo_api_dir = os.path.join(WSL_dir, 'python-novo-api')
|
||||||
|
cmu69_phoneset = os.path.join(novo_api_dir, 'novoapi', 'asr', 'phoneset', 'en', 'cmu69.phoneset')
|
||||||
|
|
||||||
|
@ -28,12 +28,12 @@ htk_dict_dir = os.path.join(default.experiments_dir, 'stimmen', 'dic_short
|
|||||||
fa_dir = os.path.join(default.experiments_dir, 'stimmen', 'FA_44k')
|
fa_dir = os.path.join(default.experiments_dir, 'stimmen', 'FA_44k')
|
||||||
result_dir = os.path.join(default.experiments_dir, 'stimmen', 'result')
|
result_dir = os.path.join(default.experiments_dir, 'stimmen', 'result')
|
||||||
|
|
||||||
kaldi_data_dir = os.path.join(default.kaldi_dir, 'data', 'alignme')
|
kaldi_data_dir = os.path.join(default.fame_s5_dir, 'data', 'alignme')
|
||||||
kaldi_dict_dir = os.path.join(default.kaldi_dir, 'data', 'local', 'dict')
|
kaldi_dict_dir = os.path.join(default.fame_s5_dir, 'data', 'local', 'dict')
|
||||||
lexicon_txt = os.path.join(kaldi_dict_dir, 'lexicon.txt')
|
lexicon_txt = os.path.join(kaldi_dict_dir, 'lexicon.txt')
|
||||||
|
|
||||||
#lex_asr = os.path.join(default.fame_dir, 'lexicon', 'lex.asr')
|
#lex_asr = os.path.join(default.fame_corpus_dir, 'lexicon', 'lex.asr')
|
||||||
#lex_asr_htk = os.path.join(default.fame_dir, 'lexicon', 'lex.asr_htk')
|
#lex_asr_htk = os.path.join(default.fame_corpus_dir, 'lexicon', 'lex.asr_htk')
|
||||||
|
|
||||||
|
|
||||||
# procedure
|
# procedure
|
||||||
@ -274,8 +274,8 @@ if make_kaldi_lexicon_txt:
|
|||||||
|
|
||||||
## ======================= load kaldi forced alignment result =======================
|
## ======================= load kaldi forced alignment result =======================
|
||||||
if load_forced_alignment_kaldi:
|
if load_forced_alignment_kaldi:
|
||||||
phones_txt = os.path.join(default.kaldi_dir, 'data', 'lang', 'phones.txt')
|
phones_txt = os.path.join(default.fame_s5_dir, 'data', 'lang', 'phones.txt')
|
||||||
merged_alignment_txt = os.path.join(default.kaldi_dir, 'exp', 'tri1_alignme', 'merged_alignment.txt')
|
merged_alignment_txt = os.path.join(default.fame_s5_dir, 'exp', 'tri1_alignme', 'merged_alignment.txt')
|
||||||
|
|
||||||
#filenames = np.load(stimmen_data_dir + '\\filenames.npy')
|
#filenames = np.load(stimmen_data_dir + '\\filenames.npy')
|
||||||
#words = np.load(stimmen_data_dir + '\\words.npy')
|
#words = np.load(stimmen_data_dir + '\\words.npy')
|
||||||
|
Loading…
Reference in New Issue
Block a user