Playing the same sound for correct and incorrect repsonses

Using Psychopy Version 3.3 on Mac IOS

I tried adding a correct and incorrect sound on participant feedback but it only plays a beep sound for both correct and incorrect responses.

This is the begin experiment code:

soundfile = ['sounds/correct.wav','sounds/incorrect.wav']

And this is the begin routine code I used:

if response.corr:
    sound = soundfile [0]
else:
    sound = soundfile [1]

I followed this video if more info is needed: https://www.youtube.com/watch?v=LIeBCltAf-w

Appreciate any help I can get!

What do you then do with the variable named sound?

Does it always play the incorrect feedback sound file? If yes, have you checked the correct answer keyword responses in your Excel sheet? I had the same problem and realized that I had changed the keyword responses in the builder but not in the Excel sheet. Once I checked and fixed it, everything worked smoothly!