Tiny data-over-sound library.
Project description
ggwave-wheels
Original project: https://github.com/ggerganov/ggwave/
This fork: https://github.com/matteotenca/ggwave-wheels
This is just a set of updated files needed to install ggwave version 0.4.2 under Python versions > 3.10. The original ggwave on PyPI fails to install in some circumstancies, due to the pre-cythonized .cpp distributed inside the package.
This version is identical to the orginal, but adds a pyproject.toml file and a updated setup.py. This way, wheel, setuptools and cython are temporary installed as build requirements, and used to create a new cythonized .cpp. After that, the .cpp file is compiled and the egg installed, and the build environment then is cleaned.
This works under Windows too, VS is needed, but and some pre-built wheel for AMD64 architecture are included.
Original README:
ggwave
Tiny data-over-sound library.
# generate audio waveform for string "hello python"
waveform = ggwave.encode("hello python")
# decode audio waveform
text = ggwave.decode(instance, waveform)
Features
Audible and ultrasound transmissions available
Bandwidth of 8-16 bytes/s (depending on the transmission protocol)
Robust FSK modulation
Reed-Solomon based error correction
Installation
pip install ggwave
API
encode()
encode(payload, [protocolId], [volume], [instance])
Encodes payload into an audio waveform.
Output of help(ggwave.encode):
built-in function encode in module ggwave
encode(...)
Encode payload into an audio waveform.
@param {string} payload, the data to be encoded
@return Generated audio waveform bytes representing 16-bit signed integer samples.
decode()
decode(instance, waveform)
Analyzes and decodes waveform into to try and obtain the original payload. A preallocated ggwave instance is required.
Output of help(ggwave.decode):
built-in function decode in module ggwave
decode(...)
Analyze and decode audio waveform to obtain original payload
@param {bytes} waveform, the audio waveform to decode
@return The decoded payload if successful.
Usage
Encode and transmit data with sound:
import ggwave
import pyaudio
p = pyaudio.PyAudio()
# generate audio waveform for string "hello python"
waveform = ggwave.encode("hello python", protocolId = 1, volume = 20)
print("Transmitting text 'hello python' ...")
stream = p.open(format=pyaudio.paFloat32, channels=1, rate=48000, output=True, frames_per_buffer=4096)
stream.write(waveform, len(waveform)//4)
stream.stop_stream()
stream.close()
p.terminate()
Capture and decode audio data:
import ggwave
import pyaudio
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paFloat32, channels=1, rate=48000, input=True, frames_per_buffer=1024)
print('Listening ... Press Ctrl+C to stop')
instance = ggwave.init()
try:
while True:
data = stream.read(1024, exception_on_overflow=False)
res = ggwave.decode(instance, data)
if (not res is None):
try:
print('Received text: ' + res.decode("utf-8"))
except:
pass
except KeyboardInterrupt:
pass
ggwave.free(instance)
stream.stop_stream()
stream.close()
p.terminate()
More
Check out http://github.com/ggerganov/ggwave for more information about ggwave!
Development
Check out ggwave python package on Github.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file ggwave_wheels-0.4.2.4.tar.gz
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4.tar.gz
- Upload date:
- Size: 97.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29ec35b1e2f9e5510b8f01a498862f929dc53b156539da81f2caa0ea53941c0f |
|
MD5 | 2ff40fb412edc78e2ca0b35788c031b9 |
|
BLAKE2b-256 | ae1bd5fd21751bfe2e008f187de57d682c34552123eff9675b80b30bcfa527e3 |
File details
Details for the file ggwave_wheels-0.4.2.4-pp310-pypy310_pp73-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-pp310-pypy310_pp73-win_amd64.whl
- Upload date:
- Size: 53.4 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0d7809fdef0db8d22a4bc04750d23b2761349d747b948fef9cdbfc66d13ce56 |
|
MD5 | 63a225fe9d1ef4fec57ba5134d7318be |
|
BLAKE2b-256 | 31868becfa03e4564020c61e603744d3c6e33399846a49553d8d37ef28b51b0a |
File details
Details for the file ggwave_wheels-0.4.2.4-pp39-pypy39_pp73-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 53.4 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0609c6cf80fc48f4e5751c543d1c92795c0a6fd97728aaf8c52310ba3877cbe |
|
MD5 | e5ce5efb95fe51aa9b51811d8dda3df8 |
|
BLAKE2b-256 | 22267fba8366b5023ff5caeb12e443d86b28fce8b3952ec9650c4afbe1c73506 |
File details
Details for the file ggwave_wheels-0.4.2.4-pp38-pypy38_pp73-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-pp38-pypy38_pp73-win_amd64.whl
- Upload date:
- Size: 53.0 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a423b4a957d0ab392ac1cd714e7544bb33844ea77ed258676b0757659ea50eb |
|
MD5 | 85918bb2ca53204af547eb62edf253c0 |
|
BLAKE2b-256 | f5036be6b2e13822d256bdb0ecb2626bb66c91c03b7d6b9c790dff5062715432 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 56.9 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4945c5b0f085d007a4221e241990ca1fc92d7952f3145876c42be43dff31e27b |
|
MD5 | 4286e0787077a07665c5da9c075bdeb6 |
|
BLAKE2b-256 | 14b46a68343eb3e55e7d7a4c9246b12639e536e16057fd4fdfe46992a4139071 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 401.0 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ed66a7d0e339046d7b1e79bf3672b9fa923796f2f27dbca5cc5ec4aac84cdd7 |
|
MD5 | 31bb2b1288d3c7ba7c584913a5c52e9c |
|
BLAKE2b-256 | 5664037f63ba48368bea6e00e2ef816cc17b7419bade744bf8ce5b29d39632ea |
File details
Details for the file ggwave_wheels-0.4.2.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 394.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e37fe6a3f5154251368252b444a0349486e912627b94d9ac7ba9ba5dc0a2e371 |
|
MD5 | ff9a03728351d4891c068a39d1395d84 |
|
BLAKE2b-256 | f07402d860f24fdee8ed5f8a0dc2d037f6013a8c9b06123e80717c94b00f84c2 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 57.2 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd6dbb9273b4977bb7bacd447d1148d663363030e2636886f3192c5e92dc577a |
|
MD5 | 732e8274bc0b3d0692322f8ed82c03a2 |
|
BLAKE2b-256 | 8847faeb0c4977848bfef723dcf9f4c92d486951a990b7dcc86e93a5b747fddf |
File details
Details for the file ggwave_wheels-0.4.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 405.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84aba40745d755a5eaecbc302d741b3f0cfa661766f5a857e3204ad8ba5746d1 |
|
MD5 | f11fdb6c589b8225015afcc83c41bd7c |
|
BLAKE2b-256 | cf194465c894d2a5cb9af99656be1398265fd183e8e5f52d38c5cc12d1d9927a |
File details
Details for the file ggwave_wheels-0.4.2.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 397.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14e9940151fe7750d81cfd096332f983c0e9bbf03b1ed65a5346ba6f23e7817a |
|
MD5 | 45ae2ee94bca529fc106dcc8b2a3be7b |
|
BLAKE2b-256 | 47661006b8df3da4959b89dfdbd14278b8619642d5466734596f030a87a45220 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 69.2 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd0fdef9bbe76fae22b92982b006aab5c9aa826f0f9b58992fdab26f1e017a0 |
|
MD5 | 4cb2b4a70c0fbf6b967a6a4ae4992737 |
|
BLAKE2b-256 | fc6f3f796a767b128c06e45966931f09ae3628de604ba8703bbc8ec978791abc |
File details
Details for the file ggwave_wheels-0.4.2.4-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 56.8 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e367955120a85eceb5664557ebd1d40a28d72cc7d26805074d8e05307bbb623 |
|
MD5 | 6cffa0c0bce7f5e0c3bb421e4d33fec8 |
|
BLAKE2b-256 | 00edc2c994f2e1b38a6386b1d7cd62dde6700b689bd1a021b25b8f0af7ef7bb1 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 405.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93827359db6f8e2d5f1e441ee79207939513c02d54ed9774ead3404e473ad054 |
|
MD5 | 681a10e9359f9a96a90120c5502dbbc2 |
|
BLAKE2b-256 | a7f850a8f57a860b8b3e07f7c4094917ce2bd6f2786a690b2c673d55a5c4aa27 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 396.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8736b9d55d936b4a6f0ebeb3cf09ceae3235485eff323569fb8a789dd794230 |
|
MD5 | dca450bee4ff2b27cb5e6db336b1bc90 |
|
BLAKE2b-256 | 7c9368f53175c65a3ef4c67bb8c9a45ebd870c0f10ddb45cbcd9f0eec07b350e |
File details
Details for the file ggwave_wheels-0.4.2.4-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 56.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f8e3f9dc2ebc3e18b30dbb7d267b2edb7570271f705205caf3fe5f88932159b |
|
MD5 | e451117fc37a862c56e52535e1e5f9b9 |
|
BLAKE2b-256 | ce092b042069131d2efe6a7e3cdd0e586b710ed1cf8bae08ac2764178ecce139 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 382.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a906933ca706f87146d32ead138051e95a4448e3a2ff1030f489e8eb8a6fe8e9 |
|
MD5 | de491bfc666fef549524d1f75f94cf9c |
|
BLAKE2b-256 | ace48abac86d7913408ab09fee1dc3e9b24cfa2e27c329b4daa370ced93fcd22 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 377.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8da0fb40da12f910fb204c4bd21f47101a7136192ea42161f1daf7e54620c957 |
|
MD5 | 2cef71f3ce8b9dd5b9db61449d98c334 |
|
BLAKE2b-256 | 56f4b5154bf05ff17a564f14eee568787a11faa0e98b2543a8b3854e18f61233 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 56.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32c88b376ea14038da027e95ae5f7ca072180978a1c60f0c2394f1fcc285b422 |
|
MD5 | 8b5844eb91cd4560088be3e8cb645a29 |
|
BLAKE2b-256 | b1ea6019db66ae5782efb792ab0da097797d59b91750ee71761441596fac2792 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 382.2 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ecb15e9074d0e51aeac79d64e40f2db742f18e07bd7f6d2aa61b6429d557ca0 |
|
MD5 | 3fc14e9251667cea3bdb433fe6b533c0 |
|
BLAKE2b-256 | aec07747f5cad7c2d37cbf06f0a8bdd96a32fa6b84df72b9574ff99811d75909 |
File details
Details for the file ggwave_wheels-0.4.2.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 377.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560bc68c8e64135d1c360baa09a415e69e4d0ccb489e4bc812b9000e4d9bc0c4 |
|
MD5 | e34aa6539c6d9184d3c8bdac4127d0a4 |
|
BLAKE2b-256 | 6b1a2993daa0ef617472576e4cb8bf8700ec4f8d921399687401273ab4be888b |
File details
Details for the file ggwave_wheels-0.4.2.4-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 56.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56dd945b1df0d8c680db6e4ae0714246fb86e9a289f694afaefe84fa50725508 |
|
MD5 | f7d41f1d16f09073af6530a87bf71bb3 |
|
BLAKE2b-256 | 26b62a0a4bc5e05228eef7934274d76c8bc9c283ea80a8bfbc951eb5f978c5ee |
File details
Details for the file ggwave_wheels-0.4.2.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 376.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb29de0cb297ac58eec4391016b46a7d4ac2330cf26f1550e18ba8b42c316cfc |
|
MD5 | 2da52740e03b6e06258c4790ed2e0fac |
|
BLAKE2b-256 | 212e53df5661d5a4716f40176574d9bb3545d6535274ec26105e5b547ac3cace |
File details
Details for the file ggwave_wheels-0.4.2.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ggwave_wheels-0.4.2.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 371.5 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61e6e4cbcc94ff33c05d5a0aad9926e842236270e385876d9f72ec8525fcc003 |
|
MD5 | 28a7a5c48c27de99ab69239b4a9ef422 |
|
BLAKE2b-256 | 6cdb8b1ae2b848697c56be357c0adfccbc808f9e79291c2dff748a97a022deb4 |