ggwave-python icon indicating copy to clipboard operation
ggwave-python copied to clipboard

Listening (Real time reception or real time decoding) doesn't work!

Open CosmicShreyas opened this issue 1 year ago • 0 comments

Hello! I'm trying to run the Real time transmission and the real time listen and decode example codes on a single computer (with single python venv environment, if that matters). The transmission works but the listening doesnt decode anything, the same issue happens when i use the bare minimum ggwave python thing that ggerganov has written. What could be the issue? I even tried to play the audio using my phone and only capture the audio to decode it on the laptop but it still doesnt do anything and only says "Start Listening.." What could be the issue?

Here is my sender code

from ggwave_python import GGWave, ProtocolId, waveform_utils

gg = GGWave()
try:
    waveform = gg.encode("Test message, Hello world.", ProtocolId.AUDIBLE_FASTEST, volume=90)
    waveform_utils.play_waveform(waveform)
finally:
    gg.free()

Here is my listening code that should decode and print the text from the sound

# Stream listening from the microphone
from ggwave_python import GGWave, waveform_utils

gg = GGWave()

try:
    print('Start listening...')
    for chunk in waveform_utils.listen():
        decoded = gg.decode(chunk)
        if decoded:
            print('Received:', decoded.decode('utf-8'))
finally:
    gg.free()

And it doesnt print anything except the Start listening... text. Thanks for making this python wrapper, i really appreciate it!

CosmicShreyas avatar Mar 03 '25 16:03 CosmicShreyas