Skip to content

Commit

Permalink
Fixes floating point gpt conditioning lenghts.
Browse files Browse the repository at this point in the history
  • Loading branch information
SinanAkkoyun committed Aug 14, 2024
1 parent dbf1a08 commit 059719a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TTS/tts/models/xtts.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ def get_gpt_cond_latents(self, audio, sr, length: int = 30, chunk_length: int =
audio = audio[:, : 22050 * length]
if self.args.gpt_use_perceiver_resampler:
style_embs = []
for i in range(0, audio.shape[1], 22050 * chunk_length):
audio_chunk = audio[:, i : i + 22050 * chunk_length]
for i in range(0, audio.shape[1], int(22050 * chunk_length)):
audio_chunk = audio[:, i : i + int(22050 * chunk_length)]

# if the chunk is too short ignore it
if audio_chunk.size(-1) < 22050 * 0.33:
Expand Down

0 comments on commit 059719a

Please sign in to comment.