You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SDK/README.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ The TypeScript runtime is the canonical implementation. The JavaScript runtime i
25
25
26
26
Compiled TPS output is meant to be portable. The active runtimes treat the compiled state machine as the shared transport format for `compile -> json -> restore -> play` flows.
27
27
28
+
The root [README.md](/Users/ksemenenko/Developer/TPS/README.md) is the canonical format specification. This SDK README documents the runtime contract that is implemented today.
29
+
28
30
## Workspace Layout
29
31
30
32
-`ts/`: canonical TypeScript implementation
@@ -48,6 +50,33 @@ Compiled TPS output is meant to be portable. The active runtimes treat the compi
48
50
|`SDK/swift`| Swift runtime package | changing Apple-platform runtime behavior or tests |`cd SDK/swift && ./coverage.sh`|
The format spec allows these file naming conventions:
56
+
57
+
-`.tps`
58
+
-`.tps.md`
59
+
-`.md.tps`
60
+
61
+
The runtimes themselves compile TPS source text, not a specific extension. If a host already has the script content in memory, it can compile it directly without depending on the original file name.
62
+
63
+
## Current Runtime Contract
64
+
65
+
Across the active runtimes, the shared contract today includes:
66
+
67
+
- spec constants for metadata keys, keywords, emotions, archetypes, tags, and playback defaults
68
+
- actionable TPS diagnostics for malformed structure, invalid ranges, unknown tags, and unknown archetypes
69
+
- parsing into a document model with segment, block, phrase, and word scopes
70
+
- compilation into a normalized JSON-friendly state machine
71
+
- restore from compiled JSON or compiled object graphs
72
+
- deterministic playback via `TpsPlayer`
73
+
- timed playback via `TpsPlaybackSession`
74
+
- compile-and-play embedding via `TpsStandalonePlayer`
75
+
76
+
Archetype parsing, inheritance, and recommended-WPM defaults are part of the current parity contract.
77
+
78
+
The advisory archetype-profile mismatch warnings and rhythm-analysis warnings described in the root spec are format-level guidance and are not yet enforced uniformly across every runtime.
79
+
51
80
## Compiled Model
52
81
53
82
The compiled TPS state machine is organized as:
@@ -58,7 +87,7 @@ The compiled TPS state machine is organized as:
58
87
4. phrases
59
88
5. words
60
89
61
-
Each compiled word carries timing and authoring-derived metadata such as emphasis, emotion, speed override, pronunciation, volume, delivery mode, and edit-point markers.
90
+
Each compiled word carries timing and authoring-derived metadata such as emphasis, pause timing, highlight, breath, edit-point markers, emotion hints, articulation, energy, melody, volume, speed override or multiplier, pronunciation or phonetic guides, stress guides, speaker, and head-cue data.
62
91
63
92
## Playback Model
64
93
@@ -91,7 +120,7 @@ Each snapshot exposes:
91
120
- tempo state: base WPM, global offset, effective base WPM, playback rate
92
121
- control availability for enabling or disabling host buttons
93
122
94
-
The root [README.md](/Users/ksemenenko/Developer/TPS/README.md) is the canonical human-readable format spec. Keep it aligned with `examples/*.tps`, `SDK/fixtures/invalid/*.tps`, and the shared example snapshots whenever TPS syntax or playback semantics change.
123
+
Keep the root [README.md](/Users/ksemenenko/Developer/TPS/README.md) aligned with `examples/*.tps`, `SDK/fixtures/invalid/*.tps`, and the shared example snapshots whenever TPS syntax or playback semantics change.
95
124
96
125
On .NET, prefer wiring playback through `TpsPlaybackSessionOptions.TimeProvider` when a host needs deterministic or externally controlled time.
97
126
On .NET UI hosts, also wire `TpsPlaybackSessionOptions.EventSynchronizationContext` so snapshot and state events land on the dispatcher the host actually renders from.
0 commit comments