Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,6 @@ def preprocess_audio(input_audio: str) -> None:
|
|
57 |
gr.Warning(f"Input audio is too long. Only the first {MAX_INPUT_AUDIO_LENGTH} seconds is used.")
|
58 |
torchaudio.save(input_audio, new_arr, sample_rate=int(AUDIO_SAMPLE_RATE))
|
59 |
|
60 |
-
@spaces.GPU
|
61 |
def run_s2tt(input_audio: str, source_language: str, target_language: str) -> str:
|
62 |
# preprocess_audio(input_audio)
|
63 |
# source_language_code = LANGUAGE_NAME_TO_CODE[source_language]
|
@@ -71,7 +70,6 @@ def run_s2tt(input_audio: str, source_language: str, target_language: str) -> st
|
|
71 |
|
72 |
return tokenizer.decode(text_out, clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
73 |
|
74 |
-
@spaces.GPU
|
75 |
def run_asr(input_audio: str, target_language: str) -> str:
|
76 |
# preprocess_audio(input_audio)
|
77 |
target_language_code = LANGUAGE_NAME_TO_CODE[target_language]
|
|
|
57 |
gr.Warning(f"Input audio is too long. Only the first {MAX_INPUT_AUDIO_LENGTH} seconds is used.")
|
58 |
torchaudio.save(input_audio, new_arr, sample_rate=int(AUDIO_SAMPLE_RATE))
|
59 |
|
|
|
60 |
def run_s2tt(input_audio: str, source_language: str, target_language: str) -> str:
|
61 |
# preprocess_audio(input_audio)
|
62 |
# source_language_code = LANGUAGE_NAME_TO_CODE[source_language]
|
|
|
70 |
|
71 |
return tokenizer.decode(text_out, clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
72 |
|
|
|
73 |
def run_asr(input_audio: str, target_language: str) -> str:
|
74 |
# preprocess_audio(input_audio)
|
75 |
target_language_code = LANGUAGE_NAME_TO_CODE[target_language]
|