@storyteller-platform/align 0.1.40 → 0.1.47
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.
- package/dist/cli/bin.cjs +4 -5
- package/dist/cli/bin.js +4 -5
- package/dist/common/ffmpeg.cjs +7 -8
- package/dist/common/ffmpeg.js +7 -8
- package/dist/readium/index.cjs +33 -0
- package/dist/readium/index.d.cts +5 -0
- package/dist/readium/index.d.ts +5 -0
- package/dist/readium/index.js +11 -0
- package/dist/readium/manifest.cjs +53 -20
- package/dist/readium/manifest.d.cts +15 -4
- package/dist/readium/manifest.d.ts +15 -4
- package/dist/readium/manifest.js +52 -19
- package/dist/readium/manifest.types.cjs +16 -0
- package/dist/readium/manifest.types.d.cts +462 -0
- package/dist/readium/manifest.types.d.ts +462 -0
- package/dist/readium/manifest.types.js +0 -0
- package/dist/transcribe/transcribe.cjs +8 -3
- package/dist/transcribe/transcribe.js +8 -3
- package/package.json +23 -3
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
type ReadiumWebPublicationManifest = EPUBExtensionSubCollections & {
|
|
2
|
+
"@context"?: string | string[];
|
|
3
|
+
metadata: Metadata;
|
|
4
|
+
links?: Link[];
|
|
5
|
+
/**
|
|
6
|
+
* All resources listed in the reading order must contain a media type.
|
|
7
|
+
*/
|
|
8
|
+
readingOrder: (Link & {
|
|
9
|
+
/**
|
|
10
|
+
* MIME type of the linked resource
|
|
11
|
+
*/
|
|
12
|
+
type: string;
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
})[];
|
|
15
|
+
/**
|
|
16
|
+
* All resources listed in the publication must contain a media type.
|
|
17
|
+
*/
|
|
18
|
+
resources?: (Link & {
|
|
19
|
+
/**
|
|
20
|
+
* MIME type of the linked resource
|
|
21
|
+
*/
|
|
22
|
+
type: string;
|
|
23
|
+
[k: string]: unknown;
|
|
24
|
+
})[];
|
|
25
|
+
toc?: Link[];
|
|
26
|
+
[k: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
type Metadata = EPUBProfileMetadata & {
|
|
29
|
+
"@type"?: string;
|
|
30
|
+
conformsTo?: string | string[];
|
|
31
|
+
title: LanguageMap;
|
|
32
|
+
sortAs?: LanguageMap;
|
|
33
|
+
subtitle?: LanguageMap;
|
|
34
|
+
identifier?: string;
|
|
35
|
+
altIdentifier?: AlternateIdentifiers;
|
|
36
|
+
accessibility?: AccessibilityObject;
|
|
37
|
+
modified?: string;
|
|
38
|
+
published?: {
|
|
39
|
+
[k: string]: unknown;
|
|
40
|
+
} & string;
|
|
41
|
+
/**
|
|
42
|
+
* The language must be a valid BCP 47 tag.
|
|
43
|
+
*/
|
|
44
|
+
language?: string | string[];
|
|
45
|
+
author?: Contributor;
|
|
46
|
+
translator?: Contributor;
|
|
47
|
+
editor?: Contributor;
|
|
48
|
+
artist?: Contributor;
|
|
49
|
+
illustrator?: Contributor;
|
|
50
|
+
letterer?: Contributor;
|
|
51
|
+
penciler?: Contributor;
|
|
52
|
+
colorist?: Contributor;
|
|
53
|
+
inker?: Contributor;
|
|
54
|
+
narrator?: Contributor;
|
|
55
|
+
contributor?: Contributor;
|
|
56
|
+
publisher?: Contributor;
|
|
57
|
+
imprint?: Contributor;
|
|
58
|
+
subject?: Subject;
|
|
59
|
+
/**
|
|
60
|
+
* Hints how the layout of the publication should be presented
|
|
61
|
+
*/
|
|
62
|
+
layout?: "fixed" | "reflowable" | "scrolled";
|
|
63
|
+
readingProgression?: "rtl" | "ltr";
|
|
64
|
+
description?: string;
|
|
65
|
+
duration?: number;
|
|
66
|
+
numberOfPages?: number;
|
|
67
|
+
belongsTo?: {
|
|
68
|
+
collection?: Collection;
|
|
69
|
+
journal?: Periodical;
|
|
70
|
+
magazine?: Periodical;
|
|
71
|
+
newspaper?: Periodical;
|
|
72
|
+
periodical?: Periodical;
|
|
73
|
+
season?: Season;
|
|
74
|
+
series?: Series;
|
|
75
|
+
storyArc?: StoryArc;
|
|
76
|
+
volume?: Volume;
|
|
77
|
+
[k: string]: unknown;
|
|
78
|
+
};
|
|
79
|
+
contains?: {
|
|
80
|
+
article?: Article;
|
|
81
|
+
chapter?: Chapter;
|
|
82
|
+
episode?: Episode;
|
|
83
|
+
issue?: Issue;
|
|
84
|
+
season?: Season;
|
|
85
|
+
series?: Series;
|
|
86
|
+
storyArc?: StoryArc;
|
|
87
|
+
volume?: Volume;
|
|
88
|
+
[k: string]: unknown;
|
|
89
|
+
};
|
|
90
|
+
tdm?: {
|
|
91
|
+
reservation: "all" | "none";
|
|
92
|
+
policy?: string;
|
|
93
|
+
[k: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
[k: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
type LanguageMap = string | {
|
|
98
|
+
/**
|
|
99
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
100
|
+
* via the `patternProperty` "^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))$".
|
|
101
|
+
*/
|
|
102
|
+
[k: string]: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* @minItems 1
|
|
106
|
+
*/
|
|
107
|
+
type AlternateIdentifiers = [
|
|
108
|
+
(string | {
|
|
109
|
+
value: string;
|
|
110
|
+
scheme?: string;
|
|
111
|
+
[k: string]: unknown;
|
|
112
|
+
}),
|
|
113
|
+
...(string | {
|
|
114
|
+
value: string;
|
|
115
|
+
scheme?: string;
|
|
116
|
+
[k: string]: unknown;
|
|
117
|
+
})[]
|
|
118
|
+
];
|
|
119
|
+
type Contributor = string | (string | ContributorObject)[] | ContributorObject;
|
|
120
|
+
type Subject = string | (string | SubjectObject)[] | SubjectObject;
|
|
121
|
+
type Collection = string | (string | CollectionObject)[] | CollectionObject;
|
|
122
|
+
type Periodical = string | (string | PeriodicalObject)[] | PeriodicalObject;
|
|
123
|
+
type Issue = number | (number | IssueObject)[] | IssueObject;
|
|
124
|
+
type Article = string | (string | ArticleObject)[] | ArticleObject;
|
|
125
|
+
type Chapter = number | (number | ChapterObject)[] | ChapterObject;
|
|
126
|
+
type Series = string | (string | SeriesObject)[] | SeriesObject;
|
|
127
|
+
type Episode = number | (number | EpisodeObject)[] | EpisodeObject;
|
|
128
|
+
type Season = number | (number | SeasonObject)[] | SeasonObject;
|
|
129
|
+
type StoryArc = number | (number | StoryArcObject)[] | StoryArcObject;
|
|
130
|
+
type Volume = number | (number | VolumeObject)[] | VolumeObject;
|
|
131
|
+
interface EPUBExtensionSubCollections {
|
|
132
|
+
pageList?: Link[];
|
|
133
|
+
landmarks?: Link[];
|
|
134
|
+
loa?: Link[];
|
|
135
|
+
loi?: Link[];
|
|
136
|
+
lot?: Link[];
|
|
137
|
+
lov?: Link[];
|
|
138
|
+
[k: string]: unknown;
|
|
139
|
+
}
|
|
140
|
+
interface Link {
|
|
141
|
+
/**
|
|
142
|
+
* URI or URI template of the linked resource
|
|
143
|
+
*/
|
|
144
|
+
href: string;
|
|
145
|
+
/**
|
|
146
|
+
* MIME type of the linked resource
|
|
147
|
+
*/
|
|
148
|
+
type?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Indicates that a URI template is used in href
|
|
151
|
+
*/
|
|
152
|
+
templated?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Title of the linked resource
|
|
155
|
+
*/
|
|
156
|
+
title?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Relation between the linked resource and its containing collection
|
|
159
|
+
*/
|
|
160
|
+
rel?: Rel | Rel[];
|
|
161
|
+
/**
|
|
162
|
+
* Properties associated to the linked resource
|
|
163
|
+
*/
|
|
164
|
+
properties?: EPUBProfileLinkProperties & EncryptionModuleLinkProperties & OPDSLinkProperties;
|
|
165
|
+
/**
|
|
166
|
+
* Height of the linked resource in pixels
|
|
167
|
+
*/
|
|
168
|
+
height?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Width of the linked resource in pixels
|
|
171
|
+
*/
|
|
172
|
+
width?: number;
|
|
173
|
+
/**
|
|
174
|
+
* Original size of the resource in bytes, prior to any use of encryption or compression in an archive
|
|
175
|
+
*/
|
|
176
|
+
size?: number;
|
|
177
|
+
/**
|
|
178
|
+
* Bitrate of the linked resource in kbps
|
|
179
|
+
*/
|
|
180
|
+
bitrate?: number;
|
|
181
|
+
/**
|
|
182
|
+
* Length of the linked resource in seconds
|
|
183
|
+
*/
|
|
184
|
+
duration?: number;
|
|
185
|
+
/**
|
|
186
|
+
* Expected language of the linked resource
|
|
187
|
+
*/
|
|
188
|
+
language?: string | string[];
|
|
189
|
+
/**
|
|
190
|
+
* Alternate resources for the linked resource
|
|
191
|
+
*/
|
|
192
|
+
alternate?: Link[];
|
|
193
|
+
/**
|
|
194
|
+
* Resources that are children of the linked resource, in the context of a given collection role
|
|
195
|
+
*/
|
|
196
|
+
children?: Link[];
|
|
197
|
+
[k: string]: unknown;
|
|
198
|
+
}
|
|
199
|
+
interface EPUBProfileLinkProperties {
|
|
200
|
+
/**
|
|
201
|
+
* Identifies content contained in the linked resource, that cannot be strictly identified using a media type.
|
|
202
|
+
*/
|
|
203
|
+
contains?: ("mathml" | "onix" | "remote-resources" | "js" | "svg" | "xmp")[];
|
|
204
|
+
[k: string]: unknown;
|
|
205
|
+
}
|
|
206
|
+
interface EncryptionModuleLinkProperties {
|
|
207
|
+
/**
|
|
208
|
+
* Indicates that a resource is encrypted/obfuscated and provides relevant information for decryption
|
|
209
|
+
*/
|
|
210
|
+
encrypted?: {
|
|
211
|
+
/**
|
|
212
|
+
* Identifies the algorithm used to encrypt the resource
|
|
213
|
+
*/
|
|
214
|
+
algorithm: string;
|
|
215
|
+
/**
|
|
216
|
+
* Compression method used on the resource
|
|
217
|
+
*/
|
|
218
|
+
compression?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Original length of the resource in bytes before compression and/or encryption
|
|
221
|
+
*/
|
|
222
|
+
originalLength?: number;
|
|
223
|
+
/**
|
|
224
|
+
* Identifies the encryption profile used to encrypt the resource
|
|
225
|
+
*/
|
|
226
|
+
profile?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Identifies the encryption scheme used to encrypt the resource
|
|
229
|
+
*/
|
|
230
|
+
scheme?: string;
|
|
231
|
+
[k: string]: unknown;
|
|
232
|
+
};
|
|
233
|
+
[k: string]: unknown;
|
|
234
|
+
}
|
|
235
|
+
interface OPDSLinkProperties {
|
|
236
|
+
/**
|
|
237
|
+
* Provide a hint about the expected number of items returned
|
|
238
|
+
*/
|
|
239
|
+
numberOfItems?: number;
|
|
240
|
+
/**
|
|
241
|
+
* The price of a publication is tied to its acquisition link
|
|
242
|
+
*/
|
|
243
|
+
price?: {
|
|
244
|
+
value: number;
|
|
245
|
+
currency: "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UZS" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL";
|
|
246
|
+
[k: string]: unknown;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Indirect acquisition provides a hint for the expected media type that will be acquired after additional steps
|
|
250
|
+
*/
|
|
251
|
+
indirectAcquisition?: OPDSAcquisitionObject[];
|
|
252
|
+
/**
|
|
253
|
+
* Library-specific feature for unavailable books that support a hold list
|
|
254
|
+
*/
|
|
255
|
+
holds?: {
|
|
256
|
+
total?: number;
|
|
257
|
+
position?: number;
|
|
258
|
+
[k: string]: unknown;
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Library-specific feature that contains information about the copies that a library has acquired
|
|
262
|
+
*/
|
|
263
|
+
copies?: {
|
|
264
|
+
total?: number;
|
|
265
|
+
available?: number;
|
|
266
|
+
[k: string]: unknown;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Indicates the availability of a given resource
|
|
270
|
+
*/
|
|
271
|
+
availability?: {
|
|
272
|
+
state: "available" | "unavailable" | "reserved" | "ready";
|
|
273
|
+
/**
|
|
274
|
+
* Timestamp for the previous state change
|
|
275
|
+
*/
|
|
276
|
+
since?: {
|
|
277
|
+
[k: string]: unknown;
|
|
278
|
+
} & string;
|
|
279
|
+
/**
|
|
280
|
+
* Timestamp for the next state change
|
|
281
|
+
*/
|
|
282
|
+
until?: {
|
|
283
|
+
[k: string]: unknown;
|
|
284
|
+
} & string;
|
|
285
|
+
[k: string]: unknown;
|
|
286
|
+
};
|
|
287
|
+
[k: string]: unknown;
|
|
288
|
+
}
|
|
289
|
+
interface OPDSAcquisitionObject {
|
|
290
|
+
type: string;
|
|
291
|
+
child?: OPDSAcquisitionObject[];
|
|
292
|
+
[k: string]: unknown;
|
|
293
|
+
}
|
|
294
|
+
interface EPUBProfileMetadata {
|
|
295
|
+
mediaOverlay?: {
|
|
296
|
+
/**
|
|
297
|
+
* Author-defined CSS class name to apply to the currently-playing EPUB Content Document element.
|
|
298
|
+
*/
|
|
299
|
+
activeClass?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Author-defined CSS class name to apply to the EPUB Content Document's document element when playback is active.
|
|
302
|
+
*/
|
|
303
|
+
playbackActiveClass?: string;
|
|
304
|
+
[k: string]: unknown;
|
|
305
|
+
};
|
|
306
|
+
[k: string]: unknown;
|
|
307
|
+
}
|
|
308
|
+
interface AccessibilityObject {
|
|
309
|
+
conformsTo?: string | string[];
|
|
310
|
+
exemption?: "eaa-disproportionate-burden" | "eaa-fundamental-alteration" | "eaa-microenterprise";
|
|
311
|
+
accessMode?: ("auditory" | "chartOnVisual" | "chemOnVisual" | "colorDependent" | "diagramOnVisual" | "mathOnVisual" | "musicOnVisual" | "tactile" | "textOnVisual" | "textual" | "visual")[];
|
|
312
|
+
accessModeSufficient?: (("auditory" | "tactile" | "textual" | "visual") | ("auditory" | "tactile" | "textual" | "visual")[])[];
|
|
313
|
+
feature?: ("annotations" | "ARIA" | "bookmarks" | "index" | "pageBreakMarkers" | "printPageNumbers" | "pageNavigation" | "readingOrder" | "structuralNavigation" | "tableOfContents" | "taggedPDF" | "alternativeText" | "audioDescription" | "closedCaptions" | "captions" | "describedMath" | "longDescription" | "openCaptions" | "signLanguage" | "transcript" | "displayTransformability" | "synchronizedAudioText" | "timingControl" | "unlocked" | "ChemML" | "latex" | "latex-chemistry" | "MathML" | "MathML-chemistry" | "ttsMarkup" | "highContrastAudio" | "highContrastDisplay" | "largePrint" | "braille" | "tactileGraphic" | "tactileObject" | "fullRubyAnnotations" | "horizontalWriting" | "rubyAnnotations" | "verticalWriting" | "withAdditionalWordSegmentation" | "withoutAdditionalWordSegmentation" | "none" | "unknown")[];
|
|
314
|
+
hazard?: ("flashing" | "motionSimulation" | "sound" | "none" | "noFlashingHazard" | "noMotionSimulationHazard" | "noSoundHazard" | "unknown" | "unknownFlashingHazard" | "unknownMotionSimulationHazard" | "unknownSoundHazard")[];
|
|
315
|
+
certification?: {
|
|
316
|
+
certifiedBy?: string;
|
|
317
|
+
credential?: string;
|
|
318
|
+
report?: string;
|
|
319
|
+
[k: string]: unknown;
|
|
320
|
+
};
|
|
321
|
+
summary?: string;
|
|
322
|
+
[k: string]: unknown;
|
|
323
|
+
}
|
|
324
|
+
interface ContributorObject {
|
|
325
|
+
name: LanguageMap;
|
|
326
|
+
identifier?: string;
|
|
327
|
+
altIdentifier?: AlternateIdentifiers;
|
|
328
|
+
sortAs?: LanguageMap;
|
|
329
|
+
role?: string | string[];
|
|
330
|
+
links?: Link[];
|
|
331
|
+
[k: string]: unknown;
|
|
332
|
+
}
|
|
333
|
+
interface SubjectObject {
|
|
334
|
+
name: LanguageMap;
|
|
335
|
+
sortAs?: LanguageMap;
|
|
336
|
+
code?: string;
|
|
337
|
+
scheme?: string;
|
|
338
|
+
links?: Link[];
|
|
339
|
+
[k: string]: unknown;
|
|
340
|
+
}
|
|
341
|
+
interface CollectionObject {
|
|
342
|
+
name: LanguageMap;
|
|
343
|
+
identifier?: string;
|
|
344
|
+
altIdentifier?: AlternateIdentifiers;
|
|
345
|
+
sortAs?: LanguageMap;
|
|
346
|
+
position?: number;
|
|
347
|
+
links?: Link[];
|
|
348
|
+
[k: string]: unknown;
|
|
349
|
+
}
|
|
350
|
+
interface PeriodicalObject {
|
|
351
|
+
name: LanguageMap;
|
|
352
|
+
identifier?: string;
|
|
353
|
+
altIdentifier?: AlternateIdentifiers;
|
|
354
|
+
sortAs?: LanguageMap;
|
|
355
|
+
position?: number;
|
|
356
|
+
links?: Link[];
|
|
357
|
+
issue?: Issue;
|
|
358
|
+
volume?: Volume;
|
|
359
|
+
[k: string]: unknown;
|
|
360
|
+
}
|
|
361
|
+
interface IssueObject {
|
|
362
|
+
name?: LanguageMap;
|
|
363
|
+
identifier?: string;
|
|
364
|
+
altIdentifier?: AlternateIdentifiers;
|
|
365
|
+
sortAs?: LanguageMap;
|
|
366
|
+
position: number;
|
|
367
|
+
links?: Link[];
|
|
368
|
+
article?: Article;
|
|
369
|
+
chapter?: Chapter;
|
|
370
|
+
[k: string]: unknown;
|
|
371
|
+
}
|
|
372
|
+
interface ArticleObject {
|
|
373
|
+
name: LanguageMap;
|
|
374
|
+
identifier?: string;
|
|
375
|
+
altIdentifier?: AlternateIdentifiers;
|
|
376
|
+
sortAs?: LanguageMap;
|
|
377
|
+
author?: Contributor;
|
|
378
|
+
translator?: Contributor;
|
|
379
|
+
editor?: Contributor;
|
|
380
|
+
artist?: Contributor;
|
|
381
|
+
illustrator?: Contributor;
|
|
382
|
+
contributor?: Contributor;
|
|
383
|
+
description?: string;
|
|
384
|
+
numberOfPages?: number;
|
|
385
|
+
position?: number;
|
|
386
|
+
links?: Link[];
|
|
387
|
+
[k: string]: unknown;
|
|
388
|
+
}
|
|
389
|
+
interface ChapterObject {
|
|
390
|
+
name?: LanguageMap;
|
|
391
|
+
identifier?: string;
|
|
392
|
+
altIdentifier?: AlternateIdentifiers;
|
|
393
|
+
sortAs?: LanguageMap;
|
|
394
|
+
position: number;
|
|
395
|
+
series?: Series;
|
|
396
|
+
links?: Link[];
|
|
397
|
+
[k: string]: unknown;
|
|
398
|
+
}
|
|
399
|
+
interface SeriesObject {
|
|
400
|
+
name: LanguageMap;
|
|
401
|
+
identifier?: string;
|
|
402
|
+
altIdentifier?: AlternateIdentifiers;
|
|
403
|
+
sortAs?: LanguageMap;
|
|
404
|
+
position?: number;
|
|
405
|
+
links?: Link[];
|
|
406
|
+
chapter?: Chapter;
|
|
407
|
+
episode?: Episode;
|
|
408
|
+
issue?: Issue;
|
|
409
|
+
season?: Season;
|
|
410
|
+
storyArc?: StoryArc;
|
|
411
|
+
volume?: Volume;
|
|
412
|
+
[k: string]: unknown;
|
|
413
|
+
}
|
|
414
|
+
interface EpisodeObject {
|
|
415
|
+
name?: LanguageMap;
|
|
416
|
+
identifier?: string;
|
|
417
|
+
altIdentifier?: AlternateIdentifiers;
|
|
418
|
+
sortAs?: LanguageMap;
|
|
419
|
+
position: number;
|
|
420
|
+
links?: Link[];
|
|
421
|
+
[k: string]: unknown;
|
|
422
|
+
}
|
|
423
|
+
interface SeasonObject {
|
|
424
|
+
name?: LanguageMap;
|
|
425
|
+
identifier?: string;
|
|
426
|
+
altIdentifier?: AlternateIdentifiers;
|
|
427
|
+
sortAs?: LanguageMap;
|
|
428
|
+
position: number;
|
|
429
|
+
links?: Link[];
|
|
430
|
+
episode?: Episode;
|
|
431
|
+
[k: string]: unknown;
|
|
432
|
+
}
|
|
433
|
+
interface StoryArcObject {
|
|
434
|
+
name: LanguageMap;
|
|
435
|
+
identifier?: string;
|
|
436
|
+
altIdentifier?: AlternateIdentifiers;
|
|
437
|
+
sortAs?: LanguageMap;
|
|
438
|
+
position?: number;
|
|
439
|
+
links?: Link[];
|
|
440
|
+
chapter?: Chapter;
|
|
441
|
+
episode?: Episode;
|
|
442
|
+
issue?: Issue;
|
|
443
|
+
[k: string]: unknown;
|
|
444
|
+
}
|
|
445
|
+
interface VolumeObject {
|
|
446
|
+
name?: LanguageMap;
|
|
447
|
+
identifier?: string;
|
|
448
|
+
altIdentifier?: AlternateIdentifiers;
|
|
449
|
+
sortAs?: LanguageMap;
|
|
450
|
+
position: number;
|
|
451
|
+
links?: Link[];
|
|
452
|
+
chapter?: Chapter;
|
|
453
|
+
issue?: Issue;
|
|
454
|
+
storyArc?: StoryArc;
|
|
455
|
+
[k: string]: unknown;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* @see https://readium.org/webpub-manifest/relationships.html
|
|
459
|
+
*/
|
|
460
|
+
type Rel = "alternate" | "contents" | "cover" | "first" | "last" | "manifest" | "search" | "self" | "start";
|
|
461
|
+
|
|
462
|
+
export type { AccessibilityObject, AlternateIdentifiers, Article, ArticleObject, Chapter, ChapterObject, Collection, CollectionObject, Contributor, ContributorObject, EPUBExtensionSubCollections, EPUBProfileLinkProperties, EPUBProfileMetadata, EncryptionModuleLinkProperties, Episode, EpisodeObject, Issue, IssueObject, LanguageMap, Link, Metadata, OPDSAcquisitionObject, OPDSLinkProperties, Periodical, PeriodicalObject, ReadiumWebPublicationManifest, Rel, Season, SeasonObject, Series, SeriesObject, StoryArc, StoryArcObject, Subject, SubjectObject, Volume, VolumeObject };
|
|
File without changes
|
|
@@ -101,8 +101,9 @@ async function transcribe(input, output, locale, options) {
|
|
|
101
101
|
const engine = options.engine ?? "whisper.cpp";
|
|
102
102
|
const model = options.model ?? "tiny.en";
|
|
103
103
|
if (engine === "whisper.cpp") {
|
|
104
|
+
const resolvedModel = getWhisperCppModelId(locale.language, model);
|
|
104
105
|
await (0, import_ghost_story.ensureWhisperInstalled)({
|
|
105
|
-
model,
|
|
106
|
+
model: resolvedModel,
|
|
106
107
|
printOutput: ["debug", "info"].includes(
|
|
107
108
|
options.logger?.level ?? "silent"
|
|
108
109
|
),
|
|
@@ -205,8 +206,12 @@ async function transcribeFile(input, locale, options) {
|
|
|
205
206
|
const fallbackVariant = getCpuOverrideVariant(
|
|
206
207
|
options.whisperCpuOverride ?? null
|
|
207
208
|
);
|
|
209
|
+
const resolvedModel = getWhisperCppModelId(
|
|
210
|
+
sharedOptions.language,
|
|
211
|
+
options.model
|
|
212
|
+
);
|
|
208
213
|
const whisperOptions = await (0, import_ghost_story.ensureWhisperInstalled)({
|
|
209
|
-
model:
|
|
214
|
+
model: resolvedModel,
|
|
210
215
|
variant: fallbackVariant,
|
|
211
216
|
printOutput: ["debug", "info"].includes(
|
|
212
217
|
options.logger?.level ?? "silent"
|
|
@@ -218,7 +223,7 @@ async function transcribeFile(input, locale, options) {
|
|
|
218
223
|
engine: options.engine,
|
|
219
224
|
options: {
|
|
220
225
|
flashAttention: true,
|
|
221
|
-
model:
|
|
226
|
+
model: resolvedModel,
|
|
222
227
|
processors: options.processors,
|
|
223
228
|
threads: options.threads,
|
|
224
229
|
onProgress: (progress) => {
|
|
@@ -32,8 +32,9 @@ async function transcribe(input, output, locale, options) {
|
|
|
32
32
|
const engine = options.engine ?? "whisper.cpp";
|
|
33
33
|
const model = options.model ?? "tiny.en";
|
|
34
34
|
if (engine === "whisper.cpp") {
|
|
35
|
+
const resolvedModel = getWhisperCppModelId(locale.language, model);
|
|
35
36
|
await ensureWhisperInstalled({
|
|
36
|
-
model,
|
|
37
|
+
model: resolvedModel,
|
|
37
38
|
printOutput: ["debug", "info"].includes(
|
|
38
39
|
options.logger?.level ?? "silent"
|
|
39
40
|
),
|
|
@@ -136,8 +137,12 @@ async function transcribeFile(input, locale, options) {
|
|
|
136
137
|
const fallbackVariant = getCpuOverrideVariant(
|
|
137
138
|
options.whisperCpuOverride ?? null
|
|
138
139
|
);
|
|
140
|
+
const resolvedModel = getWhisperCppModelId(
|
|
141
|
+
sharedOptions.language,
|
|
142
|
+
options.model
|
|
143
|
+
);
|
|
139
144
|
const whisperOptions = await ensureWhisperInstalled({
|
|
140
|
-
model:
|
|
145
|
+
model: resolvedModel,
|
|
141
146
|
variant: fallbackVariant,
|
|
142
147
|
printOutput: ["debug", "info"].includes(
|
|
143
148
|
options.logger?.level ?? "silent"
|
|
@@ -149,7 +154,7 @@ async function transcribeFile(input, locale, options) {
|
|
|
149
154
|
engine: options.engine,
|
|
150
155
|
options: {
|
|
151
156
|
flashAttention: true,
|
|
152
|
-
model:
|
|
157
|
+
model: resolvedModel,
|
|
153
158
|
processors: options.processors,
|
|
154
159
|
threads: options.threads,
|
|
155
160
|
onProgress: (progress) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyteller-platform/align",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "A library and CLI for automatically aligning audiobooks and EPUBs to produce Media Overlays",
|
|
5
5
|
"author": "Shane Friedman",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,6 +43,16 @@
|
|
|
43
43
|
"types": "./dist/index.d.cts",
|
|
44
44
|
"default": "./dist/index.cjs"
|
|
45
45
|
}
|
|
46
|
+
},
|
|
47
|
+
"./readium": {
|
|
48
|
+
"import": {
|
|
49
|
+
"types": "./dist/readium.d.ts",
|
|
50
|
+
"default": "./dist/readium.js"
|
|
51
|
+
},
|
|
52
|
+
"require": {
|
|
53
|
+
"types": "./dist/readium.d.cts",
|
|
54
|
+
"default": "./dist/readium.cjs"
|
|
55
|
+
}
|
|
46
56
|
}
|
|
47
57
|
},
|
|
48
58
|
"scripts": {
|
|
@@ -60,8 +70,8 @@
|
|
|
60
70
|
"@optique/core": "^0.10.7",
|
|
61
71
|
"@optique/run": "^0.10.7",
|
|
62
72
|
"@readium/shared": "^2.2.0",
|
|
63
|
-
"@storyteller-platform/audiobook": "^0.
|
|
64
|
-
"@storyteller-platform/epub": "^0.
|
|
73
|
+
"@storyteller-platform/audiobook": "^0.4.1",
|
|
74
|
+
"@storyteller-platform/epub": "^0.6.1",
|
|
65
75
|
"@storyteller-platform/ghost-story": "^0.1.11",
|
|
66
76
|
"@storyteller-platform/transliteration": "^3.1.2",
|
|
67
77
|
"chalk": "^5.4.1",
|
|
@@ -109,6 +119,16 @@
|
|
|
109
119
|
"types": "./dist/index.d.cts",
|
|
110
120
|
"default": "./dist/index.cjs"
|
|
111
121
|
}
|
|
122
|
+
},
|
|
123
|
+
"./readium": {
|
|
124
|
+
"import": {
|
|
125
|
+
"types": "./dist/readium.d.ts",
|
|
126
|
+
"default": "./dist/readium.js"
|
|
127
|
+
},
|
|
128
|
+
"require": {
|
|
129
|
+
"types": "./dist/readium.d.cts",
|
|
130
|
+
"default": "./dist/readium.cjs"
|
|
131
|
+
}
|
|
112
132
|
}
|
|
113
133
|
}
|
|
114
134
|
}
|