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 probabilistic model for sequences generated from hidden states that transition according to a Markov chain, where each state emits observations with a probability distribution. It was the foundation of speech recognition systems before deep networks.
Mathematical Idea
Parameters: the initial distribution $\pi$, the transition matrix $A$, and the emission probabilities $B$. The forward algorithm computes the sequence probability by the recursion $\alpha_t(j)=[\sum_i\alpha_{t-1}(i)a_{ij}]b_j(o_t)$ with complexity $O(TN^2)$. The Viterbi algorithm replaces the sum with a max to find the most likely state path. The model is trained with the Baum–Welch algorithm (a special case of EM).
How It Works
Define the states (for example silence/speech or phonemes).
Define $\pi$, $A$, and $B$.
Compute the probability with the forward algorithm.
Requires separate emission models (GMM or a network).
Less accurate than modern deep models.
Use Cases
Classical speech recognition (GMM-HMM).
Voice activity detection and segmentation.
Modeling temporal sound events.
Applied Example
With $\pi=[0.6,0.4]$, $A=[[0.7,0.3],[0.4,0.6]]$, $B=[[0.9,0.1],[0.2,0.8]]$, and two observations $[0,1]$: $P(O)=0.209$ and the Viterbi path is $[0,1]$ with probability $0.1296$.
Code Example
PythonImplemented and Tested
import numpy as np
pi = np.array([0.6, 0.4])
A = np.array([[0.7, 0.3], [0.4, 0.6]])
B = np.array([[0.9, 0.1], [0.2, 0.8]])
obs = [0, 1]
alpha = pi*B[:, obs[0]] # forward algorithm
delta, back = alpha.copy(), []
for o in obs[1:]:
alpha = (alpha @ A)*B[:, o]
cand = delta[:, None]*A # Viterbi
back.append(cand.argmax(axis=0))
delta = cand.max(axis=0)*B[:, o]
print("P(obs):", round(alpha.sum(), 4))
path = [int(delta.argmax())]
for bp in reversed(back):
path.insert(0, int(bp[path[0]]))
print("Viterbi path:", path, "prob:", round(delta.max(), 4))
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.