Skip to content

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

Open
Mr-Neutr0n wants to merge 1 commit into
facebookresearch: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 into
facebookresearch:mainfrom
Mr-Neutr0n:fix/cli-missing-task-choices

Conversation

@Mr-Neutr0n

Copy link
Copy Markdown

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
Copy Markdown
Author

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

@Mr-Neutr0n

Copy link
Copy Markdown
Author

Hi! Quick status: this still applies cleanly to the latest main as of today, and the PR is still mergeable. Re-requesting a review. If this looks good now, I would be happy to see it merged; if the repo has moved on, I am just as happy to close it.

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

2 participants