(the audio example is G6 with it's root on the 5th fret)
You can determine the name of the chord when the root (lowest) note is played on the frets in the chart below.