mirror of https://github.com/coqui-ai/TTS.git
Skip phoneme cache pre-compute if the path exists
This commit is contained in:
parent
70a4c6f16c
commit
d9e18e009b
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from coqpit import Coqpit
|
||||
from torch import nn
|
||||
|
@ -184,7 +184,11 @@ class BaseTTS(BaseModel):
|
|||
else None,
|
||||
)
|
||||
|
||||
if config.use_phonemes and config.compute_input_seq_cache:
|
||||
if (
|
||||
config.use_phonemes
|
||||
and config.compute_input_seq_cache
|
||||
and not os.path.exists(dataset.phoneme_cache_path)
|
||||
):
|
||||
# precompute phonemes to have a better estimate of sequence lengths.
|
||||
dataset.compute_input_seq(config.num_loader_workers)
|
||||
dataset.sort_items()
|
||||
|
|
Loading…
Reference in New Issue