burraco135 commited on
Commit
f640edc
1 Parent(s): 09bcf49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,13 +6,13 @@ import torch
6
  from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
7
 
8
  checkpoint = "burraco135/speecht5_finetuned_voxpopuli_it"
9
- processor = SpeechT5Processor.from_pretrained(checkpoint)
10
  model = SpeechT5ForTextToSpeech.from_pretrained(checkpoint)
11
- vocoder = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
12
 
13
  def predict(text, speaker):
14
 
15
- speaker_embedding = "speaker_0_embeddings.npy"
16
 
17
  inputs = processor(text=text, return_tensors="pt")
18
 
 
6
  from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
7
 
8
  checkpoint = "burraco135/speecht5_finetuned_voxpopuli_it"
9
+ # processor = SpeechT5Processor.from_pretrained(checkpoint)
10
  model = SpeechT5ForTextToSpeech.from_pretrained(checkpoint)
11
+ vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
12
 
13
  def predict(text, speaker):
14
 
15
+ speaker_embedding = np.load("speaker_0_embeddings.npy")
16
 
17
  inputs = processor(text=text, return_tensors="pt")
18