You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\Артем\VoiceAssistantFYP\venv\Scripts\python.exe C:\Users\Артем\VoiceAssistantFYP\tts.py
Using cache found in C:\Users\Артем/.cache\torch\hub\snakers4_silero-models_master
Contents of the directory: ['v3_en.pt', 'v4_ru.pt']
Traceback (most recent call last):
File "C:\Users\Артем\VoiceAssistantFYP\tts.py", line 15, in
model, _ = torch.hub.load(repo_or_dir='snakers4/silero-models',
File "C:\Users\Артем\VoiceAssistantFYP\venv\lib\site-packages\torch\hub.py", line 566, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File "C:\Users\Артем\VoiceAssistantFYP\venv\lib\site-packages\torch\hub.py", line 595, in _load_local
model = entry(*args, **kwargs)
File "C:\Users\Артем/.cache\torch\hub\snakers4_silero-models_master\src\silero\silero.py", line 88, in silero_tts
imp = package.PackageImporter(model_path)
File "C:\Users\Артем\VoiceAssistantFYP\venv\lib\site-packages\torch\package\package_importer.py", line 95, in init
self.zip_reader = torch._C.PyTorchFileReader(self.filename)
RuntimeError: open file failed because of errno 2 on fopen: No such file or directory, file path: C:\Users\Артем/.cache\torch\hub\snakers4_silero-models_master\src\silero\model\v3_en.pt
Process finished with exit code 1
My code:
import time
import sounddevice as sd
import torch
language = 'en'
model_id = 'v3_en'
sample_rate = 48000 # 48000
speaker = 'en_0'
put_accent = True
put_yo = True
device = torch.device('cpu') # cpu or gpu
text = "Hello Sir! Nice to see you!"
ERROR ITSELF
C:\Users\Артем\VoiceAssistantFYP\venv\Scripts\python.exe C:\Users\Артем\VoiceAssistantFYP\tts.py
Using cache found in C:\Users\Артем/.cache\torch\hub\snakers4_silero-models_master
Contents of the directory: ['v3_en.pt', 'v4_ru.pt']
Traceback (most recent call last):
File "C:\Users\Артем\VoiceAssistantFYP\tts.py", line 15, in
model, _ = torch.hub.load(repo_or_dir='snakers4/silero-models',
File "C:\Users\Артем\VoiceAssistantFYP\venv\lib\site-packages\torch\hub.py", line 566, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File "C:\Users\Артем\VoiceAssistantFYP\venv\lib\site-packages\torch\hub.py", line 595, in _load_local
model = entry(*args, **kwargs)
File "C:\Users\Артем/.cache\torch\hub\snakers4_silero-models_master\src\silero\silero.py", line 88, in silero_tts
imp = package.PackageImporter(model_path)
File "C:\Users\Артем\VoiceAssistantFYP\venv\lib\site-packages\torch\package\package_importer.py", line 95, in init
self.zip_reader = torch._C.PyTorchFileReader(self.filename)
RuntimeError: open file failed because of errno 2 on fopen: No such file or directory, file path: C:\Users\Артем/.cache\torch\hub\snakers4_silero-models_master\src\silero\model\v3_en.pt
Process finished with exit code 1
My code:
import time
import sounddevice as sd
import torch
language = 'en'
model_id = 'v3_en'
sample_rate = 48000 # 48000
speaker = 'en_0'
put_accent = True
put_yo = True
device = torch.device('cpu') # cpu or gpu
text = "Hello Sir! Nice to see you!"
model, _ = torch.hub.load(repo_or_dir='snakers4/silero-models',
model='silero_tts',
language=language,
speaker=model_id)
model.to(device)
plays
def va_speak(what: str):
audio = model.apply_tts(text=what + "..",
speaker=speaker,
sample_rate=sample_rate,
put_accent=put_accent,
put_yo=put_yo)
audio = model.apply_tts(text=text,
speaker=speaker,
sample_rate=sample_rate,
put_accent=put_accent,
put_yo=put_yo)
sd.play(audio, sample_rate)
time.sleep(len(audio) / sample_rate)
sd.stop()
The text was updated successfully, but these errors were encountered: