There are certainly lots of methods that can be applied. A really simple method that will work for lots of popular songs is to look for patters in the chroma that match a key. We can find the most common note, assume it is the root, and then check if the third is major or minor by seeing which of those has a higher value as well. In this case I used the entire song, which is about 2 minutes long, to get the chorma. Given you can already get the numbers out, I'll start from there.
# the chroma_cqt for And Your Bird Can Sing
song_chroma = [0.31807876,
0.27062345,
0.2786934,
0.49264827,
0.6221079,
0.47696424,
0.38320214,
0.3663701,
0.4019624,
0.34131885,
0.35606056,
0.411583]
# pitches in 12 tone equal temperament
pitches = ['C','C#','D','D#','E','F','F#','G','G#','A','A#','B']
# print note to value relations
for y in range(len(song_chroma)):
print(str(pitches[y]) + '\t' + str(song_chroma[y]))
# select the most dominate pitch
pitch_id = song_chroma.index(max(song_chroma))
pitch = pitches[pitch_id]
min_third_id = (pitch_id+3)%12
maj_third_id = (pitch_id+4)%12
#check if the musical 3rd is major or minor
if song_chroma[min_third_id] < song_chroma[maj_third_id]:
third = 'major'
print(str.format('\nThis song is likely in {} {}',pitch, third))
elif song_chroma[min_third_id] > song_chroma[maj_third_id]:
third = 'minor'
print(str.format('\nThis song is likely in {} {}',pitch, third))
else:
print(str.format('\nThis song might be in {} something???',pitch))
Output:
C 0.31807876
C# 0.27062345
D 0.2786934
D# 0.49264827
E 0.6221079
F 0.47696424
F# 0.38320214
G 0.3663701
G# 0.4019624
A 0.34131885
A# 0.35606056
B 0.411583
This song is likely in E major
There are more complicated rules based approaches that could be taken, such as looking at how strong is the 4th, the 5th, the minor fall or the major lift... or what's the 7th doing, and on into all sorts of complicated and fun music theory stuff. As noted in jonnor's answer there are ML/DL approaches too, and hendrik's comment also has good info on more sophisticated models. And yes, this song is in E-major according to Alan Pollack's Notes On