How to load this simple audio data set and use dataset.map without memory issues?

Actually this is writer_batch_size that you have to set, sorry.

(batch_size is for batched map, i.e. when you want your function to take several examples at once)

Let me know if it helps, otherwise this could be an issue with audio file not being closed correctly