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

import_mediaFiles()-- Some .json created, some .json lacking #230

Closed brisaann closed 4 years ago

brisaann commented 4 years ago

Given a 'French' directory containing 6 subfolders, corresponding to 6 speakers (speaker1, speaker2, speaker3, etc.). Each speaker folder contains a set of .wav files.

Assuming the emuDB is already created...

dbPath = "C:/Users/brisa/French/French_emuDB/" dbHandle_french = load_emuDB(dbPath, verbose = F)

  1. Add new .wav files to the existing emuDB wavDir = "C:/Users/brisa/French/speaker1" import_mediaFiles(dbHandle_french, dir = wavDir, targetSessionName = "speaker1", verbose = F) Error: cannot open file 'C:\Users\brisa\French\French_emuDB\/speaker1/8_even_sess30015_shadow_fric_hifrq_mp_vd_postalv_1syl_NOM_ZAA_bndl/8_even_sess30015_shadow_fric_hifrq_mp_vd_postalv_1syl_NOM_ZAA_annot.json': No such file or directoryError in file(con, "w") : cannot open the connection

  2. Check French_emuDB > speaker1_ses. Find that some .json files are there and some are lacking. For all _bndls preceding the error-inducing _bndl, there's a .wav file and a .json file. But for error-inducing *_bndls there are no .json files. These lacking .json files are the same for all speakers.

  3. One possible explanation? bash + Mac -> PC. All .wav files were renamed via a bash script to change spaces to underscores (below). However, these renamed .wav files were uploaded in emuR via PC. for f in folder/*; do mv "$f" "${f// /_}"; done

brisaann commented 4 years ago

Solved the problem. Was able to create all .json files using a MAC, just not a PC-- so not an emuR issue afterall. Must be something to do with directory path corruption of certain .wav files when transferring to a PC

raphywink commented 4 years ago

Just FYI: Could also have to do with Windows file locking mechanics. But glad you got it working...