Spaces:
Paused
Paused
Update pipeline.py
Browse files- pipeline.py +6 -6
pipeline.py
CHANGED
@@ -138,16 +138,16 @@ async def transcription_main(output_audio_path, url, headers, lang):
|
|
138 |
khaya_output = result.strip("\"")
|
139 |
|
140 |
# preprocess the output before machine translation
|
141 |
-
paragraph = eval(khaya_output)['text']
|
142 |
-
paragraph = paragraph.strip()
|
143 |
-
sentences = re.split('((?<=[.?!]")|((?<=[.?!])(?!")))\s*', paragraph)
|
144 |
-
sentences = [el.strip() for el in sentences if el]
|
145 |
|
146 |
# replace numbers with words
|
147 |
# sentences = [replace_numbers_with_words(sent) for sent in sentences]
|
148 |
|
149 |
-
return sentences
|
150 |
-
|
151 |
|
152 |
|
153 |
async def convert_text_to_speech(
|
|
|
138 |
khaya_output = result.strip("\"")
|
139 |
|
140 |
# preprocess the output before machine translation
|
141 |
+
#paragraph = eval(khaya_output)['text']
|
142 |
+
#paragraph = paragraph.strip()
|
143 |
+
#sentences = re.split('((?<=[.?!]")|((?<=[.?!])(?!")))\s*', paragraph)
|
144 |
+
#sentences = [el.strip() for el in sentences if el]
|
145 |
|
146 |
# replace numbers with words
|
147 |
# sentences = [replace_numbers_with_words(sent) for sent in sentences]
|
148 |
|
149 |
+
#return sentences
|
150 |
+
return khaya_output
|
151 |
|
152 |
|
153 |
async def convert_text_to_speech(
|