📄 readme
字号:
4) Noise estimation - we currently do notinclude any adaptive (or non-adaptive) noise estimation.Thus the J factor that can be entered at the command linemust be separately estimated. We have successfully estimatedthis quantity on-line for some of our experiments, butthe code is not yet in shape and tested for a more generalfacility. The J that we have found to work well is somethinglike 1 / (3 * noisepower), but it is possible thatfor a new type of task a different constant would be needed. (See the commentary in rasta.c for a discussion of the potentialpitfalls in using an adaptive J).CAUTION: Even with the current code, you can get in trouble byusing the J-RASTA option if you don't measure the noise,since the default J value we use is just something that workedfor one experiment at ICSI; you might have a radically differentnoise, or different gain or #bits in the A/D, etc. . In general,it is best not to just run rasta with default values unless youlook at what they are and see if they match your problem(e.g., for sampling rate). Just type the program name tosee the options.************************************************** SUPPORT************************************************** There is none. This is public domain code, and we cannotfix your modifications or even guarantee fixingbugs in this release. However, if you findimprovements, bug fixes, etc., please do share themwith us so that we can (if possible) include them in the next release. Send them to morgan@icsi.berkeley.edu************************************************** A BIT OF PHILOSOPHY************************************************** While some users may find the existing program usefulas is (we have put in quite a few command line options toencourage this), this package is intended as a research tool.Therefore it is likely that many users will want to hack at it.The program has been split up into reasonably-sized modules for thispurpose. Some users will modify or replace variousfiles in the source directory, and the structure of the code hasbeen made as regular as possible to facilitate this, in particularto facilitate modification of the speech analysis steps.While we obviously can't guarantee that all such mods will work,we can make this more likely by a couple of RASTA 1.0coding tips:1) Use a coding model - each of the core analysis stepslook very similar , and if one of them is replaced,try to follow the same model. The general pattern is that eachanalysis routine is called in rastaplp(), and that each oneis passed a pointer to a read-only structure of parametervalues (such as sampling rate) and a pointer to an "fvec"structure, which contains a float array and its integer length.The routine then processes this data as you wish, andreturns a pointer to an output fvec. Within the routineitself, analysis tables are initialized and space is allocated(but only the first time the routine is called).Note that this is always a frame-based analysis in the currentimplementation. Look at nl_audspec.c, for instance, for asimple example of such a routine.2) Use the fvec/fmat utility routines - in fvecsubs.c are severalrelevant routines. Whenever possible,use fvecs rather than simple arrays of floats, as the relevantroutines allow you to pretty painlessly allocate space,bounds-check array references, copy, etc. .You also can use show_vec() in debugging, which saves youa bit of time in writing fprintf lines. ************************************************** SRC FILES**************************************************What follows is a list of the relevant files for the rasta program,(all found in src) along with a brief description for each.Makefile - the usual compilation script. Type "make" to build the new executable, and "make print" to print out the source. Copy in non_ESPS_Makefile if you don't have ESPS.************************************** GOOD GENERAL READING**************************************rasta.h - the header file, including definitions for the 2 main data structures used: an fvec, which is a floating point vector with an associated integer vector length, and a parameter structure, which is the collection of all analysis parameters such as window size. It also defines upper-case constants that are used throughout the routines.functions.h - a header file with globally accessible function prototypes (i.e., showing the calling argument types). Note that fft.c, rasta.c, lpccep.c, and audspec.c all have some local function prototypes not listed in this file. rasta.c - the main program, including a front comment that briefly explains the algorithm and a few more things about the code.init.c - routines to initialize things, such as initial values for parameters, reading the command line to possibly update these values. a usage printing routine that is accessed by typing the command without arguments, and a routine to compute a couple of required parameters such as the number of analysis frames.************************************** ANALYSIS ROUTINES**************************************anal.c - the main calling analysis routine that is used for each new frame, along with a couple of routines that do windowing and fill the frame structure with data.powspec.c - a routine to compute the power spectrum for a frame. This mostly computes a couple of parameters and then calls fft, but it is separate so that later mods can alter this step.audspec.c - a file with routines to compute an auditory spectrum. In current form, it computes critical band ranges in the fft and weights for the integration within band (the first time it is called) and then it uses this information to integrate the power spectrum into equivalent critical band powers.nl_audspec.c - a file to compute a compressive nonlinearity, used to get the auditory spectrum into an appropriate domain for rasta filtering.rasta_filt.c - a file that does the rasta filtering.inverse_nl.c - a file to compute an inverse nonlinearity, used to get back to the auditory-like spectral domain after rasta filtering.post_audspec.c - a file with routines to equalize and compress an auditory spectrum. lpccep.c - a file to approximate the auditory-like spectrum by the spectrum of the all-pole model and compute its cepstrum using an inverse DFT, autocorrelation-based LPC analysis, and a recursion to compute cepstra. A lot of the core recursions are relatively unchanged from the fortran.fft.c - old, ugly, but efficient code to compute the fft for a vector; actually the current form of the routine returns the power spectrum in the form of the magnitude squared of the fft.fvecsubs.c - a file with basic routines for allocation and some arithmetic for float vectors (fvec structure) and matrices (fmat structure). It includes an fvec_check routine that makes sure that the array element you are planning to access (read or write) is within the allocated space. This seems to take about 1/2 microsecond on a Sparc 10, so you might not generally call it in the inner loop but it is nice to use at least once for a loop when you can figure out what the largest array index is going to be. For things out of the inner loop it is simplest to just use it whenever you access an array element if the fvec pointer has been passed to you from elsewhere. This may seem like extra work, but it can save you a lot of time tracking down an overwriting-type bug.svecsubs.c - similar to fvecsubs, but for shorts; a file with basic routines for allocation and some arithmetic for short vectors (svec structure).************************************** GOTTA HAVE I/O************************************** io.c - routines to open input and output files, and to read them in one of a number of specified forms; as of 7/21/93, the input forms supported are binary shorts, ascii, and esps formatted files. The output can be binary floats, ascii, or esps files. Note: if you do not have an ESPS license, you will want to use the alternate Makefile which is a non_ESPS_Makefile ; then if you unwittingly try to use ESPS input or output you will get tossed out of the program. If you use binary inputs from stdin, you can run in online mode. In this mode, there is no preliminary step of reading in the whole input file; instead, you just read as you process, and it goes on until the fread fails, for instance at the end of file. The routine to do this kind of input, get_online_bindata(), is also in this file.debug.c - printing routines so you can look at things if something gets messed up. Some are rather specific to looking at particular structures, while show_vec() prints out the length and values for the fvec pointed to by the argument. ***************************************************** ACKNOWLEDGEMENTS Thanks to Bill Byrne for his help with the ESPS interface; to Chuck Wooters, Joachim Koehler, and especially Phil Kohn for critical comments; to Jordan Cohen for providing the environment in which I wrote this code; to ICSI and UC Berkeley for providing my financial support during this time; and most of all to Hynek Hermansky for being at the source of all the basic ideas.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -