mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
feat(books): add read-aloud generation
Generate a synced read-aloud EPUB from a book's EPUB and audiobook through an optional STAlign worker (Docker on CPU, or native with MLX on Apple Silicon), with review, re-sync, replace in place, restart recovery and live progress on the Files tab. Book details also stack the ebook and audiobook covers when both exist. See docs/READ_ALOUD.md.
This commit is contained in:
@@ -67,6 +67,17 @@ export const audiolessEpubConfig = registerAs('audiolessEpub', () => ({
|
||||
maxOutputBytes: parsePositiveInteger(process.env.AUDIOLESS_EPUB_MAX_OUTPUT_BYTES, 2 * 1024 * 1024 * 1024),
|
||||
}));
|
||||
|
||||
export const readAloudConfig = registerAs('readAloud', () => {
|
||||
const appDataPath = resolve(process.env.APP_DATA_PATH ?? '/data');
|
||||
return {
|
||||
workerUrl: process.env.READ_ALOUD_WORKER_URL?.trim().replace(/\/$/, '') || undefined,
|
||||
workerToken: process.env.READ_ALOUD_WORKER_TOKEN?.trim() || undefined,
|
||||
workRoot: join(appDataPath, 'read-aloud', 'jobs'),
|
||||
maxOutputBytes: parsePositiveInteger(process.env.READ_ALOUD_MAX_OUTPUT_BYTES, 20 * 1024 * 1024 * 1024),
|
||||
requestTimeoutMs: parsePositiveInteger(process.env.READ_ALOUD_WORKER_REQUEST_TIMEOUT_MS, 30_000),
|
||||
};
|
||||
});
|
||||
|
||||
export const emailConfig = registerAs('email', () => ({
|
||||
encryptionKey: process.env.EMAIL_ENCRYPTION_KEY ?? '',
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user