<commit_before># Slackcast

A streaming mp3 broadcast of your Slack team chat using Ivona text-to-speech.

Using Slack as the center of team chat can be a great benefit (the same could be said for HipChat, Hangouts, or IRC), but if you're making an effort to be distraction-free, having a window begging to be watched can become a source of pressure. Why watch when you can listen? 

## Before you begin

This application ships in a few docker containers, and start/stopped using `docker-compose`. Named dockerfiles are used, so the minimum docker version required is 1.5.

You will need a Slack token to hook into the Real Time Messaging API. Learn more about that in the Slack documentation. You will likely need to create a named bot user in your team roster.

Finally, you will need an API Key to Ivona to generate mp3s using their TTS service.

## Installing

Clone this repository and run the `build.sh` script. It simply runs `docker build` on each of the `*.docker` files at the project root.

```
git clone https://github.com/bibby/slackcast
cd slackcast
./build.sh
```

## Configure

You will want to edit `docker-compose.yml` and fill in your API keys and other settings. I've made a reasonable attempt to call out each of those requiring attention. 

## Starting

To start the service, run docker-compose in daemon mode.

```
docker-compose up -d
```

After a short while, you should see your slack bot come *online* in Slack. Next, tune your media player (mplayer, vlc, chrome browser) to `/stream` on the host and port you configured it to be. Using the defaults, that would make the url `http://localhost:8000/stream`

If a play timer is moving, then you are streaming and connected. The channel will be continuously repeating `silence.mp3` until a chat event occurs.

NOTE that there WILL BE LAG! The delay is due to the buffering that most clients seem to want to do. And with a lo-fi stream such as this, that can add up to a hefty delay (30-60 seconds, looking for help here). Where possible, try to reduce the preload cache size.

## How it works
<commit_msg>added links in readme<commit_after># Slackcast

A streaming mp3 broadcast of your [Slack team chat](https://slack.com/) using [Ivona text-to-speech](http://www.ivona.com/).

Using Slack as the center of team chat can be a great benefit (the same could be said for HipChat, Hangouts, or IRC), but if you're making an effort to be distraction-free, having a window begging to be watched can become a source of pressure. Why watch when you can listen? 

## Before you begin

This application ships in a few [docker](https://www.docker.com/) containers, and start/stopped using [docker-compose](http://docs.docker.com/compose/). Named dockerfiles are used, so the minimum docker version required is 1.5.

You will need a Slack token to hook into the Real Time Messaging API. Learn more about that in the [Slack documentation](https://api.slack.com/rtm). You will likely need to create a named bot user in your team roster.

Finally, you will need an API Key to [Ivona](http://developer.ivona.com/en/index.html) to generate mp3s using their TTS service.

## Installing

Clone this repository and run the `build.sh` script. It simply runs `docker build` on each of the `*.docker` files at the project root.

```
git clone https://github.com/bibby/slackcast
cd slackcast
./build.sh
```

## Configure

You will want to edit `docker-compose.yml` and fill in your API keys and other settings. I've made a reasonable attempt to call out each of those requiring attention. 

## Starting

To start the service, run docker-compose in daemon mode.

```
docker-compose up -d
```

After a short while, you should see your slack bot come *online* in Slack. Next, tune your media player (mplayer, vlc, chrome browser) to `/stream` on the host and port you configured it to be. Using the defaults, that would make the url `http://localhost:8000/stream`

If a play timer is moving, then you are streaming and connected. The channel will be continuously repeating `silence.mp3` until a chat event occurs.

NOTE that there WILL BE LAG! The delay is due to the buffering that most clients seem to want to do. And with a lo-fi stream such as this, that can add up to a hefty delay (30-60 seconds, looking for help here). Where possible, try to reduce the preload cache size.

## How it works

{'fraction_non_alphanumeric': 0.0704095720202485, 'fraction_numerical': 0.005982512655315232, 'mean_word_length': 4.008064516129032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949939', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1174, 'n_words': 681}