From 797e12dde5b1074acf6d5b5502a158e248e8ae63 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Tue, 19 May 2026 09:15:26 +0200 Subject: [PATCH] refactor(tts): replace Minimax+Freesound with Piper TTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove Minimax Speech API and Freesound integrations entirely. Add Piper TTS as the sole TTS provider via configurable HTTP URL. - Add piper_config DB table (url field, per-user) - Add GET/POST /api/piper/config routes - Python: replace generate_tts_minimax with generate_tts_piper (GET ?text=, WAV→MP3) - Simplify generate_tts_with_subs: piper_url param replaces tts_provider+minimax fields - Drop ttsVoice/ttsProvider from all UI, API, and background job params - Settings page: replace Minimax+Freesound cards with single Piper URL input - Remove freeSoundService init from server startup and CSP headers Co-Authored-By: Claude Sonnet 4.6 --- client/src/pages/mobile/new-reel.tsx | 35 +--- client/src/pages/mobile/remotion-video.tsx | 21 +-- client/src/pages/new-reel.tsx | 79 +-------- client/src/pages/remotion-video.tsx | 21 +-- client/src/pages/settings.tsx | 190 ++++----------------- ffmpeg-service/main.py | 133 ++++----------- server/index.ts | 32 +--- server/migrate.ts | 14 +- server/routes.ts | 93 ++-------- server/routes/reels.ts | 121 +++---------- server/routes/remotion.ts | 3 +- server/services/ffmpeg.ts | 39 +---- server/storage.ts | 52 ++---- shared/schema.ts | 44 +---- 14 files changed, 152 insertions(+), 725 deletions(-) diff --git a/client/src/pages/mobile/new-reel.tsx b/client/src/pages/mobile/new-reel.tsx index 77e6173..4c0f6f7 100644 --- a/client/src/pages/mobile/new-reel.tsx +++ b/client/src/pages/mobile/new-reel.tsx @@ -58,7 +58,6 @@ export default function MobileNewReel() { // État TTS const [ttsEnabled, setTtsEnabled] = useState(false); - const [ttsVoice, setTtsVoice] = useState("fr-FR-VivienneMultilingualNeural"); // État audio preview const [isPlaying, setIsPlaying] = useState(null); @@ -83,14 +82,14 @@ export default function MobileNewReel() { const timer = setTimeout(() => { apiRequest('POST', '/api/reels/sync-info', { text: overlayText, - voice: ttsVoice, + voice: "fr-FR-VivienneMultilingualNeural", }) .then(r => r.json()) .then(data => setSyncInfo(data)) .catch(() => setSyncInfo(null)); }, 800); return () => clearTimeout(timer); - }, [overlayText, ttsVoice, ttsEnabled]); + }, [overlayText, ttsEnabled]); const { data: pages = [] } = useQuery({ @@ -231,7 +230,6 @@ export default function MobileNewReel() { stabilize: stabilize, drawText: true, ttsEnabled, - ttsVoice, enableEndingEffect, }); }; @@ -448,33 +446,9 @@ export default function MobileNewReel() { {ttsEnabled && (
-