Skip to content

Commit

Permalink
Fix trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Dec 13, 2023
1 parent e82a0aa commit 522cbe6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TTS/demos/xtts_ft_demo/utils/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def format_audio_list(audio_files, target_language="en", out_path=None, buffer=0
os.makedirs(out_path, exist_ok=True)

# Loading Whisper
device = "cuda" if torch.cuda.is_available() else "cpu"
device = "cuda" if torch.cuda.is_available() else "cpu"

print("Loading Whisper Model!")
asr_model = WhisperModel("large-v2", device=device, compute_type="float16")
Expand Down
4 changes: 2 additions & 2 deletions TTS/demos/xtts_ft_demo/xtts_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def run_tts(lang, tts_text, speaker_audio_file):



# define a logger to redirect
# define a logger to redirect
class Logger:
def __init__(self, filename="log.out"):
self.log_file = filename
Expand Down Expand Up @@ -109,7 +109,7 @@ def read_logs():
description="""XTTS fine-tuning demo\n\n"""
"""
Example runs:
python3 TTS/demos/xtts_ft_demo/xtts_demo.py --port
python3 TTS/demos/xtts_ft_demo/xtts_demo.py --port
""",
formatter_class=argparse.RawTextHelpFormatter,
)
Expand Down
2 changes: 1 addition & 1 deletion TTS/tts/models/xtts.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_gpt_cond_latents(self, audio, sr, length: int = 30, chunk_length: int =
for i in range(0, audio.shape[1], 22050 * chunk_length):
audio_chunk = audio[:, i : i + 22050 * chunk_length]

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

Expand Down

0 comments on commit 522cbe6

Please sign in to comment.