mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +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
+1
-38
@@ -10,7 +10,7 @@ import passport from "./auth";
|
||||
import { z } from "zod";
|
||||
import { openRouterService } from "./services/openrouter";
|
||||
import { minioService as cloudinaryService, buildMinioUrl } from "./services/minio";
|
||||
import { insertPostSchema, insertScheduledPostSchema, insertSocialPageSchema, insertAiGenerationSchema, insertCloudinaryConfigSchema, updateCloudinaryConfigSchema, insertOpenrouterConfigSchema, updateOpenrouterConfigSchema, insertPiperConfigSchema, updatePiperConfigSchema, insertUserSchema, postMedia, type SocialPage } from "@shared/schema";
|
||||
import { insertPostSchema, insertScheduledPostSchema, insertSocialPageSchema, insertAiGenerationSchema, insertCloudinaryConfigSchema, updateCloudinaryConfigSchema, insertOpenrouterConfigSchema, updateOpenrouterConfigSchema, insertUserSchema, postMedia, type SocialPage } from "@shared/schema";
|
||||
import type { User, InsertUser, ScheduledPost } from "@shared/schema";
|
||||
import { analyticsRouter } from "./routes/analytics";
|
||||
import { reelsRouter } from "./routes/reels";
|
||||
@@ -423,43 +423,6 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
// Analytics Routes
|
||||
app.use("/api/analytics", requireAuth, analyticsRouter);
|
||||
|
||||
// Piper TTS Configuration Routes
|
||||
app.get("/api/piper/config", requireAuth, async (req, res) => {
|
||||
try {
|
||||
const user = req.user as User;
|
||||
const config = await storage.getPiperConfig(user.id);
|
||||
if (!config) {
|
||||
return res.json(null);
|
||||
}
|
||||
return res.json(config);
|
||||
} catch (error) {
|
||||
console.error("Error fetching Piper config:", error);
|
||||
res.status(500).json({ error: "Failed to fetch configuration" });
|
||||
}
|
||||
});
|
||||
|
||||
app.post("/api/piper/config", requireAuth, async (req, res) => {
|
||||
try {
|
||||
const user = req.user as User;
|
||||
const data = updatePiperConfigSchema.parse(req.body);
|
||||
|
||||
let config = await storage.getPiperConfig(user.id);
|
||||
if (config) {
|
||||
config = await storage.updatePiperConfig(user.id, data);
|
||||
} else {
|
||||
if (!data.url) {
|
||||
return res.status(400).json({ error: "URL is required" });
|
||||
}
|
||||
config = await storage.createPiperConfig({ ...data as any, userId: user.id });
|
||||
}
|
||||
|
||||
res.json({ success: true });
|
||||
} catch (error) {
|
||||
console.error("Error saving Piper config:", error);
|
||||
res.status(500).json({ error: "Failed to save configuration" });
|
||||
}
|
||||
});
|
||||
|
||||
// Reels & Music Routes
|
||||
app.use("/api", requireAuth, reelsRouter);
|
||||
app.use("/api/remotion", requireAuth, remotionRouter);
|
||||
|
||||
Reference in new issue
Block a user