Export wav function