mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-18 20:56:54 +02:00
fix(minimax): correct API payload and add TTS debug logging
- Fix model name: speech-2.8-hd -> speech-02-hd - Fix bitrate: 128 -> 128000 bps - Add channel, speed, pitch, vol to voice/audio settings - Handle binary audio response (Content-Type: audio/*) - Fallback audio field lookup: data.data.audio || data.audio - Add background job log: ttsProvider + hasMinimaxKey - Log full FFmpeg request body (text truncated, key masked)
This commit is contained in:
1 parent
35cf21209f
commit
211b7dc272
3 files changed
+39
-10
No files matched your search
@@ -614,9 +614,13 @@ async function processReelBackground(
|
||||
const minimaxCfg = await storage.getMinimaxConfig(userId);
|
||||
if (minimaxCfg?.apiKey) {
|
||||
minimaxApiKeyBg = minimaxCfg.apiKey;
|
||||
} else {
|
||||
console.error('❌ [Background] Minimax API key not found in DB for user:', userId);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('🔊 [Background] TTS config:', { ttsEnabled, ttsProvider, ttsVoice, hasMinimaxKey: !!minimaxApiKeyBg });
|
||||
|
||||
const ffmpegResult = await ffmpegService.processReelFromUrl(resolveInternalUrl(media.originalUrl), {
|
||||
text: overlayText,
|
||||
musicUrl: finalMusicUrl,
|
||||
|
||||
@@ -229,7 +229,9 @@ export class FFmpegService {
|
||||
drawText: options.drawText,
|
||||
});
|
||||
|
||||
console.log('📤 Sending to FFmpeg API:', JSON.stringify(requestBody, null, 2).substring(0, 500) + '...');
|
||||
const debugBody = { ...requestBody };
|
||||
if (debugBody.minimax_api_key) debugBody.minimax_api_key = '***';
|
||||
console.log('📤 Sending to FFmpeg API:', JSON.stringify({ ...debugBody, text: debugBody.text ? `[${debugBody.text.length} chars]` : undefined }));
|
||||
|
||||
try {
|
||||
const response = await fetch(`${config.apiUrl}/process-reel`, {
|
||||
|
||||
Reference in new issue
Block a user