Skip to content

Commit 1614bf4

Browse files
committed
fix(tts): add missing ttsProvider dependency to useCallback hooks
1 parent dad1dfd commit 1614bf4

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RUN pnpm install --frozen-lockfile
2020
COPY . .
2121

2222
# Build the Next.js application
23+
RUN pnpm exec next telemetry disable
2324
RUN pnpm run build
2425

2526
# Expose the port the app runs on

src/contexts/EPUBContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export function EPUBProvider({ children }: { children: ReactNode }) {
329329
console.error('Error creating audiobook:', error);
330330
throw error;
331331
}
332-
}, [extractBookText, apiKey, baseUrl, voice, voiceSpeed]);
332+
}, [extractBookText, apiKey, baseUrl, voice, voiceSpeed, ttsProvider]);
333333

334334
const setRendition = useCallback((rendition: Rendition) => {
335335
bookRef.current = rendition.book;

src/contexts/HTMLContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export function HTMLProvider({ children }: { children: ReactNode }) {
147147
console.error('Error creating audiobook:', error);
148148
throw error;
149149
}
150-
}, [currDocText, currDocName, apiKey, baseUrl, voice, voiceSpeed]);
150+
}, [currDocText, currDocName, apiKey, baseUrl, voice, voiceSpeed, ttsProvider]);
151151

152152
const contextValue = useMemo(() => ({
153153
currDocData,

src/contexts/PDFContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export function PDFProvider({ children }: { children: ReactNode }) {
309309
console.error('Error creating audiobook:', error);
310310
throw error;
311311
}
312-
}, [pdfDocument, headerMargin, footerMargin, leftMargin, rightMargin, apiKey, baseUrl, voice, voiceSpeed]);
312+
}, [pdfDocument, headerMargin, footerMargin, leftMargin, rightMargin, apiKey, baseUrl, voice, voiceSpeed, ttsProvider]);
313313

314314
/**
315315
* Effect hook to initialize TTS as non-EPUB mode

src/contexts/TTSContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ export function TTSProvider({ children }: { children: ReactNode }): ReactElement
500500
});
501501
throw error;
502502
}
503-
}, [voice, speed, ttsModel, ttsInstructions, audioCache, openApiKey, openApiBaseUrl]);
503+
}, [voice, speed, ttsModel, ttsInstructions, audioCache, openApiKey, openApiBaseUrl, configTTSProvider]);
504504

505505
/**
506506
* Processes and plays the current sentence

0 commit comments

Comments
 (0)