ggerganov/ggwave là dự án Backend trên GitHub, viết chủ yếu bằng C++, với 7.8k sao. Tiny data-over-sound library
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This library allows you to communicate small amounts of data between air-gapped devices using sound. It implements a simple FSK-based transmission protocol that can be easily integrated in various projects. The bandwidth rate is between 8-16 bytes/sec depending on the protocol parameters. Error correction codes (ECC) are used to improve demodulation robustness.
This library is used only to generate and analyze the RAW waveforms that are played and captured from your audio devices (speakers, microphones, etc.). You are free to use any audio backend (e.g. PulseAudio, ALSA, etc.) as long as you provide callbacks for queuing and dequeuing audio samples.
Here is a list of possible applications of ggwave with a few examples:
Serverless, one-to-many broadcast
wave-share - file sharing through sound
Internet of Things
esp32-rx, arduino-rx, rp2040-rx, arduino-tx - Send and receive sound data on microcontrollers
r2t2 - Transmit data with the PC speaker
buttons - Record and send commands via Talking buttons
Audio QR codes
[Twitter] - Broadcast your clipboard to nearby devices
Device pairing / Contact exchange
PairSonic - Exchange contact information and public keys with nearby devices
Authorization
Try it out
You can easily test the library using the free waver application which is available on the following platforms:
Browser demos
https://waver.ggerganov.com
https://ggwave.ggerganov.com
https://ggwave-js.ggerganov.com
HTTP service
# audible example
curl -sS 'https://ggwave-to-file.ggerganov.com/?m=Hello%20world!' --output hello.wav
# ultrasound example
curl -sS 'https://ggwave-to-file.ggerganov.com/?m=Hello%20world!&p=4' --output hello.wav
Technical details
Below is a short summary of the modulation and demodulation algorithm used in ggwave for encoding and decoding data into sound.
Modulation (Tx)
The current approach uses a multi-frequency Frequency-Shift Keying (FSK) modulation scheme. The data to be transmitted is first split into 4-bit chunks. At each moment of time, 3 bytes are transmitted using 6 tones - one tone for each 4-bit chunk. The 6 tones are emitted in a 4.5kHz range divided in 96 equally-spaced frequencies:
Freq, [Hz]
Value, [bits]
Freq, [Hz]
Value, [bits]
...
Freq, [Hz]
Value, [bits]
F0 + 00*dF
Chunk 0: 0000
F0 + 16*dF
Chunk 1: 0000
...
F0 + 80*dF
Chunk 5: 0000
F0 + 01*dF
Chunk 0: 0001
F0 + 17*dF
Chunk 1: 0001
...
F0 + 81*dF
Chunk 5: 0001
F0 + 02*dF
Chunk 0: 0010
F0 + 18*dF
Chunk 1: 0010
...
F0 + 82*dF
Chunk 5: 0010
...
...
...
...
...
...
...
F0 + 14*dF
Chunk 0: 1110
F0 + 30*dF
Chunk 1: 1110
...
F0 + 94*dF
Chunk 5: 1110
F0 + 15*dF
Chunk 0: 1111
F0 + 31*dF
Chunk 1: 1111
...
F0 + 95*dF
Chunk 5: 1111
For all protocols: dF = 46.875 Hz. For non-ultrasonic protocols: F0 = 1875.000 Hz. For ultrasonic protocols: F0 = 15000.000 Hz.
The original data is encoded using Reed-Solomon error codes. The number of ECC bytes is determined based on the length of the original data. The encoded data is the one being transmitted.
Demodulation (Rx)
Beginning and ending of the transmission are marked with special sound markers (#13). The receiver listens for these markers and records the in-between sound data. The recorded data is then Fourier transformed to obtain a frequency spectrum. The detected frequencies are decoded back to binary data in the same way they were encoded.
Reed-Solomon decoding is finally performed to obtain the original data.
Examples
The examples folder contains several sample applications of the library:
Example
Description
Audio
ggtag
Sound-programmable e-paper badge
PDM mic
ggwave-rx
Very basic receive-only program
SDL
ggwave-cli
Command line tool for sending/receiving data through sound
SDL
ggwave-wasm
WebAssembly module for web applications
SDL
ggwave-to-file
Output a generated waveform to an uncompressed WAV file
-
ggwave-from-file
Decode a waveform from an uncompressed WAV file
-
waver
GUI application for sending/receiving data through sound
SDL
ggwave-py
Python examples
PortAudio
ggwave-js
Javascript example
Web Audio API
spectrogram
Spectrogram tool
SDL
ggweb-spike
Android example using a WebView to wrap ggwave into a simple app
WebAudio
buttons
Record and send commands via Talking buttons
Web Audio API
r2t2
Transmit data through the PC speaker
PC speaker
ggwave-objc
Minimal Objective-C iOS app using ggwave
AudioToolbox
ggwave-java
Minimal Java Android app using ggwave
android.media
ggwave-kmm
Kotlin Multiplatform Project using ggwave
android.media, javax.sound.sampled
ggwave-fm
Transmit ggwave messages with HackRF
Radio
esp32-rx
Transmit and receive messages using ESP32
-
rp2040-rx
Transmit and receive messages using Raspberry Pi Pico (RP2040)
-
arduino-rx
Transmit and receive messages using Arduino RP2040
-
arduino-tx
Transmit messages using Arduino Uno
-
arduino-rx-web
Receive messages from Arduino Uno
Web Audio API
Other projects using ggwave or one of its prototypes:
wave-gui - a GUI for exploring different modulation protocols
wave-share - WebRTC file sharing with sound signaling
Building
Dependencies for SDL-based examples
[Ubuntu]
$ sudo apt install libsdl2-dev
[Mac OS with brew]
$ brew install sdl2
[MSYS2]
$ pacman -S git cmake make mingw-w64-x86_64-dlfcn mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2
Linux, Mac, Windows (MSYS2)
# build
git clone https://github.com/ggerganov/ggwave --recursive
cd ggwave && mkdir build && cd build
cmake ..
make
# running
./bin/ggwave-cli
Local Debian packages
Build reproducible libggwave-dev and python3-ggwave Debian packages:
# Fetch source
git clone https://github.com/ggerganov/ggwave --recursive
cd ggwave
# Configure
cmake . -DGGWAVE_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release
# Build
make deb
# Install
sudo dpkg -i dist/*.deb
Emscripten
git clone https://github.com/ggerganov/ggwave --recursive
cd ggwave
mkdir build && cd build
emcmake cmake ..
make
Python
pip install ggwave
More info: https://pypi.org/project/ggwave/
Node.js
npm install ggwave
More info: https://www.npmjs.com/package/ggwave
iOS
Available as a Swift Package: https://github.com/ggerganov/ggwave-spm
ggerganov/ggwave thuộc nhóm Backend trên TopGit, cùng 12 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về ggerganov/ggwave ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/ggerganov/ggwave là nguồn chính thức.
ggerganov/ggwave có bao nhiêu sao?
ggerganov/ggwave có 7.8k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/ggerganov/ggwave. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
ggerganov/ggwave có phải mã nguồn mở không?
Có — ggerganov/ggwave phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/ggerganov/ggwave.
ggerganov/ggwave có trang demo không?
Dự án có trang chủ ở https://youtu.be/Zcgf77T71QM. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
ggerganov/ggwave là gì?
ggerganov/ggwave (ggerganov/ggwave) là dự án C++ trên GitHub. Theo mô tả gốc: Tiny data-over-sound library
ggerganov/ggwave so với các dự án Backend khác thế nào?
ggerganov/ggwave được TopGit xếp vào nhóm Backend, với 7.8k sao GitHub và viết bằng C++. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về ggwave?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về ggwave.