jbetker commited on
Commit
e2ee843
1 Parent(s): 17af2df
Files changed (2) hide show
  1. api.py +1 -1
  2. eval_multiple.py +3 -3
api.py CHANGED
@@ -138,7 +138,7 @@ class TextToSpeech:
138
  heads=16, number_text_tokens=256, start_text_token=255, checkpointing=False,
139
  train_solo_embeddings=False,
140
  average_conditioning_embeddings=True).cpu().eval()
141
- self.autoregressive.load_state_dict(torch.load('.models/autoregressive.pth'))
142
 
143
  self.clip = VoiceCLIP(dim_text=512, dim_speech=512, dim_latent=512, num_text_tokens=256, text_enc_depth=12,
144
  text_seq_len=350, text_heads=8,
 
138
  heads=16, number_text_tokens=256, start_text_token=255, checkpointing=False,
139
  train_solo_embeddings=False,
140
  average_conditioning_embeddings=True).cpu().eval()
141
+ self.autoregressive.load_state_dict(torch.load('.models/autoregressive_diverse.pth'))
142
 
143
  self.clip = VoiceCLIP(dim_text=512, dim_speech=512, dim_latent=512, num_text_tokens=256, text_enc_depth=12,
144
  text_seq_len=350, text_heads=8,
eval_multiple.py CHANGED
@@ -7,7 +7,7 @@ from utils.audio import load_audio
7
 
8
  if __name__ == '__main__':
9
  fname = 'Y:\\libritts\\test-clean\\transcribed-brief-w2v.tsv'
10
- outpath = 'D:\\tmp\\tortoise-tts-eval\\eval_new_autoregressive'
11
  outpath_real = 'D:\\tmp\\tortoise-tts-eval\\real'
12
 
13
  os.makedirs(outpath, exist_ok=True)
@@ -24,9 +24,9 @@ if __name__ == '__main__':
24
  path = os.path.join(os.path.dirname(fname), line[1])
25
  cond_audio = load_audio(path, 22050)
26
  torchaudio.save(os.path.join(outpath_real, os.path.basename(line[1])), cond_audio, 22050)
27
- sample = tts.tts(transcript, [cond_audio, cond_audio], num_autoregressive_samples=512, k=1,
28
  repetition_penalty=2.0, length_penalty=2, temperature=.5, top_p=.5,
29
- diffusion_temperature=.7, cond_free_k=2, diffusion_iterations=200)
30
 
31
  down = torchaudio.functional.resample(sample, 24000, 22050)
32
  fout_path = os.path.join(outpath, os.path.basename(line[1]))
 
7
 
8
  if __name__ == '__main__':
9
  fname = 'Y:\\libritts\\test-clean\\transcribed-brief-w2v.tsv'
10
+ outpath = 'D:\\tmp\\tortoise-tts-eval\\diverse_auto_256_samp_100_di_4'
11
  outpath_real = 'D:\\tmp\\tortoise-tts-eval\\real'
12
 
13
  os.makedirs(outpath, exist_ok=True)
 
24
  path = os.path.join(os.path.dirname(fname), line[1])
25
  cond_audio = load_audio(path, 22050)
26
  torchaudio.save(os.path.join(outpath_real, os.path.basename(line[1])), cond_audio, 22050)
27
+ sample = tts.tts(transcript, [cond_audio, cond_audio], num_autoregressive_samples=256, k=1,
28
  repetition_penalty=2.0, length_penalty=2, temperature=.5, top_p=.5,
29
+ diffusion_temperature=.7, cond_free_k=2, diffusion_iterations=100)
30
 
31
  down = torchaudio.functional.resample(sample, 24000, 22050)
32
  fout_path = os.path.join(outpath, os.path.basename(line[1]))