@scenerok/sdk 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ # Text-to-Speech
2
+
3
+ `import xai from "@scenerok/xai"` — voiceover via `audio xai.tts(...)`.
4
+
5
+ Voice IDs: `eve` (upbeat), `ara` (warm), `rex` (business), `sal` (balanced), `leo` (authoritative).
6
+ ```vidscript
7
+ import xai from "@scenerok/xai"
8
+ let vo = xai.tts("Welcome to SceneRok", voice: "eve")
9
+ [0 .. vo.duration] = audio vo
10
+ ```
11
+
12
+ **Never guess a TTS window.** You cannot know the audio length while writing the script. Either assign with `let` and use `vo.duration` in time expressions (measured from the generated file), or use `[-] = audio xai.tts(...)` blocks, which auto-size and never overlap each other. Guessed ranges like `[0s .. 3s] = audio xai.tts("long sentence...")` clip or collide when the real audio runs longer.
13
+
14
+ Chain multiple lines with symbolic arithmetic:
15
+
16
+ ```vidscript
17
+ import xai from "@scenerok/xai"
18
+ let vo1 = xai.tts("First line", voice: "eve")
19
+ let vo2 = xai.tts("Second line", voice: "eve")
20
+ [0 .. vo1.duration] = audio vo1
21
+ [vo1.duration + 0.3 .. vo1.duration + 0.3 + vo2.duration] = audio vo2
22
+ [0 .. vo1.duration] = text "First headline", area: "title" # visual spans the narration
23
+ ```
24
+
25
+ ## Examples
26
+
27
+ Catalog samples below use fixed example windows; in real scripts prefer `vo.duration` or `[-]` blocks as shown above.
28
+
29
+ **Leo — launch** — Product launch energy.
30
+
31
+ ```vidscript
32
+ import xai from "@scenerok/xai"
33
+
34
+ [0s .. 3s] = text "GO.", font: "Inter Black", size: 240, color: "#FF3B3B", align: "center"
35
+ [0s .. 3s] = audio xai.tts("Ship it. Right now.", voice: "leo")
36
+ ```
37
+
38
+ **Rex — countdown** — Punchy three-beat hook.
39
+
40
+ ```vidscript
41
+ import xai from "@scenerok/xai"
42
+
43
+ [0s .. 3s] = text "Drop it.", font: "Inter Black", size: 198, color: "#FFD23F", align: "center"
44
+ [0s .. 3s] = audio xai.tts("Three. Two. One. Drop it.", voice: "rex")
45
+ ```
46
+
47
+ **Ara — short line** — Single sentence under a headline.
48
+
49
+ ```vidscript
50
+ import xai from "@scenerok/xai"
51
+
52
+ [0s .. 3s] = text "Listen.", font: "Inter", size: 120, color: "#9FB6FF", align: "center"
53
+ [0s .. 3s] = audio xai.tts("One line of voice-over, baked into the mix.", voice: "ara")
54
+ ```
55
+
56
+ **Eve — narrative** — Long-form explanatory copy.
57
+
58
+ ```vidscript
59
+ import xai from "@scenerok/xai"
60
+
61
+ [0s .. 3s] = text "Voice from text.", font: "Inter Bold", size: 64, color: "#FFFFFF", align: "center"
62
+ [0s .. 3s] = audio xai.tts("Vidscript turns plain text into a fully rendered video. No timeline editing required.", voice: "eve")
63
+ ```
64
+