{ "cells": [ { "cell_type": "markdown", "id": "nb11-000", "metadata": {}, "source": [ "# 11. Short-time energy, zero crossings and voice activity detection\n", "\n", "Recognisers, codecs and diarisers first make an inexpensive decision: whether a frame contains\n", "speech. Voice activity detection (VAD) makes that decision from two per-frame\n", "features that date back to the 1970s: short-time energy (speech is louder than the\n", "background) and the zero-crossing rate (voiced sounds cross zero slowly, fricatives and noise\n", "quickly). This notebook computes both with NumPy on a synthetic utterance and reproduces the\n", "library's VAD decisions exactly.\n", "\n", "**Learning outcomes.** After this notebook you can\n", "\n", "- frame a signal and compute short-time RMS level (dBFS) and zero-crossing rate (ZCR);\n", "- predict both features for silence, voiced and unvoiced frames;\n", "- configure `VadConfig` and explain the regions returned by `speech_regions`;\n", "- convert between the library's two ZCR conventions (per frame, per sample) and\n", " crossings per **second**." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-001", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import librosa\n", "import audio_samples as aus\n", "\n", "rng = np.random.default_rng(0)\n", "F64 = np.dtype(\"float64\") # the generators take a numpy dtype instance" ] }, { "cell_type": "markdown", "id": "nb11-002", "metadata": {}, "source": [ "## Concept\n", "\n", "**Framing.** The signal $x[n]$ (samples scaled to $[-1, 1]$) is cut into frames of $F$\n", "samples that start every $H$ samples; frame $m$ covers $n = mH, \\dots, mH + F - 1$. Typical\n", "speech settings are $F = 25$ ms and $H = 10$ ms, i.e. $F = 400$ and $H = 160$ at\n", "$f_s = 16$ kHz (the sample rate in Hz).\n", "\n", "**Short-time energy** is reported as an RMS level in dBFS:\n", "\n", "$$r_m = \\sqrt{\\frac{1}{F} \\sum_{i=0}^{F-1} x^2[mH + i]}, \\qquad L_m = 20 \\log_{10} r_m\\ \\text{dBFS}$$\n", "\n", "where $r_m$ is the frame RMS (dimensionless, full scale = 1) and $L_m$ the level in decibels\n", "relative to full scale. 0 dBFS is an RMS of 1, so a full-scale sine is at $-3.01$ dBFS in\n", "this convention. dBFS says nothing about loudness in the room: the same file can be played at\n", "any volume (notebook 14).\n", "\n", "**Zero-crossing rate (ZCR)** counts sign changes:\n", "\n", "$$z_m = \\frac{\\#\\{\\text{sign changes in frame } m\\}}{F - 1}$$\n", "\n", "in crossings per sample. A sinusoid at $f$ Hz crosses zero $2f$ times per second, so\n", "$z \\approx 2f / f_s$; conversely a ZCR of $z$ corresponds to a \"dominant frequency\" of about\n", "$z f_s / 2$ Hz. White noise changes sign on about half of all sample pairs, $z \\approx 0.5$.\n", "\n", "**Three classes of speech frame:**\n", "\n", "| class | energy | ZCR |\n", "|---|---|---|\n", "| silence (background) | low | high (noise-like) |\n", "| voiced (vowels, nasals) | high | low (periodic, energy below 1 kHz) |\n", "| unvoiced (fricatives such as /s/) | medium | high (noise-like, energy at 4-8 kHz) |\n", "\n", "**Decision rules.** An energy VAD marks frame $m$ as speech if $L_m \\ge T$, where $T$ is a\n", "threshold in dBFS, equivalently $r_m \\ge 10^{T/20}$. A combined VAD also requires\n", "$z_{min} \\le z_m \\le z_{max}$, which rejects low hum and noise-like frames (and, as shown\n", "below, fricatives).\n", "\n", "**Post-processing.** Raw decisions change state from frame to frame. The library smooths them with a causal majority\n", "vote over $S$ frames, then applies **hangover**: after the last active frame the next $H_o$\n", "frames stay active, which bridges short pauses at the cost of a later offset. Finally,\n", "speech runs shorter than a minimum and silence gaps shorter than a minimum are removed.\n", "\n", "**Two ZCR conventions in the library.** The VAD's ZCR is per frame, in crossings per sample,\n", "and skips exact zeros. `AudioSamples.zero_crossing_rate()` is for the **whole signal** and is\n", "in **crossings per second**; its crossing rule treats an exact zero as non-positive. The\n", "frame-wise `zero_crossing_rate_frames()` uses centred frames and divides by the frame length, so\n", "we compute the VAD's version ourselves." ] }, { "cell_type": "markdown", "id": "nb11-003", "metadata": {}, "source": [ "## With the library\n", "\n", "Build an utterance at 16 kHz with the generators: 300 ms of silence, a 400 ms \"vowel\"\n", "(harmonics of 200 Hz shaped by a resonance at 700 Hz), a 200 ms \"fricative\" (white noise of\n", "amplitude 0.1), 300 ms of silence, plus a $-64.8$ dBFS noise floor (uniform noise of amplitude\n", "$10^{-3}$)." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-004", "metadata": {}, "outputs": [], "source": [ "sr = 16_000\n", "partials = [(200.0 * k, 0.3 / (1 + ((200.0 * k - 700) / 200) ** 2)) for k in range(1, 21)]\n", "vowel = aus.compound_tone(partials, 0.4, sample_rate=sr, dtype=F64).to_numpy()\n", "fricative = aus.white_noise(0.2, sample_rate=sr, amplitude=0.1, dtype=F64, seed=1).to_numpy()\n", "floor = aus.white_noise(1.2, sample_rate=sr, amplitude=1e-3, dtype=F64, seed=2).to_numpy()\n", "x = np.concatenate([np.zeros(4_800), vowel, fricative, np.zeros(4_800)]) + floor\n", "audio = aus.AudioSamples.new_mono(x, sr)\n", "assert len(x) == 19_200" ] }, { "cell_type": "markdown", "id": "nb11-005", "metadata": {}, "source": [ "`VadConfig` is immutable and its constructor takes every field. A small helper copies the\n", "defaults and overrides a few. We run an energy VAD with 25 ms frames, 10 ms hop, a\n", "$-40$ dBFS threshold and no smoothing or minimum-run rules, so that only the threshold and a\n", "1-frame hangover act." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-006", "metadata": {}, "outputs": [], "source": [ "FIELDS = [\"frame_size\", \"hop_size\", \"pad_end\", \"energy_threshold_db\", \"zcr_min\", \"zcr_max\",\n", " \"min_speech_frames\", \"min_silence_frames\", \"hangover_frames\", \"smooth_frames\",\n", " \"speech_band_low_hz\", \"speech_band_high_hz\", \"spectral_ratio_threshold\"]\n", "\n", "\n", "def vad_config(method=aus.VadMethod.energy, **overrides):\n", " base = aus.VadConfig.default()\n", " kwargs = {name: getattr(base, name) for name in FIELDS}\n", " kwargs.update(overrides)\n", " return aus.VadConfig(method, base.channel_policy, **kwargs)\n", "\n", "\n", "cfg = vad_config(aus.VadMethod.energy, frame_size=400, hop_size=160, energy_threshold_db=-40.0,\n", " smooth_frames=1, min_speech_frames=0, min_silence_frames=0, hangover_frames=1)\n", "mask = np.array(audio.voice_activity_mask(cfg))\n", "assert len(mask) == 120 # ceil(19200 / 160) frames (pad_end = True)\n", "\n", "# Vowel + fricative form one region, samples 4480..14960 = 0.280-0.935 s\n", "# (the true speech is 0.300-0.900 s).\n", "regions = audio.speech_regions(cfg)\n", "print(regions)\n", "assert regions == [(4_480, 14_960)]\n", "\n", "# The combined rule (energy AND 0.02 <= ZCR <= 0.30) rejects the noise-like fricative and\n", "# keeps only the vowel (true extent 4800..11200).\n", "combined = vad_config(aus.VadMethod.combined, frame_size=400, hop_size=160,\n", " energy_threshold_db=-40.0, smooth_frames=1, min_speech_frames=0,\n", " min_silence_frames=0, hangover_frames=1)\n", "assert audio.speech_regions(combined) == [(4_640, 11_600)]" ] }, { "cell_type": "markdown", "id": "nb11-007", "metadata": {}, "source": [ "The boundaries follow from the framing. The region starts at the first frame that overlaps the vowel at all:\n", "frame 28 starts at sample $28 \\cdot 160 = 4480$ and its last 80 samples are vowel, which is\n", "enough to exceed $-40$ dBFS. It ends at the end of the first inactive frame after the\n", "hangover: the last frame touching the fricative is frame 89, hangover keeps frame 90 active,\n", "and frame 91 ends at $91 \\cdot 160 + 400 = 14\\,960$. The combined region starts one frame\n", "later because frame 28 is mostly noise floor and so has a noise-like ZCR." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-008", "metadata": {}, "outputs": [], "source": [ "active = np.flatnonzero(mask)\n", "assert active[0] == 28 and active[-1] == 90\n", "assert 28 * 160 == 4_480 and 28 * 160 + 400 - 4_800 == 80 # 80 vowel samples in frame 28\n", "assert (89 * 160 < 14_400 <= 90 * 160) # frame 89 is the last that touches the fricative\n", "assert 91 * 160 + 400 == 14_960" ] }, { "cell_type": "markdown", "id": "nb11-009", "metadata": {}, "source": [ "## How it works\n", "\n", "Compute the two features for every frame with NumPy, check them against theory, and rebuild\n", "the VAD mask with nothing but a threshold and a hangover counter." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-010", "metadata": {}, "outputs": [], "source": [ "F, H = 400, 160\n", "n_frames = -(-len(x) // H) # ceil\n", "padded = np.concatenate([x, np.zeros(F)]) # a short last frame counts as zero-padded\n", "frames = np.stack([padded[m * H:m * H + F] for m in range(n_frames)])\n", "\n", "rms = np.sqrt(np.mean(frames**2, axis=1)) # divide by the full frame length F\n", "\n", "\n", "def zcr_frame(fr):\n", " s = np.sign(fr[fr != 0]) # skip exact zeros\n", " return np.count_nonzero(s[1:] != s[:-1]) / (F - 1)\n", "\n", "\n", "zcr = np.array([zcr_frame(fr) for fr in frames])\n", "L = 20 * np.log10(rms)\n", "\n", "sil, vow, fri = 10, 50, 78 # frames at 0.1, 0.5 and 0.78 s\n", "# Silence: the noise floor, RMS 1e-3/sqrt(3) = -64.8 dBFS (random: +-1 dB).\n", "assert abs(20 * np.log10(1e-3 / np.sqrt(3)) + 64.8) < 0.05\n", "assert abs(L[sil] + 64.8) < 1.0\n", "# Vowel: RMS sqrt(sum a_k^2 / 2) = -11.7 dBFS. A 25 ms frame holds exactly 5 periods of\n", "# 200 Hz, so the frame RMS matches to 0.05 dB.\n", "vowel_rms = np.sqrt(sum(a**2 / 2 for _, a in partials))\n", "assert abs(20 * np.log10(vowel_rms) + 11.7) < 0.05\n", "assert abs(L[vow] - 20 * np.log10(vowel_rms)) < 0.05\n", "# Fricative: uniform noise of amplitude 0.1, RMS 0.1/sqrt(3) = -24.8 dBFS (+-0.5 dB).\n", "assert abs(L[fri] + 24.8) < 0.5\n", "# ZCR: noise-like frames near 0.5; the vowel near 2 * 780 / 16000 = 0.098, set by its\n", "# strongest partials (600 and 800 Hz).\n", "assert abs(zcr[sil] - 0.5) < 0.06 and abs(zcr[fri] - 0.5) < 0.06\n", "assert 0.06 < zcr[vow] < 0.11\n", "print(f\"silence : {L[sil]:6.1f} dBFS, ZCR {zcr[sil]:.3f}\")\n", "print(f\"vowel : {L[vow]:6.1f} dBFS, ZCR {zcr[vow]:.3f}\")\n", "print(f\"fricative: {L[fri]:6.1f} dBFS, ZCR {zcr[fri]:.3f}\")" ] }, { "cell_type": "markdown", "id": "nb11-011", "metadata": {}, "source": [ "**Independent reference.** `librosa.feature.rms` with `center=False` computes the same frame\n", "RMS for every full frame. librosa's `zero_crossing_rate` divides by $F$ instead of $F - 1$ and\n", "also counts a crossing between a frame's first sample and the sample before it, so after\n", "rescaling by $F/(F-1)$ the two can differ by one crossing, $1/(F-1)$." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-012", "metadata": {}, "outputs": [], "source": [ "full = (len(x) - F) // H + 1 # frames that fit entirely inside the signal\n", "rms_lr = librosa.feature.rms(y=x, frame_length=F, hop_length=H, center=False)[0]\n", "assert len(rms_lr) == full\n", "# librosa returns float32 here, so agreement is to float32 precision (1e-6 relative).\n", "assert np.allclose(rms[:full], rms_lr, rtol=1e-6, atol=0)\n", "zcr_lr = librosa.feature.zero_crossing_rate(x, frame_length=F, hop_length=H, center=False)[0]\n", "assert np.all(np.abs(zcr[:full] - zcr_lr * F / (F - 1)) <= 1 / (F - 1) + 1e-6)" ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-013", "metadata": {}, "outputs": [], "source": [ "def hangover(raw, n_hold):\n", " # After the last active frame, keep the next n_hold frames active.\n", " out, hold = [], 0\n", " for v in raw:\n", " if v:\n", " hold = n_hold\n", " out.append(True)\n", " elif hold > 0:\n", " hold -= 1\n", " out.append(True)\n", " else:\n", " out.append(False)\n", " return np.array(out)\n", "\n", "\n", "# The energy VAD: threshold, then a hangover of one frame.\n", "thr = 10 ** (-40 / 20)\n", "mine = hangover(rms >= thr, 1)\n", "assert np.array_equal(mine, mask) # identical decisions\n", "\n", "# Combined rule: energy AND zcr_min <= z <= zcr_max, then the same hangover.\n", "mine_c = hangover((rms >= thr) & (zcr >= 0.02) & (zcr <= 0.30), 1)\n", "assert np.array_equal(mine_c, audio.voice_activity_mask(combined))" ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-014", "metadata": {}, "outputs": [], "source": [ "t_frames = (np.arange(n_frames) * H + F / 2) / sr\n", "fig, axes = plt.subplots(3, 1, figsize=(8, 6), sharex=True)\n", "axes[0].plot(np.arange(len(x)) / sr, x, lw=0.5)\n", "for a, b in regions:\n", " axes[0].axvspan(a / sr, b / sr, color=\"C1\", alpha=0.2, label=\"energy VAD region\")\n", "axes[0].set(ylabel=\"Amplitude\", title=\"Synthetic utterance: silence, vowel, /s/, silence\")\n", "axes[0].legend(fontsize=8, loc=\"upper right\")\n", "axes[1].plot(t_frames, L)\n", "axes[1].axhline(-40, color=\"grey\", ls=\"--\", lw=0.8)\n", "axes[1].set(ylabel=\"Level (dBFS)\")\n", "axes[2].plot(t_frames, zcr)\n", "axes[2].axhspan(0.02, 0.30, color=\"C2\", alpha=0.15)\n", "axes[2].set(ylabel=\"ZCR (crossings/sample)\", xlabel=\"Time (s)\")\n", "fig.tight_layout()\n", "plt.show()" ] }, { "cell_type": "markdown", "id": "nb11-015", "metadata": {}, "source": [ "**The whole-signal ZCR.** `zero_crossing_rate()` is `zero_crossings()` divided by the\n", "duration in seconds. A 500 Hz tone for 1 s gives about $2 \\cdot 500 = 1000$ crossings per\n", "second, which is $1000/16\\,000 = 0.0625$ crossings per sample." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-016", "metadata": {}, "outputs": [], "source": [ "tone = aus.sine_wave(500.0, 1.0, sample_rate=16_000, amplitude=0.5, dtype=F64)\n", "per_second = tone.zero_crossing_rate()\n", "assert per_second == tone.zero_crossings() / 1.0\n", "# Within 2 crossings of 1000 (depends on where the first and last samples fall).\n", "assert abs(per_second - 1_000) <= 2\n", "assert abs(per_second / 16_000 - 0.0625) < 2e-4\n", "# The same count by hand, with the library's rule (zero counts as non-positive).\n", "s = tone.to_numpy() > 0\n", "assert np.count_nonzero(s[1:] != s[:-1]) == tone.zero_crossings()" ] }, { "cell_type": "markdown", "id": "nb11-017", "metadata": {}, "source": [ "## Ask the library to explain\n", "\n", "`VadConfig.explain(sample_rate, n_samples=...)` converts frames, hops and hangover into\n", "milliseconds and the ZCR window into equivalent tone frequencies. The default configuration\n", "(1024-sample frames) is tuned for music-rate audio; at 16 kHz the explainer reports that its\n", "frames are long for speech." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-018", "metadata": {}, "outputs": [], "source": [ "doc = aus.VadConfig.default().explain(16_000.0, n_samples=19_200)\n", "doc" ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-019", "metadata": {}, "outputs": [], "source": [ "assert doc.quantity(\"Frame duration\") == 64.0 # 1024 / 16 kHz, in ms\n", "assert doc.quantity(\"ZCR lower bound as a tone\") == 160.0 # 0.02 x 8 kHz\n", "assert doc.quantity(\"ZCR upper bound as a tone\") == 2_400.0 # 0.30 x 8 kHz\n", "assert doc.has_warning_containing(\"64 ms\")\n", "\n", "speech_cfg = vad_config(frame_size=400, hop_size=160)\n", "doc2 = audio.explain(speech_cfg) # the signal supplies fs and the length\n", "assert doc2.quantity(\"Frame duration\") == 25.0\n", "assert doc2.quantity(\"Hangover\") == 20.0 # 2 frames x 10 ms\n", "assert doc2.quantity(\"Frames\") == 120.0" ] }, { "cell_type": "markdown", "id": "nb11-020", "metadata": {}, "source": [ "## Exercises\n", "\n", "**1. Levels.** Predict the RMS level in dBFS of (a) a full-scale sine and (b) `white_noise`\n", "with amplitude 0.1 (uniform on $[-0.1, 0.1)$). Check with `AudioSamples.rms()`. Put the two\n", "measured levels in `answer` as a tuple." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-021", "metadata": {}, "outputs": [], "source": [ "answer = None # TODO" ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-022", "metadata": { "tags": [ "solution" ] }, "outputs": [], "source": [ "# Solution\n", "sine = aus.sine_wave(1_000.0, 1.0, sample_rate=16_000, amplitude=1.0, dtype=F64)\n", "noise = aus.white_noise(1.0, sample_rate=16_000, amplitude=0.1, dtype=F64, seed=7)\n", "answer = (20 * np.log10(sine.rms()), 20 * np.log10(noise.rms()))\n", "assert abs(answer[0] - 20 * np.log10(1 / np.sqrt(2))) < 1e-3 # -3.01 dB; whole periods: exact\n", "# Uniform noise has RMS a / sqrt(3): -24.77 dBFS. 16000 random samples estimate it to about\n", "# 1 % (0.1 dB).\n", "assert abs(answer[1] + 24.77) < 0.1" ] }, { "cell_type": "markdown", "id": "nb11-023", "metadata": {}, "source": [ "**2. Hangover.** With the energy VAD above, predict how far the end of the speech region moves\n", "when the hangover goes from 1 to 6 frames. Put the end sample with 6 frames in `answer`." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-024", "metadata": {}, "outputs": [], "source": [ "answer = None # TODO" ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-025", "metadata": { "tags": [ "solution" ] }, "outputs": [], "source": [ "# Solution\n", "def end(h):\n", " c = vad_config(aus.VadMethod.energy, frame_size=400, hop_size=160, energy_threshold_db=-40.0,\n", " smooth_frames=1, min_speech_frames=0, min_silence_frames=0, hangover_frames=h)\n", " return audio.speech_regions(c)[0][1]\n", "\n", "answer = end(6)\n", "# Each extra hangover frame keeps one more 10 ms frame active: 5 x 160 = 800 samples later.\n", "assert end(1) == 14_960 and answer == 15_760 and answer - end(1) == 5 * 160" ] }, { "cell_type": "markdown", "id": "nb11-026", "metadata": {}, "source": [ "**3. A loud hum.** A 100 Hz tone at $-10$ dBFS peak is not speech. Predict its per-sample ZCR,\n", "then decide which rule rejects it: energy or combined. Put the number of active frames under\n", "the combined rule in `answer`." ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-027", "metadata": {}, "outputs": [], "source": [ "answer = None # TODO" ] }, { "cell_type": "code", "execution_count": null, "id": "nb11-028", "metadata": { "tags": [ "solution" ] }, "outputs": [], "source": [ "# Solution\n", "amp = 10 ** (-10 / 20) # -10 dBFS peak, -13 dBFS RMS\n", "hum = aus.sine_wave(100.0, 0.5, sample_rate=16_000, amplitude=amp, dtype=F64)\n", "assert abs(20 * np.log10(hum.rms()) + 13.01) < 0.01\n", "h = hum.to_numpy()[1_000:1_400]\n", "z = np.count_nonzero((h[1:] > 0) != (h[:-1] > 0)) / 399\n", "assert abs(z - 2 * 100 / 16_000) < 0.003 # 0.0125: 5 crossings in 400 samples\n", "count = lambda m: int(np.sum(hum.voice_activity_mask(\n", " vad_config(m, frame_size=400, hop_size=160, energy_threshold_db=-40.0))))\n", "assert count(aus.VadMethod.energy) > 0 # loud enough to pass the energy rule\n", "answer = count(aus.VadMethod.combined)\n", "assert answer == 0 # z < z_min = 0.02: rejected" ] }, { "cell_type": "markdown", "id": "nb11-029", "metadata": {}, "source": [ "## Common pitfalls\n", "\n", "- **Units of ZCR.** The VAD uses crossings per sample (per frame); `zero_crossing_rate()`\n", " returns crossings per **second** for the whole signal; `zero_crossing_rate_frames()` returns\n", " a per-frame fraction (crossings / frame length, centred frames by default). Divide by $f_s$\n", " to compare.\n", "- **dBFS conventions.** Levels here are RMS levels (dBFS RMS), so a full-scale sine is\n", " $-3.01$ dBFS; where a peak level is meant it is written \"dBFS peak\" (exercise 3). AES17\n", " calibrates RMS levels so that a full-scale sine reads 0 dBFS.\n", "- **Default frames are long.** `VadConfig.default()` uses 1024 / 512 samples (64 / 32 ms at\n", " 16 kHz); speech VAD normally uses 20-30 ms frames.\n", "- **Fricatives fail the combined rule.** /s/ and /f/ have speech-like energy but noise-like\n", " ZCR, so the default ZCR window (0.02-0.30) drops them. Use the energy rule with hangover if\n", " you need whole words.\n", "- **Smoothing delays onsets.** The majority vote looks only backwards, so onsets are reported\n", " about $(S - 1)/2$ frames late; hangover delays offsets.\n", "- **Regions are wider than the speech.** A region starts at the first frame touching speech and ends at the\n", " end of the first inactive frame.\n", "\n", "## See also\n", "\n", "- Rust guide chapter: (available from the next release; until then build the docs locally with `cargo doc --features educational,full_no_plotting --open`)\n", " and the lab `examples/tutorial_11_energy_vad.rs`.\n", "- Python API: `AudioSamples.voice_activity_mask`, `AudioSamples.speech_regions`,\n", " `audio_samples.VadConfig`, `audio_samples.VadMethod`, `AudioSamples.rms`,\n", " `AudioSamples.zero_crossings`, `AudioSamples.zero_crossing_rate`.\n", "- Previous: [10. Cepstrum, mel and MFCC](10_cepstrum_mel_mfcc.ipynb); next:\n", " [12. Dynamics](12_dynamics.ipynb)." ] }, { "cell_type": "markdown", "id": "references", "metadata": {}, "source": [ "## References\n", "\n", "* Rabiner, L. R. and Sambur, M. R. (1975). An algorithm for determining the endpoints of isolated utterances. *Bell System Technical Journal*, 54(2), 297-315. (Energy plus zero-crossing-rate endpoint detection.)\n", "* Rabiner, L. R. and Schafer, R. W. (1978). *Digital Processing of Speech Signals*. Prentice-Hall. Chapter 4 (short-time energy and zero-crossing rate)." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }