# V5
import os
import torch
device = torch.device('cpu')
torch.set_num_threads(1)
local_file = 'model.pt'
if not os.path.isfile(local_file):
torch.hub.download_url_to_file('https://models.silero.ai/models/tts/ru/v5_ru.pt',
local_file)
model = torch.package.PackageImporter(local_file).load_pickle("tts_models", "model")
model.to(device)
with open('in.txt', 'r', encoding='utf-8') as f:
example_text = f.read()
sample_rate = 48000
speaker='baya'
audio_paths = model.save_wav(text=example_text,
speaker=speaker,
sample_rate=sample_rate)
I'm using this script on Linux:
python3 ./silero.pyHow can I reduce the sound speed by 10%?