Skip to main content

deephaven-plugin-speed-reader

A deephaven.ui element that reads text to you one word at a time — rapid serial visual presentation (RSVP), the technique behind Spritz-style readers.

The speed reader playing a sentence one word at a time, with the pivot letter highlighted in red

Because the words appear in a fixed position, your eyes never move between them. The highlighted pivot letter marks the optimal recognition point, the spot the eye naturally focuses on, and it stays put no matter how long the word is.

Install

pip install deephaven-plugin-speed-reader

Restart the Deephaven server so it picks up the plugin.

Usage

speed_reader takes a string and returns an element. There is no hook to call and nothing to mount.

from deephaven import ui

from deephaven_plugin_speed_reader import speed_reader


@ui.component
def my_panel():
    return speed_reader("The quick brown fox jumps over the lazy dog", default_wpm=400)


my_reader = my_panel()

Options

text is the single positional argument; everything else is optional.

Option Type Default Notes
text str The text to read out, split on whitespace.
wpm int unset Words per minute, for controlled use. When set, this wins over the slider.
default_wpm int 300 Starting words per minute, for uncontrolled use.
on_wpm_change Callable[[int]] Called with the new value whenever the speed control is adjusted.
auto_start bool True Begin reading as soon as the component renders.
loop bool False Restart from the first word after the last.
show_controls bool True Show the play/pause, restart and speed controls.
on_complete Callable[[]] Called when the last word has been shown; with loop, once per pass.

Speed is clamped to 60–1200 wpm.

Controlled vs uncontrolled speed

Follows the same convention as other deephaven.ui inputs.

Uncontrolled — the component owns the speed. Simplest, and the slider works on its own:

speed_reader(passage, default_wpm=350)

Controlled — Python owns the speed, so anything can drive it. Pass wpm and update it from on_wpm_change, or the slider will appear stuck:

@ui.component
def my_panel():
    wpm, set_wpm = ui.use_state(300)
    return ui.flex(
        speed_reader(passage, wpm=wpm, on_wpm_change=set_wpm),
        ui.button("Speed read", on_press=lambda _e: set_wpm(800)),
        direction="column",
    )

Reading text from a table

speed_reader takes a plain string, so any source works — including a table cell:

@ui.component
def article_reader():
    body, set_body = ui.use_state("Click a row to start reading.")
    return ui.flex(
        ui.table(articles, on_row_press=lambda row: set_body(row["Body"]["value"])),
        speed_reader(body, default_wpm=400),
    )

New text resets the reader to the first word.

See examples/ for complete, runnable panels.

Contributing

See AGENTS.md for the dev loop, project layout, and how to build, test, and lint.

License

Apache-2.0

Download files

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

Source Distribution

deephaven_plugin_speed_reader-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

deephaven_plugin_speed_reader-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file deephaven_plugin_speed_reader-0.1.0.tar.gz.

File metadata

File hashes

Hashes for deephaven_plugin_speed_reader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b9467d39481f5a9ed25d229118c372d674b696c82a16c501d7af1b25b633efd
MD5 9dc403b97081d73255b7f35ee6e26748
BLAKE2b-256 19885544de0d170b34eb8ba5819256ae4c9901f6cc7dcaab6c5f55240dce41e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for deephaven_plugin_speed_reader-0.1.0.tar.gz:

Publisher: publish.yml on mofojed/deephaven-plugin-speed-reader

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

File details

Details for the file deephaven_plugin_speed_reader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deephaven_plugin_speed_reader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1051f79b945600c58ab21b9f9bc9fc558b39d0306c61eacdccea7750a3cd13d6
MD5 a0144c72e5aab9d86ab82b74a92c5453
BLAKE2b-256 0445ff0d838b1879efa9f0baebda70605eaeb65aeb62e8368ff21d68c584ccda

See more details on using hashes here.

Provenance

The following attestation bundles were made for deephaven_plugin_speed_reader-0.1.0-py3-none-any.whl:

Publisher: publish.yml on mofojed/deephaven-plugin-speed-reader

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page