TranscriptCallback.
Registering the callback
Event types
JSON schema
Example: print finalised text
JSON library.
nlohmann/json is used in examples for brevity. Any JSON library works. Always wrap parsing in try/catch.