mirror of https://github.com/coqui-ai/TTS.git
Fixup
This commit is contained in:
parent
b2682d39c5
commit
92fa988aec
|
@ -369,11 +369,8 @@ class Xtts(BaseTTS):
|
||||||
audios = []
|
audios = []
|
||||||
speaker_embedding = None
|
speaker_embedding = None
|
||||||
for file_path in audio_paths:
|
for file_path in audio_paths:
|
||||||
# load the audio in 24khz to avoid issued with multiple sr references
|
|
||||||
audio = load_audio(file_path, load_sr)
|
audio = load_audio(file_path, load_sr)
|
||||||
audio = audio[:, : load_sr * max_ref_length].to(self.device)
|
audio = audio[:, : load_sr * max_ref_length].to(self.device)
|
||||||
if audio.shape[0] > 1:
|
|
||||||
audio = audio.mean(0, keepdim=True)
|
|
||||||
if sound_norm_refs:
|
if sound_norm_refs:
|
||||||
audio = (audio / torch.abs(audio).max()) * 0.75
|
audio = (audio / torch.abs(audio).max()) * 0.75
|
||||||
if librosa_trim_db is not None:
|
if librosa_trim_db is not None:
|
||||||
|
|
Loading…
Reference in New Issue