@ducci/jarvis 1.0.90 → 1.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -697,6 +697,7 @@ export async function startTelegramChannel(config) {
|
|
|
697
697
|
await sendMessage(api, chatId, displayText, result.sessionId);
|
|
698
698
|
console.log(`[telegram] response sent chat_id=${chatId} slot=${slot} length=${displayText.length}`);
|
|
699
699
|
// TTS: send audio summary if voice is enabled (config.voiceEnabled checked live, updated by /voice toggle)
|
|
700
|
+
await api.sendMessage(chatId, `[TTS debug] voiceEnabled=${config.voiceEnabled} hasKey=${!!config.fishAudioApiKey}`).catch(() => {});
|
|
700
701
|
if (config.voiceEnabled && config.fishAudioApiKey) {
|
|
701
702
|
try {
|
|
702
703
|
// If the response is a raw JSON blob (format_error recovery), extract the actual text
|
|
@@ -708,8 +709,10 @@ export async function startTelegramChannel(config) {
|
|
|
708
709
|
const plain = toPlainText(ttsSource);
|
|
709
710
|
if (plain) {
|
|
710
711
|
const ttsText = await generateTtsSummary(plain, config);
|
|
712
|
+
await api.sendMessage(chatId, `[TTS debug] plain: "${plain.slice(0, 300)}"\nsummary: "${ttsText}"`).catch(() => {});
|
|
711
713
|
if (ttsText) {
|
|
712
714
|
const audioBuffer = await textToSpeech(ttsText, config);
|
|
715
|
+
await api.sendMessage(chatId, `[TTS debug] audio bytes: ${audioBuffer.length}`).catch(() => {});
|
|
713
716
|
await api.sendAudio(chatId, new InputFile(audioBuffer, 'response.mp3'));
|
|
714
717
|
console.log(`[telegram] voice sent chat_id=${chatId} slot=${slot} tts_chars=${ttsText.length}`);
|
|
715
718
|
}
|