Skip to content

fix: add missing T2TT and T2ST task choices to CLI predict#572

Open
Mr-Neutr0n wants to merge 1 commit intofacebookresearch:mainfrom
Mr-Neutr0n:fix/cli-missing-task-choices
Open

fix: add missing T2TT and T2ST task choices to CLI predict#572
Mr-Neutr0n wants to merge 1 commit intofacebookresearch:mainfrom
Mr-Neutr0n:fix/cli-missing-task-choices

Conversation

@Mr-Neutr0n
Copy link

Summary

The CLI predict command only accepts ASR, S2ST, and S2TT as task choices, but the underlying Translator.predict() supports all five tasks including T2TT (text-to-text translation) and T2ST (text-to-speech translation).

The main() function already handles text input tasks correctly — it checks for T2ST at the output path validation and routes text input through the else branch — but argparse rejects T2TT and T2ST at argument validation before the code can run.

Changes

  • Added T2TT and T2ST to the --task argument choices
  • Updated help text to document all five supported tasks
  • Added validation requiring --src_lang for text input tasks (T2TT, T2ST)

Fixes #476

The CLI predict command only accepts ASR, S2ST, and S2TT as task
choices, but the underlying Translator.predict() supports T2TT
(text-to-text translation) and T2ST (text-to-speech translation).
The main() function already handles these tasks correctly (lines
204, 227-233), but argparse rejects them at argument validation.

Add T2TT and T2ST to the choices list, update the help text, and
add a validation check requiring src_lang for text input tasks.

Fixes facebookresearch#476
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 9, 2026
@Mr-Neutr0n
Copy link
Author

Friendly bump! Let me know if there's anything I should update or improve to help move this forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T2TT not works

1 participant