Record an audio and store locally

Hi to everyone and firstly, great work with expo!! :slight_smile: Love it!!

I’m trying to make a simple soundboard app, where you record a small audio, and then you can play it again once you reopen the app…

Recording is ok, i did it just like in the example.
But then if i simply try this:

//i have the previously recorded audio saved into "recording"
//i try to save it into another file
FileSystem.downloadAsync(
        this.recording.getURI(),
        FileSystem.documentDirectory + '/' + fileName
).then(({ uri }) => {
        Expo.FileSystem.readAsStringAsync(uri).then(info => console.log(info))
}).catch(error => {
        console.error(error);
});

i always get: “Unhandled promise rejection Error: File ‘file:///var/mobile/Containers/Data/Application/9534DF96-8724-4CCB-98FD-41DC871D47DD/Documents/ExponentExperienceData/%2540maumaxxa%252Freecord//recording-3B291744-2E08-4655-890A-9CDD562FD38C.caf’ could not be read.”

also, even when i try to load my audio from the loaded uri:

const source = { uri: myUriString };
const { sound, status } = await Audio.Sound.create(
      source,
      {},
      null
);

It’s mute, empty…!

Any help, please? :slight_smile:

Thank you!!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.