Updated retrieveaudio function with new api endpoint