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:
Michael committed 2026-05-19 10:55:01 +02:00
1 parent 8736e4f6a0
commit 59bc56aedc
12 files changed
+46 -265

No files matched your search

+7 -8
View File
@@ -12,7 +12,7 @@ interface FFmpegReelRequest {
music_id?: string; // ID de la musique (catalogue FFmpeg)
music_url?: string; // OU URL directe de la musique
tts_enabled?: boolean; // Activation du TTS
piper_url?: string; // URL du serveur Piper TTS
tts_voice?: string; // Voix TTS (ex: fr-FR-VivienneNeural)
word_duration?: number; // Durée par mot (default: 0.6s)
font_size?: number; // Taille police (default: 24)
music_volume?: number; // Volume musique (default: 0.25)
@@ -71,7 +71,7 @@ export class FFmpegService {
musicId?: string;
musicUrl?: string;
ttsEnabled?: boolean;
piperUrl?: string;
ttsVoice?: string;
wordDuration?: number;
fontSize?: number;
musicVolume?: number;
@@ -90,7 +90,7 @@ export class FFmpegService {
music_id: options.musicId,
music_url: options.musicUrl,
tts_enabled: options.ttsEnabled,
piper_url: options.piperUrl,
tts_voice: options.ttsVoice,
word_duration: options.wordDuration ?? 0.6,
font_size: options.fontSize ?? 64,
music_volume: options.musicVolume ?? 0.25,
@@ -172,7 +172,7 @@ export class FFmpegService {
musicId?: string;
musicUrl?: string;
ttsEnabled?: boolean;
piperUrl?: string;
ttsVoice?: string;
wordDuration?: number;
fontSize?: number;
musicVolume?: number;
@@ -191,7 +191,7 @@ export class FFmpegService {
music_id: options.musicId,
music_url: options.musicUrl,
tts_enabled: options.ttsEnabled,
piper_url: options.piperUrl,
tts_voice: options.ttsVoice,
word_duration: options.wordDuration ?? 0.6,
font_size: options.fontSize ?? 64,
music_volume: options.musicVolume ?? 0.25,
@@ -216,7 +216,6 @@ export class FFmpegService {
hasMusicId: !!options.musicId,
hasMusicUrl: !!options.musicUrl,
ttsEnabled: options.ttsEnabled,
hasPiperUrl: !!options.piperUrl,
drawText: options.drawText,
});
@@ -291,7 +290,7 @@ export class FFmpegService {
}
async previewTTS(
text: string,
piperUrl?: string
ttsVoice?: string
): Promise<{ success: boolean; audioBase64?: string; error?: string }> {
const config = this.ensureConfigured();
@@ -305,7 +304,7 @@ export class FFmpegService {
body: JSON.stringify({
text,
tts_enabled: true,
piper_url: piperUrl,
tts_voice: ttsVoice,
}),
});