Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,9 @@ def guessanAge(model, image):
|
|
26 |
|
27 |
@spaces.GPU(duration=120)
|
28 |
def text2speech(model, text, voice):
|
29 |
-
print(voice)
|
30 |
if len(text) > 0:
|
31 |
-
synthesiser = pipeline("text-to-speech", model=
|
32 |
|
33 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
34 |
speaker_embedding = torch.tensor(embeddings_dataset[voice]["xvector"]).unsqueeze(0)
|
|
|
26 |
|
27 |
@spaces.GPU(duration=120)
|
28 |
def text2speech(model, text, voice):
|
29 |
+
print(model, text, voice)
|
30 |
if len(text) > 0:
|
31 |
+
synthesiser = pipeline("text-to-speech", model="microsoft/speecht5_tts")
|
32 |
|
33 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
34 |
speaker_embedding = torch.tensor(embeddings_dataset[voice]["xvector"]).unsqueeze(0)
|