{"id":23854042,"url":"https://github.com/lewangdev/ggwave-fork","last_synced_at":"2026-06-12T20:33:32.206Z","repository":{"id":247898635,"uuid":"827167196","full_name":"lewangdev/ggwave-fork","owner":"lewangdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-11T07:30:25.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T08:30:44.320Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lewangdev.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T06:15:18.000Z","updated_at":"2024-08-08T03:42:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"b205c241-ec89-41a3-b668-d7b2191a9ace","html_url":"https://github.com/lewangdev/ggwave-fork","commit_stats":null,"previous_names":["lewangdev/py-ggwave-fork"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lewangdev/ggwave-fork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fggwave-fork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fggwave-fork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fggwave-fork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fggwave-fork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lewangdev","download_url":"https://codeload.github.com/lewangdev/ggwave-fork/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fggwave-fork/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34262155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T23:51:35.524Z","updated_at":"2026-06-12T20:33:32.130Z","avatar_url":"https://github.com/lewangdev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n======\nggwave\n======\n\nTiny data-over-sound library.\n\n\n.. code:: python\n\n    # generate audio waveform for string \"hello python\"\n    waveform = ggwave.encode(\"hello python\")\n\n    # decode audio waveform\n    text = ggwave.decode(instance, waveform)\n\n\n--------\nFeatures\n--------\n\n* Audible and ultrasound transmissions available\n* Bandwidth of 8-16 bytes/s (depending on the transmission protocol)\n* Robust FSK modulation\n* Reed-Solomon based error correction\n\n------------\nInstallation\n------------\n::\n\n    pip install ggwave\n\n---\nAPI\n---\n\nencode()\n--------\n\n.. code:: python\n\n    encode(payload, [protocolId], [volume], [instance])\n\nEncodes ``payload`` into an audio waveform.\n\n\nOutput of ``help(ggwave.encode)``:\n\n.. code::\n\n    built-in function encode in module ggwave\n    \n    encode(...)\n        Encode payload into an audio waveform.\n        @param {string} payload, the data to be encoded\n        @return Generated audio waveform bytes representing 16-bit signed integer samples.\n    \n\ndecode()\n--------\n\n.. code:: python\n\n    decode(instance, waveform)\n\nAnalyzes and decodes ``waveform`` into to try and obtain the original payload.\nA preallocated ggwave ``instance`` is required.\n\n\nOutput of ``help(ggwave.decode)``:\n\n.. code::\n\n    built-in function decode in module ggwave\n    \n    decode(...)\n        Analyze and decode audio waveform to obtain original payload\n        @param {bytes} waveform, the audio waveform to decode\n        @return The decoded payload if successful.\n    \n\n\n-----\nUsage\n-----\n\n* Encode and transmit data with sound:\n\n.. code:: python\n\n    import ggwave\n    import pyaudio\n\n    p = pyaudio.PyAudio()\n\n    # generate audio waveform for string \"hello python\"\n    waveform = ggwave.encode(\"hello python\", protocolId = 1, volume = 20)\n\n    print(\"Transmitting text 'hello python' ...\")\n    stream = p.open(format=pyaudio.paFloat32, channels=1, rate=48000, output=True, frames_per_buffer=4096)\n    stream.write(waveform, len(waveform)//4)\n    stream.stop_stream()\n    stream.close()\n\n    p.terminate()\n\n* Capture and decode audio data:\n\n.. code:: python\n\n    import ggwave\n    import pyaudio\n\n    p = pyaudio.PyAudio()\n\n    stream = p.open(format=pyaudio.paFloat32, channels=1, rate=48000, input=True, frames_per_buffer=1024)\n\n    print('Listening ... Press Ctrl+C to stop')\n    instance = ggwave.init()\n\n    try:\n        while True:\n            data = stream.read(1024, exception_on_overflow=False)\n            res = ggwave.decode(instance, data)\n            if (not res is None):\n                try:\n                    print('Received text: ' + res.decode(\"utf-8\"))\n                except:\n                    pass\n    except KeyboardInterrupt:\n        pass\n\n    ggwave.free(instance)\n\n    stream.stop_stream()\n    stream.close()\n\n    p.terminate()\n\n----\nMore\n----\n\nCheck out `\u003chttp://github.com/ggerganov/ggwave\u003e`_ for more information about ggwave!\n\n-----------\nDevelopment\n-----------\n\nCheck out `ggwave python package on Github \u003chttps://github.com/ggerganov/ggwave/tree/master/bindings/python\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewangdev%2Fggwave-fork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewangdev%2Fggwave-fork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewangdev%2Fggwave-fork/lists"}