<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href="/feed-style.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>猪发发</title>
        <link>https://blog.zhu88.cc/</link>
        <description>Zhu88 - AI-powered publishing for a global audience.</description>
        <lastBuildDate>Thu, 23 Jul 2026 11:25:15 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>Zhu88</generator>
        <language>zh-CN</language>
        <image>
            <title>猪发发</title>
            <url>https://blog.zhu88.cc/brand/zhu88-share.jpg</url>
            <link>https://blog.zhu88.cc/</link>
        </image>
        <copyright>© 2026 猪发发. All rights reserved.</copyright>
        <atom:link href="https://blog.zhu88.cc/feed.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[人性的缺点]]></title>
            <link>https://blog.zhu88.cc/posts/%E4%BA%BA%E6%80%A7%E7%9A%84%E7%A1%AE%E8%AE%A4</link>
            <guid isPermaLink="false">https://blog.zhu88.cc/posts/%E4%BA%BA%E6%80%A7%E7%9A%84%E7%A1%AE%E8%AE%A4</guid>
            <pubDate>Thu, 23 Jul 2026 11:25:15 GMT</pubDate>
            <description><![CDATA[贪婪、虚荣、短视、偏执偏见、怯懦侥幸 今后的几年能克服其中个别缺点就好了]]></description>
            <content:encoded><![CDATA[<p>贪婪、虚荣、短视、偏执偏见、怯懦侥幸</p>
<p>今后的几年能克服其中个别缺点就好了</p>
]]></content:encoded>
            <author>lsp</author>
            <category>随手记</category>
        </item>
        <item>
            <title><![CDATA[用 StreamCap 和本地 Whisper 总结财经直播：从自动录音到观点报告]]></title>
            <link>https://blog.zhu88.cc/posts/%E7%94%A8-stream-cap-%E5%92%8C%E6%9C%AC%E5%9C%B0-whisper-%E6%80%BB%E7%BB%93%E8%B4%A2%E7%BB%8F%E7%9B%B4%E6%92%AD%EF%BC%9A%E4%BB%8E%E8%87%AA%E5%8A%A8%E5%BD%95%E9%9F%B3%E5%88%B0%E8%A7%82%E7%82%B9%E6%8A%A5%E5%91%8A</link>
            <guid isPermaLink="false">https://blog.zhu88.cc/posts/%E7%94%A8-stream-cap-%E5%92%8C%E6%9C%AC%E5%9C%B0-whisper-%E6%80%BB%E7%BB%93%E8%B4%A2%E7%BB%8F%E7%9B%B4%E6%92%AD%EF%BC%9A%E4%BB%8E%E8%87%AA%E5%8A%A8%E5%BD%95%E9%9F%B3%E5%88%B0%E8%A7%82%E7%82%B9%E6%8A%A5%E5%91%8A</guid>
            <pubDate>Thu, 23 Jul 2026 06:26:59 GMT</pubDate>
            <description><![CDATA[起因 ：最近科技跌的厉害，所以我又重新开始看起了财经直播，准备寻找一个入场的机会，但是财经主播讲的大部分是废话，可能偶尔一两句话是重点，而且一下要看一个小时，于是乎就产生了让 ai 帮我总结的方法。 整体流程 Snipaste 20260723 141953.png 第一步：用 StreamCap 监听并录音 Snipaste 20260723 141921.png StreamCap 是一个基于 FFmpeg 的开源直播录制工具，支持 Windows、macOS 和 Web 方式运行，也支持抖音等多个直播平台。 项目主页： 下载页面： 从 Releas...]]></description>
            <content:encoded><![CDATA[<p><strong>起因</strong>：最近科技跌的厉害，所以我又重新开始看起了财经直播，准备寻找一个入场的机会，但是财经主播讲的大部分是废话，可能偶尔一两句话是重点，而且一下要看一个小时，于是乎就产生了让 ai 帮我总结的方法。</p>
<h2 id="整体流程" tabindex="-1"><a class="header-anchor" href="#整体流程">整体流程</a></h2>
<pre><code class="language-text">主播开播
  ↓
StreamCap 自动监听并分段录音
  ↓
本地 Whisper 转成带时间戳的文字稿
  ↓
GPT 区分观点、论据、预测和事实
  ↓
生成 Markdown 复盘报告
</code></pre>
<p><img src="https://ai-blog.cn-nb1.rains3.com/posts/67e3675feb5fab1b/image/20260723142025574-h5mqzwh.png" alt="Snipaste_20260723_141953.png"></p>
<h2 id="第一步-用-streamcap-监听并录音" tabindex="-1"><a class="header-anchor" href="#第一步-用-streamcap-监听并录音">第一步：用 StreamCap 监听并录音</a></h2>
<p><img src="https://ai-blog.cn-nb1.rains3.com/posts/67e3675feb5fab1b/image/20260723142047284-0o0v36m.png" alt="Snipaste_20260723_141921.png"></p>
<p>StreamCap 是一个基于 FFmpeg 的开源直播录制工具，支持 Windows、macOS 和 Web 方式运行，也支持抖音等多个直播平台。</p>
<ul>
<li>项目主页：<a href="https://github.com/ihmily/StreamCap">https://github.com/ihmily/StreamCap</a></li>
<li>下载页面：<a href="https://github.com/ihmily/StreamCap/releases">https://github.com/ihmily/StreamCap/releases</a></li>
</ul>
<p>从 Release 页面下载与系统对应的版本。Windows 解压后运行，macOS 下载 DMG 后安装即可。只从项目官方页面下载，不使用来历不明的打包版本。</p>
<p>打开 StreamCap 后，添加主播的公开主页地址或直播间地址，然后设置：</p>
<table>
<thead>
<tr>
<th>设置</th>
<th>建议值</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>监控状态</td>
<td>开启</td>
<td>定时检查主播是否开播，开播后自动录制</td>
</tr>
<tr>
<td>录制格式</td>
<td><code>M4A</code> 或 <code>WAV</code></td>
<td>M4A 更省空间；WAV 更通用，但文件很大</td>
</tr>
<tr>
<td>分段录制</td>
<td>开启</td>
<td>长直播损坏时不会丢失整场内容</td>
</tr>
<tr>
<td>分段时长</td>
<td>600 秒</td>
<td>每 10 分钟一个文件，便于转写和重试</td>
</tr>
<tr>
<td>画质</td>
<td>任意</td>
<td>只录音时，最终文件不保存画面</td>
</tr>
<tr>
<td>自动转 MP4</td>
<td>关闭</td>
<td>音频总结不需要视频转码</td>
</tr>
<tr>
<td>录制目录</td>
<td>自定义目录</td>
<td>建议按平台和主播分别保存</td>
</tr>
</tbody>
</table>
<p>这次实测使用的是 <code>WAV</code>：40 分钟约占 404 MB。它没有经过有损压缩，适合排查识别问题，但长期使用没有必要。日常监听更适合 <code>M4A</code>；如果已经录成 WAV，也不需要重新录制，Whisper 可以直接读取。</p>
<p>建议把轮询间隔设得保守一些。频繁请求直播状态可能触发平台风控，项目本身也可能因为抖音接口调整而需要升级。</p>
<h2 id="第二步-安装本地-whisper" tabindex="-1"><a class="header-anchor" href="#第二步-安装本地-whisper">第二步：安装本地 Whisper</a></h2>
<p>下面使用开源的 OpenAI Whisper。它支持中文，并能在 Apple Silicon、NVIDIA GPU 或 CPU 上运行。</p>
<p>先安装 FFmpeg。macOS 可以使用 Homebrew：</p>
<pre><code class="language-bash">brew install ffmpeg
</code></pre>
<p>然后使用 <code>uv</code> 创建独立环境：</p>
<pre><code class="language-bash">uv venv
source .venv/bin/activate
uv pip install openai-whisper
</code></pre>
<p>Windows 激活环境时使用：</p>
<pre><code class="language-powershell">.venv\Scripts\activate
</code></pre>
<p>首次运行会下载模型。中文财经直播建议从 <code>small</code> 开始：它比 <code>base</code>、<code>tiny</code> 更能识别板块名和财经术语，速度又明显快于 <code>large</code>。遇到大量公司名、方言或多人连麦时，再考虑更大的模型。</p>
<h2 id="第三步-批量转写分段音频" tabindex="-1"><a class="header-anchor" href="#第三步-批量转写分段音频">第三步：批量转写分段音频</a></h2>
<p>把下面脚本保存为 <code>transcribe_live.py</code>。它会读取一个目录中的常见音频格式，按文件名排序，输出带全局时间戳的 Markdown 文字稿。</p>
<pre><code class="language-python">import argparse
import json
import subprocess
from pathlib import Path

import torch
import whisper


def media_duration(path: Path) -&gt; float:
    result = subprocess.run(
        [
            &quot;ffprobe&quot;,
            &quot;-v&quot;,
            &quot;error&quot;,
            &quot;-show_entries&quot;,
            &quot;format=duration&quot;,
            &quot;-of&quot;,
            &quot;json&quot;,
            str(path),
        ],
        check=True,
        capture_output=True,
        text=True,
    )
    return float(json.loads(result.stdout)[&quot;format&quot;][&quot;duration&quot;])


def timestamp(seconds: float) -&gt; str:
    total = round(seconds)
    hours, remainder = divmod(total, 3600)
    minutes, seconds = divmod(remainder, 60)
    return f&quot;{hours:02d}:{minutes:02d}:{seconds:02d}&quot;


parser = argparse.ArgumentParser()
parser.add_argument(&quot;audio_dir&quot;, type=Path)
parser.add_argument(&quot;--model&quot;, default=&quot;small&quot;)
parser.add_argument(&quot;--output&quot;, type=Path, default=Path(&quot;transcript.md&quot;))
args = parser.parse_args()

if torch.cuda.is_available():
    device = &quot;cuda&quot;
elif torch.backends.mps.is_available():
    device = &quot;mps&quot;
else:
    device = &quot;cpu&quot;

model = whisper.load_model(args.model, device=device)
extensions = {&quot;.wav&quot;, &quot;.mp3&quot;, &quot;.m4a&quot;, &quot;.aac&quot;, &quot;.flac&quot;}
audio_files = sorted(
    path for path in args.audio_dir.iterdir() if path.suffix.lower() in extensions
)
if not audio_files:
    parser.error(&quot;录音目录中没有找到支持的音频文件&quot;)

offset = 0.0
lines = [&quot;# 直播文字稿&quot;, &quot;&quot;]

for audio_path in audio_files:
    result = model.transcribe(
        str(audio_path),
        language=&quot;zh&quot;,
        fp16=device != &quot;cpu&quot;,
        condition_on_previous_text=True,
        initial_prompt=(
            &quot;这是一场中文财经直播，请准确识别股票、指数、板块、基金、&quot;
            &quot;公司名称、价格、涨跌幅和投资术语。&quot;
        ),
    )

    for segment in result[&quot;segments&quot;]:
        text = segment[&quot;text&quot;].strip()
        if text:
            lines.append(f&quot;[{timestamp(offset + segment['start'])}] {text}&quot;)

    offset += media_duration(audio_path)

args.output.write_text(&quot;\n&quot;.join(lines) + &quot;\n&quot;, encoding=&quot;utf-8&quot;)
print(f&quot;已输出：{args.output}&quot;)
</code></pre>
<p>运行方式：</p>
<pre><code class="language-bash">python transcribe_live.py &quot;/你的/主播录音目录&quot; \
  --model small \
  --output &quot;2026-07-22-直播文字稿.md&quot;
</code></pre>
<p>分段文件必须能按名称正确排序。StreamCap 默认文件名包含时间和分段序号，一般可以直接使用。如果文件名是手工修改过的，先确认排序结果与直播顺序一致。</p>
<h2 id="第四步-让-gpt-提炼观点" tabindex="-1"><a class="header-anchor" href="#第四步-让-gpt-提炼观点">第四步：让 GPT 提炼观点</a></h2>
<p>不要只让 GPT “总结一下”。财经内容需要明确区分主播的立场、观察到的数据和未经验证的推测。可以使用下面的提示词：</p>
<pre><code class="language-text">你是一名严谨的财经内容分析助手。请分析下面的直播文字稿。

要求：
1. 不要把主播观点写成客观事实。
2. 提取核心观点，并为每条观点保留对应时间戳。
3. 分别列出主播给出的论据、预测、操作倾向和风险提示。
4. 标出缺少证据的因果推断、市场传闻和可能的前后矛盾。
5. 股票、指数、公司名或数字如果疑似转写错误，请标记“待核对”，不要自行补造。
6. 最后整理出未来可以验证的三到五条预测。
7. 不提供个性化投资建议。

输出结构：
- 一句话结论
- 核心观点
- 操作与仓位倾向
- 缺少证据或需要核查的内容
- 后续验证清单

直播文字稿：
{在这里粘贴带时间戳的文字稿}
</code></pre>
<p>如果文字稿太长，可以每 10 至 20 分钟总结一次，最后再把各段摘要交给 GPT 做全场归并。第二轮提示中应要求模型合并重复观点、保留变化过程，并指出主播前后是否改变立场。</p>
]]></content:encoded>
            <author>lsp</author>
            <category>AI应用</category>
            <enclosure url="https://ai-blog.cn-nb1.rains3.com/posts/67e3675feb5fab1b/image/ai/20260723142536327-irgxood.png" length="0" type="image/png"/>
        </item>
    </channel>
</rss>