Interactive labs for speech recognition, speech synthesis, and audio in general: in-browser DSP experiments, algorithms, datasets, and a learning path, without storing any recording.
Educational content in the form of a scientific draft that needs expert review before being adopted as an academic reference. No experimental result that was not actually run is shown here.
Definition
A simple method for identifying the frames that contain speech by comparing the energy of each short frame with a threshold derived from the noise floor. It does not need a trained model.
Mathematical Idea
We split the signal into frames (for example 25 ms with a 10 ms hop) and compute $E_m=\sum_n x^2[n]$ and then $E_{dB}=10\log_{10}(E_m+\varepsilon)$. We estimate the noise floor as a low percentile of $E_{dB}$ and set the threshold $T=\text{floor}+\delta$. A frame is active if it exceeds the threshold. Temporal smoothing (hangover) is usually added to avoid fragmentation.
How It Works
We split the signal into short frames.
We compute the energy of each frame.
We convert it to decibels.
We estimate the noise floor (a low percentile).
We set the threshold and classify the frames.
We smooth the decisions and merge adjacent segments.
Stages Diagram
Frames
Energy
dB
Adaptive threshold
Smoothing
Speech segments
Equations
$$E_m=\sum_{n=0}^{L-1} x^2[mH+n]$$
The energy of frame $m$ with length $L$ and hop $H$.
$\delta$ is a margin in decibels above the noise floor.
Advantages
Very fast and works in real time.
Requires no training.
Transparent and easy to tune.
Limitations
Breaks down with high or variable noise.
Cannot distinguish speech from high-energy noise.
The threshold needs tuning per recording.
Use Cases
Trimming silence before ASR.
Segmenting long recordings.
Saving computation in audio systems.
Applied Example
A two-second signal containing a one-second active segment: the code counts the active frames × 10 ms, giving about one second (1.02 s in the experiment because of the window width).
Code Example
PythonImplemented and Tested
import numpy as np
rng = np.random.default_rng(0)
sr = 16000
t = np.arange(sr)/sr
x = 0.01*rng.standard_normal(2*sr) # background noise
x[sr//2:sr//2+sr] += 0.3*np.sin(2*np.pi*200*t) # active segment one second long
fl, hop = 400, 160 # 25 ms and 10 ms
n = 1 + (len(x) - fl)//hop
E = np.array([np.sum(x[i*hop:i*hop+fl]**2) for i in range(n)])
E_db = 10*np.log10(E + 1e-12)
floor = np.percentile(E_db, 10) # noise floor estimate
active = E_db > floor + 10 # threshold = floor + 10 dB
print("active seconds:", round(active.sum()*hop/sr, 2))
Silero Team. Silero VAD (software repository). GitHub.Source
McFee, Raffel, Liang, Ellis, McVicar, Battenberg, et al.. librosa: Audio and Music Signal Analysis in Python. Proceedings of the 14th Python in Science Conference (2015).DOI
Audio processing in the experiments takes place inside your browser. Audio, texts, and conversations are not saved on the server. Privacy Policy
Assistant Professor of Artificial Intelligence and Deep Learning
University of Al-Qadisiyah
About
Researcher and academic specialising in artificial intelligence (AI), deep learning, computer vision and natural language processing (NLP). The “Deep Learning in Arabic” project aims to enrich Arabic scientific and technical content with sound, free references and software for researchers and learners across the Arab world.
Smart Audio Assistant
I am the lab's Audio Assistant. Ask me about an algorithm, model, dataset, or experiment, and I will answer from the lab's content with links.
Smart Audio Assistant
Local mode: the lab's database
It answers from the lab's database only, without sending your question to any external party. Conversations and audio are not saved.
Smart assistant
Answers from the site’s content
The assistant can make mistakes, so check the attached sources.
Welcome! I am Dr. Alaa Taima, and this is my smart assistant on “Deep Learning in Arabic”. Ask it about any term or topic in artificial intelligence, and it will answer from the site's content with links to the sources.
DL Bot
Your smart assistant · Connecting…
Enter to send · Shift + Enter for a new line · The assistant can make mistakes, so check the sources.