该介绍目前仅提供英文版本。
An AI-powered Hacker News podcast project that automatically fetches popular articles daily, generates summaries, and converts them into podcast content.
Overview
Hacker News Daily Broadcast is an innovative project that bridges the gap between English tech news and Chinese audiences. It automatically harvests trending articles from Hacker News, uses AI to create concise Chinese summaries, and transforms them into audio content accessible via both web and podcast apps.
Preview: https://hacker-news.agi.li
Subscribe: https://hacker-news.agi.li/rss.xml
Key Features
- 🤖 Automated Content Curation: Daily collection of trending articles from Hacker News
- 🎯 AI-Powered Summarization: Intelligent summarization of articles and comments
- 🎙️ Text-to-Speech Synthesis: High-quality Chinese audio generation via Edge TTS
- 📱 Multi-Platform Access: Support for web browsers and podcast apps
- 🔄 Daily Updates: Automatic content refreshment
- 📝 Full Text Availability: Access to both article summaries and complete broadcast transcripts
Technology Stack
- Frontend Framework: Next.js
- Deployment Environment: Cloudflare Workers
- Audio Synthesis: Edge TTS
- Content Generation: OpenAI API
- Styling: Tailwind CSS
- UI Components: shadcn-ui
Workflow
- Data Collection: Scheduled scraping of popular Hacker News articles
- Content Processing: AI generation of Chinese summaries and broadcast scripts
- Audio Conversion: Transformation into audio using TTS (sponsored by Minimax Audio)
- Storage: Content saved to Cloudflare R2 and KV
- Distribution: Access provided via RSS feed and web interface
Local Development
The project consists of a Worker component for data collection and audio processing, and a Web program for displaying data and providing RSS subscriptions.
Prerequisites
- Node.js
- pnpm
- Cloudflare account (for R2 storage, KV storage, workflows, and browser rendering)
Setup Instructions
-
Install Dependencies:
pnpm install -
Configure Environment Variables:
.dev.vars:
NEXTJS_ENV=development NEXT_STATIC_HOST=http://localhost:3000/staticworker/.dev.vars:
WORKER_ENV=development HACKER_NEWS_WORKER_URL=https://your-worker-url HACKER_NEWS_R2_BUCKET_URL=https://your-bucket-url OPENAI_API_KEY=your_api_key OPENAI_BASE_URL=https://api.openai.com/v1 OPENAI_MODEL=gpt-4.1 -
Start Development Servers:
For workflow development:
pnpm dev:workerFor web page development:
pnpm dev
Deployment
The project is deployed using Cloudflare Workers:
-
Create an R2 file storage bucket and bind a domain
-
Create a KV storage space
-
Modify the KV and R2 values in
wrangler.json -
Configure environment variables using
wrangler:# Update Worker private variables wrangler secret put --cwd worker HACKER_NEWS_WORKER_URL wrangler secret put --cwd worker HACKER_NEWS_R2_BUCKET_URL wrangler secret put --cwd worker OPENAI_API_KEY wrangler secret put --cwd worker OPENAI_BASE_URL wrangler secret put --cwd worker OPENAI_MODEL # Update Web program private variables wrangler secret put NEXT_STATIC_HOST -
Deploy the application:
pnpm deploy:worker pnpm deploy
Notes for Developers
- When running the workflow locally, Edge TTS audio conversion may hang. Consider commenting out this portion of the code for debugging.
- Audio merging requires Cloudflare’s browser-side rendering, which isn’t supported in local development and needs remote debugging.
- Use
npm run testfor testing.
Contributing
Issues and Pull Requests are welcome!
Sponsors
- Minimax Audio: Bringing text to life with voice
Disclaimer
This project is not affiliated with Hacker News or Y Combinator. “Hacker News” is a registered trademark of Y Combinator.