Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HOWTO JUST MAKE IT FREAKIN WORK - Voice in Ubuntu Hardy/Intrepid/PulseAudio

Gaffe Melnik
I HATE COMPUTERS
Join date: 2 Mar 2007
Posts: 1
01-07-2009 22:20
HOWTO MAKE IT FREAKIN' WORK: VOICE IN UBUNTU HARDY/INTREPID

LINDENS: Please adopt an open standards voice architecture. We shouldn't have to do stuff like this.

PULSEAUDIO USERS: It's not that hard to kludge around it, this works pretty well, and it's been consistent since Hardy. I'll start with a fresh Ubuntu Intrepid Ibex install on the pentium box. Essentially you use padsp to run the windows SLVoice.exe alongside the Linux viewer.

YOU NEED:
A distro with Pulseaudio (I'm using Intrepid, this works on Hardy too)
I use the official linux Release Candidate as the client.
You also want the official windows release secondlife client.

Get WINE. (It's in the repos, but not installed out of the box)
https://help.ubuntu.com/community/Wine if you need help getting WINE on your Ubuntu distro.

I'm assuming you have your proprietary video drivers set up, have already established that you can run SL *WITH* sound but without voice, and your mic works in other non-SL applications. You're ready.

DO THIS:
Open wineconfig (wineconfig in the console or from the menu:
Applications--> WINE --> Configure Wine). Click on the "Audio" tab. If it gives you an error when you click on it, ignore it. Check the square that says "OSS Driver" in the driver selection window. Uncheck the one that says "ALSA Driver." Click OK. You're done configuring WINE unless you know what you're doing.

Unpack the linux SL viewer (will probably have "i686" in the filename), and put the unpacked folder somewhere convenient. Don't forget where you put it. Inside the unpacked client is a folder called "bin" and inside that is an executable file named "SLVoice"

Delete SLVoice. Replace SLVoice with an empty file (right click, "Create Document," "Empty File"). Name the file "SLVoice" and yes, it's case sensitive. We're done with the client until we're ready to run it.

I don't think the SLVoice binary was in the bin folder in the last release, so if you're using an older client or maybe even the release (I'm not going to bother checking) it's possible SLVoice will be in the base directory of the package. Just make sure an empty file replaces the SLVoice binary, wherever it might be.

Now we're going to actually install the windows version, but only use the voice part. I don't know if there's a way to do this without installing the whole viewer again. Right click on the secondlife Setup.exe and "Open with Wine Windows Program Loader" Don't try to extract it as though it were an executable zip file.

Install SL as you would in windows. I accepted all the defaults and noted the install directory. CHOOSE "NO" WHEN IT ASKS IF YOU WANT TO "Start Second Life Now"

There's a shortcut on your desktop for the windows second life viewer. Delete it, because you'll never use it. I would have decided against a desktop shortcut were I given the option.

Run the LINUX SL client. Login. Go somewhere with voice and chatty people. Ahern Welcome Area is usually populated. You don't have voice yet.

Open a console (in Ubuntu, Applications --> Accessories --> Terminal) and type

From: someone
padsp wine ~/.wine/drive_c/Program\ Files/Secondlife/SLVoice.exe


This runs the SLVoice windows application, which does what the linux version is supposed to do. I'm choosing to ignore any errors that aren't red and keep the program from running. Adjust the arguments if you installed the windows viewer somewhere exotic.

Now that SLVoice.exe and the linux SL client are running at the same time, your client should connect to the voice servers in 10 - 20 seconds. It was almost instant for me. SLVoice.exe exits when voice is disabled in Edit --> Preferences --> Voice Chat. So run the SLVoice.exe again before you re-enable voice chat.

It should work. I had to turn up my capture volume, though. Double click on the system volume speaker or run gnome-volume-control from the terminal. I'm using some kind of intel sound card, so the magic slider for me was "Capture," which shows up under the "Recording" tab after you enable it in the preferences. You might have to experiment.

CAVEATS:
You need a fast computer. You're (not) emulating a windows binary the same time you're filtering the SLVoice audio data through a sound daemon hack. I just did this on a P4 3.0HT with out any sound artifacts, but it might stutter/crackle/get stupid if you're taxing something less robust. In Hardy, if another app is using the sound server when you start sl and slvoice, the pulseaudio daemon will hang (and probably crash most sound-using programs). Force quit any open application that uses sound, then kill and restart the pulseaudio process:

From: someone
kill -s KILL $(pgrep pulseaudio)
pulseaudio


If you can't launch pulseaudio again, something is still using your sound card. Find the app that's using sound and kill it. Then start pulseaudio, secondlife, and the windows SLVoice app and you should be up and running. Now that sl and voice are working, you can use rhythmbox and vlc player and other noisy apps. Flash video on firefox hangs up time to time when I use this hack, but I'll blame that on closed Flash code for now.

POLISH:
Rather than mess with the console every time, you can just run this script to start SL with the voice kludge.

From: someone

WHY WON'T VBULLETIN LET ME POST MY SCRIPT HERE


Paste that into a text file, fix the SL_DIR and SL_VOICE variables, save it, make the file executable, and run it. Type in your name and password. Don't get your password wrong. Click ok. You should launch with voice support.

Good luck!
Missy Malaprop
♥Diaper Girl♥
Join date: 28 Oct 2005
Posts: 544
01-10-2009 20:48
thats a pretty hard way... easier to just use the OpenAL client.. install OpenAL soft on your machine... and then because of path problems, make sure SLs lib folder is in your path, or copy all its libs into your systems lib folder... I use voice fine with pulseaudio as long as i'm using the OpenAL viewer.
Baloo Uriza
Debian Linux Helper
Join date: 19 Apr 2008
Posts: 895
01-10-2009 20:58
From: Missy Malaprop
thats a pretty hard way... easier to just use the OpenAL client.. install OpenAL soft on your machine... and then because of path problems, make sure SLs lib folder is in your path, or copy all its libs into your systems lib folder... I use voice fine with pulseaudio as long as i'm using the OpenAL viewer.


The wine method always works. The OpenAL client does not work on Intel audio devices, such as those that ship in every ThinkPad in the last two years.
say Moo
.......
Join date: 14 Mar 2007
Posts: 284
01-11-2009 01:00
uhm.. slvoice is supported in linux client out of the box.
just make sure you have your audio setup correctly (alsa as daemon works best) and routed when using pulse.

no need to tinker with window editions through wine, etc..
that used to be the work around when voice was not supported yet by the sl linux client.
Carter Liveoak
Registered User
Join date: 10 Nov 2006
Posts: 2
01-11-2009 09:58
From: say Moo
uhm.. slvoice is supported in linux client out of the box.
just make sure you have your audio setup correctly (alsa as daemon works best) and routed when using pulse.

no need to tinker with window editions through wine, etc..
that used to be the work around when voice was not supported yet by the sl linux client.


No, friend Moo. Voice isn't supported in ALL linux clients "out of the box." Since Ubuntu 8.04, which introduced PulseAudio as the default sound system, voice has tended to be quite broken out of the box. Sad, but true.
say Moo
.......
Join date: 14 Mar 2007
Posts: 284
01-11-2009 10:24
well, then it's pulse audio (ubuntu implementation) to blame, not the SL client :)

my quick not indepth findings:
It's primarely an Ubuntu implementation of Pulse audio, that borks with SL. (i've ran Ubuntu today to test it out.. and guess what the whole pulse thingy is borked, even alsa has problems with it (routing the sounds sources etc). Nasty, but true.

That's a negative score for ubuntu, in this case. Pulse being badly implemented, i mean.

With fedora and gentoo i have no problems, even opensuse works fine.
(quad boot setup in this case.. )
Baloo Uriza
Debian Linux Helper
Join date: 19 Apr 2008
Posts: 895
01-11-2009 13:03
From: say Moo
uhm.. slvoice is supported in linux client out of the box. just make sure you have your audio setup correctly (alsa as daemon works best) and routed when using pulse.


If it worked for you out of the box, then odds are you don't need pulse to begin with: You have a decent audio device that can play multiple streams without resorting to ugly hacks like arts, esound or pulse.
Baloo Uriza
Debian Linux Helper
Join date: 19 Apr 2008
Posts: 895
01-11-2009 13:05
From: say Moo
well, then it's pulse audio (ubuntu implementation) to blame, not the SL client


I'm inclined to blame both sides. Pulse clearly isn't the answer, but it's the only way to give access to sound from more than one program at a time if you have inferior audio hardware (almost everybody falls into this category as chipset manufacturers don't seem to consider "can play more than one sound at a time" as a feature worth including or even mentioning on the package, even if it does support that).
say Moo
.......
Join date: 14 Mar 2007
Posts: 284
01-11-2009 14:30
it might be my audio setup..

i use two cards..

one M-audio delta card (professional studio card) using the linux envy something module.

And i also use the Creative SB live 5.1 card (ensoniq chipset i believe).

anyway, on both cards it does work on my setup. (selecting one of them as primary card then testing it)

although as stated before, NOT with ubuntu.. strangely enough, since it's suppose to be out of the box working newbie distro...
Both alsa and pulse are borked.. (alsa won't start OR if it starts it's giving erratic squicks noisy sound using the mic)
And pulse seems to have big issues with setup, crashing even.
(on both cards)

other distro's i use (in random intervals) like Fedora Opensuse and gentoo, don't give me problems. So, my guess is that somehow ubuntu is lacking something with pulse AND alsa combination.
Hilby Yalin
Registered User
Join date: 4 May 2007
Posts: 21
Native SLVoice working
01-14-2009 01:18
Since 1.21.* Voice cannot work because of a faulty libvivoxsdk.so, as in jira is said, following can be done to patch it:
1. cat /proc/cpuinfo > cpuinfo
2. echo 'power management:' >> cpuinfo
3. cp libvivoxsdk.so libvivoxsdk.so.bak
4. sed -i 's/\/proc\/cpuinfo/lib\/cpuinfo\c@\c@/g' libvivoxsdk.so
This fixes one part of the problem, second install openal-soft en copy this one over the one found in lib (from: http://kcat.strangesoft.net/openal.html)
The last part, install freealut en copy the installed file from (probably /usr/lib) to the lib folder of secondlife.
After this is done and checked that the microphone and speakers are working normally under linux.
Now you should have voice.
Tested it yesterday and more than 4 hours of voice :-D (with an interval :-P without logging out).

So what is done:
1) patched libvivoxsdk.so
2) replaced libopenal.so
3) replaced libalut.so

Working on a Fedora Core 10 32 bit machine with a core 2 duo and an Nvidia 9600GT card, with pulse audio
Katheryne Helendale
(loading...)
Join date: 5 Jun 2008
Posts: 2,187
01-14-2009 22:52
See my notes in the Experimental Viewer thread. I was able to get voice to work by doing a little mixing-and-matching of the Linden-supplied libraries and forcing SLVoice to use OSS.
Baloo Uriza
Debian Linux Helper
Join date: 19 Apr 2008
Posts: 895
01-15-2009 00:05
From: Katheryne Helendale
See my notes in the Experimental Viewer thread. I was able to get voice to work by doing a little mixing-and-matching of the Linden-supplied libraries and forcing SLVoice to use OSS.


I'm not able to reproduce this on a thinkpad.
Katheryne Helendale
(loading...)
Join date: 5 Jun 2008
Posts: 2,187
01-17-2009 18:00
From: Baloo Uriza
I'm not able to reproduce this on a thinkpad.

What was it you're not able to reproduce?
PeterPunk Mooney
Registered User
Join date: 30 May 2008
Posts: 34
01-19-2009 23:48
From: Missy Malaprop
thats a pretty hard way... easier to just use the OpenAL client.. install OpenAL soft on your machine... and then because of path problems, make sure SLs lib folder is in your path, or copy all its libs into your systems lib folder... I use voice fine with pulseaudio as long as i'm using the OpenAL viewer.


How to know if Sls lib folder is in my path? And if not, how to copy all its libs into my system lib folder? I extracted OpenAL in my home as a subfolder in my kubuntu 8.10.
PeterPunk Mooney
Registered User
Join date: 30 May 2008
Posts: 34
01-19-2009 23:52
From: say Moo

...
just make sure you have your audio setup correctly (alsa as daemon works best) and routed when using pulse.
...


How to set Alsa as daemon and route it on my kubuntu 8.10?
Baloo Uriza
Debian Linux Helper
Join date: 19 Apr 2008
Posts: 895
02-02-2009 13:08
From: Katheryne Helendale
What was it you're not able to reproduce?


Voice without having to resort to using the Windows slvoice in a wrapper on this thinkpad
Bersl Woodrunner
Registered User
Join date: 13 Jan 2009
Posts: 1
02-03-2009 19:34
From: Baloo Uriza
If it worked for you out of the box, then odds are you don't need pulse to begin with: You have a decent audio device that can play multiple streams without resorting to ugly hacks like arts, esound or pulse.

PulseAudio is not an ugly hack (probably).

I'm a friggin' Slackware user, and I have done the necessary compilation and installation of packages outside of the distro in order to get PulseAudio to work. I even have a sound card that supports hardware mixing. So why have I done such a thing? Because PulseAudio provides per-application volume control.

I'd love for sound cards to have per-stream volume control built into the hardware, but the trend in sound is to go the opposite direction.

Anyway, I'll give this a shot. PulseAudio and Wine usually don't mix, I have found, but I'll try a couple of these.
Inconspicuous Hammerer
Registered User
Join date: 27 May 2008
Posts: 1
02-03-2009 19:58
From: Bersl Woodrunner
PulseAudio is not an ugly hack (probably).

[snip]

Anyway, I'll give this a shot. PulseAudio and Wine usually don't mix, I have found, but I'll try a couple of these.


Please post with your results!
Katheryne Helendale
(loading...)
Join date: 5 Jun 2008
Posts: 2,187
02-04-2009 16:09
From: Baloo Uriza
I'm not able to reproduce this on a thinkpad.

What distro are you running on it? Does the distro use Pulseaudio? If so, did you disable Pulseaudio?

The solutions I had come up with assume Pulseaudio is in use; I have not tested it on non-PA distros.

I just updated to Viewer version 1.22 RC7, and took the opportunity to play with the libraries a little more. I'm not sure if things are starting to get better or what, but the number of changes I've had to make are far fewer than what I had to do to get voice to work on 1.19.1.4. Specifically:

- I ran the "fixcpuinfo.sh" script on the libvivoxsdk.so library. THAT issues has not been fixed to date.

- I noted that, while SL connected me to voice, and that Pulseaudio had made the necessary connections (as shown in PAMAN), I was the only active speaker in the list, and voice regularly disconnected and reconnected. This is an old problem that has not yet been fixed.

- I removed libopenal.so.1 from the /libs directory within my SL install, and replaced it with a copy of the libopenal.so.1.3.253 library I found in /usr/lib. I renamed the copied library to libopenal.so.1.

and with those few changes, I had working voice.

I noticed also that SLVoice still tries to strangle Pulseaudio to death, as noted in the experimental viewer thread, so I set it up to force it to use OSS using the padsp workaround. PA crashes still happen, but not as often as when it was using ALSA.

In working on the PA-strangulation issue some more, I have discovered that, if I disable voice in SL before logging on, and then re-enable it at least one minute after logging on, it almost never crashes Pulseaudio. Methinks there is something going on during the initial connection while SL is still loading that is causing the problem. I have also noted that even if I remove my padsp workaround and allow SLVoice to use ALSA, I rarely experience Pulseaudio crashes if I delay connection to SL's voice system.

Tofu: I know that one day all of SL's audio will be routed through OpenAL, getting rid of fmod once and for all. FWIW, I've never had any issues with fmod, but - could you please take a look at the code and see if there is a possible race condition being set up when SL connects to voice while the SL viewer itself is still loading? Once I'm in-world, SLVoice never causes any problems, even if I cross regions and TP all over the place; it's only while initially entering the world that I get these issues.
Baloo Uriza
Debian Linux Helper
Join date: 19 Apr 2008
Posts: 895
02-04-2009 16:17
From: Katheryne Helendale
What distro are you running on it? Does the distro use Pulseaudio? If so, did you disable Pulseaudio?


As previously mentioned, Debian. No. And I tried it both ways. You can't do it without pulseaudio if you don't have a sound device that can play multiple streams, period. Laptops don't exactly have a choice in the matter.
Krystal Yifu
Registered User
Join date: 21 Feb 2007
Posts: 34
02-26-2009 20:15
Yeah. I am a user of Hardy Heron and I only get alsa and oss settings to choose when doing my voice chat preferences.

I get the white dot above my head but nothing will let me speak, causing the waves to show up above my head. It really is too bad but I guess the Lindens just focus on Windows and Mac for now.
Katheryne Helendale
(loading...)
Join date: 5 Jun 2008
Posts: 2,187
02-27-2009 23:32
From: Krystal Yifu
Yeah. I am a user of Hardy Heron and I only get alsa and oss settings to choose when doing my voice chat preferences.

I get the white dot above my head but nothing will let me speak, causing the waves to show up above my head. It really is too bad but I guess the Lindens just focus on Windows and Mac for now.
A little more information would be helpful:

Do you have Pulseaudio enabled? Is it correctly configured as per this guide: http://ubuntuforums.org/showthread.php?t=789578 ?

Can you hear other people talking (you may need to go somewhere where voice is used a lot, such as an infohub or a welcoming center)?

Does your mic work in other applications?

Is the correct input source selected in alsamixer?

Is your input source muted or turned down too low?
_____________________
From: Debra Himmel
Of course, its all just another conspiracy, and I'm a conspiracy nut.

Need a high-quality custom or pre-fab home? Please check out my XStreetSL Marketplace at http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=231434/ or IM me in-world.