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 that represents the feature distribution as a weighted sum of several Gaussian distributions. It is estimated with the expectation-maximization (EM) algorithm.
Mathematical Idea
$p(x)=\sum_k \pi_k\,\mathcal N(x;\mu_k,\sigma_k^2)$. In the E step we compute the responsibility of each component $\gamma_{ik}=\pi_k\mathcal N_{ik}/\sum_j\pi_j\mathcal N_{ij}$, and in the M step we update the weights, means, and variances weighted by the responsibilities. Each iteration does not decrease the likelihood. The solution is affected by initialization and may get stuck in a local maximum.
How It Works
Initialize $\pi,\mu,\sigma^2$.
E step: compute the responsibilities.
M step: update the parameters.
Repeat until the likelihood converges.
Use the model to compute the likelihood for each class.
A historical foundation for GMM-HMM and speaker systems.
Limitations
Requires choosing $K$.
Sensitive to initialization and local maxima.
Full-covariance formulations are expensive.
Use Cases
Speaker modeling (educational).
Modeling emission probabilities in HMMs.
Unsupervised feature clustering.
Applied Example
Two components with weight 0.5, means 0 and 4, and variance 1: at $x=1$ the responsibility is $\gamma_1=e^{-0.5}/(e^{-0.5}+e^{-4.5})\approx0.982$.
Code Example
PythonImplemented and Tested
import numpy as np
rng = np.random.default_rng(0)
x = np.concatenate([rng.normal(0, 1, 300), rng.normal(5, 1.5, 200)])
pi, mu, var = np.array([0.5, 0.5]), np.array([-1.0, 6.0]), np.array([1.0, 1.0])
def pdf(x, m, v):
return np.exp(-(x - m)**2/(2*v))/np.sqrt(2*np.pi*v)
for _ in range(50):
p = np.stack([pi[k]*pdf(x, mu[k], var[k]) for k in range(2)]) # E step
r = p/p.sum(axis=0)
Nk = r.sum(axis=1) # M step
pi, mu = Nk/len(x), (r @ x)/Nk
var = np.array([(r[k]*(x - mu[k])**2).sum()/Nk[k] for k in range(2)])
print("weights:", np.round(pi, 2))
print("means :", np.round(mu, 2))
print("stds :", np.round(np.sqrt(var), 2))
Reynolds, Quatieri, Dunn. Speaker Verification Using Adapted Gaussian Mixture Models. Digital Signal Processing (2000).DOI
Rabiner. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE 77(2):257-286 (1989).DOI
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.