소스 검색

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 년 전
부모
커밋
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