The gogwave package provides Go language bindings for the ggwave C++ library.
Note: At the moment, gogwave supports linux systems only.
For further detail see the GoDocs
This example encodes a payload ([]byte
) into a waveform, stores the waveform as a .wav file, and decodes the waveform back into a payload.
func main() {
gg := New()
defer gg.Close()
waveform, err := gg.Encode([]byte("hola"), ProtocolAudibleNormal, 50)
if err != nil {
panic(err)
}
b, err := gg.Decode(waveform)
if err != nil {
panic(err)
}
payload := string(b)
fmt.Println("payload:", payload)
}
To install ggwave library follow the ggwave building/installing instructions
An alternative is using GoGWave's Makefile
Clone this repo:
git clone https://github.com/diegohce/gogwave
cd gogwave
Build (linux):
make
Install:
sudo make install
after building ggwave, from GoGWave's root directory run:
go test .
tests should run fine.
Note: ggwave
directory is safe to remove after building and installing.
GoGWave is licensed under the Apache 2.0 license. Copyright (c) 2025 Diego Cena
ggwave is licensed under the MIT license. Copyright (c) 2020 Georgi Gerganov