Spaces:
Runtime error
Runtime error
Commit
·
f93be97
1
Parent(s):
40fa455
correct text
Browse files
app.py
CHANGED
@@ -124,12 +124,12 @@ def text_to_speech_loc(text):
|
|
124 |
print("audio: ", audio)
|
125 |
return audio
|
126 |
|
127 |
-
def text_to_speech_loc2(
|
128 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
129 |
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
|
130 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
131 |
|
132 |
-
inputs = processor(text, return_tensors="pt")
|
133 |
|
134 |
# load xvector containing speaker's voice characteristics from a dataset
|
135 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
|
|
124 |
print("audio: ", audio)
|
125 |
return audio
|
126 |
|
127 |
+
def text_to_speech_loc2(Text_input):
|
128 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
129 |
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
|
130 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
131 |
|
132 |
+
inputs = processor(text = Text_input, return_tensors="pt")
|
133 |
|
134 |
# load xvector containing speaker's voice characteristics from a dataset
|
135 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|