Bug report - model can only be called once. #245
-
🐛 BugModel can only be called once, and then hangs on second call. To ReproduceSteps to reproduce the behavior: import time
import torch
language = 'en'
model_id = 'v3_en'
speaker = 'en_5' # en_0, en_1, ..., en_117, random
sample_rate = 48000
silero_model, _ = torch.hub.load(
repo_or_dir='snakers4/silero-models',
model='silero_tts',
language=language,
speaker=model_id
)
device = 'cpu'
silero_model.to(device) # gpu or cpu
def _get_wave(text):
return silero_model.apply_tts(text=text, speaker=speaker, sample_rate=sample_rate)
start = time.time()
print('Audio 1:', _get_wave('Hello, my name is John.'))
print('Elapsed time:', time.time() - start)
start = time.time()
print('Audio 2:', _get_wave('Hello, my name is NOT John.'))
print('Elapsed time:', time.time() - start) This outputs:
and then never outputs the second evaluation. Expected behaviorMultiple model calls should produce output, perhaps with subsequent calls being in fact faster than the first. EnvironmentPlease copy and paste the output from this
|
Beta Was this translation helpful? Give feedback.
Answered by
snakers4
Aug 25, 2023
Replies: 1 comment 2 replies
-
This helps? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
snakers4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helps?
#195