Remove torch from requirements

This commit is contained in:
oobabooga
2023-04-06 20:31:04 -03:00
parent e80d0b0160
commit de7fb66d52
2 changed files with 0 additions and 6 deletions

View File

@@ -3,5 +3,3 @@ num2words
omegaconf
pydub
PyYAML
torch
torchaudio

View File

@@ -34,18 +34,15 @@ table = str.maketrans({
'"': """,
})
def xmlesc(txt):
return txt.translate(table)
def load_model():
model, example_text = torch.hub.load(repo_or_dir='snakers4/silero-models', model='silero_tts', language=params['language'], speaker=params['model_id'])
model.to(params['device'])
return model
model = load_model()
def output_modifier(string):
"""
This function is applied to the model outputs.
@@ -73,7 +70,6 @@ def output_modifier(string):
print(string)
if __name__ == '__main__':
import sys
output_modifier(sys.argv[1])