BitBeats is an audio messaging web application that encodes text into sound using Frequency Shift Keying (FSK) and decodes it back from recorded audio.
BitBeats transforms text messages into audio signals and back using the following steps:
-
Text Encoding:
- Input text is first converted to UTF-8 bytes.
-
FSK Modulation:
- UTF-8 data is converted into FSK-modulated audio signals.
- Each bit is represented as a specific frequency (mark/space tones).
-
Audio Transmission:
- Encoded audio can be played via browser speakers.
-
Demodulation:
- Recorded audio is filtered using a bandpass FIR filter to reduce noise.
- Goertzel algorithm detects frequency components corresponding to 0s and 1s.
- Extracted bits are decoded back into UTF-8 bytes and reconstructed as text. (for this FastAPI handels the backend)
This allows browser-based, real-time communication purely through audio signals.
| Layer | Technology |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | FastAPI |
| Database | SQLite |
| Audio Processing | Python + NumPy + Scipy, FSK modulation/demodulation, Goertzel algorithm, FIR bandpass filtering |
- UTF-8 Conversion: Supports text-to-byte conversion for consistent encoding.
- FSK (Frequency Shift Keying): Encodes digital bits as distinct audio frequencies (mark/space tones).
- Bandpass FIR Filter: Reduces noise outside the expected frequency range before demodulation.
- Goertzel Algorithm: Efficient detection of individual frequencies in the signal, ideal for real-time decoding of FSK tones.
- Demodulation: Extracts the transmitted bits from audio and reconstructs the original UTF-8 text.
# Clone the repository
git clone https://github.com/dikshantadi/bitbeats.git
cd bitbeats
# (Optional) Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run FastAPI server
uvicorn main:app --reload