IPS-LMU / wrassp

wrassp is a wrapper for R around Michel Scheffers's libassp (Advanced Speech Signal Processor). The libassp library aims at providing functionality for handling speech signal files in most common audio formats and for performing analyses common in phonetic science/speech science. This includes the calculation of formants, fundamental frequency, root mean square, auto correlation, a variety of spectral analyses, zero crossing rate, filtering etc. This wrapper provides R with a large subset of libassp's signal processing functions and provides them to the user in a (hopefully) user-friendly manner. The wrassp package is used by the EMU Speech Database Management System (EMU-SDMS) to perform signal processing routines.
http://ips-lmu.github.io/EMU.html
22 stars 7 forks source link

read.AsspDataObj gets wrong start time on SSFF files #16

Closed stevecassidy closed 11 years ago

stevecassidy commented 11 years ago

I was just testing the wrassp library on the demo database from Emu and got an error due to read.AsspDataObj getting the wrong start time for the files.

o = read.AsspDataObj("/Library/Emu/demo/msdjc001.ssd") attr(o, 'start_time') [1] 5.1273

the header for this file is:

SSFF -- (c) SHLRC Machine SPARC Start_Time 2.563650 Record_Freq 20000.000000 Comment CHAR Created by CONV Column samples SHORT 1 record_freq1 DOUBLE 20000.000000 scale FLOAT 1.000000 end_time DOUBLE 3.800000 max_value FLOAT 10547.000000

I get a similar result with the sfb and sf0 files and with other files in this database.

I tried to find the source of this but couldn't easily see where the header is being read.

raphywink commented 11 years ago

I would have to double check with Lasse but this is a header unlike anything libassp produces. And I think that is where the parser gets it wrong. I have no idea if we even intend to parse every possible SSFF file? @quabolasse what do you think?

stevecassidy commented 11 years ago

This is a standard SSFF header as produced by the Emu libraries, I think by converting from the original ESPS format. There's a lot of data that looks like this over here at least. However, it's the Start_Time field that is being missed which is one of the fundamental fields. Other fields seem to be read ok, eg. Record_Freq.

Does ASSP read this data ok outside of this code?

quabolasse commented 11 years ago

@stevecassidy: could you please send me an example file? I'm not sure generic variables were ever implemented in assp.

quabolasse commented 11 years ago

Oh, it's the demo daatabase. I have that of course. I'll look into it.

quabolasse commented 11 years ago

The startTime issue is fixed. How ever, generic variables may need some discussion. This will be a separate issue #17