[prev in list] [next in list] [prev in thread] [next in thread] 

List:       viavoice
Subject:    Re: ViaVoice-DL: .Wav Files as input to Viavoice
From:       
Date:       1999-12-13 18:04:48
[Download RAW message or body]

> > > > > " " == Vaughan Pratt <pratt@cs.stanford.edu> writes:

> > From: Stefan Kuzminski <stefan@umevoice.com> Get the Custom Audio DLL
> > sample project for window for the wav file reading code..

 > This is 2000 lines of C and C++ code. Which parts of it should be
 > extracted, ported, or mimicked so that runasc will open a .wav file under
 > Linux instead of /dev/dsp? Is this a major programming project or can it be
 > done with much less than 2000 lines?

AudioConnect, AudioStartRecording, AudioGetPCM are the funcs you need to
change in the audio lib.

> > Your application calls SmSetBinary with the wav file you want to recognize,
> > AudioSetSource is called in the audio lib and is passed the filename.

 > Nothing in either ViaVoice/samples or the Custom Audio DLL sample project
 > calls SmSetBinary. Is there an example of where and when one calls
 > SmSetBinary?

There is a sample application for the Custom Audio DLL that might call this.. 

> > You have to modify and recompile the audoss lib so it can read from a file
> > and returns the data when called by the engine.

 > The samples don't seem to use the audoss library, how is it intended to be
 > linked? With ln -s or in an ld command (-laudoss)? Is there any greppable
 > or indexed documentation containing this information?

 The audoss is a .so and therefore dynamically linked to the engine when it
starts up, the application ( ie. samples ) don't know anything about it.

 > As an experiment I tried inserting

 >  rc = SmSetBinary ( SM_AUDIO_SOURCE, strlen( "/u/pratt/foo.wav" ),
 > "/u/pratt/foo.wav" , &reply );
 
 > in a variety of places in dw.c and ascgui.c.

 > (Doing a "file" command on this file yields /u/pratt/foo.wav: RIFF
 > (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22000 Hz.)

 > The most promising place for this command seemed to be at the end of
 > ConnectStuff, where at least rc was set to SM_RC_OK (= 0). But in no place
 > did runasc attempt to read this file.

The AudioSetSource function in audoss is empty by default. You have to add
code to audoss to open the file.

 > I have the tantalizing feeling that there should be some further change I
 > can make that would make it work.

 > While I'm an experienced Linux programmer I have zero knowledge of Windows,
 > so if there's information that's being left out of the instructions because
 > it would be immediately obvious to any Windows programmer then I'm dead in
 > the water.

Take the three funtions listed above from the windows DLL and stick them in in
the linux version, there's nothing windows about it, just watch out that the
block size is different for live and file data..  Start off by sticking some
printfs in audoss to see how it's called by the engine.

 > Vaughan Pratt

 > For information about the IBM ViaVoice SDKs and Run Time Kits for Linux
 > visit http://www.ibm.com/software/speech/dev/sdk_linux.html. To view the
 > archive of submissions visit http://viavoice.sparklist.com. To view the
 > Frequently Asked Questions visit
 > http://www.ibm.com/software/speech/dev/faq_linux.html. To remove your
 > subscription to this list, simply send a note to:
 > remove-viavoice@sparklist.com


For information about the IBM ViaVoice SDKs and Run Time Kits for Linux
visit http://www.ibm.com/software/speech/dev/sdk_linux.html. To view the
archive of submissions visit http://viavoice.sparklist.com. To view the Frequently \
Asked Questions visit http://www.ibm.com/software/speech/dev/faq_linux.html. To \
remove your subscription to this list, simply send a note to:
remove-viavoice@sparklist.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic