IPS-LMU / emuR

The main R package for the EMU Speech Database Management System (EMU-SDMS)
http://ips-lmu.github.io/EMU.html
23 stars 15 forks source link

resample_annots not implemented yet #237

Closed Hywel-Stoakes closed 3 years ago

Hywel-Stoakes commented 3 years ago

When running the function emuR::resample_annots() there is a warning message:

not implemented yet!!!

Is there a relatively simple way to change the sample rate within annotations in an emuDB? The database I am working on currently, has annotations at 22050 Hz and audio files at 44100 Hz. Thanks

Hywel-Stoakes commented 3 years ago

My solution was to resample the audio files back to 22050 Hz and then export to TextGrid usingemuR::export_TextGridCollection(). I was then able to upsample the audio files to 44100 Hz and reconvert to an Emu database using emuR::convert_TextGridCollection. In the process the hierarchy had to be regenerated, but otherwise there was no data loss. The reason for upsampling, is so that the database can be viewed in a Safari-based browser (macOS, iOS) all phonetic analysis is performed on the original database.

raphywink commented 3 years ago

I am currently working on the next release of emuR and will either not export that function (no idea why I did it originally) or implement something like an external sox call to perform the audio resampling. So just watch the release notes/change log of the upcoming CRAN release.