Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -54,7 +54,8 @@ def merge_audio_video(entities_num, resize_img_list, text_input):
|
|
| 54 |
|
| 55 |
#Convert text to speech using facebook's latest model from HF hub
|
| 56 |
speech = text2speech(text_input)
|
| 57 |
-
print(type(speech))
|
|
|
|
| 58 |
wav_audio = AudioSegment.from_file(speech, "flac") #("/content/gdrive/My Drive/AI/audio1.flac", "flac")
|
| 59 |
#convert flac to mp3 audio format
|
| 60 |
print('flac audio read', type(wav_audio))
|
|
@@ -95,7 +96,10 @@ fastspeech = gr.Interface.load("huggingface/facebook/fastspeech2-en-ljspeech")
|
|
| 95 |
|
| 96 |
def text2speech(text):
|
| 97 |
print('inside testtospeech')
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
def engine(text_input):
|
| 101 |
print(" ** Inside Enngine **")
|
|
|
|
| 54 |
|
| 55 |
#Convert text to speech using facebook's latest model from HF hub
|
| 56 |
speech = text2speech(text_input)
|
| 57 |
+
print('type of speech : ',type(speech))
|
| 58 |
+
print(speech)
|
| 59 |
wav_audio = AudioSegment.from_file(speech, "flac") #("/content/gdrive/My Drive/AI/audio1.flac", "flac")
|
| 60 |
#convert flac to mp3 audio format
|
| 61 |
print('flac audio read', type(wav_audio))
|
|
|
|
| 96 |
|
| 97 |
def text2speech(text):
|
| 98 |
print('inside testtospeech')
|
| 99 |
+
speech = fastspeech(text)
|
| 100 |
+
print(type(speech))
|
| 101 |
+
print(speech)
|
| 102 |
+
return speech
|
| 103 |
|
| 104 |
def engine(text_input):
|
| 105 |
print(" ** Inside Enngine **")
|