Tremfusion.net

VoIP Setup Guide

From TremFusion

First off, thanks to the ioq3 guys who put the VoIP in to make us look good. Second off, thanks to the ioq3 guys for making a great help file at http://svn.icculus.org/*checkout*/quake3/trunk/voip-readme.txt

Third, this isn't going to be easy, so just bear with me.

Fourth, you don't need a microphone to enjoy VoIP. Yes, that's because at least you could hear what your teammates are saying, even if you have to type back.

Contents

Windows Users

Okay, windows users have quite a bit to do. First things first, we need to ensure that your microphone is working properly and that it is set up as the correct input device. Start by pluggin in your microphone into the microphone jack of your soundcard. If you don't know where that is, you're screwed, give up.

Now, all of my instructions will be written from the perspective of XP service pack 2, because that is what I run. If you are running Vista, I suggest you get Ubuntu instead...and...um...change my instructions to something more Vista-y

Testing Your Recording Device

Ok, now, open Sound Recorder. You can do that by going to Start->Programs->Accessories->Entertainment->Sound Recorder or by typing 'sndrec32' into the 'Run...' dialog box. Or by typing 'Windows Key + R, sndrec32, Enter'. Anyways, you get a cute little dialog box that acts as a voice recorder. Looks like this:

Sound recorder blank.png

Hit the record button and screaming into the microphone. You should see the little green waves go crazy. Even if you don't see much, it could still be recording. After a couple seconds hit stop, then play it back to see if there is sound. If your microphone is well set up, you'll see something like this:

Sound recorder recording.png


What if Windows isn't getting stuff from the microphone?

The first step is to change the default recording device. You can do that by either double clicking on the volume icon in your system tray or by going through the control panel. Here's what the icon looks like:

Sound icon.png

If you don't have one in your system tray, you'll want to enable it in the Control Panel. Go to Control Panel and click on 'Sounds and Audio Devices'. Looks like this:

Control panel audio devices.png

Click on the Volume tab. Click on the box labeled 'Place volume icon in the taskbar'.

Audio devices dialog volume control.png

Or, you can click on the 'Audio' tab and then click 'Volume...' under Sound Recording... This will also bring up the Volume Control dialog box. Here's what I mean.

Audio devices dialog.png

Now, the red arrow here means that you need to be careful that you have selected the audio device that you plan to use. For me, I have a bluetooth device and a !SigmaTel audio. I plan to connect my microphone via the !SigmaTel (my soundcard) so I choose the volume for that device.

For those of you that went with double-clicking on the volume icon in your systray, you need to switch to the recording controls (instead of the playback controls). When your volume control first comes up, it looks like this (or similar):

Volume control playback.png

The red arrow is showing you that you are working with 'Volume Control'. This means it will not change recording settings yet. To do that, click on the Options button (which I've circled in green). Then do like the below:

Volume control options.png

This now brings up a new dialog box where you can switch to recording devices.

Volume control options recording.png

Make sure that your Mixer device is set to the proper device. Since I have a bluetooth sound device and a built-in sound card, I want to make sure I pick '!SigmaTel Audio' instead of 'Bluetooth Audio' for my Mixer device, since my microphone will be connected to the !SigmaTel sound card, not the bluetooth card.

Now, after we've changed to the proper sound card and switched to the recording properties we hit OK and we will see something like this:

Recording control.png

The red arrow shows here that your window should say 'Recording Control' at the top. That indicates that we are working with the recording volume, not the playback volume. Down towards the bottom I have circled the two options that matter most - which input you select. Here I have a sound card with two input options, the microphone jack and the line-in jack. Generally, you should select 'Microphone' (not what I have selected here, obviously). Turn the volume all the way to the top on whichever you select. Now go back to the Sound Recorder and try recording again. Keep moving through the different input options, selecting different ones until you find the one that actually records for windows. If none of them work, I'd make sure your microphone works and then try some other, better guide for figuring out how to get sound recording working under windows, because you've blown through all my expertise.

Setting Up TremFusion

Okay, we assume that if you are at this point you can get Windows to properly record sound and play it back. If you can't, scroll up and do the instructions above and get that working, because if you do this out of order it only makes headaches for all of us.

Also, we assume that you have TremFusion itself up and working. If not, go to the page on [wiki:InstallationInstructions installation instructions] and get TremFusion installed and working first.

Changing from SDL to OpenAL

Currently, sound recording doesn't work with the SDL backend. That is the default setting for Tremulous. So, we have to switch to OpenAL for our sound. Yes, this will make your sound slightly different, but it will get VoIP working. If you are totally awesome, we'd love it if you coded a way for this to work with SDL. Everyone would.

You may need to get OpenAL installed. That should be as easy as following the instructions at the OpenAL website. Basically, get the windows installer and install it.

Start up TremFusion and then bring up the console by hitting '~'. Then type in {{{ \seta s_useOpenAL 1 }}} It should look something like this:

Set openal.png

You'll notice two things here. First, the red circle shows what you should see - it indicates that you're using TremFusion. Second, you'll notice in my screenshot that the default, as reported by TremFusion, is to not use OpenAL. That's why we have to do this. Again, if you have already changed to using OpenAL for whatever reason, great. Now you'll want to restart TremFusion. If you did this all correctly, you should be able to scroll back through your console and see the following:

Openal init.png

Several things to point out. First, the red circle shows '!SigmaTel Audio', which is the same device I already set the recording volume/input for in the steps previously. You should ensure that TremFusion is starting the correct audio device for your microphone. Second, the green circle shows that it was able to start a capture device. That means that I will be able to use a microphone. If yours doesn't say this, you won't be able to talk, just listen. Finally, the blue part is the most important - it means that sound intialization worked. If yours doesn't, I suggest you [wiki:GettingHelp|get some help]

Also, make sure that the cvar 's_backend' is OpenAL. You can do that by starting TremFusion, going to the console and typing {{{ \cvarlist s_backend }}} And it should show OpenAL, not SDL.

Enabling VoIP

Alright, now that we have working OpenAL audio, we just need to enable VoIP in TremFusion.

Data Rate

First we need to increase our connection speed, as VoIP isn't allowed on connections that are not broadband. By default, TremFusion believes that you have a dialup connection. We need to change that. If you like, you can do it via the Options menu. Go to Options->System->Net & Sound and change the Net Data Rate to something representative of your speed. For most of you, that'll be 'LAN, aDSL, Cable.' If you want, you can do it much faster (and without connecting to a server) by using the rate command in the console: {{{ /rate 25000 }}} But, for those of you who like menus, here's how you do it via menus:

Connection speed.png

If you have no done this correctly, later when you try to enable VoIP you will see an error like this in your console:

Voip speed error.png

Enabling VoIP

Now, let's take a look at some of your voip cvars. Start up the TremFusion console and do {{{ \cvarlist cl_voip }}} You should get something like this:

Cl voip.png

The big variable here is 'cl_voip' which enables all of voip. Since our data rate is now something that VoIP can handle, we're ready to enable VoIP. {{{ \seta cl_voip 1 }}}

That should do it. It will tell you you need to restart TremFusion before it will be changed. That's fine, go ahead and restart it. If it doesn't tell you to restart, do it anyways. Then scroll back in your console and you shouldn't see any errors. What would an error look like? Well, it'd look like this:

Voip speed error.png

Okay. We're almost there. Just one last thing to do. Okay, two.

Binding a VoIP Key

You can choose to have the game detect when you are speaking, and have it turn on automatically. More on that further down. For now, we'll use a key. I'd suggest that you modify some kind of binding configuration file (like autoexec.cfg) and add a line like this: {{{ bind f12 "+voiprecord" }}} This will bind F12 to VoIP recording. Optionally, you can jump down to the section on the VoIP cvars and enable voice auto-detect (VAD).

Optionally, you can create the bind in the console. Bring up the console and type {{{ bind f12 +voiprecord }}}

Testing it

Find a server with VoIP enabled. Currently, the only decent server is Dretch*Storm. I'd be happy to add others as soon as you tell us about it...

Anyways, connect to the server. Hit F12 (or whatever key you bound it to). You should see a little VoIP volume meter. Looks like this:

Voip recording.png

One important thing to notice is that my voip meter has asterisks. If yours looks like this:

Voip not recording.png

It is probably because you have 1) not selected the correct input for windows 2) don't have the volume high enough on the capture device or 3) have found a magical new reason. Anyways, the asterisks show you in realtime the volume that TremFusion detects from your microphone. If you get no astersiks (stars) you aren't transmitting anything. Fix it.

Conclusion

There's a lot more to do on this page - check back often. For now though, you have VoIP! Congratulations!

If you don't have VoIP, please don't hesitate to [wiki:GettingHelp get some help]. We are very active, helpful devs, and we will find a way to make it work for you. Pinky swear.


Linux Users

OpenAL should work out of the box. If you have a USB mic or your mic is on a different device, you're going to need an alsoftrc. ~/.alsoftrc

drivers=alsa
[alsa]
device=default
capture=default

You can replace default with the ALSA device for your mic/speakers. For example

drivers=alsa
[alsa]
device=default
capture=hw:1

You can detect your devices by running

cat /proc/asound/cards

Cvars and What They Do

Here's how the VoIP cvars effect things

sv_voip

Set to 1 on servers where VoIP is allowed and supported

cl_voip

Set to 1 on clients where VoIP is allowed and supported

s_alCapture

set to "1" (the default) to have the audio layer open an OpenAL capture device. Without this set on sound startup, you'll never get bits from the microphone. This means you won't transmit, but you can still hear other people.

cl_voipUseVAD

set to "1" to automatically send audio when the game thinks you're talking, "0" (the default) to require the user to manually start transmitting, presumably with a keybind.

cl_voipVADThreshold

Used in conjunction with cl_voipUseVAD, this allows the game to determine when you are speaking, and transmit then. This is only used if cl_voipUseVAD is set to '1'. Set it to a value between 0 and 1 and it will start transmitting over VoIP when it detects the sound in your microphone going over the set value. For instance, if you set it to 0.33, when your audio goes over 1/3 of the maximum that your microphone picks up, it will begin transmission. You want this set high enough to ignore the sounds of you breathing, hitting keys, etc, but not so loud we can't hear you scream when I kill you.

cl_voipGainDuringCapture

This is used to control the sound coming out of your computer from the game when you talk. It's so that when you are talking we can hear you over the sounds of gunfire, screams, etc. that come from the game. When you begin to talk over VoIP, the gain on your sounds will be set to this level until you are done recording. For that reason, you should set it to a value between 0 (silence) and 1 (normal gameplay). The default is 0.2, which means the game will be at 1/5 volume when you're talking.

cl_voipCaptureMult

Multiply recorded audio by this value after denoising. Defaults to 2.0 to double the volume of your voice. This is to make you more audible if denoising eats away too much data. Set this to 1.0 to get no change, less to be quieter. Generally with sounds you have to go up by powers of two to see much difference. So, while 2.0 will double the volume of your voice, 4.0 will double that, and 8.0 will double that, and that's pretty much how you should increase the volume. Double it each time until people can hear you easily.

cl_voipDefaultGain

This sets the default gain of any noice coming in from outside VoIP. So, if you can't quite understand what other players are saying, and they don't want to fiddle with their cl_voipCaptureMult, you can try fiddling with this setting to make all VoIP louder. I have mine set to 1.5, though the default is 0.

cl_voipShowMeter

This is used to determine if the game should show the volume meter when you're talking. Default is 1 - on. The meter is the little ascii-art meter at the top of the game screen when you talk.

cl_voipShowSender

Controls whether or not the current speaker on VoIP is displayed. Defaults to 1, 0 turns it off.

cl_voipSendTarget

cl_voipSendTarget is a string that tells VoIP who to broadcast to. By default it is set to 'all' and for now, you should probably leave it at that. That just broadcasts your voice to everyone. You can also change it to 'attacker' to send it to the last person that hit you (uncertain this is supported in TremFusion). 'crosshair' will send VoIP to the person in your crosshairs. A comma-separated list of numbers will send it to the clients specified by the numbers. For instance, '1,3,5,7' will send your VoIP to clients 1, 3, 5 and 7. Setting it to 'none' will send to no one. Useful.

Settings:

  • 'all' - broadcast to all players
  • 'attacker' - broadcast to your last attacker
  • 'crosshair' - broadcast to player under your crosshairs
  • 'none' - broadcast to none
  • '#,#' - broadcast to clients in the numbered list. Example: '1,2,3'

One thing to remember is that when you set it to 'crosshair' only your teammates will work. Enemies won't hear you, even if they are in your crosshair With 'attacker', teammates who shoot you WILL work. So, if some dick shoots you, you can yell at him and only him. Or her. Whatever.

To Add

There are several things to add to this page. Ender will get to them eventually

  • A Linux guide
  • A Mac guide (Ender will never get to this - he doesn't do mac)
  • A guide on how to do team-chat only (whenever we code that)
  • A FAQ - since lots of people jump right to those and prefer that format.
  • more?

Servers Using VoIP

This list was updated Jan 20, 2011

  • Amsterdam Unlimited
  • MM
  • Mercenaries guild dev server
  • SST
  • Welcomed-WorldTree
  • BB
  • AAAAAAA.:RK:. Trepidus Alpha
  • TremSpain
  • CC
  • O
  • TremScrims!
  • Unlimited BP
  • EBSF
  • |Trinity| Tremulous Major
  • AussieAssault
  • [!!!]Triplex EMPEROR
  • [STARBURST]
  • KoRX
  • KoRX Test
  • Tremspain-KORX
  • Cyber Dretch [KoRx]
  • European |KoRx| Server
  • AAA |KoR| KoRx
  • RUSSIAN KorX
  • SenGoku [KoRx - Asia]
  • psy
  • X
  • A