jbetker commited on
Commit
a05af09
1 Parent(s): 2a67565

update read to output concatenated audio

Browse files
Files changed (2) hide show
  1. read.py +6 -1
  2. results/texts.txt +0 -22
read.py CHANGED
@@ -67,7 +67,12 @@ if __name__ == '__main__':
67
  for cond_path in cond_paths:
68
  c = load_audio(cond_path, 22050)
69
  conds.append(c)
 
70
  for j, text in enumerate(texts):
71
  gen = tts.tts_with_preset(text, conds, preset=args.preset, clvp_cvvp_slider=args.voice_diversity_intelligibility_slider)
72
- torchaudio.save(os.path.join(voice_outpath, f'{j}.wav'), gen.squeeze(0).cpu(), 24000)
 
 
 
 
73
 
 
67
  for cond_path in cond_paths:
68
  c = load_audio(cond_path, 22050)
69
  conds.append(c)
70
+ all_parts = []
71
  for j, text in enumerate(texts):
72
  gen = tts.tts_with_preset(text, conds, preset=args.preset, clvp_cvvp_slider=args.voice_diversity_intelligibility_slider)
73
+ gen = gen.squeeze(0).cpu()
74
+ torchaudio.save(os.path.join(voice_outpath, f'{j}.wav'), gen, 24000)
75
+ all_parts.append(gen)
76
+ full_audio = torch.cat(all_parts, dim=-1)
77
+ torchaudio.save(os.path.join(voice_outpath, 'combined.wav'), full_audio, 24000)
78
 
results/texts.txt DELETED
@@ -1,22 +0,0 @@
1
- bengio_it_needs_to_know_what_is_bad|and so it needs to know what is bad. what is morally wrong? what is socially acceptable? i think we'll manage to train computers to understand this, but it is going to take awhile.
2
- gatsby_and_so_we_beat_on|and so we beat on, boats against the current, borne back ceaselessly into the past.
3
- harrypotter_differences_of_habit_and_language|differences of habit and language are nothing at all, if our aims are identical and our hearts are open.
4
- i_am_a_language_model|i am a language model that has learned to speak.
5
- real_courage_is_when_you_know_your_licked|real courage is when you know you are licked before you begin, but you begin anyway and see it through no matter what.
6
- frost_road_not_taken|then took the other, as just as fair, and having perhaps the better claim, because it was grassy and wanted wear.
7
- frost_oar_to_oar|cannot be parted nor swept away, for one another once you are agreed, that life is only life forevermore, together wing to wing and oar to oar.
8
- dickinson_stop_for_death|because i could not stop for death, he kindly stopped for me, the carriage held but just ourselves, and immortality.
9
- spongebob_stubbed_my_toe|i'll have you know that i stubbed my toe last week and only cried for 20 minutes.
10
- watts_this_is_the_real_secret_of_life|this is the real secret of life - to be completely engaged with what you are doing in the here and now, and instead of calling it work, realize it is play.
11
- wilde_nowadays_people_know_the_price|nowadays the people know the price of everything and the value of nothing.
12
- melodie_kao|instead of molten iron, jupiter and brown dwarfs have hydrogen, which is under so much pressure that it develops metallic properties.
13
- nyt_covid|the ballooning death toll has defied the hopes of many americans that the less severe omicron variant would spare the country the pain of past waves.
14
- spacecraft_interview|i cannot provide, unfortunately, really any details whatsoever, which is really frustrating to me in one regard because then i’m not able to accurately communicate the kind of capability this is going to deliver on orbit.
15
- autoregressive_ml|once you have the first token, you want to predict the second token given the input and the first token using multi-head attention.
16
- rolling_stone_review|the bleary distortion that opens n d a sets the tone: this is a song about life as a disconnected blur of new-fame isolation.
17
- espn_basketball|bane picks up his dribble, takes two long strides down the middle of the floor and lofts a pass high over stanley johnson.
18
- obama_govt|if the people cannot trust their government to do the job for which it exists - to protect them and to promote their common welfare - all else is lost.
19
- tacotron2_sample1|the essential point, to be remembered, is that the ornament - whatever it is - whether picture or patternwork, should form part of the page.
20
- tacotron2_sample2|there is a way to measure the acute emotional intelligence that has never gone out of style.
21
- tacotron2_sample3|president trump met with other leaders at the group of 20 conference.
22
- tacotron2_sample4|the senates bill to repeal and replace the affordable care act is now imperiled.