[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
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
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
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
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
(both shipped with SuSE 8.1, 8.2).

It's important that within vvstartuserguru, the volume slider for
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.
should be getting an "excellent". You need at least a "good" to make
use of ViaVoice.

6.2 Audio mixer

It is important to find some mixer settings (output volume, input gain,
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
effected. The viavoice wrapper script, created by applying the patch, 
restores audio levels from a file you previously saved, so each time you
ViaVoice you're starting with the same mixer settings.

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


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
------------------------------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
# replace the older OSS as of kernel 2.5, also introduce a problem for
# soundcards: unlike the OSS drivers, the ALSA drivers limit the
# buffer to the hardware limit of your sound card.  For example, the SB
# only has two 'period' buffers (called fragments before), and although
# viavoice requests an 'arbitrary number of periods, size 1024 bytes',
# only gets two periods of 1024 bytes: 2048 bytes in total!  The
# engine however doesn't even process sound until it sees at least 6102
# The 'solution' for this is to increase the buffer size (from 1024 to
# 8192), this script also takes care of that.  Unfortunately, also that
# 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
# When ALSA sees an underrun... it stops the sound stream.
# While this script works for me - you might still run into this
# 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
# 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
------------------------------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.