diff --git a/.vs/acoustic_model/v15/.suo b/.vs/acoustic_model/v15/.suo index 1448d62..67c72c1 100644 Binary files a/.vs/acoustic_model/v15/.suo and b/.vs/acoustic_model/v15/.suo differ diff --git a/acoustic_model/__pycache__/defaultfiles.cpython-36.pyc b/acoustic_model/__pycache__/defaultfiles.cpython-36.pyc index 4fac91d..b47d5a6 100644 Binary files a/acoustic_model/__pycache__/defaultfiles.cpython-36.pyc and b/acoustic_model/__pycache__/defaultfiles.cpython-36.pyc differ diff --git a/acoustic_model/check_novoapi.py b/acoustic_model/check_novoapi.py index 9a3057a..e2c7322 100644 --- a/acoustic_model/check_novoapi.py +++ b/acoustic_model/check_novoapi.py @@ -25,12 +25,12 @@ mapping = convert_xsampa2ipa.load_converter('xsampa', 'ipa', default.ipa_xsampa_ stimmen_transcription_ = pd.ExcelFile(default.stimmen_transcription_xlsx) -phonelist_novo70_ = pd.ExcelFile(default.phonelist_novo70_xlsx) -df = pd.read_excel(phonelist_novo70_, 'list') - ## novo phoneset -#translation_key = dict() +translation_key = dict() + +#phonelist_novo70_ = pd.ExcelFile(default.phonelist_novo70_xlsx) +#df = pd.read_excel(phonelist_novo70_, 'list') ## *_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): @@ -38,3 +38,18 @@ df = pd.read_excel(phonelist_novo70_, 'list') # translation_key[ipa] = novo70 #phonelist_novo70 = np.unique(list(df['novo70_simple'])) +phoneset_ipa = [] +phoneset_novo70 = [] +with open(default.cmu69_phoneset, "rt", encoding="utf-8") as fin: + lines = fin.read() + lines = lines.split('\n') + for line in lines: + words = line.split('\t') + if len(words) > 1: + novo70 = words[0] + ipa = words[1] + phoneset_ipa.append(ipa) + phoneset_novo70.append(novo70) + translation_key[ipa] = novo70 +phoneset_ipa = np.unique(phoneset_ipa) +phoneset_novo70 = np.unique(phonset_novo70) \ No newline at end of file