jschafer
Joined 1 year ago
Joined 1 year ago
If you look at the code of (phone/voice) codecs GSM/Speex/Opus you can see that you can estimate the spectral envelope (or the configuration of a physical tube model for the vocal tract) in time domain with linear prediction coefficients (LPC).
And it is simple, e.g. the often used Levinson-Durbin algorithm is just 22 lines of C code. It is an interesting exercise to build your own vocoder from scratch that fits in a single screen page.
Many of the code snippets I have seen (which likely have already processed your voice) are just translations of the Fortran code of the book "Linear Prediction of Speech" by Markel and Gray (1976).
If it has a false positive all the time (the worst case) then the performance is the same as before the bloom filter optimization was implemented (besides the small bloom filter overhead).
As the bloom filter size in SQLite directly depends on the table size I estimated a false positive rate of 63.2% due to this bug, while it could have been just 11.75%.
So the bloom filter optimization does not work there.
It had to do with the different ways strings can be compared with collating functions, as strings may be equal even if they have different bytes: https://sqlite.org/forum/forumpost/0846211821
https://sqlite.org/src/info/56d9bb7aa63043f5
I found and reported the bug because I wanted to know how the bloom filters work in SQLite for my uni seminar paper. Still wondering if one can find those kind of bugs with test cases.