You might want to look at this recent post:
https://forum.audacityteam.org/t/need-pointers-on-adding-feature-to-search-pattern/33729/1
It should return those sounds you are looking for, always depending on the threshold.
It has a constant time resolution though. It is clear that it would otherwise indrease the calculation time exponentially since we had to look in an x * x matrix for the best fitting.
It essentially finds sounds that do rhyme with the sample sound.
It does currently compare the wave form themselves which does naturally emphase voiced sounds. Therefore, drawl, ball, call and so on are regarded as highly related because the consonants do not contribute much energy to the whole sound.