[PlanetCCRMA] can't record

Aaron aamehl@bezeqint.net
Mon Mar 15 14:01:00 2004


Hi again,

arecord gives me nothing.

The question is where something I did when configuring viavoice did this
or if this is a problem with my alsa setup and that is why viavoice
won't set up?

------------------------------snip viavioce setup=--------------------
6.1 Sound drivers

ViaVoice requires sound hardware and a linux driver which can record at
22kHz,
mono, and play back (see ViaVoice docs for details)

I have only one sound card to test with, and that's a Soundblaster PCI
64 with
an Ensoniq 1370 chip. It's a pretty cheap card, but it works
(recognition
accuracy may perhaps be better with a higher-quality card).

I am using the alsa alsa-0.9.0.cvs20030217 as shipped with SuSE 8.2.
This driver
does not support /dev/sndstat for this card/chip, but it's not needed by
ViaVoice. The example in /usr/doc/ViaVoice/en_us.rt.readme.txt tests
sound
playing and recording using /dev/audio, but I am not sure whether
/dev/audio is
really required for running ViaVoice. /dev/dsp should be enough.

Alternatively you an try the Linux kernel drivers, but they didn't use
to
support PCI sound cards. There are the commercially available OSS
drivers as
well, see http://www.4front-tech.com/.

Test your audio setup with any program you like, I used sound studio and
snd
(both shipped with SuSE 8.1, 8.2).

It's important that within vvstartuserguru, the volume slider for
playback
volume adjustment works, and that the following test of recording
quality works
as well. The recording quality check does not try to recognise any
words, it
only determines whether the input signal is typical for spoken words.
You
should be getting an "excellent". You need at least a "good" to make
reasonable
use of ViaVoice.


6.2 Audio mixer

It is important to find some mixer settings (output volume, input gain,
etc)
which will work with ViaVoice, and to have these restored each time
ViaVoice is
started. If this doesn't happen expect recognition accuracy to be
seriously
effected. The viavoice wrapper script, created by applying the patch, 
restores audio levels from a file you previously saved, so each time you
start
ViaVoice you're starting with the same mixer settings.

This script looks for these files and restores the mixer settings from
the
first one it finds (the names were different for previous versions of
the
script):

        $HOME/viavoice/alsa.state
        /etc/asound.state.viavoice

It then starts vvstartdictation.

The mixer settings file can be created with

    alsactl -f $HOME/viavoice/alsa.state store

or a system-wide one as root with

    alsactl -f /etc/asound.state.viavoice store
    chmod 644 /etc/asound.state.viavoice

after adjusting the mixer settings with a program of your choice. See
next
section.
------------------------------snip viavioce setup=--------------------

I also tried doing what vvinstall said but I think couldn't record even
before doing this.
------------------------------snip from vvinstall -------------------
Note that ALSA (Advanced Linux Sound Architecture), the sound drivers
that
# replace the older OSS as of kernel 2.5, also introduce a problem for
some
# soundcards: unlike the OSS drivers, the ALSA drivers limit the
recording
# buffer to the hardware limit of your sound card.  For example, the SB
Live!
# only has two 'period' buffers (called fragments before), and although
# viavoice requests an 'arbitrary number of periods, size 1024 bytes',
it
# only gets two periods of 1024 bytes: 2048 bytes in total!  The
ViaVoice
# engine however doesn't even process sound until it sees at least 6102
bytes.
# The 'solution' for this is to increase the buffer size (from 1024 to
say
# 8192), this script also takes care of that.  Unfortunately, also that
is
# possibly not enough: the sound is read from the hardware in chunks of
# 'period size' and having only two buffers this is often causing an
underrun.
# When ALSA sees an underrun... it stops the sound stream.
# While this script works for me - you might still run into this
problem.
# The problem can easily be detected by attaching the ViaVoice 'engine'
# with 'strace' once it runs and see if it reads the dsp device or not,
# or that all it does is calling ioctl without ever trying to read(2)
# something.  I reported this difference between OSS and ALSA's OSS
emulation
# to the ALSA developers and they 'fixed' it in the current CVS of ALSA
# (should be fixed in 0.9.6).  But... you guess it, it still doesn't
work.
------------------------------snip from vvinstall --------

in vvinstall he checks for alsa but once checked the script exits, I
wonder if it is because of a problem in my alsa setup??

Sorry I realize this is not a viavoice list but I can't figure out if
the problem is alsa or via voice.

Thanks
Aaron