Loading audio dynamically

I am loading audio dynamically in my project. This is a educational game. I am doing something like this:

lykill1=‘ord’;
this.load.audio(lykill1,gSoundId);
this.load.once(‘complete’, () => {
word = this.sound.add(lykill1);
word.play();
});
this.load.start();

This works fine. But the problem is that once the kids have finished this problem I will give them a new one. And it looks like I cannot use the same key again. How can I destroy the old key?

Thanks in advance

this.cache.audio.remove('KEY');

Instead of deleting and remaking an audio file to restart it (which is what I gathered from this, I could be completely wrong), you can just play from a marker which is at the beginning. e.g.:

var word = this.sound.add(‘ord’);
var beginning = { name: ‘markerName’, start: 1, duration: 3, config: {} }; // Make sure to change duration
word.addMarker(beginning);
const button = this.add.text(100, 100, ‘Click to Play Sound!’, { fill: ‘#0f0’ });
button.setInteractive();
button.on(‘pointerdown’, () => { this.sound.play(‘ord’, beginning); });`

Hi

What I am doing is playing another sound file next time around.
These are word they are supposed to find rime words for. When they have done that they get a new word with new sound file.

Thanks but unfortunately this does not work. I remove the key and then load another sound file using this key. But when playing the audio I get the old sound.

Worked! I was using something like this:
lykill1=‘ord’
and then
this.load.audio(lykill1,gSoundId);
removing ‘lykill1’ did nothing but
this.cache.audio.remove(‘ord’) worked!
I am not sure way but thanks!