Add logging message
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
import numpy as np
|
3 |
import torch
|
4 |
from datasets import load_dataset
|
@@ -34,6 +35,7 @@ def synthesise(text):
|
|
34 |
|
35 |
def speech_to_speech_translation(audio):
|
36 |
translated_text = translate(audio)
|
|
|
37 |
synthesised_speech = synthesise(translated_text)
|
38 |
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
39 |
return 16000, synthesised_speech
|
|
|
1 |
import gradio as gr
|
2 |
+
import logging
|
3 |
import numpy as np
|
4 |
import torch
|
5 |
from datasets import load_dataset
|
|
|
35 |
|
36 |
def speech_to_speech_translation(audio):
|
37 |
translated_text = translate(audio)
|
38 |
+
logging.info(f"Translated Text: {translated_text}")
|
39 |
synthesised_speech = synthesise(translated_text)
|
40 |
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
41 |
return 16000, synthesised_speech
|