关于「语音活动检测:端点等待是延迟的地板」,《情境感知副官的阈值与预算》给出的定量结论是什么?

结论:整条音轨有 498,384 个采样点,切成 3,114 帧。噪声底估计为 -32.7 分贝。底噪帧共 1,442 帧,能量在底噪附近(-0.2 分贝),过零率 0.143。浊音帧 1,073 帧,平均高出底噪 12.1 分贝,过零率只有 0.060。擦音帧 160 帧,平均只高出 3.9 分贝,过零率却高达 0.468。句中停顿 420 帧,特征与底噪几乎一样(-0.2 分贝、0.150)。敲击声 19 帧,能量高出 7.7 分贝,过零率 0.351。

数据口径:语音端点等待是延迟的地板,示意架构下端到端延迟中位数 1,083 毫秒、95 分位 1,540 毫秒,一秒内完成的只有 0.323,「零延迟」「人类开口前」「电影级」都被改写为分位数与推翻条件。 书中参数为示意,数据为合成;全部计算由书中 23 段标准库程序生成。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: -0.2, -32.7, 0.060, 0.143, 0.150, 0.351

track: 498,384 samples, 3,114 frames, 30 utterances
noise floor -32.7 dB
kindframesenergy dB above floormean ZCR
background1,442-0.20.143
click197.70.351
voiced1,07312.10.060
fricative1603.90.468
pause420-0.20.150
fricative frames below +6 dB: 0.906
查看完整验算程序
# Chapter 2. p21: synthetic audio frames, short-time energy and ZCR.
# 8 kHz samples, 20 ms frames (160 samples). Background is low-passed
# Gaussian noise (one-pole, a = 0.9). Utterances hold 2 to 5 words;
# a word is an optional weak fricative (high-passed uniform noise) and
# a voiced stretch (f0 110 to 220 Hz plus two harmonics, sine envelope);
# pauses of 40 to 220 ms sit between words. Gaps between utterances
# may hold a 30 ms click. Kinds: 0 background, 1 click, 2 voiced,
# 3 fricative, 4 in-utterance pause. All parameters are illustrative.
import math
import random

FS, FRAME = 8000, 160


def make_track(rng, noise_sd, n_utt=30):
    x, kind, utts = [], [], []
    st = [0.0, 0.0]

    def bg():
        st[0] = 0.9 * st[0] + rng.gauss(0.0, noise_sd)
        return st[0]

    def gap(ms, k, click=False):
        n = FS * ms // 1000
        c0 = rng.randrange(n) if click else -1
        for t in range(n):
            hit = click and 0 <= t - c0 < 240
            pop = 0.0
            if hit:
                pop = 0.4 * math.exp(-(t - c0) / 60.0) * rng.uniform(-1, 1)
            x.append(bg() + pop)
            kind.append(1 if hit else k)

    def fricative(ms):
        a = rng.uniform(0.02, 0.05)
        for _ in range(FS * ms // 1000):
            w = rng.uniform(-1.0, 1.0)
            x.append(bg() + a * (w - st[1]))
            st[1] = w
            kind.append(3)

    def voiced(ms):
        n = FS * ms // 1000
        a, f0 = rng.uniform(0.12, 0.3), rng.uniform(110.0, 220.0)
        for t in range(n):
            env = math.sin(math.pi * (t + 0.5) / n)
            ph = 2.0 * math.pi * f0 * t / FS
            s = math.sin(ph) + 0.5 * math.sin(2 * ph) + \
                0.25 * math.sin(3 * ph)
            x.append(bg() + a * env * s)
            kind.append(2)

    gap(1000, 0)
    for _ in range(n_utt):
        start = len(x)
        words = rng.randint(2, 5)
        for w in range(words):
            if rng.random() < 0.4:
                fricative(rng.randint(50, 110))
            voiced(rng.randint(120, 320))
            if w < words - 1:
                gap(rng.randint(40, 220), 4)
        utts.append((start, len(x)))
        gap(rng.randint(500, 1400), 0, click=rng.random() < 0.35)
    return x, kind, utts


def features(x):
    out = []
    for f in range(len(x) // FRAME):
        seg = x[f * FRAME:(f + 1) * FRAME]
        e = math.fsum(v * v for v in seg) / FRAME
        zc = 0
        for a, b in zip(seg, seg[1:]):
            if (a >= 0.0) != (b >= 0.0):
                zc += 1
        out.append((10.0 * math.log10(e + 1e-12), zc / (FRAME - 1)))
    return out


def noise_floor(feats):
    first = sorted(e for e, _ in feats[:50])
    return first[len(first) // 2]


if __name__ == "__main__":
    rng = random.Random(40921)
    x, kind, utts = make_track(rng, 0.01)
    feats = features(x)
    floor = noise_floor(feats)
    names = ["background", "click", "voiced", "fricative", "pause"]
    groups = {k: [] for k in range(5)}
    for f, (e, z) in enumerate(feats):
        ks = kind[f * FRAME:(f + 1) * FRAME]
        k = max(range(5), key=ks.count)
        groups[k].append((e - floor, z))
    print("track: {:,} samples, {:,} frames, {} utterances".format(
        len(x), len(feats), len(utts)))
    print("noise floor {:.1f} dB".format(floor))
    print("  kind         frames  energy dB above floor  mean ZCR")
    for k in range(5):
        g = groups[k]
        me = math.fsum(e for e, _ in g) / len(g)
        mz = math.fsum(z for _, z in g) / len(g)
        print("  {:<11} {:>7,}  {:>12.1f}          {:.3f}".format(
            names[k], len(g), me, mz))
    fr = groups[3]
    lo = 0
    for e, _ in fr:
        if e < 6.0:
            lo += 1
    print("fricative frames below +6 dB: {:.3f}".format(lo / len(fr)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《全天候多模态情境感知智能副官、低延迟视听记忆流与主动预判辅助母典》第 2 章「语音活动检测:端点等待是延迟的地板」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-409 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026409,
  author    = {Fan, Yafu},
  title     = {Ambient Multimodal Cognitive Adjutants: Low-Latency Audio-Visual Memory Streams, Proactive Intent Anticipation and Real-Time Decision Support},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论