Codumentor logo Codumentor

Read Aloud Plugin

The Read Aloud plugin adds a "read aloud" action to each assistant message. Clicking it sends the final message text to the shared speech (text-to-speech) service and plays the audio in the browser. It is a play-on-demand action, not a real-time voice mode.

Configuration

plugins:
  - module: codumentor.plugins.read_aloud
    class: ReadAloudPlugin
    # args:
    #   enabled: true   # (default)

Parameters

The plugin has no other settings of its own — it relies on the top-level shared speech: configuration block (the same one the Telegram voice replies use):

speech:
  enabled: true
  base_url: "https://api.openai.com/v1"
  api_key: "${OPENAI_API_KEY}"
  tts_model: "tts-1"
  tts_voice: "alloy"

How It Works

The plugin adds a custom x-read-aloud-action element to the message-actions row (next to the copy button) and exposes a small HTTP API under /ui/plugins/read_aloud:

There are no agent tools and no turn hooks — the action is driven entirely from the UI.

Notes