A Discord bot that monitors SDRTrunk recordings and transcriptions, providing real-time updates of radio communications in a clean, organized format.
- Real-time monitoring of SDRTrunk recordings
- Efficient private detail censoring
- Automatic transcription posting
- Department color coding and categorization
- Department-based emoji indicators
- System status monitoring
- Detailed logging system
- Graceful startup and shutdown handling
- SQLite database integration
- Node.js v18 or higher
- SDRTrunk with recording capability
- My sdrTrunkTranscriber fork
- SQLite database setup from SDRTrunk
- Discord bot token and channel
{
"dependencies": {
"discord.js": "^14.x",
"sqlite3": "^5.x",
"chalk": "^4.1.2",
"systeminformation": "^5.x",
"xml2js": "^0.6.x"
}
}
- Clone the repository:
git clone https://github.com/cryptofyre/swimtrunks.git
cd swimtrunks
- Install dependencies:
npm install
- Create
config.json
:
{
"discord": {
"token": "YOUR_BOT_TOKEN",
"channelId": "YOUR_CHANNEL_ID"
},
"database": {
"path": "/path/to/sdrtrunk/recordings.db"
},
"playlist": {
"path": "/path/to/sdrtrunk/playlist/default.xml"
},
"polling": {
"interval": 5000,
"batchSize": 5
},
"logging": {
"level": "info",
"timestamps": true,
"colors": true
}
}
discord.token
: Your Discord bot tokendiscord.channelId
: Channel ID where messages will be sentdatabase.path
: Path to SDRTrunk's SQLite databaseplaylist.path
: Path to SDRTrunk's playlist XMLpolling.interval
: How often to check for new recordings (ms)polling.batchSize
: Maximum number of recordings to process at oncelogging
: Logging configuration options
Start the bot:
node main.js
The bot automatically color-codes departments:
- 👮 Law Enforcement: Blue
- 🚒 Fire Department: Red
- 🚨 Emergency Management: Orange
- 🔧 Public Works: Green
- 🎓 Schools: Purple
- 📡 Radio/Events: Yellow
✈️ Airport Operations: Light Blue- 🔔 Other: Default Blue
The bot provides system information on startup:
- System specifications
- Resource usage
- SDRTrunk status
- Transcriber status
- Memory utilization
This project is licensed under GPL-3.0. See the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Never commit your
config.json
with sensitive information - Ensure proper file permissions for database and XML access
- Monitor the logs for any potential issues
- Keep your dependencies updated
For support, please open an issue in the GitHub repository.