Code Monkey home page Code Monkey logo

slack-audiobot's Introduction

Welcome!

What is Audiobot?

Audiobot is an audio feedback bot for Slack. Slack Audiobot is written in node.js and plays MP3 files from it's /sound directory based on queues from Slack users. Audiobot now also features text-to-speech (TTS) for Mac and Windows.

Why is Audiobot?

Audio feedback seemed like a great way to liven up the office, but can also be used to provide realtime feedback around events in Slack.

How to Audiobot

  1. Grab the repo and run npm install. This will install all of the dependencies Audiobot requires.
  2. Add a bot integration in Slack here
  3. Add your bot's API key to config.js
  4. Run node audiobot.js from the command line
  5. Invite your brand new bot into the channels you'd like it to watch.

Commands

Here's a couple commands you might like to try:

  • play bell - this will play the bell noise (comes with this package)
  • @BOTNAME help - get a list of commands you can use with your bot (replace BOTNAME with your bot's name, obviously)
  • @BOTNAME list - get a list of valid sound files. If you want more, just dump them in the sounds folder
  • @BOTNAME stop - stop the bot listening to requests for sounds
  • @BOTNAME start - start the bot listening to requests for sounds (on by default)
  • @BOTNAME say MESSAGE - Make the bot speak via TTS.

Linux

To enable the 'say' command, install espeak:

sudo apt-get install espeak

slack-audiobot's People

Contributors

brenmurrell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

slack-audiobot's Issues

No sound :( (still awesome script though...)

Thanks for making this, everything seems to work... except 1 thing.
No sounds :( it says it's playing in Slack and in the console, but there's nothing happening.

Text to speech does work.
But mp3's are not playing, can someone advise how to debug?

Kind of a node-noob.
Currently running the script from the User\Downloads folder... could that be a problem?

Thanks in advance.

License file?

Would be nice to know what license is audiobot under? Could you add the LICENSE file into github?

After offline/disconnect program crashes

Here is the output:

[Sun Jun 26 2016 20:55:40 GMT+0000 (UTC)] ERROR Last pong is too old: 14.737
[Sun Jun 26 2016 20:55:40 GMT+0000 (UTC)] INFO Reconnecting in 1000ms
[Sun Jun 26 2016 20:55:41 GMT+0000 (UTC)] INFO Attempting reconnect
[Sun Jun 26 2016 20:55:41 GMT+0000 (UTC)] INFO Connecting...
events.js:87
throw Error('Uncaught, unspecified "error" event.');
^
Error: Uncaught, unspecified "error" event.
at Error (native)
at Client.emit (events.js:87:13)
at Client._onLogin (/home/pi/music/slack-audiobot/node_modules/slack-client/src/client.js:74:14)
at /home/pi/music/slack-audiobot/node_modules/slack-client/src/client.js:2:59
at ClientRequest. (/home/pi/music/slack-audiobot/node_modules/slack-client/src/client.js:684:18)
at ClientRequest.emit (events.js:107:17)
at TLSSocket.socketErrorListener (_http_client.js:271:9)
at TLSSocket.emit (events.js:129:20)
at net.js:950:16
at process._tickCallback (node.js:355:11)

Wrap file types into an array / loop combo

In line #86 and #87 we have two separate vars handling mp3 and wav playback. Need to wrap this up into an array of supported filetypes. Can then loop through them one and a time to play the files - thus removing the need for two separate conditionals for mp3 (line #90) and wav (line #98). Will make adding supported filetypes super easy.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.