mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-17 20:26:24 +02:00
refactor: remove Piper TTS, keep edge_tts only
- Remove piper_url from ReelRequest model and all function signatures - Remove generate_tts_piper() function and Piper branch in generate_tts_with_subs() - Remove /api/piper/config routes from server/routes.ts - Remove piperConfig table, schemas and storage methods - Remove piper_config migration - Remove Piper TTS settings UI card - Update "Piper TTS" labels to "TTS — voix activée" edge_tts is now the only TTS engine, using precise word-boundary timing
This commit is contained in:
1 parent
8736e4f6a0
commit
59bc56aedc
12 files changed
+46
-265
No files matched your search
+4
-17
@@ -320,18 +320,12 @@ reelsRouter.post('/reels/preview', async (req: Request, res: Response) => {
|
||||
|
||||
const finalWordDuration = wordDuration;
|
||||
|
||||
let piperUrl: string | undefined;
|
||||
if (ttsEnabled) {
|
||||
const piperCfg = await storage.getPiperConfig(user.id);
|
||||
piperUrl = piperCfg?.url ?? undefined;
|
||||
}
|
||||
|
||||
// Traiter la vidéo via FFmpeg
|
||||
const result = await ffmpegService.processReelFromUrl(resolveInternalUrl(media.originalUrl), {
|
||||
text: overlayText,
|
||||
musicUrl: finalMusicUrl,
|
||||
ttsEnabled,
|
||||
piperUrl,
|
||||
ttsVoice,
|
||||
wordDuration: finalWordDuration,
|
||||
fontSize,
|
||||
musicVolume,
|
||||
@@ -370,8 +364,7 @@ reelsRouter.post('/reels/tts-preview', async (req: Request, res: Response) => {
|
||||
return res.status(400).json({ error: 'Texte requis' });
|
||||
}
|
||||
|
||||
const piperCfg = await storage.getPiperConfig(user.id);
|
||||
const result = await ffmpegService.previewTTS(text, piperCfg?.url);
|
||||
const result = await ffmpegService.previewTTS(text, voice);
|
||||
|
||||
if (!result.success) {
|
||||
return res.status(500).json({ error: result.error || 'Erreur de génération TTS' });
|
||||
@@ -550,19 +543,13 @@ async function processReelBackground(
|
||||
|
||||
const finalWordDuration = wordDuration ?? 0.6;
|
||||
|
||||
let piperUrlBg: string | undefined;
|
||||
if (ttsEnabled) {
|
||||
const piperCfg = await storage.getPiperConfig(userId);
|
||||
piperUrlBg = piperCfg?.url ?? undefined;
|
||||
}
|
||||
|
||||
console.log('🔊 [Background] TTS config:', { ttsEnabled, hasPiperUrl: !!piperUrlBg });
|
||||
console.log('🔊 [Background] TTS config:', { ttsEnabled, ttsVoice });
|
||||
|
||||
const ffmpegResult = await ffmpegService.processReelFromUrl(resolveInternalUrl(media.originalUrl), {
|
||||
text: overlayText,
|
||||
musicUrl: finalMusicUrl,
|
||||
ttsEnabled,
|
||||
piperUrl: piperUrlBg,
|
||||
ttsVoice,
|
||||
wordDuration: finalWordDuration,
|
||||
fontSize,
|
||||
musicVolume,
|
||||
|
||||
Reference in new issue
Block a user