|
From: Martin L. <mar...@gm...> - 2012-08-31 06:56:47
|
On Thu, Aug 30, 2012 at 11:24 PM, Ulrich Klauer <ul...@ch...> wrote: > Martin Lukac <mar...@gm...>: > >> However when I try to put this inline into some longer chain of >> commands where the data is piped to stdin for sox the spectrogram is >> generated by it is zero seconds long. > >> If I add the headers back to the raw file and cat the wav file instead >> of the raw file, he spectrogram is generated ok > > Well, when reading a raw file from standard input, there is no way for SoX to know how long the audio is going to be (no header info, no file size). You should be able to specify the desired length of the spectrogram with the -d option to the effect. > Thank you for pointing out the parameter! The -d solved the problem. All my files are the same size... or I can programatically insert the size into the command line. Thank you! M. > I am a bit surprised, though, that the default of 8 seconds apparently isn't applied. > > Ulrich > |