[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]
Re: IBM ViaVoice and Alsa
- To: Tim Cross <tcross@xxxxxxxxxxx>
- Subject: Re: IBM ViaVoice and Alsa
- From: Lukas Loehrer <listaddr1@xxxxxxxxxxx>
- Date: Sun, 7 May 2006 11:00:23 +0200
- Delivered-To: priestdo@xxxxxxxxxxx
- Delivered-To: emacspeak@xxxxxxxxxxx
- In-Reply-To: <17501.33420.865397.400182@xxxxxxxxxxx>
- List-Help: <mailto:emacspeak-request@xxxxxxxxxxx?subject=help>
- List-Post: <mailto:emacspeak@xxxxxxxxxxx>
- List-Subscribe: <mailto:emacspeak-request@xxxxxxxxxxx?subject=subscribe>
- List-Unsubscribe: <mailto:emacspeak-request@xxxxxxxxxxx?subject=unsubscribe>
- Old-Return-Path: <listaddr1@xxxxxxxxxxx>
- Reply-To: listaddr1@xxxxxxxxxxx
- Resent-Date: Sun, 7 May 2006 05:00:29 -0400 (EDT)
- Resent-From: emacspeak@xxxxxxxxxxx
- Resent-Message-ID: <t3yJG.A.FRF.tcbXEB@xxxxxxxxxxx>
- Resent-Sender: emacspeak-request@xxxxxxxxxxx
This does not really solve Tim's problems but is more like a report
of my own findings with viavoice and alsa.
Theoretically, you should no longer need a .asoundrc file with current
alsa versions as dmix is used by default. When I was working on alsa
support for eflite, I found that alsa can behave quite differently
on different machines. Also, I found that there can be very annoying
interaction between different processes that all use the sound device
quasi simultaniously, e.g. killing one process will kill unrelated
others too only because they are also happend to use sound, or one process can
sometimes corrupt the sound device in such a way that others will also
sound strangely.
As for viavoice with alsa, I have also observed the problem you
describe where at the end of the utterence, it seems that It wants to
talk a bit more. On one of my machines, it actually repeats that last
sound indefinitely. On another machine, this probelm is fixed perfectly
with the right .asoundrc file, so it can indeed make a huge difference
to get those settings correct.
I believe that most instability issues with viavoice are due to
viavoice itself and do not stem from the alsa interface. However, I
have identified 2 sound issues of which I have only fixed one so far:
The funtion alsa_reset does not close the sound device but just opens
a new one. This will most likely cause a resource leak. I changed the
funtion to:
void
alsa_reset () {
snd_pcm_drop (AHandle);
snd_pcm_prepare(AHandle);
}
In this way, the same handle is reused.
The second problem is more compicated. When there is no more speech,
the sound device goes into xrun state, which should not be a problem
but is apparently not handled well by all drivers and I suppose it
causes the strange sounds at the end of some utterences. To fix this,
one would have to call snd_pcm_drain() at the point where no more
sound data is available. I have not yet had time to find a good way to
achieve this. Also, there seem to be some issues with this function on
some machines, i.e. it sometimes blocks indefinitely. The solution
I am considering would add a eci-mark after the last utterence before a "d"
command and thus the callback function would be called again after the last
utternce of that block has been sent to the sound device and we could
call snd_pcm_drain from there.
About sluggishness, I think it mainly shows at low speech rates with
certain special characters. For example, set the speech rate to 50 and
it "[" quickley a few times. Now do the same thing with "w". It seems that with
"w", succeeding utternces cancel previous ones, wile with "[" this is
not the case.
Anyway, those were just some of my observations. I hope I will find
time soon to thry to implement the xrun-fix. If anyone has any ideas
on how to do this cleverly, I would be very interested to hear it.
Best regards, Lukas
Tim Cross writes ("IBM ViaVoice and Alsa"):
> I've just had an interesting experience which may help others and
> answer some of the questions regarding issues which have come up
> concerning ViaVoice.
>
> I'm running Debian testing and on the weekend did an upgrade which
> included an upgrade to the Alsa utilities and Debian's sound-core
> package. There was no kernel upgrade. I'm running kernel 2.6.15
>
> After the upgrade, I found ViaVoice was not operating correctly. In
> fact, it was now speaking with a distinct stutter and sounded like it
> was trying to say everything twice.
>
> I removed the .asoundrc file I had (which was pretty much the same as
> the example Raman provides). This pretty much solved the problem,
> except at the end of speaking a chunk of text, there was an irritating
> "blah" sort of sound - like a bit of text being cut off before it
> could complete speaking.
>
> I then decided to try the OSS version of the driver rather than the
> alsa version. This doesn't have any stuttering or repeated text and no
> cut off bit of repeated text at the end of text blocks. However, when
> typing, it is *a lot more sluggish* than when using the alsa driver.
> However, the driver itself is a lot more stable. The current alsa
> driver dies on me quite a bit, but he OSS version rarely dies - its
> just sluggish when typing and a bit less responsive with respect to
> interruption of speech.
>
> I suspect the problem with the alsa version of the driver is that I
> need to tweak my .asoundrc settings. So, its probably time to go to
> the alsa web site and start to learn how to use the .asoundrc file. A
> brief scan of this gives me the impression this could take a bit of
> learning - it seems to be quite complex/large. Not sure when I will
> get to it.
>
> If anyone has a good working version of a .asoundrc file for a system
> running a SoundBlaster Live card, I'd appreciate a copy to see if it
> works better than the very basic one I have.
>
> At any rate, this would seem to provide some clues as to why some
> users have reported that ViaVoice is sluggish and doesn't keep up when
> typing i.e. is likely due to usiing the Alsa OSS emulation layer
> rather than native Alsa support. Also, it would seem the settings in
> your .asoundrc file may affect how well the native alsa version works.
>
> Tim
-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"
Emacspeak Files |
Subscribe |
Unsubscribe | Search