https://github.com/nikolaigulatz/audio-slackbot
A Raspberry Pi audio slackbot
https://github.com/nikolaigulatz/audio-slackbot
python slack slack-bot
Last synced: 2 months ago
JSON representation
A Raspberry Pi audio slackbot
- Host: GitHub
- URL: https://github.com/nikolaigulatz/audio-slackbot
- Owner: NikolaiGulatz
- License: mit
- Created: 2017-09-02T14:46:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T07:36:18.000Z (over 3 years ago)
- Last Synced: 2025-03-05T23:44:37.114Z (over 1 year ago)
- Topics: python, slack, slack-bot
- Language: Python
- Homepage:
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# audio-slackbot
[](https://travis-ci.org/NikolaiGulatz/audio-slackbot) [](https://codecov.io/gh/NikolaiGulatz/audio-slackbot) [](https://badge.fury.io/py/audio-slackbot)
A Slack bot which plays sounds from the filesystem upon certain triggers. Install and configure
it on a RaspberryPi, connect some speakers and have fun.
## Requirements
1. `python ^3.6`
## Quickstart
1. Install the package:
* `$ pip install --user --upgrade audio-slackbot`
2. Set up the Slack bot:
* Create a new Slack bot in your workspace settings
* Export the API token to your environment: `$ export SLACK_API_TOKEN="xoxb-2349..."`
* Invite the bot to some Slack channels in your workspace
3. Create a configuration file:
```yaml
# sounds.yaml
---
triggers:
- word: "trololol"
sound: "/home/pi/sounds/trololol.wav"
```
4. Start the bot:
* `$ audio_slackbot --config /home/pi/sounds.yaml`
Now, when any message in any channel the bot is present contains "trololol" it will
try to play the sound file "/home/pi/sounds/trololol.wav".
## macOS
On macOS you need to install `PyObjC` and `AppKit` as well:
```shell
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig"
pip install --user PyObjC AppKit
```