Is there a way to snapshot WAV audio files?

Hello everyone,

I'm trying to test a function that generates a .wav audio file with snapshot testing from testthat. I know that there is whole file snapshotting that has "initial support for images (.png , .jpg , .svg ), data frames (.csv ), and text files (.R , .txt , .json , ...)".

Is there any support for audio files in the form of .wav or .mp3?

I don't think that there is direct support for audio files. E.g. there is no easy way to compare a changed audio snapshot to the original snapshot.

Maybe comparing the output byte by byte would work for you, or you could calculate the hash of the file and save that.


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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.