A voice-first trivia game with category selection, multi-question rounds, answer grading, and persistent best-score tracking.
- Category-based trivia (or random/general knowledge mode)
- Configurable question count (1-10; defaults to 3 when unclear)
- Multiple-choice question flow (A/B/C/D)
- Flexible answer parsing:
- letter answers (
A,B, etc.) - spoken option text matching
- LLM fallback grading for ambiguous answers
- letter answers (
- Trigger-echo protection for cleaner first-turn behavior
- Exit word handling (
stop,exit,quit, etc.) - Persistent best score storage across sessions
- Python 3.8+
- OpenHome runtime (
src.agent,src.main) - No external API keys required
- Place this folder under
community/vibe-trivia/. - Install or enable the ability in the OpenHome dashboard.
- Set the ability's unique name and trigger words in the OpenHome dashboard.
The ability is activated via configured hotwords (for example: start vibe trivia, trivia time, quiz me).
User triggers ability
│
▼
Ask category (or random)
│
▼
Ask number of questions (1-10)
│
▼
Confirm start
│
▼
Generate quiz questions via LLM (JSON array)
│
▼
Ask each question, grade answer, keep score
│
▼
Read final score + update best score file
│
▼
resume_normal_flow()
- Questions are generated with
text_to_text_response()using a strict JSON prompt. - Returned JSON is cleaned and validated before use.
- Answer grading order:
- detect direct letter (
A/B/C/D) - match spoken answer text to options
- fallback LLM yes/no grading if needed
- detect direct letter (
- Used for question generation and ambiguous answer judging.
- No external API integration and no hardcoded keys in this Ability.
- Best score persisted in
vibe_trivia_best_score.json. - Uses:
check_if_file_exists(...)read_file(...)write_file(...)
Recommended triggers:
start vibe triviavibe triviatrivia timequiz meplay triviastart a quiz
Best score is stored per user in:
vibe_trivia_best_score.json
The ability compares current score percentage vs previous best and announces whether a new best score was achieved.
Users can end at any time with:
stop,exit,quit,cancel,done,bye,goodbye
Logs are written via worker.editor_logging_handler with [VibeTrivia] prefixes for:
- generation/parse failures
- retry attempts
- persistence read/write errors
- Designed for short spoken prompts and robust STT handling.
- Uses
session_taskspatterns and callsresume_normal_flow()on exit paths.