just setup the height of the array to two and width to number of different animals
You could take the easy way out and prevent the second dimension by just generating the wav-names out of the animal name. So in the example set next_sound to "sound_"&string&".wav" and next_sound would be sound_cat.wav for example.
What's bugging me is: cat doesn't work, but dog and bird does. Also adding .wav behind woof would make the dog stop working as well. Really really weird. Maybe I did something wrong, but can't see the problem if there is one. (maybe someone can help)
If you don't want the comparison to be case sensitive, compare the strings as lowercase (use lowercase(string))