SOLVED Fix for no audio from sound card

JimLS

Member
Joined
May 22, 2013
Messages
43
Reaction score
2
I have been trying to get audio from the sound card of the PC running piaf. Did all sorts of things to make sure gains were turned up, unmuted, checked devices, ... No luck. I did find other reports of issues with piaf and also with Centos. Brought back memories of the main reason I switched from Fedora to Ubuntu several years ago - lots of problems with audio. Anyway, I ran across this:

https://www.centos.org/forums/viewtopic.php?t=7570

And used the procedure referenced above that is here:
http://www.linwik.com/configuring_the_audio_and_updating_alsa_for_centos_and_rhel_6

I need to remove the repo and am not sure if I might have created other problems by doing this but...

Once I rebooted audio worked. At least this worked:

flite -t hello
aplay also works on wav files

However:
echo "Hello world" | festival --tts
gives an error:
Pulseaudio: Connection refused

Haven't figured that one out yet.

I found this but it doesn't seem to help:
http://pbxinaflash.com/community/index.php?threads/20645-alsa-console.13751/

My system info:
PIAF Installed Version = 2.0.6.4 under *HARDWARE* x
x FreePBX Version = 2.11.0.0rc1.8 x
x Running Asterisk Version = 11.3.0 x
x Asterisk Source Version = 11.3.0 x
x Zap/Dahdi Source Version = N/A x
x Libpri Source Version = 1.4.12 x
x IP Address = 192.168.15.180 on eth0 x
x Operating System = CentOS release 6.4 (Final) x
x Kernel Version = 2.6.32-358.6.1.el6.i686 - 32 Bit x
x Incredible Version = 11.3

Apparently not many people try to use audio on their piaf box? Or does it work ok for most people?
 

JimLS

Member
Joined
May 22, 2013
Messages
43
Reaction score
2
Attempted to kill pulseaudio and restart:
root@pbx:~ $ pulseaudio -k
E: main.c: Failed to kill daemon: No such process
WARNING: Always run Incredible PBX behind a secure hardware-based firewall.
root@pbx:~ $ pulseaudio
W: main.c: This program is not intended to be run as root (unless --system is specified).
W: main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

Then I found a bug report regarding pulseaudio on headless servers:
https://bugzilla.redhat.com/show_bug.cgi?id=747963
Commands I ran:

root@pbx:~ $ dbus-launch --exit-with-session pulseaudio --daemon
W: main.c: This program is not intended to be run as root (unless --system is specified).
WARNING: Always run Incredible PBX behind a secure hardware-based firewall.
root@pbx:~ $ pulseaudio
W: main.c: This program is not intended to be run as root (unless --system is specified).
E: pid.c: Daemon already running.
E: main.c: pa_pid_file_create() failed.
WARNING: Always run Incredible PBX behind a secure hardware-based firewall.
root@pbx:~ $

flite, aplay, and festival now all work

I have to admit that I am mucking around with things I don't really understand so this may not be the right or best solution but hopefully that gives others some clues as to what is going on and how to properly fix it.
 

Hyksos

Guru
Joined
May 28, 2011
Messages
474
Reaction score
70
You're not saying a lot, so it's hard to understand exactly what else you might have done but I would theorize based on what you said that it might not survive a reboot.
At least it should not based on what you said, if you reboot and do "echo "Hello world" | festival --tts" does it work or you're back with the problem?

You describe manually starting pulseaudio via dbus-lauch so that pulseaudio can find the session bus instance... But you did that manually, it won't restart like that on the next reboot.

I'm not really helping (helping from 60K feet).. but you're better off trying it while you're in it, instead of 6 months down the road when you reboot.

Hope this helps
 

JimLS

Member
Joined
May 22, 2013
Messages
43
Reaction score
2
I think I described what I did fairly completely. You are right that this won't survive a reboot although at this time I am just trying to sort out a fix. Making it auto start is something I don't think will be too difficult once I have the fix.

What I _am_ wondering is why this doesn't work "out of the box". Was hoping someone would jump in and say something like "that's a known limitation. Not too many people need to do that so it wasn't set up" or "Audio out of the sound card should work" or "here's the preferred/usual way to get this working" or something like that so I would know if I have some unique situation.

I consider it a bug and I found a bug report that is related on a redhat system but I see the moderators have marked it as a suggestion rather than a bug - would be appreciated if they would post why... The claim for piaf is that festival is "preinstalled" iirc but does that only apply to use within asterisk for sound channels and not to sound cards? I am not sure that pulseaudio is required to make this work or make festival for sound channels work (probably not?). So perhaps there are other ways to make this work?

Hope this isn't taken as a general complaint against piaf. I am just not experienced with this and struggling to figure it out and don't want to inadvertently do something to mess up my system somehow.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
Simple answer is we're providing an Asterisk-based PBX, not a full-featured Linux platform. Audio, text-to-speech, and speech-to-text all work with Asterisk. It probably didn't work as a standalone platform because you are the first person in 7+ years to ever try it. That kinda tells you where it fits on the priority list, but we're glad you got it working.
 

Members online

Forum statistics

Threads
25,824
Messages
167,825
Members
19,247
Latest member
mdauck
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top