xiankai123
commited on
Commit
•
f8f5e1d
1
Parent(s):
c5b110a
load a checkpoint that has jpn config
Browse files
app.py
CHANGED
@@ -11,9 +11,9 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
11 |
# load speech translation checkpoint
|
12 |
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=device)
|
13 |
|
14 |
-
# load
|
15 |
-
model = VitsModel.from_pretrained("
|
16 |
-
tokenizer = VitsTokenizer.from_pretrained("
|
17 |
|
18 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
19 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
|
|
11 |
# load speech translation checkpoint
|
12 |
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=device)
|
13 |
|
14 |
+
# load MMS VITS model
|
15 |
+
model = VitsModel.from_pretrained("mms-1b-fl102")
|
16 |
+
tokenizer = VitsTokenizer.from_pretrained("mms-1b-fl102")
|
17 |
|
18 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
19 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|