跳到正文

Hacker News Daily Broadcast

热门趋势维护中
miantiao-me/hacker-podcast

AI 驱动的 Hacker News 中文播客项目,每天自动抓取 Hacker News 热门文章,生成中文摘要并转换为播客内容。

在 GitHub 查看
星标
2561
Fork
239
关注
2561
未关闭 Issue
1

该介绍目前仅提供英文版本。

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

  1. Data Collection: Scheduled scraping of popular Hacker News articles
  2. Content Processing: AI generation of Chinese summaries and broadcast scripts
  3. Audio Conversion: Transformation into audio using TTS (sponsored by Minimax Audio)
  4. Storage: Content saved to Cloudflare R2 and KV
  5. 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

  1. Install Dependencies:

    pnpm install
  2. Configure Environment Variables:

    .dev.vars:

    NEXTJS_ENV=development
    NEXT_STATIC_HOST=http://localhost:3000/static

    worker/.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
  3. Start Development Servers:

    For workflow development:

    pnpm dev:worker

    For web page development:

    pnpm dev

Deployment

The project is deployed using Cloudflare Workers:

  1. Create an R2 file storage bucket and bind a domain

  2. Create a KV storage space

  3. Modify the KV and R2 values in wrangler.json

  4. 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
  5. 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 test for 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.

按共同分类和标签排序的同类开源项目。

全部 AI 项目 →