I want to make a small app that plays a sound every time i press a button, but the sounds have a small delay because they have to load from the SD (i think). Is there any way to upload the audio files to RAM memory every time i run the code, or any other idea to get rid of that delay?
Thank you!
import pygame
pygame.init()
doSound = pygame.mixer.Sound('/mnt/ramdisk/do.wav')
doSound.play()