@storyteller-platform/audiobook 0.1.0 → 0.2.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.
Files changed (49) hide show
  1. package/dist/bufferEntry.cjs +59 -0
  2. package/dist/bufferEntry.d.cts +16 -0
  3. package/dist/bufferEntry.d.ts +16 -0
  4. package/dist/bufferEntry.js +35 -0
  5. package/dist/entry.cjs +259 -28
  6. package/dist/entry.d.cts +31 -11
  7. package/dist/entry.d.ts +31 -11
  8. package/dist/entry.js +273 -28
  9. package/dist/ffmpeg.cjs +84 -0
  10. package/dist/ffmpeg.d.cts +11 -0
  11. package/dist/ffmpeg.d.ts +11 -0
  12. package/dist/ffmpeg.js +58 -0
  13. package/dist/fileEntry.cjs +58 -0
  14. package/dist/fileEntry.d.cts +16 -0
  15. package/dist/fileEntry.d.ts +16 -0
  16. package/dist/fileEntry.js +34 -0
  17. package/dist/index.cjs +281 -35
  18. package/dist/index.d.cts +67 -11
  19. package/dist/index.d.ts +67 -11
  20. package/dist/index.js +269 -35
  21. package/dist/resources.cjs +16 -0
  22. package/dist/resources.d.cts +14 -0
  23. package/dist/resources.d.ts +14 -0
  24. package/dist/resources.js +0 -0
  25. package/dist/tagMaps.cjs +120 -0
  26. package/dist/tagMaps.d.cts +24 -0
  27. package/dist/tagMaps.d.ts +24 -0
  28. package/dist/tagMaps.js +95 -0
  29. package/dist/zipFsEntry.cjs +65 -0
  30. package/dist/zipFsEntry.d.cts +19 -0
  31. package/dist/zipFsEntry.d.ts +19 -0
  32. package/dist/zipFsEntry.js +41 -0
  33. package/package.json +24 -29
  34. package/dist/base.cjs +0 -248
  35. package/dist/base.d.cts +0 -67
  36. package/dist/base.d.ts +0 -67
  37. package/dist/base.js +0 -223
  38. package/dist/node/entry.cjs +0 -76
  39. package/dist/node/entry.d.cts +0 -18
  40. package/dist/node/entry.d.ts +0 -18
  41. package/dist/node/entry.js +0 -52
  42. package/dist/node/index.cjs +0 -107
  43. package/dist/node/index.d.cts +0 -17
  44. package/dist/node/index.d.ts +0 -17
  45. package/dist/node/index.js +0 -89
  46. package/dist/taglib/Uint8ArrayFileAbstraction.cjs +0 -128
  47. package/dist/taglib/Uint8ArrayFileAbstraction.d.cts +0 -26
  48. package/dist/taglib/Uint8ArrayFileAbstraction.d.ts +0 -26
  49. package/dist/taglib/Uint8ArrayFileAbstraction.js +0 -106
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var bufferEntry_exports = {};
20
+ __export(bufferEntry_exports, {
21
+ BufferEntry: () => BufferEntry
22
+ });
23
+ module.exports = __toCommonJS(bufferEntry_exports);
24
+ var import_promises = require("node:fs/promises");
25
+ var import_mediabunny = require("mediabunny");
26
+ var import_entry = require("./entry.cjs");
27
+ var import_ffmpeg = require("./ffmpeg.cjs");
28
+ class BufferEntry extends import_entry.AudiobookEntry {
29
+ constructor(entry) {
30
+ super();
31
+ this.entry = entry;
32
+ this.filename = entry.filename;
33
+ }
34
+ input = null;
35
+ filename;
36
+ getInput() {
37
+ this.input ??= new import_mediabunny.Input({
38
+ formats: import_mediabunny.ALL_FORMATS,
39
+ source: new import_mediabunny.BufferSource(this.entry.data)
40
+ });
41
+ return this.input;
42
+ }
43
+ async getChapters() {
44
+ const chapters = await (0, import_ffmpeg.getTrackChaptersFromBuffer)(this.entry.data);
45
+ return chapters.map((chapter) => ({
46
+ filename: this.filename,
47
+ title: chapter.title,
48
+ start: chapter.startTime
49
+ }));
50
+ }
51
+ async saveAndClose() {
52
+ const { data, filename } = await this.getArrayAndClose();
53
+ await (0, import_promises.writeFile)(filename, data);
54
+ }
55
+ }
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ BufferEntry
59
+ });
@@ -0,0 +1,16 @@
1
+ import * as mediabunny from 'mediabunny';
2
+ import { Input } from 'mediabunny';
3
+ import { AudiobookEntry, Uint8ArrayEntry } from './entry.cjs';
4
+ import { AudiobookChapter } from './resources.cjs';
5
+
6
+ declare class BufferEntry extends AudiobookEntry {
7
+ private entry;
8
+ private input;
9
+ filename: string;
10
+ constructor(entry: Uint8ArrayEntry);
11
+ getInput(): Input<mediabunny.Source>;
12
+ getChapters(): Promise<AudiobookChapter[]>;
13
+ saveAndClose(): Promise<void>;
14
+ }
15
+
16
+ export { BufferEntry };
@@ -0,0 +1,16 @@
1
+ import * as mediabunny from 'mediabunny';
2
+ import { Input } from 'mediabunny';
3
+ import { AudiobookEntry, Uint8ArrayEntry } from './entry.js';
4
+ import { AudiobookChapter } from './resources.js';
5
+
6
+ declare class BufferEntry extends AudiobookEntry {
7
+ private entry;
8
+ private input;
9
+ filename: string;
10
+ constructor(entry: Uint8ArrayEntry);
11
+ getInput(): Input<mediabunny.Source>;
12
+ getChapters(): Promise<AudiobookChapter[]>;
13
+ saveAndClose(): Promise<void>;
14
+ }
15
+
16
+ export { BufferEntry };
@@ -0,0 +1,35 @@
1
+ import { writeFile } from "node:fs/promises";
2
+ import { ALL_FORMATS, BufferSource, Input } from "mediabunny";
3
+ import { AudiobookEntry } from "./entry.js";
4
+ import { getTrackChaptersFromBuffer } from "./ffmpeg.js";
5
+ class BufferEntry extends AudiobookEntry {
6
+ constructor(entry) {
7
+ super();
8
+ this.entry = entry;
9
+ this.filename = entry.filename;
10
+ }
11
+ input = null;
12
+ filename;
13
+ getInput() {
14
+ this.input ??= new Input({
15
+ formats: ALL_FORMATS,
16
+ source: new BufferSource(this.entry.data)
17
+ });
18
+ return this.input;
19
+ }
20
+ async getChapters() {
21
+ const chapters = await getTrackChaptersFromBuffer(this.entry.data);
22
+ return chapters.map((chapter) => ({
23
+ filename: this.filename,
24
+ title: chapter.title,
25
+ start: chapter.startTime
26
+ }));
27
+ }
28
+ async saveAndClose() {
29
+ const { data, filename } = await this.getArrayAndClose();
30
+ await writeFile(filename, data);
31
+ }
32
+ }
33
+ export {
34
+ BufferEntry
35
+ };
package/dist/entry.cjs CHANGED
@@ -21,34 +21,265 @@ __export(entry_exports, {
21
21
  AudiobookEntry: () => AudiobookEntry
22
22
  });
23
23
  module.exports = __toCommonJS(entry_exports);
24
- var import_zip = require("@zip.js/zip.js");
25
- var import_node_taglib_sharp = require("node-taglib-sharp");
26
- var import_base = require("./base.cjs");
27
- var import_Uint8ArrayFileAbstraction = require("./taglib/Uint8ArrayFileAbstraction.cjs");
28
- class AudiobookEntry extends import_base.BaseAudiobookEntry {
29
- constructor(entry) {
30
- super();
31
- this.entry = entry;
32
- this.filename = entry.filename;
33
- }
34
- filename;
35
- file = null;
36
- async readData() {
37
- if ("data" in this.entry) {
38
- return this.entry.data;
39
- }
40
- const writer = new import_zip.Uint8ArrayWriter();
41
- return await this.entry.getData(writer);
42
- }
43
- async getData() {
44
- const file = await this.getFile();
45
- return file.fileAbstraction.data;
46
- }
47
- async createFile() {
48
- const data = await this.readData();
49
- return import_node_taglib_sharp.File.createFromAbstraction(
50
- new import_Uint8ArrayFileAbstraction.Uint8ArrayFileAbstraction(this.filename, data)
51
- );
24
+ var import_mediabunny = require("mediabunny");
25
+ var import_tagMaps = require("./tagMaps.cjs");
26
+ function splitNames(names) {
27
+ return names.split(/[;,/]/).map((name) => name.trim());
28
+ }
29
+ class AudiobookEntry {
30
+ metadataTags = null;
31
+ duration = null;
32
+ async getMetadataTags() {
33
+ if (this.metadataTags) return this.metadataTags;
34
+ const input = await this.getInput();
35
+ this.metadataTags = await input.getMetadataTags();
36
+ return this.metadataTags;
37
+ }
38
+ async getOutputFormat() {
39
+ const input = await this.getInput();
40
+ const inputFormat = await input.getFormat();
41
+ switch (inputFormat) {
42
+ case import_mediabunny.MP3: {
43
+ return new import_mediabunny.Mp3OutputFormat();
44
+ }
45
+ case import_mediabunny.MP4: {
46
+ return new import_mediabunny.Mp4OutputFormat();
47
+ }
48
+ case import_mediabunny.WAVE: {
49
+ return new import_mediabunny.WavOutputFormat();
50
+ }
51
+ case import_mediabunny.OGG: {
52
+ return new import_mediabunny.OggOutputFormat();
53
+ }
54
+ case import_mediabunny.FLAC: {
55
+ return new import_mediabunny.FlacOutputFormat();
56
+ }
57
+ }
58
+ return null;
59
+ }
60
+ async getTitle() {
61
+ const tags = await this.getMetadataTags();
62
+ if (!tags.raw) return null;
63
+ for (const tag of import_tagMaps.readTagMap.title) {
64
+ if (typeof tags.raw[tag] === "string") {
65
+ return tags.raw[tag];
66
+ }
67
+ }
68
+ return null;
69
+ }
70
+ async getTrackTitle() {
71
+ const tags = await this.getMetadataTags();
72
+ if (!tags.raw) return null;
73
+ for (const tag of import_tagMaps.readTagMap.trackTitle) {
74
+ if (typeof tags.raw[tag] === "string") {
75
+ return tags.raw[tag];
76
+ }
77
+ }
78
+ return null;
79
+ }
80
+ async setTitle(title) {
81
+ const tags = await this.getMetadataTags();
82
+ const input = await this.getInput();
83
+ const inputFormat = await input.getFormat();
84
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "title");
85
+ tags.raw ??= {};
86
+ for (const tag of writeTags) {
87
+ tags.raw[tag] = title;
88
+ }
89
+ }
90
+ async getSubtitle() {
91
+ const tags = await this.getMetadataTags();
92
+ if (!tags.raw) return null;
93
+ for (const subtitleTag of import_tagMaps.readTagMap.subtitle) {
94
+ if (typeof tags.raw[subtitleTag] === "string") {
95
+ return tags.raw[subtitleTag];
96
+ }
97
+ }
98
+ return null;
99
+ }
100
+ async setSubtitle(subtitle) {
101
+ const tags = await this.getMetadataTags();
102
+ const input = await this.getInput();
103
+ const inputFormat = await input.getFormat();
104
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "subtitle");
105
+ tags.raw ??= {};
106
+ for (const tag of writeTags) {
107
+ tags.raw[tag] = subtitle;
108
+ }
109
+ }
110
+ async getDescription() {
111
+ const tags = await this.getMetadataTags();
112
+ if (!tags.raw) return null;
113
+ for (const tag of import_tagMaps.readTagMap.description) {
114
+ if (typeof tags.raw[tag] === "string") {
115
+ return tags.raw[tag];
116
+ }
117
+ }
118
+ return null;
119
+ }
120
+ async setDescription(description) {
121
+ const tags = await this.getMetadataTags();
122
+ const input = await this.getInput();
123
+ const inputFormat = await input.getFormat();
124
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "description");
125
+ tags.raw ??= {};
126
+ for (const tag of writeTags) {
127
+ tags.raw[tag] = description;
128
+ }
129
+ }
130
+ async getAuthors() {
131
+ const tags = await this.getMetadataTags();
132
+ if (!tags.raw) return [];
133
+ for (const tag of import_tagMaps.readTagMap.authors) {
134
+ if (typeof tags.raw[tag] === "string") {
135
+ return splitNames(tags.raw[tag]);
136
+ }
137
+ }
138
+ return [];
139
+ }
140
+ async setAuthors(authors) {
141
+ const tags = await this.getMetadataTags();
142
+ const input = await this.getInput();
143
+ const inputFormat = await input.getFormat();
144
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "authors");
145
+ tags.raw ??= {};
146
+ for (const tag of writeTags) {
147
+ tags.raw[tag] = authors.join(";");
148
+ }
149
+ }
150
+ async getNarrators() {
151
+ const tags = await this.getMetadataTags();
152
+ if (!tags.raw) return [];
153
+ for (const tag of import_tagMaps.readTagMap.narrators) {
154
+ if (typeof tags.raw[tag] === "string") {
155
+ return splitNames(tags.raw[tag]);
156
+ }
157
+ }
158
+ return [];
159
+ }
160
+ async setNarrators(narrators) {
161
+ const tags = await this.getMetadataTags();
162
+ const input = await this.getInput();
163
+ const inputFormat = await input.getFormat();
164
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "narrators");
165
+ tags.raw ??= {};
166
+ for (const tag of writeTags) {
167
+ tags.raw[tag] = narrators.join(";");
168
+ }
169
+ }
170
+ async getCoverArt() {
171
+ var _a;
172
+ const tags = await this.getMetadataTags();
173
+ return ((_a = tags.images) == null ? void 0 : _a.find((image) => image.kind === "coverFront")) ?? null;
174
+ }
175
+ async setCoverArt(picture) {
176
+ const tags = await this.getMetadataTags();
177
+ const images = tags.images ?? [];
178
+ const frontCover = images.find((image) => image.kind === "coverFront");
179
+ if (frontCover) {
180
+ Object.assign(frontCover, picture);
181
+ } else {
182
+ images.push(picture);
183
+ }
184
+ tags.images = images;
185
+ }
186
+ async getPublisher() {
187
+ const tags = await this.getMetadataTags();
188
+ if (!tags.raw) return null;
189
+ for (const tag of import_tagMaps.readTagMap.publisher) {
190
+ if (typeof tags.raw[tag] === "string") {
191
+ return tags.raw[tag];
192
+ }
193
+ }
194
+ return null;
195
+ }
196
+ async setPublisher(publisher) {
197
+ const tags = await this.getMetadataTags();
198
+ const input = await this.getInput();
199
+ const inputFormat = await input.getFormat();
200
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "publisher");
201
+ tags.raw ??= {};
202
+ for (const tag of writeTags) {
203
+ tags.raw[tag] = publisher;
204
+ }
205
+ }
206
+ async getReleaseDate() {
207
+ const tags = await this.getMetadataTags();
208
+ if (!tags.raw) return null;
209
+ for (const tag of import_tagMaps.readTagMap.releaseDate) {
210
+ if (typeof tags.raw[tag] === "string") {
211
+ return new Date(tags.raw[tag]);
212
+ }
213
+ }
214
+ return null;
215
+ }
216
+ async setReleaseDate(date) {
217
+ const tags = await this.getMetadataTags();
218
+ const input = await this.getInput();
219
+ const inputFormat = await input.getFormat();
220
+ const writeTags = (0, import_tagMaps.getWriteTags)(inputFormat, "releaseDate");
221
+ tags.raw ??= {};
222
+ for (const tag of writeTags) {
223
+ tags.raw[tag] = `${date.getDate().toString().padStart(2, "0")}-${date.getMonth().toString().padStart(2, "0")}-${date.getFullYear()}`;
224
+ }
225
+ }
226
+ async getDuration() {
227
+ const input = await this.getInput();
228
+ this.duration ??= await input.computeDuration();
229
+ return this.duration;
230
+ }
231
+ async getResource() {
232
+ const input = await this.getInput();
233
+ this.duration ??= await input.computeDuration();
234
+ const title = await this.getTrackTitle() ?? null;
235
+ const type = await input.getMimeType();
236
+ return {
237
+ filename: this.filename,
238
+ title,
239
+ type,
240
+ duration: this.duration,
241
+ bitrate: null
242
+ };
243
+ }
244
+ async getArrayAndClose() {
245
+ const input = await this.getInput();
246
+ const outputFormat = await this.getOutputFormat();
247
+ if (!outputFormat) {
248
+ const inputFormat = await input.getFormat();
249
+ throw new Error(
250
+ `Failed to save Audiobook entry: could not find valid output format for input with format ${inputFormat.name}`
251
+ );
252
+ }
253
+ const output = new import_mediabunny.Output({
254
+ format: outputFormat,
255
+ target: new import_mediabunny.BufferTarget()
256
+ });
257
+ const tags = await this.getMetadataTags();
258
+ const conversion = await import_mediabunny.Conversion.init({
259
+ input,
260
+ output,
261
+ tags: {
262
+ // Since we only write raw metadata tags, we
263
+ // only copy those into the output. Otherwise
264
+ // the unchanged parsed metadata tags will overwrite
265
+ // our changes to raw!
266
+ raw: tags.raw ?? {},
267
+ images: tags.images ?? []
268
+ },
269
+ showWarnings: false
270
+ });
271
+ if (!conversion.isValid) {
272
+ throw new Error(
273
+ conversion.discardedTracks.map((track) => track.reason).join(";")
274
+ );
275
+ }
276
+ await conversion.execute();
277
+ input.dispose();
278
+ return {
279
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
280
+ data: new Uint8Array(output.target.buffer),
281
+ filename: this.filename
282
+ };
52
283
  }
53
284
  }
54
285
  // Annotate the CommonJS export names for ESM import in node:
package/dist/entry.d.cts CHANGED
@@ -1,19 +1,39 @@
1
- import { Entry } from '@zip.js/zip.js';
2
- import { File } from 'node-taglib-sharp';
3
- import { BaseAudiobookEntry } from './base.cjs';
1
+ import { Input, MetadataTags, OutputFormat, AttachedImage } from 'mediabunny';
2
+ import { AudiobookChapter, AudiobookResource } from './resources.cjs';
4
3
 
5
4
  interface Uint8ArrayEntry {
6
5
  filename: string;
7
6
  data: Uint8Array;
8
7
  }
9
- declare class AudiobookEntry extends BaseAudiobookEntry {
10
- protected entry: Uint8ArrayEntry | Entry;
11
- filename: string;
12
- protected file: File | null;
13
- protected readData(): Promise<Uint8Array<ArrayBufferLike>>;
14
- getData(): Promise<Uint8Array<ArrayBufferLike>>;
15
- createFile(): Promise<File>;
16
- constructor(entry: Uint8ArrayEntry | Entry);
8
+ declare abstract class AudiobookEntry {
9
+ abstract filename: string;
10
+ private metadataTags;
11
+ private duration;
12
+ abstract getChapters(): Promise<AudiobookChapter[]>;
13
+ abstract getInput(): Promise<Input> | Input;
14
+ abstract saveAndClose(): Promise<void>;
15
+ getMetadataTags(): Promise<MetadataTags>;
16
+ getOutputFormat(): Promise<OutputFormat | null>;
17
+ getTitle(): Promise<string | null>;
18
+ getTrackTitle(): Promise<string | null>;
19
+ setTitle(title: string): Promise<void>;
20
+ getSubtitle(): Promise<string | null>;
21
+ setSubtitle(subtitle: string): Promise<void>;
22
+ getDescription(): Promise<string | null>;
23
+ setDescription(description: string): Promise<void>;
24
+ getAuthors(): Promise<string[]>;
25
+ setAuthors(authors: string[]): Promise<void>;
26
+ getNarrators(): Promise<string[]>;
27
+ setNarrators(narrators: string[]): Promise<void>;
28
+ getCoverArt(): Promise<AttachedImage | null>;
29
+ setCoverArt(picture: AttachedImage): Promise<void>;
30
+ getPublisher(): Promise<string | null>;
31
+ setPublisher(publisher: string): Promise<void>;
32
+ getReleaseDate(): Promise<Date | null>;
33
+ setReleaseDate(date: Date): Promise<void>;
34
+ getDuration(): Promise<number>;
35
+ getResource(): Promise<AudiobookResource>;
36
+ getArrayAndClose(): Promise<Uint8ArrayEntry>;
17
37
  }
18
38
 
19
39
  export { AudiobookEntry, type Uint8ArrayEntry };
package/dist/entry.d.ts CHANGED
@@ -1,19 +1,39 @@
1
- import { Entry } from '@zip.js/zip.js';
2
- import { File } from 'node-taglib-sharp';
3
- import { BaseAudiobookEntry } from './base.js';
1
+ import { Input, MetadataTags, OutputFormat, AttachedImage } from 'mediabunny';
2
+ import { AudiobookChapter, AudiobookResource } from './resources.js';
4
3
 
5
4
  interface Uint8ArrayEntry {
6
5
  filename: string;
7
6
  data: Uint8Array;
8
7
  }
9
- declare class AudiobookEntry extends BaseAudiobookEntry {
10
- protected entry: Uint8ArrayEntry | Entry;
11
- filename: string;
12
- protected file: File | null;
13
- protected readData(): Promise<Uint8Array<ArrayBufferLike>>;
14
- getData(): Promise<Uint8Array<ArrayBufferLike>>;
15
- createFile(): Promise<File>;
16
- constructor(entry: Uint8ArrayEntry | Entry);
8
+ declare abstract class AudiobookEntry {
9
+ abstract filename: string;
10
+ private metadataTags;
11
+ private duration;
12
+ abstract getChapters(): Promise<AudiobookChapter[]>;
13
+ abstract getInput(): Promise<Input> | Input;
14
+ abstract saveAndClose(): Promise<void>;
15
+ getMetadataTags(): Promise<MetadataTags>;
16
+ getOutputFormat(): Promise<OutputFormat | null>;
17
+ getTitle(): Promise<string | null>;
18
+ getTrackTitle(): Promise<string | null>;
19
+ setTitle(title: string): Promise<void>;
20
+ getSubtitle(): Promise<string | null>;
21
+ setSubtitle(subtitle: string): Promise<void>;
22
+ getDescription(): Promise<string | null>;
23
+ setDescription(description: string): Promise<void>;
24
+ getAuthors(): Promise<string[]>;
25
+ setAuthors(authors: string[]): Promise<void>;
26
+ getNarrators(): Promise<string[]>;
27
+ setNarrators(narrators: string[]): Promise<void>;
28
+ getCoverArt(): Promise<AttachedImage | null>;
29
+ setCoverArt(picture: AttachedImage): Promise<void>;
30
+ getPublisher(): Promise<string | null>;
31
+ setPublisher(publisher: string): Promise<void>;
32
+ getReleaseDate(): Promise<Date | null>;
33
+ setReleaseDate(date: Date): Promise<void>;
34
+ getDuration(): Promise<number>;
35
+ getResource(): Promise<AudiobookResource>;
36
+ getArrayAndClose(): Promise<Uint8ArrayEntry>;
17
37
  }
18
38
 
19
39
  export { AudiobookEntry, type Uint8ArrayEntry };