
Recognises the text in a single cropped Image line with a TrOCR vision encoder-decoder and emits either a bare String transcript or a {text: String, confidence: Double} record pairing the transcript with the mean per-token recogniser score.
Crop one text line from a page, recognise it, and post the transcript over HTTP.
Recognise lines from a cropped image region and summarise the running text with a text model.
String transcript, a consumer that also needs a score pins the {text: String, confidence: Double} record whose `confidence` is the mean per-token recogniser score in `0..1`.num_beams widens the search for accuracy at higher latency, and max_tokens bounds the recognised line length.model must resolve to a TrOCR vision encoder-decoder bundle (the printed or handwritten checkpoint matching the input style); an encoder-only or unrelated checkpoint fails to load.device requesting CUDA resolves to CPU when no compatible accelerator is visible at startup; inference continues at CPU latency.Automated release