Update app.py
Browse files
app.py
CHANGED
@@ -52,8 +52,8 @@ def load_summarization_model():
|
|
52 |
def process_audio(audio_file, translate=False):
|
53 |
"""Process audio file"""
|
54 |
transcriber = ChunkedTranscriber(chunk_size=5, overlap=1)
|
55 |
-
|
56 |
-
return
|
57 |
# try:
|
58 |
# processor = AudioProcessor()
|
59 |
# language_segments, final_segments = processor.process_audio(audio_file, translate)
|
@@ -159,7 +159,7 @@ with gr.Blocks() as iface:
|
|
159 |
outputs=[translation_output, full_text_output]
|
160 |
# outputs=[ASR_RESULT]
|
161 |
)
|
162 |
-
|
163 |
# translated_text = ''.join(item['translated'] for item in ASR_RESULT if 'translated' in item)
|
164 |
summarize_button.click(
|
165 |
summarize_text,
|
|
|
52 |
def process_audio(audio_file, translate=False):
|
53 |
"""Process audio file"""
|
54 |
transcriber = ChunkedTranscriber(chunk_size=5, overlap=1)
|
55 |
+
_translation, _output = transcriber.transcribe_audio(audio_file, translate=True)
|
56 |
+
return _translation, _output
|
57 |
# try:
|
58 |
# processor = AudioProcessor()
|
59 |
# language_segments, final_segments = processor.process_audio(audio_file, translate)
|
|
|
159 |
outputs=[translation_output, full_text_output]
|
160 |
# outputs=[ASR_RESULT]
|
161 |
)
|
162 |
+
logger.info(f"\n\n {translation_output} \n\n {full_text_output}\n\n")
|
163 |
# translated_text = ''.join(item['translated'] for item in ASR_RESULT if 'translated' in item)
|
164 |
summarize_button.click(
|
165 |
summarize_text,
|