I have a barely unique name. Everyone has heard my combination of consonants, but not everyone has heard it as a typical first name. Combined with the morning melancholy of a caffeine-deprived dearth and an auditorially audacious acoustic environment, it is very rare (I’m assuming) that my barista will actually get my name right on the first time. At this point I’m wasting precious pre-coffee phonetics to repeat my name, insist yes, it’s a real name, and even then hope the judicious barista transcribes it correctly onto my paper cup.
Luckily we can mathematically select a finely-crafted Coffee Shop Psuedo (nay, a Mocha Moniker, an Iced Late Icognito, a Flat White Fake White Guy, a London… you get the idea) that is, colloquially, distinct from other names. Keep reading.
Statistical Approach
I have a set of the 100 most common U.S. English names pulled from the Census Bureau over the last century. I made it 101 by adding my own to the start. With each name $i$, I want to compare each name against each other name and find the single name that is the most acoustically distinct. In more mathematical terms, I’m finding the pairwise correlation (between each name pair). Then, I’m taking the mean mutual coherence value $\mu_i$ of each name $i$ across its pairs to find the minimum mean pairwise correlation:
$\boxed{i^* = \underset{i}{\operatorname{argmin}}\ \mu_i}$
I’ll talk here about mutual coherence, then about how I’m actually measuring my names.
Background: Mutual Coherence
The mutual coherence between two normalized signals is defined as the absolute value of their inner product:
| $\boxed{\mu_{ij} =\left | \hat{\mathbf{x}}_i^T\hat{\mathbf{x}}_j\right | }$ |
Expanding the inner product gives:
| $\mu_{ij} =\frac{\left | \sum_{k=0}^{M-1}x_i[k]x_j[k]\right | }{\sqrt{\sum_{k=0}^{M-1}x_i[k]^2}\sqrt{\sum_{k=0}^{M-1}x_j[k]^2}}$ |
The resulting coherence measurement is bounded:
$0 \leq \mu_{ij} \leq 1$
To make the matrix of every pair, I constructed a symmetric matrix of inner products, sometimes called a Gram Matrix.
Define the absolute coherence matrix as:
$\mathbf{C} =\begin{bmatrix}1 & \mu_{12} & \cdots & \mu_{1N} \mu_{21} & 1 & \cdots & \mu_{2N} \vdots & \vdots & \ddots & \vdots \mu_{N1} & \mu_{N2} & \cdots & 1\end{bmatrix}$
The diagnol elements (cross-correlation between the same name) will be unity - this makes intuitive sense since a name, compared to the same name, will have the same properties.
The matrix is symmetric:
$\mu_{ij} = \mu_{ji}$
Consequently, calculating the coherence between word $i$ and word $j$ eliminates the need to calculate the reverse comparison.
The number of unique pairwise comparisons for a vocabulary of $N$ words is given by the binomial coefficient:
$P = \binom{N}{2}$
Expanding:
$P = \frac{N(N-1)}{2}$
For a vocabulary containing 101 words:
$P = \frac{101(100)}{2}$
$\boxed{P = 5050}$
Therefore, you only need 5,050 unique pairwise coherence calculations to determine the order of best-performing names.
As previously stated, this is the common approach for mutual coherence:
| $\mu(\mathcal{D}) =\max_{i \neq j}\left | \hat{\mathbf{x}}_i^T\hat{\mathbf{x}}_j\right | $ |
But since I’m trying to find the best name against all other names, not just the best pair (ie, if I wanted to never get mistaken for Lucas, I’d pick Joe), I am taking the mean of all pairs:
$\boxed{\bar{\mu}(\mathcal{D}) =\frac{1}{\binom{N}{2}}\sum_{i=1}^{N-1}\sum_{j=i+1}^{N}\mu_{ij}}$
And with the previously mentioned 5050 calculations:
$\bar{\mu} =\frac{1}{5050}\sum_{i<j}\mu_{ij}$
The optimization goal is then:
$\boxed{\mathcal{D}^{*} =\underset{\mathcal{D}}{\operatorname{argmin}}\ \bar{\mu}(\mathcal{D})}$
Background: Speech Processing Basics (What’s in a name?)
Speech processing is a fascinating field of linguistics, sociology, transmission line modeling, thermal fluid dynamics, and computer science (no, really). Stanford recently updated a speech processing textbook that is helpful at highlighting important aspects of speech vs normal audio processing - especially chapter 15.
Mels and MFCC
Obviously we will take the fourier transform of the speech signal to analyze its spectral components. However, speech isn’t processed by humans on a linear axis - it’s actually a logarthmic scale called a mel:
$\operatorname{mel}(f) = 1127 \ln\left(1 + \frac{f}{700}\right)$
The stanford textbook accomplishes this by using filterbanks. Therefore, I can take filter coeffecients as (generally) power-channel measurements over wide bands of my received frequency. We are concerned with the MFCC or Mel Frequency Cepstral Coefficients.
Copying from the Stanford book, the MFCC, mel frequency cepstral coefficients, is a useful representation of the MFCC waveform that emphasizes aspects of the signal that are relevant for detection of phonetic units. The MFCC is a 39-dimensional feature vector consisting of:
| Cepstral Coefficients | Energy Coefficient |
|---|---|
| 12 cepstral coefficients | 1 energy coefficient |
| 12 delta cepstral coefficients | 1 delta energy coefficient |
| 12 double delta cepstral coefficients | 1 double delta energy coefficient |
Still cherry-picking important parts of the text:
MFCC coefficients are based on the cepstrum. One way to think about the cepstrum (named after an inversion of spectrum! ) is as a useful way of separating the source and filter - I’m moreso concerned with the phones (sort of like syllables) produced in these words. The cepstrum can be thought of as the spectrum of the log of the spectrum.
In signal processing terms, the cepstrum is more formally defined as the inverse DFT of the log magnitude of the DFT of a signal; hence, for a windowed frame of speech x[n]:
| $c[n] = \sum_{k=0}^{N-1}\log\left(\left | \sum_{m=0}^{N-1}x[m]e^{-j\frac{2\pi}{N}km}\right | \right)e^{j\frac{2\pi}{N}kn}$ |
For the energy, I simply take the sum over time of the power of the signal:
$\operatorname{Energy} = \sum_{t=t_1}^{t_2} x^2[t]$
The MFCC also includes the delta terms, which describe changes in pitch, acceleration, and energy.
Here’s a visual representation of the signal processing occuring:

Phone Count
I am also trying to minimize the phones spoken in a name I select - I’m sure a very exotic and long name could be very distinct, but the shorter the better. To do this, I just referenced an alphabet database (CMUdict) to get the phone-sounds in a word and add it as a data field on a csv for each word.
Experimental Approach
So, I’m optimizing for the mean minimum mutual coherence based on specially-designed acoustic speech paramters. I’m then choosing the value with the lower relative phone count. A block diagram can be shown as:

In my code, I had the following steps:
- record.py - uses words.txt to prompt you to record each name in order
- whiten.py - truncates the signal and saves the MFCC
- phone.py - uses an alphabet to count the phone
- optimize.py - actually calculates the order for mutual coherence and saves as a csv
- analysis.py - matplotlib visualization
Results
So, what shakes out? Here’s the big visualization of the cross-correlation across names:

Blue is better - it means less correlation. You can note some easy similarities that are intuitive - Jerry sounds a little like Terry, Bryan and Brian are basically identical, etc etc.
Turns out result 000 (withheld for security purposes) has the lowest mean coherence at 0.19!
I’m not necessarily sold on this one being the most unique. The next two, Walter and Patrick, have similarly low coherences at 0.21 and 0.23, which I can buy.
Next Steps
It’s one thing to get the word conveyed correctly. It’s another thing to get it spelled correctly. Shannon famously had plenty of ideas on entropy in the english language - I imagine a spellchecker with hamming distances could prove some good results.
Curious if I’m looking at the right results here or if my math checks out. Let me know if there’s any suggested improvements.