Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli]rm extra log #2107

Merged
merged 1 commit into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddlespeech/cli/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def disable_task_loggers(self):
logging.getLogger(name) for name in logging.root.manager.loggerDict
]
for l in loggers:
l.disabled = True
l.setLevel(logging.ERROR)

def show_rtf(self, info: Dict[str, List[float]]):
"""
Expand Down
6 changes: 0 additions & 6 deletions paddlespeech/cli/tts/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,21 +267,18 @@ def _init_from_path(
with open(self.phones_dict, "r") as f:
phn_id = [line.strip().split() for line in f.readlines()]
vocab_size = len(phn_id)
print("vocab_size:", vocab_size)

tone_size = None
if self.tones_dict:
with open(self.tones_dict, "r") as f:
tone_id = [line.strip().split() for line in f.readlines()]
tone_size = len(tone_id)
print("tone_size:", tone_size)

spk_num = None
if self.speaker_dict:
with open(self.speaker_dict, 'rt') as f:
spk_id = [line.strip().split() for line in f.readlines()]
spk_num = len(spk_id)
print("spk_num:", spk_num)

# frontend
if lang == 'zh':
Expand All @@ -291,7 +288,6 @@ def _init_from_path(

elif lang == 'en':
self.frontend = English(phone_vocab_path=self.phones_dict)
print("frontend done!")

# acoustic model
odim = self.am_config.n_mels
Expand Down Expand Up @@ -324,7 +320,6 @@ def _init_from_path(
am_normalizer = ZScore(am_mu, am_std)
self.am_inference = am_inference_class(am_normalizer, am)
self.am_inference.eval()
print("acoustic model done!")

# vocoder
# model: {model_name}_{dataset}
Expand All @@ -347,7 +342,6 @@ def _init_from_path(
voc_normalizer = ZScore(voc_mu, voc_std)
self.voc_inference = voc_inference_class(voc_normalizer, voc)
self.voc_inference.eval()
print("voc done!")

def preprocess(self, input: Any, *args, **kwargs):
"""
Expand Down
4 changes: 0 additions & 4 deletions paddlespeech/t2s/models/fastspeech2/fastspeech2.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def __init__(
padding_idx=self.padding_idx)

if encoder_type == "transformer":
print("encoder_type is transformer")
self.encoder = TransformerEncoder(
idim=idim,
attention_dim=adim,
Expand All @@ -275,7 +274,6 @@ def __init__(
positionwise_layer_type=positionwise_layer_type,
positionwise_conv_kernel_size=positionwise_conv_kernel_size, )
elif encoder_type == "conformer":
print("encoder_type is conformer")
self.encoder = ConformerEncoder(
idim=idim,
attention_dim=adim,
Expand Down Expand Up @@ -362,7 +360,6 @@ def __init__(
# NOTE: we use encoder as decoder
# because fastspeech's decoder is the same as encoder
if decoder_type == "transformer":
print("decoder_type is transformer")
self.decoder = TransformerEncoder(
idim=0,
attention_dim=adim,
Expand All @@ -380,7 +377,6 @@ def __init__(
positionwise_layer_type=positionwise_layer_type,
positionwise_conv_kernel_size=positionwise_conv_kernel_size, )
elif decoder_type == "conformer":
print("decoder_type is conformer")
self.decoder = ConformerEncoder(
idim=0,
attention_dim=adim,
Expand Down