siddhartharya's picture
Update utils.py
af743db verified
raw
history blame
1.37 kB
runtime error
Exit code: 1. Reason: Traceback (most recent call last):
File "/home/user/app/app.py", line 2, in <module>
from utils import generate_script, generate_audio, truncate_text
File "/home/user/app/utils.py", line 17, in <module>
tts_male = pipeline("text-to-speech", model="microsoft/speecht5_tts", device="cpu")
File "/usr/local/lib/python3.10/site-packages/transformers/pipelines/__init__.py", line 999, in pipeline
tokenizer = AutoTokenizer.from_pretrained(
File "/usr/local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 907, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/usr/local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1637, in __getattribute__
requires_backends(cls, cls._backends)
File "/usr/local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1625, in requires_backends
raise ImportError("".join(failed))
ImportError:
SpeechT5Tokenizer requires the SentencePiece library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/google/sentencepiece#installation and follow the ones
that match your environment. Please note that you may need to restart your runtime after installation.