eprec 1.1.0 → 1.3.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,245 @@
1
+ export type ChapterStatus = 'ready' | 'review' | 'skipped'
2
+
3
+ export type ChapterPlan = {
4
+ id: string
5
+ title: string
6
+ start: number
7
+ end: number
8
+ status: ChapterStatus
9
+ outputName: string
10
+ notes: string
11
+ }
12
+
13
+ export type CommandAction = 'remove' | 'rename' | 'skip'
14
+
15
+ export type CommandWindow = {
16
+ id: string
17
+ label: string
18
+ start: number
19
+ end: number
20
+ action: CommandAction
21
+ chapterId: string
22
+ value?: string
23
+ summary: string
24
+ }
25
+
26
+ export type CutRange = {
27
+ id: string
28
+ start: number
29
+ end: number
30
+ reason: string
31
+ source: 'command' | 'manual'
32
+ sourceId?: string
33
+ }
34
+
35
+ export type TranscriptWord = {
36
+ index: number
37
+ word: string
38
+ start: number
39
+ end: number
40
+ }
41
+
42
+ export type EditSession = {
43
+ sourceName: string
44
+ duration: number
45
+ chapters: ChapterPlan[]
46
+ commands: CommandWindow[]
47
+ cuts: CutRange[]
48
+ transcript: TranscriptWord[]
49
+ }
50
+
51
+ const transcriptWords = buildTranscriptWords(
52
+ [
53
+ 'chapter',
54
+ 'one',
55
+ 'normal',
56
+ 'processing',
57
+ 'starts',
58
+ 'here',
59
+ 'we',
60
+ 'trim',
61
+ 'dead',
62
+ 'air',
63
+ 'and',
64
+ 'keep',
65
+ 'the',
66
+ 'pacing',
67
+ 'tight',
68
+ 'next',
69
+ 'we',
70
+ 'mark',
71
+ 'the',
72
+ 'command',
73
+ 'window',
74
+ 'jarvis',
75
+ 'bad',
76
+ 'take',
77
+ 'thanks',
78
+ 'reset',
79
+ 'the',
80
+ 'scene',
81
+ 'with',
82
+ 'clean',
83
+ 'audio',
84
+ 'chapter',
85
+ 'two',
86
+ 'dives',
87
+ 'into',
88
+ 'editing',
89
+ 'workflow',
90
+ 'jarvis',
91
+ 'filename',
92
+ 'normal',
93
+ 'processing',
94
+ 'thanks',
95
+ 'we',
96
+ 'call',
97
+ 'out',
98
+ 'transcript',
99
+ 'search',
100
+ 'markers',
101
+ 'for',
102
+ 'fast',
103
+ 'cleanup',
104
+ 'chapter',
105
+ 'three',
106
+ 'covers',
107
+ 'timeline',
108
+ 'refinement',
109
+ 'jarvis',
110
+ 'retake',
111
+ 'thanks',
112
+ 'wrap',
113
+ 'up',
114
+ 'notes',
115
+ 'and',
116
+ 'export',
117
+ 'ready',
118
+ ],
119
+ 4.2,
120
+ 2.8,
121
+ )
122
+
123
+ export const sampleEditSession: EditSession = {
124
+ sourceName: 'chapter-01-normal-processing.mp4',
125
+ duration: 240.5,
126
+ chapters: [
127
+ {
128
+ id: 'chapter-01',
129
+ title: 'Intro and setup',
130
+ start: 0,
131
+ end: 62.4,
132
+ status: 'ready',
133
+ outputName: 'chapter-01-intro-and-setup.mp4',
134
+ notes: 'Trimmed silence is already applied.',
135
+ },
136
+ {
137
+ id: 'chapter-02',
138
+ title: 'Editing workflow',
139
+ start: 62.4,
140
+ end: 124.8,
141
+ status: 'review',
142
+ outputName: 'chapter-02-editing-workflow.mp4',
143
+ notes: 'Rename requested via Jarvis command.',
144
+ },
145
+ {
146
+ id: 'chapter-03',
147
+ title: 'Timeline refinement',
148
+ start: 124.8,
149
+ end: 188.2,
150
+ status: 'ready',
151
+ outputName: 'chapter-03-timeline-refinement.mp4',
152
+ notes: 'Includes two command windows to remove.',
153
+ },
154
+ {
155
+ id: 'chapter-04',
156
+ title: 'Wrap up and export',
157
+ start: 188.2,
158
+ end: 240.5,
159
+ status: 'review',
160
+ outputName: 'chapter-04-wrap-up.mp4',
161
+ notes: 'Consider skipping due to retake.',
162
+ },
163
+ ],
164
+ commands: [
165
+ {
166
+ id: 'cmd-rename-02',
167
+ label: 'jarvis filename normal-processing thanks',
168
+ start: 71.2,
169
+ end: 75.6,
170
+ action: 'rename',
171
+ chapterId: 'chapter-02',
172
+ value: 'chapter-02-normal-processing.mp4',
173
+ summary: 'Rename chapter 2 output to highlight normal processing.',
174
+ },
175
+ {
176
+ id: 'cmd-bad-take-03',
177
+ label: 'jarvis bad take thanks',
178
+ start: 143.8,
179
+ end: 149.1,
180
+ action: 'remove',
181
+ chapterId: 'chapter-03',
182
+ summary: 'Remove the command window before the retake.',
183
+ },
184
+ {
185
+ id: 'cmd-skip-04',
186
+ label: 'jarvis bad take thanks',
187
+ start: 192,
188
+ end: 195.2,
189
+ action: 'skip',
190
+ chapterId: 'chapter-04',
191
+ summary: 'Mark the outro chapter as skipped.',
192
+ },
193
+ {
194
+ id: 'cmd-retake-04',
195
+ label: 'jarvis retake thanks',
196
+ start: 210.5,
197
+ end: 214.9,
198
+ action: 'remove',
199
+ chapterId: 'chapter-04',
200
+ summary: 'Cut a retake marker from the outro.',
201
+ },
202
+ ],
203
+ cuts: [
204
+ {
205
+ id: 'cut-01',
206
+ start: 32.4,
207
+ end: 33.7,
208
+ reason: 'Manual: remove mic pop before intro.',
209
+ source: 'manual',
210
+ },
211
+ {
212
+ id: 'cut-02',
213
+ start: 143.8,
214
+ end: 149.1,
215
+ reason: 'Jarvis command window (bad take).',
216
+ source: 'command',
217
+ sourceId: 'cmd-bad-take-03',
218
+ },
219
+ {
220
+ id: 'cut-03',
221
+ start: 210.5,
222
+ end: 214.9,
223
+ reason: 'Jarvis command window (retake).',
224
+ source: 'command',
225
+ sourceId: 'cmd-retake-04',
226
+ },
227
+ ],
228
+ transcript: transcriptWords,
229
+ }
230
+
231
+ function buildTranscriptWords(
232
+ words: string[],
233
+ startAt: number,
234
+ step: number,
235
+ ): TranscriptWord[] {
236
+ return words.map((word, index) => {
237
+ const start = startAt + index * step
238
+ return {
239
+ index,
240
+ word,
241
+ start,
242
+ end: start + step * 0.7,
243
+ }
244
+ })
245
+ }