This commit is contained in:
2025-06-08 15:21:27 +09:00
parent ca236067e8
commit b5ff912fcb
3 changed files with 217 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import {
openAI_GeneratePodcastContent,
} from "../services/llm.js";
import { generateTTS, generateTTSWithoutQueue } from "../services/tts.js";
import { enhanceArticleContent } from "../services/content-extractor.js";
import {
saveFeed,
getFeedByUrl,
@ -423,11 +424,22 @@ async function generatePodcastForArticle(article: any, abortSignal?: AbortSignal
throw new Error('Podcast generation was cancelled');
}
// Enhance article content with web scraping if needed
console.log(`🔍 Enhancing content for: ${article.title}`);
const enhancedContent = await enhanceArticleContent(
article.title,
article.link,
article.content,
article.description
);
// Generate podcast content for this single article
const podcastContent = await openAI_GeneratePodcastContent(article.title, [
{
title: article.title,
link: article.link,
content: enhancedContent.content,
description: enhancedContent.description,
},
]);