Where is the proper location?
Where ever you like. But you need to specify the location correctly to the --init flag.
When I attempt to impose statistics on an existing sound file via the --init flag, I receive
OSError: PySndfile::error while opening b’*/snd_examples/6-Nihal-8_Nihal22050.wav’
For such questions you better provide the full command line you used. Here the error message seems to imply that you specified the file as
--init */snd_examples/6-Nihal-8_Nihal22050.wav. The “*” is a pattern matching operator. You probably just need to remove
*/ from your filename
and if your current directory is the Xtextures root folder and the file exists in the snd_examples sub folder this should work.
A few explanations about using
- If you write
--init */snd_examples/6-Nihal-8_Nihal22050.wav in the bash command line the shell will search for files matching the pattern
*/snd_examples/6-Nihal-8_Nihal22050.wav starting from the current working directory. If it finds one or more it will replace the pattern by all files it found. If it does not find a matching file it keeps the pattern unchanged. So here as the impose script reports not being able to open the file
*/snd_examples/6-Nihal-8_Nihal22050.wav I would conclude that the shell did not find any matching files. The problem is therefore not the placement but the way you specify the file. You can debug you command line simply by means of echo. Let’s see two examples supposing you are located in the Xtextures root folder with an incomplete command line (having only the --init flag).
1> echo ./impose_cnn_stats.py --init snd_examples/Fr*.flac
./impose_cnn_stats.py --init snd_examples/FreeJazz_Drum.flac
echo command does not execute the command but displays it. So you can see the command line the shell has constructed. It found a single flac files starting with Fr in the
snd_examples folder and replaced the pattern on the command line. Now using your pattern:
2> echo ./impose_cnn_stats.py --init */snd_examples/Fr*.flac
./impose_cnn_stats.py --init */snd_examples/Fr*.flac
The shell did not find a matching file and kept the pattern. This wont work.
In fact the pattern
*/snd_examples/Fr*.flac searchers for folders containing folders named snd_examples containg files starting with Fr.
- the --init expects a single file. The * pattern may find more than one, in which case the resulting command line will have more than one file after the --init flag which will lead to an error.
In case you want to run over multiple files and you are using bash you could use for loops like this
for file in snd/examples/*.wav; do
./impose_cnn_stats.py --init $file ...other flags and