don't print if quiet=True

This commit is contained in:
Chris 2023-11-12 12:26:57 +00:00 committed by GitHub
parent 6f1cba2f81
commit 39aeeedaec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -288,10 +288,13 @@ class Synthesizer(nn.Module):
"You need to define either `text` (for sythesis) or a `reference_wav` (for voice conversion) to use the Coqui TTS API."
)
quiet = kwargs.pop('quiet', False)
if text:
sens = self.split_into_sentences(text)
print(" > Text splitted to sentences.")
print(sens)
if not quiet:
print(" > Text splitted to sentences.")
print(sens)
# handle multi-speaker
if "voice_dir" in kwargs:
@ -488,6 +491,7 @@ class Synthesizer(nn.Module):
# compute stats
process_time = time.time() - start_time
audio_time = len(wavs) / self.tts_config.audio["sample_rate"]
print(f" > Processing time: {process_time}")
print(f" > Real-time factor: {process_time / audio_time}")
if not quiet:
print(f" > Processing time: {process_time}")
print(f" > Real-time factor: {process_time / audio_time}")
return wavs