Skip to content

ライブコメント連動 / Live Comment Integration

概要 / Overview

YouTube Live と TikTok Live のチャットコメントをリアルタイムで取得し、John と Sara がコメントに反応・会話する。視聴者は「見るだけ」ではなく、キャラクターの生活に参加できる。

Fetch chat comments from YouTube Live and TikTok Live in real-time. John and Sara react and respond to comments. Viewers don't just watch — they participate.

2つの速度 / Two Response Speeds

┌───────────────────────────────────────────────────────────┐
│                                                           │
│  🔴 TIPS (Super Chat / TikTok Gift)                       │
│     → IMMEDIATE RESPONSE                                  │
│     → 即時反応                                             │
│     → Characters always react, thank by name               │
│                                                           │
│  🟢 FREE COMMENTS                                         │
│     → BATCHED EVERY 10 MINUTES                            │
│     → 10分ごとにまとめて反応                               │
│     → AI picks notable comments to respond to             │
│                                                           │
└───────────────────────────────────────────────────────────┘

コメント処理フロー / Comment Processing Flow

YouTube Live Chat / TikTok Live Comments


┌──────────────────┐
│ Comment Poller   │ ← YouTube: 5s polling / TikTok: WebSocket
└────────┬─────────┘


┌──────────────────┐
│ Filter &         │ ← Spam/NG word removal, language detection
│ Classifier       │
└────────┬─────────┘

         ├──▶ [TIP] Super Chat / TikTok Gift
         │       → IMMEDIATE: interrupt current action
         │       → Generate reaction + thank you

         └──▶ [FREE COMMENT] → Queue for 10-min cycle

                 ├── [Talk-to] "John!" "Sara, what's for dinner?"
                 ├── [Cheer] "Go for it!" "So cute!"
                 ├── [Question] "How old is Eve?" "Favorite food?"
                 └── [Suggestion] "Go for a walk!" "Make curry today"

10分サイクルでのコメント処理 / Comment Handling in 10-min Cycle

コメント選択ルール / Comment Selection Rules

10分間に溜まったコメントから、以下のルールでピックアップ:

RuleDetail
Max responses per cycle2-3 comments per 10-min cycle
Same userMax 1 response per 30 min
Low comment volume (< 10/10min)Respond to most
High comment volume (> 50/10min)Cherry-pick interesting ones
LanguageRespond in the comment's language (JP/EN)

話しかけ対象の判定 / Target Detection

PatternResponse
Contains "John" / "ジョン"John responds
Contains "Sara" / "サラ"Sara responds
Contains "Eve" / "イブ"Nearby human responds ("Eve says hi!" etc.)
No specific nameWhoever is currently idle responds

コメント反応の演出 / Comment Reaction Display

Free comment: "Sara, what's for dinner tonight?"

  ┌───────────────────────────────────┐
  │ Screen display:                    │
  │                                    │
  │ "!" mark above Sara's head         │
  │    ↓                               │
  │ Speech bubble:                     │
  │ "Hmm, let me check the fridge...   │
  │  Maybe pasta today!"               │
  │                                    │
  │ Comment attribution:               │
  │ "To: cooking_fan_123"              │
  └───────────────────────────────────┘

投げ銭コメントの即時処理 / Immediate Tip Processing

投げ銭は現在の10分サイクルを中断して即座に処理する。

Tips interrupt the current 10-min cycle and are processed immediately.

Super Chat (¥500) from yuki_chan: "A kotatsu for you two!"

  ┌───────────────────────────────────┐
  │ 1. Tip effect (screen top)         │
  │    "¥500 from yuki_chan!"          │
  │                                    │
  │ 2. Item appears                    │
  │    Kotatsu materializes in room    │
  │                                    │
  │ 3. Character reactions (immediate) │
  │    John: "Whoa, a kotatsu!         │
  │          Thanks yuki_chan!"         │
  │    Sara: "Yay! Now we can stay     │
  │          warm this winter!"        │
  │                                    │
  │ 4. Eve's reaction                  │
  │    Eve walks over, sniffs it,      │
  │    lies down next to it            │
  └───────────────────────────────────┘

バイリンガル対応 / Bilingual Support

Characters detect the comment language and respond accordingly:

Comment LanguageResponse LanguageExample
JapaneseJapanese「ありがとう!今日はカレー作るよ!」
EnglishEnglish"Thanks! I'm making curry today!"
MixedPrimary language of commentFollow the dominant language

エージェントプロンプトでの指示 / Agent Prompt Instructions

You are bilingual (Japanese/English).
Detect the language of viewer comments and respond in the same language.
- Japanese comment → respond in Japanese
- English comment → respond in English
- Keep your character personality consistent across languages.

視聴者参加イベント / Viewer Participation Events

コメント集計で発生する特別イベント(10分サイクルのタイミングで判定):

ConditionEvent
10+ "がんばれ"/"Go for it" in 10minMotivation UP effect
5+ "おやすみ"/"Good night"Goodnight scene with wave
Multiple "Don't fight!"Makeup probability UP
30+ "Eve"/"イブ" in 10minEve does a special cute action
100+ comments in 10min"It's lively today!" meta conversation