-
Notifications
You must be signed in to change notification settings - Fork 14
Description
My Dir "Peter_Test" contains to mono-WAV. I changes the python-file to:
`import argparse
import os
import torch
import torchaudio
from api import TextToSpeech, MODELS_DIR
from utils.audio import load_voices, load_voice
This is the text that will be spoken.
text = """
In the pursuit of success, one must be willing to make sacrifices.,
It is through these sacrifices that we kindle the flame of determination, propelling ourselves towards greatness.,
Each sacrifice serves as a testament to our commitment and unwavering focus on our goals.,"""
Pick a "preset mode" to determine quality. Options: {"ultra_fast", "fast" (default), "standard", "high_quality"}. See docs in api.py
preset = "high_quality"
tts = TextToSpeech()
voice_samples, conditioning_latents = load_voice('Peter_Test')
gen = tts.tts_with_preset(text, voice_samples=voice_samples, conditioning_latents=conditioning_latents,
preset=preset)
torchaudio.save(f'generated-voice4.wav', gen.squeeze(0).cpu(), 24000)`
and got this error
` self.clvp.load_state_dict(torch.load(get_model_path('clvp2.pth', models_dir)))
Traceback (most recent call last):
File "E:\AI\Tortoise\tortoise-WebUI\tortoise\my_voice_test.py", line 19, in
tts = TextToSpeech()
File "E:\AI\Tortoise\tortoise-WebUI\tortoise\api.py", line 259, in init
self.clvp.load_state_dict(torch.load(get_model_path('clvp2.pth', models_dir)))
File "C:\Users\peter\AppData\Local\conda\conda\envs\TTS\lib\site-packages\torch\serialization.py", line 1326, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "C:\Users\peter\AppData\Local\conda\conda\envs\TTS\lib\site-packages\torch\serialization.py", line 671, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
(TTS) E:\AI\Tortoise\tortoise-WebUI\tortoise>python my_voice_test.py`