A lightweight audio streaming server that enables real-time audio broadcasting over WebSocket connections. Built with Go and Web Audio API.
- Real-time audio streaming using WebSocket
- CD quality audio (44.1kHz, 16-bit, stereo)
- Web-based audio player with visualizer
- Volume control and connection status monitoring
- Mobile-friendly responsive design
- Dark mode support
- Go 1.21 or later
- Bun for development and running the server
-
Clone the repository:
git clone https://github.com/maks112v/minicast.git cd minicast
-
Install dependencies:
bun install
-
Build and run the server:
bun run build bun run start
The server will start at http://localhost:8001
.
- Open
http://localhost:8001/listen
in your web browser - The player will automatically connect to the stream
- Use the volume slider to adjust the audio level
- The visualizer will show the audio frequency spectrum in real-time
To broadcast audio, you need to connect to the WebSocket endpoint with the source=true
query parameter:
const ws = new WebSocket('ws://localhost:8001/ws?source=true');
// Send audio data as binary messages
ws.send(audioData);
minicast/
├── cmd/
│ └── server/
│ └── main.go # Server entry point
├── pkg/
│ ├── audio/
│ │ └── processor.go # Audio processing
│ ├── server/
│ │ ├── server.go # HTTP server
│ │ └── templates/ # HTML templates
│ └── websocket/
│ └── manager.go # WebSocket management
└── README.md
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.