Files
Jeremy FowersandClaude 421eabdf6f Serve example HTML demos over localhost instead of opening from disk (#3547)
Opening the HTML examples via file:// sends Origin: null, which lemond's
default allowed_origins rejects. Point the instructions at
python3 -m http.server, as recommended in #3537.


Claude-Session: https://claude.ai/code/session_011VJnULp3V5MJbfmRyZFtMF

Co-authored-by: Claude <[email protected]>
2026-09-11 17:59:19 +00:00
..

Lemonade Examples

Interactive demos that work with Lemonade Server.

Available Demos

Audio Transcription

  • realtime_transcription.py: Stream microphone audio for real-time transcription (+ test mode for WAV files)

LLM Demos

  • llm-debate.html: A debate arena where multiple LLMs can debate each other on any topic
  • multi-model-tester.html: Test prompts across multiple models side-by-side

Image Generation

  • api_image_generation.py: Generate images using the images/generations endpoint

Speech Synthesis (TTS)

  • api_text_to_speech.py: Generate speech from a prompt using audio/speech endpoint

Setup

  1. Install Lemonade Server from the latest release
  2. The server starts automatically after installation.
  3. Pull a model if needed (e.g., lemonade pull Whisper-Tiny)

Running the Examples

Realtime Transcription (Python)

Uses the OpenAI-compatible WebSocket API for real-time speech-to-text.

# Install dependencies
pip install openai websockets pyaudio

# Stream from microphone
python realtime_transcription.py

# Use a different model
python realtime_transcription.py --model Whisper-Small

LLM Demos

Serve the HTML files over localhost, then open them in your browser. Opening them directly from disk (file://) is blocked by the server's default allowed_origins.

cd examples
python3 -m http.server 8080
# then open http://localhost:8080/llm-debate.html or http://localhost:8080/multi-model-tester.html

See debate-arena.md for detailed instructions on the debate demo.