/AltBot

Mastodon Bot for writing alt-text and improving accesibility

Primary LanguageGoOtherNOASSERTION

A decorative banner featuring a repeating pattern of small purple robot icons against a light background, creating a retro-tech wallpaper effect

Altbot アクセシビリティロボット

Making the Fediverse more inclusive, one image at a time

Latest Release Mastodon Follow License: OWL Go Version Status Environment

About

Altbot is an open-source accessibility bot designed to enhance the Fediverse by generating alt-text descriptions for images, video, and audio. This helps make content more accessible to users with visual impairments.

Privacy Note

The current instance of altbot Mastodon Follow is using Google Gemini Flash: If you consent, your media will be uploaded to Google and might be used for training purposes. See also: Gemini Apps Privacy Hub

Your post content is never used. Only images without existing alt-text will be processed.

Disclaimer

Alt-texts are generated using a Large Language Model (LLM). While we strive for accuracy, results may sometimes be factually incorrect. Always double-check the alt-text before using it.

How It Works

Altbot listens for mentions and follows on Mastodon. When it detects a mention or a new post from a followed user, it checks for images without alt-text. If it finds any, it uses a Large Language Model (LLM) to generate descriptive alt-text and replies with the generated text.

Features

  • Mention-Based Alt-Text Generation: Mention @Altbot in a reply to any post containing an image, video, or audio, and Altbot will generate an alt-text description for it.
  • Automatic Alt-Text for Followers: Follow @Altbot, and it will monitor your posts. If you post an image, video, or audio without alt-text, Altbot will automatically generate one for you.
  • Local LLM Support: Use local LLMs via Ollama for generating alt-text descriptions.
  • Consent Requests: Ask for consent from the original poster before generating alt-text when mentioned by non-OP users.
  • Configurable Settings: Easily configure the bot using a TOML file.

Setup

  1. Clone the repository:

    git clone https://github.com/micr0-dev/Altbot.git
    cd Altbot
  2. Run it:

    go run main.go

    The setup wizard will guide you through configuring the essential values required for the bot, including:

    • Your Mastodon server URL, client secret, access token, and bot username.
    • The admin contact handle for moderation notifications.
    • Enabling optional features like metrics and alt-text reminders.

    Alternatively, copy the example configuration file and edit it manually:

    cp example.config.toml config.toml
  3. Run the bot:

    go run main.go

Contributing

We welcome contributions! Please open an issue or submit a pull request with your improvements.

License

This project is licensed under the OVERWORKED LICENSE (OWL) v1.0. See the LICENSE file for details.


Join us in making the Fediverse a more inclusive place for everyone!