未验证 提交 675cff25 编写于 作者: 小湉湉's avatar 小湉湉 提交者: GitHub

[TTS]fix praatio version, test=tts (#1158)

* fix praatio version, test=tts

* fix praatio version, test=tts
上级 f8402773
......@@ -15,7 +15,7 @@ import argparse
from collections import defaultdict
from pathlib import Path
from praatio import tgio
from praatio import textgrid
def get_baker_data(root_dir):
......@@ -28,7 +28,7 @@ def get_baker_data(root_dir):
alignment_files = [f for f in alignment_files if f.stem not in exclude]
data_dict = defaultdict(dict)
for alignment_fp in alignment_files:
alignment = tgio.openTextgrid(alignment_fp)
alignment = textgrid.openTextgrid(alignment_fp, includeEmptyIntervals=True)
# only with baker's annotation
utt_id = alignment.tierNameList[0].split(".")[0]
intervals = alignment.tierDict[alignment.tierNameList[0]].entryList
......
#!/bin/bash
export MAIN_ROOT=`realpath ${PWD}/../../../`
export PATH=${MAIN_ROOT}:${MAIN_ROOT}/utils:${PATH}
export LC_ALL=C
export PYTHONDONTWRITEBYTECODE=1
# Use UTF-8 in Python to avoid UnicodeDecodeError when LC_ALL=C
export PYTHONIOENCODING=UTF-8
export PYTHONPATH=${MAIN_ROOT}:${PYTHONPATH}
#!/bin/bash
export MAIN_ROOT=`realpath ${PWD}/../../../`
export PATH=${MAIN_ROOT}:${MAIN_ROOT}/utils:${PATH}
export LC_ALL=C
export PYTHONDONTWRITEBYTECODE=1
# Use UTF-8 in Python to avoid UnicodeDecodeError when LC_ALL=C
export PYTHONIOENCODING=UTF-8
export PYTHONPATH=${MAIN_ROOT}:${PYTHONPATH}
......@@ -19,12 +19,12 @@ from pathlib import Path
import librosa
import numpy as np
import soundfile as sf
from praatio import tgio
from praatio import textgrid
from tqdm import tqdm
def get_valid_part(fpath):
f = tgio.openTextgrid(fpath)
f = textgrid.openTextgrid(fpath, includeEmptyIntervals=True)
start = 0
phone_entry_list = f.tierDict['phones'].entryList
......
......@@ -20,7 +20,7 @@ paddlespeech_feat
pandas
phkit
Pillow
praatio~=4.1
praatio==5.0.0
pre-commit
pybind11
pypi-kenlm
......
......@@ -45,7 +45,7 @@ requirements = {
"pandas",
"paddleaudio",
"paddlespeech_feat",
"praatio~=4.1",
"praatio==5.0.0",
"pypinyin",
"python-dateutil",
"pyworld",
......
......@@ -18,12 +18,12 @@ from pathlib import Path
import librosa
import numpy as np
import yaml
from praatio import tgio
from praatio import textgrid
from yacs.config import CfgNode
def readtg(tg_path, sample_rate=24000, n_shift=300):
alignment = tgio.openTextgrid(tg_path, readRaw=True)
alignment = textgrid.openTextgrid(tg_path, includeEmptyIntervals=True)
phones = []
ends = []
for interval in alignment.tierDict["phones"].entryList:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册