kevinwang676 commited on
Commit
7e1c39f
1 Parent(s): db0f8b7

Update cloning/clonevoice.py

Browse files
Files changed (1) hide show
  1. cloning/clonevoice.py +2 -2
cloning/clonevoice.py CHANGED
@@ -31,7 +31,7 @@ def clone_voice(audio_filepath, dest_filename, progress=gradio.Progress(track_tq
31
  hubert_model = CustomHubert(checkpoint_path='./models/hubert/hubert.pt').to(device)
32
 
33
  # Load the CustomTokenizer model
34
- tokenizer = CustomTokenizer.load_from_checkpoint('./models/hubert/en_tokenizer.pth').to(device) # Automatically uses the right layers
35
 
36
  progress(0.25, desc="Converting WAV")
37
 
@@ -65,4 +65,4 @@ def clone_voice(audio_filepath, dest_filename, progress=gradio.Progress(track_tq
65
  import numpy as np
66
  output_path = dest_filename + '.npz'
67
  np.savez(output_path, fine_prompt=codes, coarse_prompt=codes[:2, :], semantic_prompt=semantic_tokens)
68
- return "Finished"
 
31
  hubert_model = CustomHubert(checkpoint_path='./models/hubert/hubert.pt').to(device)
32
 
33
  # Load the CustomTokenizer model
34
+ tokenizer = CustomTokenizer.load_from_checkpoint('./models/hubert/en_tokenizer.pth').to(device) # change to the correct path
35
 
36
  progress(0.25, desc="Converting WAV")
37
 
 
65
  import numpy as np
66
  output_path = dest_filename + '.npz'
67
  np.savez(output_path, fine_prompt=codes, coarse_prompt=codes[:2, :], semantic_prompt=semantic_tokens)
68
+ return ["Finished", output_path]