bmc0 / dsp

An audio processing program with an interactive mode.
ISC License
219 stars 31 forks source link

Losing audio output from terminal? #38

Closed exaiyo closed 5 years ago

exaiyo commented 5 years ago

Your dsp is working great for me, but I've noticed that speaker-test is silent with ladspa enabled. Also, I cannot hear text to speech programs from terminal.

load-module module-ladspa-sink sink_name=dsp sink_master=alsa_output.pci-0000_06_01.0.iec958-stereo plugin=ladspa_dsp label=ladspa_dsp
set-default-sink dsp

Removing the above lines and restarting pulseaudio allows me to hear audio via terminal apps again. Any idea what I might be doing wrong?

Thanks.

EDIT: Removed silly question.

bmc0 commented 5 years ago

I have somewhat limited experience with PulseAudio (I usually use ALSA directly), but it seems like mono sources are not working for some reason. Does speaker-test -c 2 work? If you have enable-remixing=no in ~/.config/pulse/daemon.conf, PulseAudio will not remix a mono source to stereo and you will get only silence.

Also, you should replace sink_master= in the load-module with master= (not sure whether this might be causing the issue or not).

exaiyo commented 5 years ago

speaker-test -c 2 does not work either. I changed sink_master to master but that didn't help either. Neither flite (the text-to-speech terminal app) nor speaker-test throw any errors, they operate as they should minus the sound.

Let me know if I should provide additional information, it is only a hindrance for me because I wanted to use flite text-to-speech in my bash scripts. I also tried speech-dispatcher but it seems to have a documented bug that causes audio quality loss (crackling) with pulseaudio due to sampling mismatching or something I don't quite recall. That is of course unrelated, I first encountered that bug when using Mumble VoIP client which also uses speech dispatcher.

Regardless, thanks so much for the dsp. The more I learn about the nature of pulseaudio/alsa, the more I gain respect for those like you who work with it. I

ariendj commented 5 years ago

'Speaker-test -c2 -D pulse' should work. Have you tried that? Works fine here. For your text to speech software you should also try to specify the alsa device called 'pulse'. That should redirect the alsa output to pulseaudio and your LADSPA plugin will be used.

If you want to redirect all alsa software to pulseaudio permanently, make a /etc/asound.conf file that contains this:

pcm.pulse { type pulse }

ctl.pulse { type pulse }

After a reboot all your alsa programs should play audio via pulseaudio by default.

exaiyo commented 5 years ago

If you want to redirect all alsa software to pulseaudio permanently, make a /etc/asound.conf file that contains this:

pcm.pulse { type pulse }

ctl.pulse { type pulse }

After a reboot all your alsa programs should play audio via pulseaudio by default.

The first command did not work, it said "pulse" was unrecognized. The asound.conf lines you provided allowed speaker-test to work. Thanks both of you. I believe I misread the documentation and thought that this was for ALSA-only installations.