mikolak-net / ts-plugin-voiceaction

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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. In ToolsOptionsAddonsPlugins, ensure that the Lua Plugin is installed and enabled. If not, install it using Browse Online.

  2. 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

  3. Copy the voiceaction directory into lua_plugin/.

  4. 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".

  5. (Re)Start TeamSpeak.

  6. Go to ToolsOptionsAddonsPlugins.

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

  8. Back in AddonsPlugins, click Reload All.

  9. 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.

About

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


Languages

Language:Lua 100.0%