djkesu commited on
Commit
238dfd8
1 Parent(s): 537d84b

loading conditioning latents during voice creation

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -11,6 +11,7 @@ from tortoise.inference import (
11
  run_and_save_tts,
12
  split_and_recombine_text,
13
  )
 
14
  from tortoise.utils.diffusion import SAMPLERS
15
  from app_utils.filepicker import st_file_selector
16
  from app_utils.conf import TortoiseConfig
@@ -75,6 +76,9 @@ def main():
75
  # # Save the conditioning latents and samples
76
  # save_conditioning(voices_dir, voice_samples, conditioning_latents)
77
 
 
 
 
78
  st.session_state["text_input_key"] = str(randint(1000, 100000000))
79
  st.session_state["file_uploader_key"] = str(randint(1000, 100000000))
80
  st.experimental_rerun()
 
11
  run_and_save_tts,
12
  split_and_recombine_text,
13
  )
14
+ from tortoise.api import TextToSpeech
15
  from tortoise.utils.diffusion import SAMPLERS
16
  from app_utils.filepicker import st_file_selector
17
  from app_utils.conf import TortoiseConfig
 
76
  # # Save the conditioning latents and samples
77
  # save_conditioning(voices_dir, voice_samples, conditioning_latents)
78
 
79
+ voice_samples, conditioning_latents = TextToSpeech.get_conditioning_latents(new_voice_name)
80
+ print(voice_samples, conditioning_latents)
81
+
82
  st.session_state["text_input_key"] = str(randint(1000, 100000000))
83
  st.session_state["file_uploader_key"] = str(randint(1000, 100000000))
84
  st.experimental_rerun()