<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def playSound(folder, name=""):
 """ as easy as that """

    try:
        if not name:
            onlyfiles = [
                f for f in os.listdir(folder)
                if os.path.isfile(os.path.join(folder, f))
            ]
            name = random.choice(onlyfiles)
        subprocess.call(["afplay", folder + name])
        # subprocess.call(["say", "%d started, batch %d" % (adate, batch)])
    except:
        pass