Skip to main content

clicue

Speech-Driven Live Teleprompter Scroller for Screenplays & Scripts

clicue is a lightweight, high-performance terminal teleprompter that list-scrolls Fountain screenplays and markdown documents live as you speak. Powered by local speech recognition engines and rapid fuzzy matching, clicue anchors your reading position with zero line reflow and ultra-low latency.


✨ Features

  • 🎙️ Speech-Driven Auto-Scrolling: Follows your voice live in real-time as you read your script.
  • 🔒 100% Private & Local: Runs entirely on your local machine CPU using local C++ engines (Faster-Whisper via CTranslate2 or Vosk). Zero audio data is sent to external servers.
  • 📜 Fountain & Markdown Parser: Native support for Fountain screenplay formatting (Scene Headings, Character Cues, Parentheticals) and Markdown (*italics*, _italics_, **bold**, `code`).
  • 📺 Zero-Reflow Line-Anchored TUI: Displays 1 line of previous context at the top and maximizes upcoming line visibility for an unobstructed reading experience.
  • ⚡ Instant TUI Hotkeys: Non-blocking keyboard controls for instant restart (r), pause (Space), seeking (Left/Right), and real-time latency debug overlay (d).
  • 🔁 Last-Script Memory: Re-open and continue your active script instantly with clicue -c.
  • 📊 Performance Telemetry: Built-in high-resolution performance logger (clicue logs) with automatic 7-day date-stamped file auto-purge.
  • 🔄 Built-in Self-Updater: Keep clicue up-to-date with clicue self-up.

🏗️ Local Audio Processing Pipeline Architecture

All audio capture and speech recognition run 100% locally on your machine.

flowchart LR
    A["🎙️ Mic Input (sounddevice 16kHz)"] --> B["⚡ 0.001ms RMS Silence Gate"]
    B -- Silence (rms < 0.003) --> C["Discard Silence (0% CPU)"]
    B -- Active Speech --> D["🎚️ Peak Gain Normalization"]
    D --> E["🧠 Local Neural STT Engine (Faster-Whisper int8 / Vosk)"]
    E --> F["🎯 Fuzzy String Aligner (rapidfuzz)"]
    F --> G["🖥️ Zero-Reflow TUI Scroller (Rich Live)"]

Pipeline Workflow:

  1. Microphone Capture: Captures 16kHz float32 audio blocks locally via sounddevice.
  2. RMS Energy Silence Gate: A 0.001ms instantaneous root-mean-square (RMS) check filters out ambient noise and room silence before invoking the neural network, keeping idle CPU usage < 0.5%.
  3. Peak Gain Normalization: Dynamically normalizes low-volume speech, boosting recognition accuracy for quiet speakers or low-gain USB microphones.
  4. Local Neural STT: Speech buffers pass through local C++ inference models (Faster-Whisper quantized int8 CPU engine or Vosk Kaldi engine).
  5. Sub-Millisecond Fuzzy Alignment: Utterance text is matched against script words using rapidfuzz with a distance-penalized locality window (~0.06ms per match).
  6. Memoized Line-Anchored TUI: Rendered via rich Live display with memoized line wrapping to prevent unnecessary Python allocations.

🚀 Installation

Install clicue globally using uv or pipx:

# Recommended (using uv):
uv tool install clicue

# Using pip:
pip install clicue

To update clicue to the latest PyPI release at any time:

clicue self-up
# or
uv tool upgrade clicue

📖 Usage & Examples

# Open a Fountain script (.fountain, .fountain.md, or .md) with default Vosk STT engine:
clicue script.fountain

# Use Faster-Whisper neural STT engine:
clicue script.fountain --whisper

# Open a Fountain markdown script:
clicue script.fountain.md

# Re-open and continue the last-used script:
clicue -c

# Continue last script with Faster-Whisper and live latency debug header:
clicue -c --whisper -d

# Inspect downloaded speech recognition models:
clicue models

# Inspect date-stamped performance log sessions:
clicue logs

🎮 Live TUI Keyboard Controls

While clicue is running, the keyboard is monitored with zero-latency non-blocking input:

Key Shortcut Action
r / 0 / Home Instant Restart: Resets teleprompter cursor to word 0 and flushes audio buffers.
q / Esc Instant Quit: Exits clicue immediately.
Space / p Pause / Resume: Toggles auto-scrolling pause state.
Left / b Seek Backward: Moves cursor back 5 words.
Right / f Seek Forward: Moves cursor forward 5 words.
d Toggle Debug Overlay: Displays live STT, Aligner, and Render latency stats in header.

🛠️ CLI Options Reference

USAGE:
  clicue <script.fountain | script.md> [options]
  clicue -c | --continue [options]
  cat script.fountain | clicue [options]

ARGUMENTS & OPTIONS:
  script                Path to script file (.fountain, .fountain.md, .md, or '-' for stdin).
  -c, --continue        Re-open and continue the last-used script file.
  --whisper             Shortcut for Faster-Whisper neural STT engine.
  --engine <name>        STT engine plugin ('vosk' or 'whisper'). Default: vosk.
  --model <name>         Model shortcut ('vosk-small', 'vosk-full', 'base.en', 'tiny.en').
  -d, --debug           Display real-time STT, Aligner, and Render latency in header.
  --perf-log            Enable date-stamped session performance logging.
  --raw                 Read text literally without parsing Fountain syntax.
  self-up / self-update Self-update clicue to latest PyPI version.
  models / purge-models List or purge downloaded STT models.
  logs                  Inspect date-stamped performance log sessions.
  -h, --help            Show help message and exit.
  -V, --version         Show clicue version details and exit.

⚙️ Configuration File

clicue can be configured via a TOML file at ~/.config/clicue/config.toml:

[audio]
engine = "vosk"
model = "vosk-small"

[scroller]
window_size = 38
past_size = 9

[aligner]
max_lookahead = 20
threshold = 70.0
locality_penalty = 1.5

[debug]
perf_log = false

📄 License

MIT License. Built for creators, public speakers, and video producers.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clicue-0.1.43.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clicue-0.1.43-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file clicue-0.1.43.tar.gz.

File metadata

  • Download URL: clicue-0.1.43.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clicue-0.1.43.tar.gz
Algorithm Hash digest
SHA256 c00c3d32234bf685b83c05523d3a4b9252d8f546f7ccd6ce77391cf61acdec77
MD5 a10c2dac2f91bb656fa149f64b3186ee
BLAKE2b-256 4b136a2ddfc9f03be92d2849f855b8a47e7591ff9209e4e0da9c202df9619c2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for clicue-0.1.43.tar.gz:

Publisher: publish.yml on bizkite-co/clicue

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clicue-0.1.43-py3-none-any.whl.

File metadata

  • Download URL: clicue-0.1.43-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for clicue-0.1.43-py3-none-any.whl
Algorithm Hash digest
SHA256 960724b2e23e9ea3e0d59371af18a9c47cdcbea5d695664b162fa4638f9e0a4a
MD5 fcf45d1fe046dab670bf9095f381640f
BLAKE2b-256 cff2d2243552ac86a1eafbe2b0a4519f26724e3994f339618a738c89721b3824

See more details on using hashes here.

Provenance

The following attestation bundles were made for clicue-0.1.43-py3-none-any.whl:

Publisher: publish.yml on bizkite-co/clicue

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.49

2 files

0.1.48

2 files

0.1.47

2 files

0.1.46

2 files

0.1.45

2 files

0.1.44

2 files

This release

0.1.43 This release

2 files

0.1.42

2 files

0.1.41

2 files

0.1.40

2 files

0.1.39

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.32

2 files

0.1.31

2 files

0.1.30

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page