From b534f9d2497f921b17ec6f011b3595de491b8d94 Mon Sep 17 00:00:00 2001 From: Aaron Boxer Date: Fri, 17 Apr 2026 09:31:38 -0400 Subject: [PATCH] Clarify --translate vs --enable_translation CLI flags - --translate: Whisper built-in to-English translation (task=translate) - --enable_translation: M2M100 any-to-any translation backend - Added warning when both flags are used simultaneously - Updated help text to distinguish the two features --- run_client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/run_client.py b/run_client.py index 1c2ce14..dc29423 100644 --- a/run_client.py +++ b/run_client.py @@ -33,7 +33,8 @@ if __name__ == '__main__': help='Language code for transcription, e.g., "en" for English.') parser.add_argument('--translate', '-t', action='store_true', - help='Enable translation of the transcription output.') + help='Use Whisper built-in translation to English (sets task=translate). ' + 'For any-to-any translation, use --enable_translation instead.') parser.add_argument('--mute_audio_playback', '-a', action='store_true', help='Mute audio playback during transcription.') @@ -42,7 +43,7 @@ if __name__ == '__main__': help='Save the output recording, only used for microphone input.') parser.add_argument('--enable_translation', action='store_true', - help='Enable translation of the transcription output.') + help='Enable any-to-any translation via M2M100 model (separate from Whisper --translate).') parser.add_argument('--target_language', '-tl', type=str, default='fr', @@ -57,6 +58,12 @@ if __name__ == '__main__': args = parser.parse_args() + if args.translate and args.enable_translation: + print("[WARN]: Both --translate and --enable_translation are set. " + "--translate uses Whisper's built-in to-English translation, " + "while --enable_translation uses M2M100 for any-to-any. " + "Both will be active.") + client = TranscriptionClient( args.server, args.port,