espeakup, alsa, pulseaudio, and volume levels

Samuel Thibault samuel.thibault at ens-lyon.org
Sun Oct 24 11:52:20 EDT 2010


William Hubbs, le Sun 24 Oct 2010 10:41:07 -0500, a écrit :
> On Sun, Oct 24, 2010 at 03:56:00PM +0200, Samuel Thibault wrote:
> > Getting back to the issue of volume levels in a future Debian installer
> > with software speech synthesis, I've just realized there's direct alsa
> > support in espeakup.  Would it perhaps be better to use that instead of
> > portaudio?
> 
> Unfortunately the direct alsa support is not quite where it needs to be imho.

Ok.

> > In any case, could somebody work on adding an option to set all the
> > muted audio levels to a middle value?  The installer could then pass it
> > to somehow make sure at least some audio goes through.
> 
> The issue here is that the channels are muted by default, and we would
> have to find all muted channels and unmute them as well.  From what I
> remember that has to be done with alsamixer or something similar from
> the command line; I do not know of an API function to unmute sound
> cards.

Well, there must be one since alsamixer is able to do it.

> The way we do that for now on gentoo and arch is with scripts
> that run as part of the boot sequence.

But that'd mean yet more tools on the d-i disk, taking room, while I
believe it would be helpful to have it in espeakup, also for the reason
below:

> > Also, the CMD_SET_VOLUME command only adjust the espeak volume, and not
> > the actual PCM volume for instance.  I'd say with the option mentioned
> > above it should also set all output volumes it can find.
> 
> CND_SET_VOLUME is used when the volume is changed either in the speakup
> sys file setting or from the keyboard, so I'm not sure you want that to
> mess with any volumes other than speakup's volume (espeak's volume
> setting is what actually gets adjusted).

That's why I'm saying it should be done only when the debian installer
gives the option to do so.

> I don't know, again, if there is an ALSA API call that will "find all
> volumes on a card and set them to a certain level" or not.

Probably not that exactly, but there must be an ALSA API that will find
all volumes on a card, an API to get their level and muteness, and an
API to set their level. Looking at the alsamixer source code would
probably be useful.

Samuel



More information about the Speakup mailing list