Skip to content

A small, open-source Mac dictation app that uses your ChatGPT sign-in. Speak into T3 Code, your editor, or any text field.

fix: pause the shortcut cue when the demo is outside view

Vishesh Rahejaef59b1990b81
diff --git a/website/README.md b/website/README.md
index 17c2eeb..dcc6494 100644
--- a/website/README.md
+++ b/website/README.md
@@ -4,7 +4,7 @@ Static site, no build step. Everything that gets hosted is in `dist/`.
- `dist/index.html`: the page (inline icon sprite).
- `dist/styles.css`: page styles.
-- `dist/app.js`: link and release-state wiring, scroll reveals, the film player, the scripted hero demo and the accent swatches in the features grid. No microphone, clipboard or network use.
+- `dist/app.js`: link and release-state wiring, scroll reveals, the film player, the scripted hero demo and the accent swatches in the features grid. The demo does not access the microphone or clipboard.
- `dist/config.js`: the only file to edit for a release (`releaseReady`, `version`, URLs, video paths).
- `dist/CREDITS.txt`: icon and media credits.
@@ -16,3 +16,6 @@ Preview locally:
Freeze the hero preview in one state for screenshots: `?demo=recording`, `transcribing`, `pasted`, `copied`, `notice`, `nospeech` or `settings`.
The promo and poster are in `dist/assets/`.
+
+The live site is https://entropyconquers.github.io/gpt-voice/.
+Changes to `website/dist/` on `main` deploy through `.github/workflows/pages.yml`.
diff --git a/website/dist/app.js b/website/dist/app.js
index 273b5a8..554abeb 100644
--- a/website/dist/app.js
+++ b/website/dist/app.js
@@ -523,7 +523,9 @@
if ("IntersectionObserver" in window) {
new IntersectionObserver(function (entries) {
- invite.inView = entries[entries.length - 1].isIntersecting;
+ var entry = entries[entries.length - 1];
+ // The first callback fires even below the threshold, so check the ratio as well.
+ invite.inView = entry.isIntersecting && entry.intersectionRatio >= 0.35;
updateInvite();
}, { threshold: 0.35 }).observe(demo);
} else {