Skip to content

wootguy/Radio

Repository files navigation

Radio

Listen to music in co-op. Also it has text-to-speech.

Any URL to video/audio should work, unless it's a website where you need to sign-in to access it. YouTube, SoundCloud, forum posts, Discord attachments are some working examples. Anything YouTube-DL supports should work.

Benefits over traditional mic spamming:

  • Volume is automatically normalized. No more "can you hear me?" troubleshooting.
  • You can see the title and URL of what you're listening to. No more asking "song name?" and getting "darude sandstorm" as a response.
  • DJs can easily queue song requests from listeners and create a playlist.
  • Audio can be muted without using the buggy scoreboard mute system.
  • You know who is actually listening.
  • No need to mute your game audio if you want to stream music.
  • No interruption in music because the streamer has trouble holding their mic key down.
  • Unlike normal mic audio, the radio does not slowly begin to stutter over time.

The MicFix plugin should be installed along with this.

How does it look in the game?

Use .radio in the console, select a channel, become DJ and say ~yourYoutubeUrl to start the music. Everyone on the channel will listen to your track.

There is an option for the Text-To-Speech function for chat messages. Check also .radio help.

How does it work?

  1. Player says which song to play
  2. Angel script plugin writes this msg in the log file
  3. Server (radio_server.py) checks this log file in the loop
  4. Server says to the client about this msg
  5. Client gets song from youtube
  6. Client (radio_client.py) streams video into ffmpeg
  7. Client notifies steam_voice about stream
  8. Steam_voice streams ffmpeg into packets in the necessary format for sven plugins
  9. Steam_voice sends those packets to the client
  10. Client resends them to the server
  11. Server writes them into the file format
  12. Angel script reads them
  13. Angel script plays the music and everybody is dancing, yay

How to set up?

Check this.