/ts-plugin-voiceaction

TeamSpeak silence- and voice-detecting plugin that can run a custom command (e.g. music pause/play).

Primary LanguageLua

VoiceAction plugin for TeamSpeak

Introduction

This is a very simple plugin that enables you to run a predefined system command (or script) when one of the following happens:

  • Someone in channel starts talking (the channel is no longer silent).

  • No one in the channel is talking anymore (the channel is silent).

A typical use case is (un)muting or (un)pausing music playback in your favorite player.

Installation and usage

  1. Find your lua_plugin directory in your TeamSpeak installation. On various OSes it’s typically at:

    • Windows: C:\Users\<user>\AppData\Roaming\TS3Client\plugins\lua_plugin

    • Linux: ~/.ts3client/plugins/lua_plugin

    • MacOS: ~/Library/Application\ Support/TeamSpeak\ 3/plugins/lua_plugin

  2. Copy the voiceaction directory into lua_plugin/.

  3. In lua_plugin/voiceaction/events.lua, set the commandSomeoneTalking and commandNobodyTalking to whatever you want.

    • For example, I use a dbus callback to toggle Spotify playback via "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause".

  4. (Re)Start TeamSpeak.

  5. In SettingsPlugins, ensure that the Lua Plugin is enabled.

  6. Click on the Lua Plugin entry, click Settings, and ensure the voiceaction module is enabled.

  7. Back in SettinsPlugins, click Reload All.

  8. You should be all set. If the nothing is happening on silence/voice, start TeamSpeak from a console/terminal emulator and check the output for any errors from your command.

    • if the output does not mention voiceaction anywhere, check if there’s a luaconfig.ini file in your home directory (on Linux, it’s at .ts3client/luaconfig.ini ). If it exists, add a voiceaction entry into it.

Further improvements

A tentative list of TODOs can be found among the code :p.

Special thanks to

My muse inspiring me to write this plugin, i.e. a certain neighbor particularly fond of a hammer drill.