Newsgroups: comp.speech
From: joop@entropic.demon.co.uk (Joop Jansen)
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!news.duke.edu!convex!cs.utexas.edu!howland.reston.ans.net!pipex!demon!entropic.demon.co.uk!joop
Subject: Re: Lookig for linear --> alaw or ulaw or esps conv.
References: <CyrACA.CBC@festival.ed.ac.uk>
Organization: Entropic Research Laboratories, Inc
Reply-To: joop@wrl.epi.com
X-Newsreader: Demon Internet Simple News v1.29
Lines: 94
Date: Wed, 9 Nov 1994 10:40:45 +0000
Message-ID: <784377645snz@entropic.demon.co.uk>
Sender: usenet@demon.co.uk

In article <CyrACA.CBC@festival.ed.ac.uk>
           m.j.o.clark@ed.ac.uk "M J O Clark" writes:

> Does anyone have a short piece of code to convert between linear and any
> format acceptable to ESPS?? Mail would be preferable..!!
> 
> 
> Martyn
> -- 
> MJO Clark-----------------University of Edinburgh-------------------------------> 
> 
> 
> 

     Use programs ESPS programs like btosps and addgen to convert a
     headerless data file into ESPS format 


     OR



                      LOADING NON-ESPS FILES

     xwaves and ESPS have several features that facilitate viewing files
     with non-ESPS or no headers.

     xwaves reads all NIST (Sphere) format sampled data files.
     (This is also the case for all ESPS programs that process
     sampled data).  Thus, xwaves and ESPS can be used directly
     on the NIST databases, including: TIMIT, Air Travel Informa-
     tion System (ATIS), Extended Resource Management, TIDIGITS,
     and Resource Management.  Note that files produced by xwaves
     and ESPS continue to be in ESPS format.  You may use the new
     utility, e2sphere (1-ESPS) to perform license-free conver-
     sion of any ESPS FEA_SD file to Sphere format.

     xwaves will also read files in AT&T SIGnal format.  Again,
     output files are in ESPS format.

     If xwaves (or any ESPS program) does not recognize a file,
     it assumes it is "headerless".  If the UNIX environment
     variable DEF_HEADER is defined and points to a file with a
     valid ESPS header (whether or not there is data in that file
     is irrelevant), the header of that file is used as a "vir-
     tual" header for the headerless file.  Thus, the data
     description in the DEF_HEADER should be valid for the input
     data.  The ESPS conversion programs btosps and addfeahd are
     useful in creating such headers.

     DEF_HEADER is processed by the ESPS read_header() function,
     so in fact xwaves can not distinguish between files that
     have their own headers or "virtual" headers.  If DEF_HEADER
     is not defined, xwaves itself has an opportunity to supply a
     virtual header.  In this case, if the xwaves global
     def_header is defined and points to a file with a valid
     header (ESPS, NIST Sphere, or SIGnal), then this header is
     used.  Note that, if you want def_header to change for dif-
     ferent input files while xwaves is running, then you may
     wish to leave DEF_HEADER undefined, since its value (for
     this purpose) is fixed at the value that exists when xwaves
     starts up.  An alternative is to move or copy different
     files as needed to the fixed location DEF_HEADER.  Either
     approach can be taken by means of command files or by exter-
     nal scripts that communicate with xwaves using send_xwaves
     (1-ESPS).

     Files that are headerless from the ESPS and xwaves viewpoint
     may in fact contain "foreign" headers.  The ESPS header for-
     mat allows for this in the following way: If an ESPS header
     contains certain generic header items, a foreign header
     (i.e., a block of information at the head of the file) is
     skipped when reading data.  A copy is kept right inside the
     ESPS header, however, so that the foreign header is
     preserved in a series of ESPS operations and can be exposed
     again by running bhd on a subsequent ESPS file.  See
     read_header (3-ESPS) for more details and for information
     about setting the relevant generics in the headers specified
     by DEF_HEADER or def_header.

-- 
______________________________________________________________________________
     __            _____  __    __    __      __   |
   /     |\      |   |   |  \  /  \  |  \ |  /  \  |  Sheraton House
 /       |  \    |   |   |__/ |    | |__/ | |      |  Castle Park
|        |    \  |   |   |\   |    | |    | |      |  Cambridge CB3 0AX
|        |      \|   |   |  \  \__/  |    |  \__/  |  UK
|======  ----------------------------------------  |
|          ____      ____      ____      ____      |  E-mail: joop@entropic.com
|        /   / \   /   / \   /   / \   /   / \     |  Tel: +44-223-302651  
 \            \ _ /     \ _ /     \ _ /     \ _ /  |  Fax: +44-223-324560
   \     ----------------------------------------  |
     --  Entropic Research Laboratory, Inc         |
-------------------------------------------------------------------------------
