
Translates a String or a [String] batch with a Helsinki-NLP Opus-MT (MarianMT) checkpoint and emits text, a list, or a Translation per the resolved output. The language pair is fixed by the bound checkpoint; light enough for CPU.
Many-to-English file translation on CPU, written back to a text file.
Translate transcribed speech to another language before delivery.
model file slot, not by config. A direct-pair checkpoint (such as English-to-German) and a many-to-English checkpoint keep tgt_lang empty; only a multi-target checkpoint needs tgt_lang set to an ISO-639-3 code, prepended internally as a `>>id<<` routing token.device rebuilds the loaded checkpoint in place, so the first call after a change pays the load cost; changing tgt_lang takes effect on the next call with no rebuild.batch_size bounds memory on a [String] input; num_beams 1 is greedy decoding while higher values trade latency for quality, capped by max_new_tokens.String joins all segments, a [String] keeps them split, and the Translation arms tag both language fields with the tgt_lang label (the bilingual checkpoint exposes no source code).Automated release