Просмотр исходного кода

Remove T2ST task from audio resampling and add ASR and S2TT (#276)

* audio should not resample for T2ST task

* resample audio input for S2TT and ASR task

---------

Co-authored-by: Ye Yint Htoon <yeyinthtoon.yyh@gmail.com>
yeyinthtoon 1 год назад
Родитель
Сommit
5807362d14
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/seamless_communication/cli/m4t/predict/predict.py

+ 1 - 1
src/seamless_communication/cli/m4t/predict/predict.py

@@ -215,7 +215,7 @@ def main() -> None:
     )
 
     # If the input is audio, resample to 16kHz
-    if args.task.upper() in {"S2ST", "T2ST"}:
+    if args.task.upper() in {"S2ST", "ASR", "S2TT"}:
         wav, sample_rate = torchaudio.load(args.input)
         translator_input = torchaudio.functional.resample(
             wav, orig_freq=sample_rate, new_freq=16_000