openreader/next.config.ts
Sunny 9cdeeca420 perf: optimize audiobook generation with concurrent TTS and stream copy
- Add concurrent TTS processing with configurable limit (3 parallel requests)
- Use FFmpeg stream copy instead of re-encoding for 10-20x faster combining
- Cache chapter durations to sidecar files to avoid repeated ffprobe calls
- Add text chunking for TTS providers with character limits (Groq: 3800, OpenAI: 4096)
- Include WAV and MP3 buffer concatenation for chunked audio
- Add page mapping cache to optimize chapter regeneration
- Increase middleware client max body size to 100mb

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 05:19:36 +00:00

14 lines
252 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
turbopack: {
resolveAlias: {
canvas: './empty-module.ts',
},
},
experimental: {
middlewareClientMaxBodySize: '100mb',
},
};
export default nextConfig;