Skip to content

Commit 1ab2ec3

Browse files
committed
emotion + stress
1 parent 25c1b86 commit 1ab2ec3

File tree

3 files changed

+144
-103
lines changed

3 files changed

+144
-103
lines changed

README.md

Lines changed: 107 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## What is TPS?
44

5-
TPS (TelePrompterScript) is a markdown-based file format for teleprompter scripts. It supports hierarchical content organization with precise timing, emotional cues, visual styling, and presentation instructions.
5+
TPS (TelePrompterScript) is a markdown-based file format for teleprompter scripts. It supports hierarchical content organization with precise timing, emotional cues, delivery instructions, and presentation control.
66

77
## Motivation
88

@@ -32,7 +32,7 @@ TPS bridges this gap: it is human-readable markdown that any text editor can ope
3232
| **Segment** | A major section (`##` header) — e.g., Intro, Problem, Solution. |
3333
| **Block** | A topic group (`###` header) within a segment. |
3434
| **Phrase** | A sentence or thought within a block, delimited by sentence-ending punctuation or pause markers. |
35-
| **Word** | An individual token with optional per-word properties (color, emphasis, pause). |
35+
| **Word** | An individual token with optional per-word properties (emphasis, volume, pause). |
3636
| **WPM** | Words Per Minute — the reading speed. |
3737
| **Edit Point** | A marker indicating a natural place to stop or start an editing session. |
3838
| **Emotion** | A predefined mood preset that controls visual styling (colors) and presentation hints. |
@@ -193,20 +193,39 @@ Inline markers are embedded within phrase text to control presentation.
193193

194194
The **+/−** buttons on the reading page change the **base speed** for the current run. All relative speed tags (`[xslow]`, `[slow]`, `[fast]`, `[xfast]`) automatically scale with the new base, preserving their proportional relationship. For example, pressing **+** to increase from 140 to 150 WPM means `[slow]` changes from 112 to 120 WPM.
195195

196-
#### Color Styling
196+
#### Volume
197197

198198
```markdown
199-
[red]warning text[/red] # Color coding
200-
[highlight]key point[/highlight] # Highlighting (yellow background)
199+
[loud]important announcement[/loud] # Louder delivery
200+
[soft]gentle aside[/soft] # Softer, quieter delivery
201+
[whisper]secret or intimate[/whisper] # Whispered delivery
201202
```
202203

204+
Volume tags control the **intended loudness** of delivery. Renderers should visually distinguish volume levels (e.g., larger/bolder text for `[loud]`, smaller/lighter for `[soft]`, styled differently for `[whisper]`).
205+
206+
#### Highlighting
207+
208+
```markdown
209+
[highlight]key point[/highlight] # Visual highlighting (background overlay)
210+
```
211+
212+
`highlight` is a visual formatting tag — it applies a semi-transparent background overlay to make text stand out on the teleprompter. It does not imply a specific delivery change.
213+
203214
#### Emotion Styling
204215

205216
```markdown
206217
[warm]friendly greeting[/warm] # Apply emotion-based styling inline
207-
[urgent]breaking news[/urgent] # Emotion colors applied to text
218+
[urgent]breaking news[/urgent] # Inline emotion override
208219
```
209220

221+
#### Breath Marks
222+
223+
```markdown
224+
[breath] # Natural breath point
225+
```
226+
227+
A breath mark indicates where the speaker should take a breath. Unlike pauses, breath marks do not add time — they guide the reader to breathe naturally at that point. Useful in long passages where phrasing might otherwise cause the reader to run out of air.
228+
210229
#### Edit Points
211230

212231
```markdown
@@ -224,56 +243,65 @@ The **+/−** buttons on the reading page change the **base speed** for the curr
224243

225244
#### Stress Marks
226245

246+
Three ways to mark word stress, from simplest to most detailed:
247+
248+
**Inline tag** — wrap the stressed part of a word with `[stress]`:
249+
227250
```markdown
228-
[stress:de-VE-lop-ment]development[/stress] # Stressed syllable in UPPERCASE
229-
[stress:IN-fra-struc-ture]infrastructure[/stress]
251+
develop[stress]me[/stress]nt # Stress on "me"
252+
[stress]in[/stress]frastructure # Stress on "in"
253+
```
254+
255+
The simplest approach. The tag can wrap a single letter or a syllable — whatever part needs emphasis. Renderers should visually distinguish the stressed portion (e.g., underline, bold, or color).
256+
257+
**Inline accent** — place an acute accent (`´`) on the stressed vowel directly in the word:
258+
259+
```markdown
260+
developmént # Stress on the "e" in "-ment"
261+
ínfrastructure # Stress on the first "i"
230262
```
231263

232-
The guide string uses hyphens to separate syllables. The stressed syllable is written in **UPPERCASE**; unstressed syllables are lowercase. For words with secondary stress, use an acute accent on the vowel: `[stress:rè-su-MÉ]résumé[/stress]`.
264+
No tags needed — the accent is visible in the text itself. Parsers should recognize acute-accented vowels (`á`, `é`, `í`, `ó`, `ú`) as stress markers. The renderer may display the accent or strip it after applying visual stress.
265+
266+
**Stress guide tag** — for full syllable breakdown when the reader needs more guidance:
267+
268+
```markdown
269+
[stress:de-VE-lop-ment]development[/stress]
270+
[stress:IN-fra-struc-ture]infrastructure[/stress]
271+
```
233272

234-
Renderers should display the stress guide as a tooltip, subtitle, or overlay — not replace the word itself.
273+
The guide string uses hyphens to separate syllables. The stressed syllable is written in **UPPERCASE**; unstressed syllables are lowercase. Renderers should display the stress guide as a tooltip, subtitle, or overlay — not replace the word itself.
235274

236275
## Keyword Reference
237276

238277
### Emotions (case-insensitive)
239278

240-
| Keyword | Color | Emoji | Description |
241-
|---------|-------|-------|-------------|
242-
| `warm` | Orange | 😊 | Friendly, welcoming tone |
243-
| `concerned` | Red | 😟 | Worried, empathetic |
244-
| `focused` | Green | 🎯 | Concentrated, precise |
245-
| `motivational` | Purple | 💪 | Inspiring, encouraging |
246-
| `neutral` | Blue | 😐 | Default, balanced |
247-
| `urgent` | Bright Red | 🚨 | Critical, immediate attention |
248-
| `happy` | Yellow | 😄 | Joyful, positive |
249-
| `excited` | Pink | 🚀 | Enthusiastic, energetic |
250-
| `sad` | Indigo | 😢 | Melancholy, somber |
251-
| `calm` | Teal | 😌 | Peaceful, relaxed |
252-
| `energetic` | Orange-Red || High energy, dynamic |
253-
| `professional` | Navy | 💼 | Business-like, formal |
254-
255-
### Colors (case-insensitive)
256-
257-
Colors are **semantic names** — renderers map them to actual hex values appropriate for the rendering context. The hex codes below are reference values for a **dark background** (the default teleprompter rendering context).
258-
259-
| Keyword | Dark-BG Hex | Visibility | Usage |
260-
|---------|-------------|------------|-------|
261-
| `red` | #FF6B6B | High | Warnings, emphasis |
262-
| `green` | #51CF66 | High | Positive, success |
263-
| `blue` | #74C0FC | High | Calm, informational |
264-
| `yellow` | #FFE066 | High | Caution, highlight |
265-
| `orange` | #FFA94D | High | Attention |
266-
| `purple` | #CC5DE8 | High | Creative, special |
267-
| `cyan` | #66D9E8 | High | Cool, tech |
268-
| `magenta` | #F783AC | High | Accent |
269-
| `pink` | #FAA2C1 | High | Soft emphasis |
270-
| `teal` | #38D9A9 | High | Professional |
271-
| `white` | #F8F9FA | High | Default text on dark BG |
272-
| `gray` | #ADB5BD | Medium | Subdued, secondary text |
273-
274-
> **Note:** `black` is **not a valid inline color** — it is invisible on the dark teleprompter background. Parsers should strip `[black]` tags and render the enclosed content unstyled (no color applied).
275-
276-
`highlight` is a **formatting tag**, not a color — it applies a semi-transparent yellow **background overlay**: `[highlight]key point[/highlight]`.
279+
Emotions are a **closed set** — parsers must reject unknown emotion keywords. Each emotion describes a **delivery style** that affects how the speaker reads the text: tone of voice, energy level, and pacing feel.
280+
281+
| Keyword | Delivery | Typical pacing | Use when |
282+
|---------|----------|----------------|----------|
283+
| `neutral` | Even, balanced tone. No particular emotional coloring. | Steady | Default. Informational content, transitions. |
284+
| `warm` | Friendly, approachable. Slight smile in the voice. | Relaxed | Greetings, introductions, audience connection. |
285+
| `professional` | Formal, authoritative. Clear articulation. | Measured | Business content, reports, official statements. |
286+
| `focused` | Concentrated, precise. Each word matters. | Deliberate | Technical details, step-by-step instructions. |
287+
| `concerned` | Worried, empathetic. Lower energy, careful tone. | Slower | Problems, risks, bad news, sensitive topics. |
288+
| `urgent` | High alert, immediate attention. Tense, direct. | Faster | Breaking news, critical warnings, deadlines. |
289+
| `motivational` | Inspiring, encouraging. Building energy. | Building | Calls to action, closing statements, rallying. |
290+
| `excited` | Enthusiastic, high energy. Wider pitch range. | Faster | Announcements, reveals, good news. |
291+
| `happy` | Joyful, positive. Light and upbeat. | Relaxed | Celebrations, positive results, thank-yous. |
292+
| `sad` | Somber, reflective. Lower pitch, slower. | Slower | Loss, disappointment, memorial. |
293+
| `calm` | Peaceful, reassuring. Steady and even. | Slow | De-escalation, meditation, closing thoughts. |
294+
| `energetic` | Dynamic, high tempo. Punchy delivery. | Fast | Demos, action sequences, rapid-fire content. |
295+
296+
Renderers map each emotion to a visual style (colors, background, text treatment) appropriate for the rendering context. The exact visual representation is implementation-defined, but should be consistent and distinguishable.
297+
298+
### Volume Levels
299+
300+
| Keyword | Description |
301+
|---------|-------------|
302+
| `loud` | Louder, more projected delivery |
303+
| `soft` | Quieter, gentler delivery |
304+
| `whisper` | Whispered, intimate delivery |
277305

278306
### Inline Tags
279307

@@ -293,11 +321,16 @@ Colors are **semantic names** — renderers map them to actual hex values approp
293321
| **Speed (preset)** | `[xfast]text[/xfast]` | Extra fast: base × 1.5 |
294322
| **Speed (reset)** | `[normal]text[/normal]` | Reset to base speed: base × 1.0 |
295323
| **Edit point** | `[edit_point]` or `[edit_point:priority]` | Mark edit location |
324+
| **Loud** | `[loud]text[/loud]` | Louder, projected delivery |
325+
| **Soft** | `[soft]text[/soft]` | Quieter, gentler delivery |
326+
| **Whisper** | `[whisper]text[/whisper]` | Whispered delivery |
296327
| **Phonetic** | `[phonetic:IPA]text[/phonetic]` | IPA pronunciation guide |
297328
| **Pronunciation** | `[pronunciation:guide]text[/pronunciation]` | Simple pronunciation guide |
298-
| **Stress** | `[stress:SYL-la-ble]text[/stress]` | Syllable stress (UPPERCASE = stressed) |
299-
| **Color** | `[red]text[/red]`, `[green]...[/green]`, etc. | Apply color styling (see Colors table) |
300-
| **Emotion** | `[warm]text[/warm]`, `[urgent]...[/urgent]`, etc. | Apply emotion-based color styling (see Emotions table) |
329+
| **Stress (wrap)** | `develop[stress]me[/stress]nt` | Wrap stressed part of a word |
330+
| **Stress (accent)** | `developmént` | Acute accent on stressed vowel |
331+
| **Stress (guide)** | `[stress:de-VE-lop-ment]text[/stress]` | Full syllable breakdown (UPPERCASE = stressed) |
332+
| **Breath** | `[breath]` | Natural breath point (no added time) |
333+
| **Emotion** | `[warm]text[/warm]`, `[urgent]...[/urgent]`, etc. | Inline emotion/delivery override (see Emotions table) |
301334

302335
### Speed Presets
303336

@@ -367,9 +400,9 @@ For any word, the effective WPM is determined by (highest priority first):
367400

368401
When emotion changes between segments or blocks, renderers should apply a smooth visual transition (recommended: 3-second fade between color schemes).
369402

370-
### Color and Emotion Precedence
403+
### Inline Emotion Precedence
371404

372-
When inline color and emotion tags are nested, the **innermost tag wins** for the enclosed span. For example, `[warm][red]text[/red][/warm]` renders "text" in red, not the warm emotion color. Block-level emotion serves as the default styling; inline tags override it for their span only.
405+
When inline emotion tags are nested, the **innermost tag wins** for the enclosed span. Block-level emotion serves as the default styling; inline emotion tags override it for their span only.
373406

374407
### Phrase Boundaries
375408

@@ -382,9 +415,9 @@ Phrases are the smallest unit for timing calculation. Words within a phrase are
382415

383416
### Tag Nesting
384417

385-
- Tags must be properly closed: `[red]text[/red]`.
386-
- Tags must not cross-nest: `[red][emphasis]text[/red][/emphasis]` is **invalid**.
387-
- Valid nesting: `[red][emphasis]text[/emphasis][/red]`.
418+
- Tags must be properly closed: `[loud]text[/loud]`.
419+
- Tags must not cross-nest: `[loud][emphasis]text[/loud][/emphasis]` is **invalid**.
420+
- Valid nesting: `[loud][emphasis]text[/emphasis][/loud]`.
388421
- If a tag is never closed, the parser should implicitly close it at the end of the current block.
389422

390423
### Nested Speed Resolution
@@ -412,11 +445,11 @@ TPS is designed for **teleprompter use** — text is always rendered on a **dark
412445

413446
### Dark Background Rules
414447

415-
1. **Text base color** is white/light (`#F8F9FA` or similar). All inline colors must be **lighter variants** that contrast well against dark backgrounds.
416-
2. **`black` is not a valid inline color**it would be invisible. Renderers should strip `[black]` tags and render the enclosed content unstyled.
417-
3. **Minimum contrast** — all color keywords must produce at least **WCAG AA 4.5:1** contrast ratio against the dark background.
418-
4. **Emotion color schemes** (background, text, accent) are pre-defined per emotion. They are not raw hex values — they are tuned for the dark rendering context with appropriate alpha channels.
419-
5. **`highlight`** uses a semi-transparent yellow background overlay, not a text color change.
448+
1. **Text base color** is white/light (`#F8F9FA` or similar).
449+
2. **Minimum contrast**all styled text must produce at least **WCAG AA 4.5:1** contrast ratio against the dark background.
450+
3. **Emotion color schemes** (background, text, accent) are pre-defined per emotion and tuned for the dark rendering context.
451+
4. **`highlight`** uses a semi-transparent yellow background overlay, not a text color change.
452+
5. **Volume indicators** `[loud]` text should be visually larger or bolder; `[soft]` and `[whisper]` should be visually smaller or lighter.
420453

421454
## WPM Guidelines
422455

@@ -456,7 +489,7 @@ The Actor profile targets natural spoken delivery — reading aloud from a telep
456489
| Inline speed | Integer, respects allowed range |
457490

458491
Additional validation:
459-
- Emotions must be from the predefined set (see table above).
492+
- Emotions must be from the predefined closed set (see Emotions table). Unknown emotion keywords are a parse error.
460493
- Timing calculations should not exceed target duration by > 20%.
461494
- All markup tags must be properly closed; no cross-nesting.
462495
- Edit points should be at phrase or block boundaries.
@@ -490,19 +523,19 @@ author: Jane Doe
490523

491524
### [Opening Block]
492525
Good morning everyone, / and [emphasis]welcome[/emphasis] to what I believe /
493-
will be a [green]transformative moment[/green] for our company. //
526+
will be a [emphasis]transformative moment[/emphasis] for our company. //
494527

495528
[pause:2s]
496529

497530
### [Purpose Block|145WPM]
498-
[emphasis]Today[/emphasis], / we're not just launching a product – /
531+
[emphasis]Today[/emphasis], / we're not just launching a product – / [breath]
499532
we're introducing a [highlight]solution[/highlight] that will [emphasis]revolutionize[/emphasis] /
500533
how our customers interact with [stress:tech-NO-lo-gy]technology[/stress]. //
501534

502535
## [Problem|135WPM|Concerned]
503536

504537
### [Statistics Block|Neutral]
505-
But first, / let's address the [xslow][red]elephant in the room[/red][/xslow]. /
538+
But first, / let's address the [xslow]elephant in the room[/xslow]. /
506539
Our industry has been [emphasis]struggling[/emphasis] with a fundamental problem. //
507540

508541
[edit_point:high]
@@ -513,22 +546,22 @@ due to [highlight]complexity and poor user experience[/highlight]. //
513546

514547
### [Impact Block]
515548
This affects [emphasis]millions[/emphasis] of people worldwide, /
516-
costing businesses [red]billions in revenue[/red] annually. //
549+
costing businesses [loud][emphasis]billions[/emphasis] in revenue[/loud] annually. //
517550

518551
## [Solution|Focused]
519552

520553
### [Introduction Block]
521-
That's where our [blue][emphasis]new platform[/emphasis][/blue] comes in. /
522-
We've developed a [green]local-first teleprompter workflow[/green] that /
523-
[highlight]simplifies complex processes[/highlight] and [emphasis]enhances user experience[/emphasis]. //
554+
That's where our [emphasis]new platform[/emphasis] comes in. /
555+
We've developed a local-first téleprompter workflow that /
556+
[highlight]simplifies complex processes[/highlight] and [emphasis]enhances user experiénce[/emphasis]. //
524557

525558
### [Benefits Block|150WPM|Excited]
526-
With our solution, / you can expect a [green][emphasis]50% reduction[/emphasis][/green] in user abandonment /
527-
and a [green][emphasis]30% increase[/emphasis][/green] in engagement. //
559+
With our solution, / you can expect a [emphasis]50% reduction[/emphasis] in user abandonment /
560+
and a [emphasis]30% increase[/emphasis] in engagement. //
528561

529562
[pause:1s]
530563

531-
[xfast]Full details are available in the handout.[/xfast] /
564+
[soft]Full details are available in the handout.[/soft] /
532565
[highlight]Thank you[/highlight] for your time. //
533566

534567
[edit_point:medium]
@@ -540,9 +573,9 @@ The [`examples/`](examples/) directory contains sample TPS files demonstrating t
540573

541574
| File | Description |
542575
|------|-------------|
543-
| [`basic.tps`](examples/basic.tps) | Minimal valid TPS file — front matter, title, segments, blocks, pauses, emphasis. |
544-
| [`advanced.tps`](examples/advanced.tps) | All format features — speed controls, inline WPM, colors, emotions, pronunciation, edit points, tag nesting. |
545-
| [`multi-segment.tps`](examples/multi-segment.tps) | Multi-segment script with varying speed and emotion across segments. |
576+
| [`basic.tps`](examples/basic.tps) | Minimal valid TPS file — front matter, title, segments, blocks, pauses, emphasis, simple headers, escape sequences. |
577+
| [`advanced.tps`](examples/advanced.tps) | All format features — speed controls, volume, stress marks, breath marks, emotions, pronunciation, edit points, tag nesting. |
578+
| [`multi-segment.tps`](examples/multi-segment.tps) | Multi-segment script with varying speed, emotion, and delivery cues across segments. |
546579

547580
## File Extension
548581

0 commit comments

Comments
 (0)