Skip to content

Commit 5060cad

Browse files
committed
polishing
1 parent a14900a commit 5060cad

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ All parameters after the name are optional, separated by `|`. Parameters are ide
103103
- An integer (or integer + `WPM` suffix) → **WPM**
104104
- A known emotion keyword → **Emotion**
105105
- A time pattern (`MM:SS` or `MM:SS-MM:SS`) → **Timing**
106+
- `Speaker:Name`**Speaker** (for multi-talent scripts)
106107

107108
This means parameters can appear in any order and unneeded ones can simply be omitted — no empty `||` slots required.
108109

@@ -120,6 +121,7 @@ This means parameters can appear in any order and unneeded ones can simply be om
120121
| **WPM** | `NNN` or `NNNWPM` | Integer speed override. Omit to inherit. |
121122
| **Emotion** | preset name | Emotion preset (see table below). Omit to inherit (defaults to `Neutral` at document level). |
122123
| **Timing** | `MM:SS` or `MM:SS-MM:SS` | Duration hint. Stored for tooling; playback computes timing from word counts. |
124+
| **Speaker** | `Speaker:Name` | Talent assignment for multi-speaker scripts. Omit for single-speaker. |
123125

124126
**Leading text:** Content between a segment header and its first block is preserved as introductory text that inherits the segment's speed and emotion.
125127

@@ -144,6 +146,7 @@ Blocks are topic groups within a segment.
144146
| **Name** | free text | Descriptive label. Required (first value before the first `\|`). |
145147
| **WPM** | `NNN` or `NNNWPM` | Integer speed override. Inherits segment WPM if omitted. |
146148
| **Emotion** | preset name | Emotion override. Inherits segment emotion if omitted. |
149+
| **Speaker** | `Speaker:Name` | Talent assignment. Inherits segment speaker if omitted. |
147150

148151
### Inline Markers
149152

@@ -279,6 +282,22 @@ Delivery mode tags describe **how** to deliver a passage, beyond emotion and vol
279282
| `[rhetorical]` | Deliver as a statement with question syntax. No rising intonation. | Rhetorical questions that don't expect answers. |
280283
| `[building]` | Start at lower energy, gradually increase through the passage. | Reveals, motivational build-ups, crescendo moments. |
281284

285+
#### Speaker Tags
286+
287+
For multi-talent scripts, mark who reads each section:
288+
289+
```markdown
290+
## [Interview|Warm|Speaker:Alex]
291+
292+
### [Question|Speaker:Jordan]
293+
So tell us about the project. //
294+
295+
### [Answer|Speaker:Alex]
296+
We started with a simple idea. //
297+
```
298+
299+
The `Speaker:Name` parameter is added to segment or block headers using the same `|`-separated syntax. The parser identifies it by the `Speaker:` prefix. Renderers should visually distinguish speakers (e.g., different text colors or labels).
300+
282301
## Keyword Reference
283302

284303
### Emotions (case-insensitive)
@@ -312,6 +331,8 @@ Renderers map each emotion to a visual style (colors, background, text treatment
312331

313332
### Delivery Modes
314333

334+
Delivery modes are a **closed set** — parsers should treat unknown delivery mode keywords as unknown tags (see Error Handling).
335+
315336
| Keyword | Delivery | Use when |
316337
|---------|----------|----------|
317338
| `sarcasm` | Say it straight, but mean the opposite. Deadpan or exaggerated. | Comedy, skepticism, irony. |
@@ -427,6 +448,8 @@ When emotion changes between segments or blocks, renderers should apply a smooth
427448

428449
**Delivery modes** (`[sarcasm]`, `[aside]`, `[rhetorical]`, `[building]`) override the current emotion for their span. They are specialized delivery instructions that take priority over the block emotion.
429450

451+
**Volume + delivery modes:** Volume tags apply independently to delivery modes. `[building][loud]text[/loud][/building]` starts at loud volume and gradually increases energy while maintaining the loud level. Volume controls loudness; delivery modes control the shape of delivery.
452+
430453
### Phrase Boundaries
431454

432455
A **phrase** is a unit of text delimited by:
@@ -483,13 +506,14 @@ All tags (`[emphasis]`, `[slow]`, `[loud]`, `[sarcasm]`, etc.) are **invisible i
483506

484507
The reader sees only the spoken text with visual styling applied. Tags are commands for the renderer, not content for the speaker.
485508

486-
### Content Restrictions
509+
### Content Guidelines
510+
511+
TPS scripts contain **spoken text only**. Authors should avoid including non-spoken content. Parsers treat everything as plain text — these are authoring guidelines, not parsing constraints.
487512

488-
TPS scripts contain **spoken text only**. Do not include:
489-
- URLs or hyperlinks — these are not spoken content
490-
- Code blocks or technical syntax — rewrite as spoken language
491-
- Images or embedded media references
492-
- Raw data tables — narrate the data instead
513+
- **URLs or hyperlinks** — not spoken content; rewrite as "visit our website" or similar
514+
- **Code blocks or technical syntax** — rewrite as spoken language
515+
- **Images or embedded media references** — describe verbally instead
516+
- **Raw data tables** — narrate the data instead
493517

494518
### Rendering Context
495519

examples/advanced.tps

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ Block emotion is warm, / but you can override inline: /
8686
[urgent]this is critical[/urgent] / and back to warm. /
8787
Or shift to [calm]a more relaxed tone[/calm] for a moment. //
8888

89+
Volume and emotion are independent / you can combine them: /
90+
[soft][urgent]this is critical but quiet[/urgent][/soft]. //
91+
8992
### [Emphasis Levels]
9093

9194
[emphasis]Standard emphasis[/emphasis] for important words. /

0 commit comments

Comments
 (0)