Spaces:
Runtime error
Runtime error
Commit
·
a732d4f
1
Parent(s):
0237f9a
update sound
Browse files
app.py
CHANGED
@@ -130,6 +130,7 @@ def text_to_speech_loc(text):
|
|
130 |
return audio
|
131 |
|
132 |
def text_to_speech_loc2(Text_input):
|
|
|
133 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
134 |
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
|
135 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
@@ -149,6 +150,7 @@ def text_to_speech_loc2(Text_input):
|
|
149 |
sf.write(audio, speech.numpy(), samplerate=16000)
|
150 |
# audio = sf.write("convert1.wav", speech, samplerate=16000)
|
151 |
print("audio: ", audio)
|
|
|
152 |
return audio
|
153 |
|
154 |
|
|
|
130 |
return audio
|
131 |
|
132 |
def text_to_speech_loc2(Text_input):
|
133 |
+
global Audio_output
|
134 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
135 |
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
|
136 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
|
|
150 |
sf.write(audio, speech.numpy(), samplerate=16000)
|
151 |
# audio = sf.write("convert1.wav", speech, samplerate=16000)
|
152 |
print("audio: ", audio)
|
153 |
+
Audio_output.append(audio.name)
|
154 |
return audio
|
155 |
|
156 |
|