Fixing Festival in Lucid Lynx…

I have come across a common issue with my Lucid computers.  After installing festival, the command echo "Hello world" | festival --tts gives me an error, “can’t open /dev/dsp”.  I found the fix, although I do not remember where.

Anyway, edit the following file:

sudo vi /usr/share/festival/festival.scm

and append the following lines at the end:

(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")

This seems to take care of that issue, and the command now works.

Kubuntu 9.04 and Flash Audio…

I finally got sound to work reliably.  Here is what did NOT work:

  • “touch .asoundrc” in the home directory
  • remove and reinstall non-free flash and the installer
  • ensuring the PCM channel was unmuted and not turned down

I did have to make sure that the correct sound card was selected (I have two).  This made a difference for system-wide purposes, but as far as flash went, sites like YouTube were mute.

I finally found a site that gave instructions to install a pulse audio management tool – padevchooser.  I don’t remember which site, because I must have trolled dozens, but this solution worked every time (I had to do this once for each user, as each user).

Opening a terminal and running padevchooser opened up the app in the system tray.  Left clicking it brought up the context menu.  Selecting Volume Control, and the Output Devices tab, I was able to ensure that the correct card was the default.  On the Playback tab, I was able to move the stream to the correct card.  For some reason, they all seemed to default on the other unused card, which is integrated into the motherboard.

Once I did these things, Flash audio was just fine.

HOWTO – Another Sound Fix in Kubuntu 7.10…

I occasionally get sound system error messages from arts, usually fatal, that the system cannot be started, or some such nonsense. Usually after a Flash website is left loaded in a browser for a long time, or many games have been played over time by one of the kids.

I finally did a quick search for an answer and found this on the Ubuntu forums. The solution needed slight tweaking, since the script listed did not provide sound. By troubleshooting (running the script in konsole), I got it to work in short order and adjusted the default volume, then logged in on each user account and made the required user changes.

Here is the script:

#! /bin/sh
# sox_play script for knotify
sox -v 2.9 -q "$@" -t alsa default &

Hopefully this will make sound a little more reliable. Still having issues with YouTube videos and Flash locking up and becoming unplayable. Will keep working this and post whatever fix I can find.

Update:  After  three days of constant multi-user use, I can say that this fix is a definite improvement over using arts.  No more sound-server fatal errors, no more lost sound, regardless of who used what application.  I guess sox …uh…rox.  (Sorry, couldn’t resist – I am a weak man.)

The only thing that was not resolved regarding sound was the occasional loss of the ability to play multimedia files (MPEG, AVI, FLV mostly), following YouTube lockups (Firefox freezes).  I do not think these are related to the sound server, however.  I am using the latest Flash player (from the Adobe web site, not the Ubuntu package).  Nothing seems to fix that but a reboot.  Google has yet to provide a better answer than that.

If anyone has any ideas for a fix, please, indulge me…  I’ll be happy to detail any real fix and give credit where it is due, of course.

Howto – Troubleshooting Sound in Kubuntu…

Mentioned in an earlier post was a problem I was having with sound. I have two sound cards, both recognized well by Kubuntu 7.10. One is onboard – a VIA VT8233/A/8235/8237 AC97 Audio Controller (rev 60). The other is a PCI card from C-Media – a CM8738 (rev 10), and is the one I prefer to use.

In kmix, both cards would be visible in a drop-down list, and I would make sure the C-Media card was selected after logging into KDE. I have been having issues, however, with the default sound card switching from the C-Media card to the VIA card. When this would happen, nothing I did in the sound server or kmix would make any difference, not even logging off and logging back on. I would have to reboot and actually go into the BIOS and toggle the onboard card to either on or off – changing its state made the difference (usually).

I found some good tips in the Ubuntu forums that helped. These and the module blacklisting I did seem to have permanently fixed the problem. I also rebooted back into the BIOS and disabled the onboard sound card to ensure there were as few variables running amuck as possible.

The links I found helpful were:

The commands I found useful were:

  • cat /proc/asound/modules
  • sudo asoundconf list
  • sudo asoundconf set-default-card <desired card name from the preceding list command> – sets across the system
  • asoundconf set-default-card <desired card name from the preceding list command> – sets for the user running the command

Files that were useful in this were:

  • /etc/modprobe.d/alsa-base – shows card-slots, modules and options
  • /etc/modprobe/blacklist – take out modules that keep stepping on your toes

Some caveats here – be familiar with your hardware and modules.  Use lspci and lsmod.  Take your time and go slow, making one-change-at-a-time if you are unsure or uncomfortable.  Document what you do, so in the worst case, you can reboot into rescue mode and undo what ya done did.

Or you can be like me and gun it till you throw a rod.  ^______^

(Way more fun that way, IMHO).