Browse Source

commit to clean up

master
yemaozi88 3 years ago
parent
commit
af785e51cf
  1. BIN
      .vs/acoustic_model/v15/.suo
  2. BIN
      acoustic_model/__pycache__/defaultfiles.cpython-36.pyc
  3. 23
      acoustic_model/check_novoapi.py

BIN
.vs/acoustic_model/v15/.suo

BIN
acoustic_model/__pycache__/defaultfiles.cpython-36.pyc

23
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)
Loading…
Cancel
Save