For about a year, we’re running TeamSpeak server for non-commercial use. Reason for this is simple, me, colleagues and many friends like to play online computer games and chat in our freetime. As in our circle are many music fans (and even DJs and producers), I decided to setup radio station for them. This radio station has many features: It’s playing songs randomly in good quality (as possible), writing song name to the TS channel name and even play songs uploaded by users. There are many things to set and if you are would like, you can do the same according in this article.
This manual assumes, that you already have TeamSpeak server. It also requires to have a free computer connected to the server as client and playing songs. You’ll also need some other software:
- VB software audio cable (to redirect output from music player to microphone)
- foobar2000 (to play your music)
- foobar simple output plugin (to ouput actual song name from foobar2000 to text file, to install use steps 2 and 3 from this manual)
- TeamSpeak Radio Room Name Updater (software made by us reading song name from foobar plugin output and sending to your TS server, FREEWARE)
- FreeFileSync (to optionally synchronize uploaded tracks with your media library)
We also assume, that you’ve some technical skills and are not describing everything to the greatest detail.
Prepare the channel on your TS server
- Create room for your TS server, give user permission to upload
- Set the needed talk power to prevent other users disrupting the broadcast
- Set the channel codec to Opus Music and best quality
- Generate TS3 Server Query Login (Tools => ServerQuery login) and save it for later use
Setup your radio station laptop/PC/server
As we mentioned, you need to have some PC on and playing songs to the TS server as client. You need to
- Install foobar2000 and TeamSpeak client
- Install VB software audio cable
- Set the VB Audio as used microphone in TS 3 client (Options =>Capture)
- Set the VB Audio as output device in foobar2000 (Preferences =>Playback)
- Create media library in foobar2000 – use only local files to prevent too much traffic on network
- Add some songs (for testing)
- Create foobar autoplaylist to ensure, that playlists will get automatically updated when you add new tracks to your folders
- Set play-mode in foobar2000 to random
- Connect to the TS Radio room you created, give yourself permissions to talk
- Start playing songs
Great, the TS room is now playing songs you added randomly to visitors. It may be enough, but you may want to extend functionality as described below.
Allow users to upload their own tracks
To achieve this, you’ll have to synchronize the files from your teamspeak server to the computer serving as player. In case your server is hosted on same pc as the one which plays music, you just need to add channel file transfer folder to the media library in foobar2000. Thanks to the setup above, the foobar2000 will automatically add new tracks to the playlist.
If the radio station PC is different than the server one, you’ll need to synchronize files somehow (example: by setting FTP sync). In our case, the both computers (server and laptop) are on the same local Active Directory network. Thus we used FreeFileSync to copy files from Windows share to the local directory monitored by foobar2000. You can automate the task using task scheduler and FreeFileSync’s batch job.
Automatically update room name using actual track played
This was the hardest task for us as it required some extra coding. Fortunately, we released the tool and you don’t have to code anything. What our tool does? It’s basically reading the text file outputted by foobar2000 and sending it to the TS server using TS Server Query protocol. Here are the steps to set this all up
- Add and set foobar simple output plugin (according to this manual and pre-requisites section)
- Download our tool (it requires .NET Framework 4.6)
- Create TS3 Server Query login (in TS client, with sufficient permissions)
- Run our tool, enter server details and credentials from step 3
- Determine your TS3 radio room channel ID.
- To find it upload unique named file to your radio room using TS3 client
- Open TS3 server installation directory, then files directory and search for the file name you uploaded
- You’ll find that your file resides in channel_XX directory, where the XX is the channel ID we need
- Set the path of file with song name, room name and channel ID correctly in our tool and check “Auto update active”
- If you have entered correct server and login details, your room will automatically update