I've been searching for some information regarding reverse chord lookup and various libraries that might help me with some software I'm writing. I've tried tonal.js and various other JS music theory libraries, and the one that was most consistent with inversions and the like was music21 (python, not JS port). A majority of the libraries I've found had a lot of trouble recognizing a minor 7th chord in 3rd inversion (C D F A for example), but music21 had no issues. Only problem thus far is that it struggles with some of the more basic things like a basic voicing of a 6th chord (D F# A B for example) - it interprets that as a Bm7 even though a 6 chord is the 'easier' avenue.
That top part is just for context and my motivations in asking this: is there a dictionary (JSON format would be nice, I can make one if I find the right resources) with a chord and all possible voicings, from most to least likely? Something like a D6/9 chord could just be R 3 5 6 9, but could be voiced much nicer as a stack of 5ths (tonal.js has no idea what chord I'm playing and music21 interprets it as a B major pentatonic scale). Similarly, a D6 chord in first inversion is output as a Bm7 chord. This may be true, but it would be nice to have possibilities in the output.
In lieu of this, perhaps a simple algorithm that would detect a minor 7th chord, and then also suggest a 6 chord built on the minor 3rd of the root would suffice, but since chord detection is fairly static (there are only a set number of possibilities) I feel like dictionary lookup will always be the most reliable and low-latency method.