diff --git a/TTS/tts/layers/tortoise/tokenizer.py b/TTS/tts/layers/tortoise/tokenizer.py index 3969b2cc32..0adc6e308d 100644 --- a/TTS/tts/layers/tortoise/tokenizer.py +++ b/TTS/tts/layers/tortoise/tokenizer.py @@ -5,9 +5,12 @@ from TTS.tts.utils.text.cleaners import english_cleaners +DEFAULT_VOCAB_FILE = os.path.join( + os.path.dirname(os.path.realpath(__file__)), "../../utils/assets/tortoise/tokenizer.json" +) class VoiceBpeTokenizer: - def __init__(self, vocab_file=None, vocab_str=None): + def __init__(self, vocab_file=DEFAULT_VOCAB_FILE, vocab_str=None): self.tokenizer = None if vocab_file is not None: self.tokenizer = Tokenizer.from_file(vocab_file)