mirror of
https://github.com/lemonade-sdk/lemonade.git
synced 2026-11-22 19:49:40 -10:00
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]>
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/generationsendpoint
Speech Synthesis (TTS)
- api_text_to_speech.py: Generate speech from a prompt using
audio/speechendpoint
Setup
- Install Lemonade Server from the latest release
- The server starts automatically after installation.
- 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.