Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kiwiclientd.py sound trouble #84

Open
hamav8tor opened this issue Jun 12, 2021 · 8 comments
Open

kiwiclientd.py sound trouble #84

hamav8tor opened this issue Jun 12, 2021 · 8 comments

Comments

@hamav8tor
Copy link

Having some trouble getting kiwiclientd.py to play to any sound devices. No sound output at all. Errors shown below. This is on a Mac Mini with the latest master. I can connect/record with kiwirecorder.py and can successfully hear the expected audio in the wav files, so the KiwiSDR connection is fine.

python3 kiwiclientd.py -s kiwisdr -p 8073 -f 8906 -m usb --snddev="Display Audio" --rigctl-port=6400
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
speaker.player failed with blocksize must be between 15.0 and 512
Block: 00000001, RSSI: -112.62021-06-12 18:00:33,520 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000002, RSSI: -114.02021-06-12 18:00:33,524 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000003, RSSI: -111.92021-06-12 18:00:33,528 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000004, RSSI: -114.72021-06-12 18:00:33,532 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000005, RSSI: -112.72021-06-12 18:00:33,535 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000006, RSSI: -112.82021-06-12 18:00:33,604 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000007, RSSI: -113.12021-06-12 18:00:33,766 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000008, RSSI: -113.42021-06-12 18:00:33,929 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 00000009, RSSI: -112.42021-06-12 18:00:34,112 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 0000000a, RSSI: -114.02021-06-12 18:00:34,275 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 0000000b, RSSI: -113.32021-06-12 18:00:34,457 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'
Block: 0000000c, RSSI: -112.82021-06-12 18:00:34,623 pid 2526 'KiwiSoundRecorder' object has no attribute '_player'

@jks-prv
Copy link
Owner

jks-prv commented Jun 13, 2021

I did not write kiwiclientd. Let's see if the author @rikvanriel has any suggestions. What versions of OS X?

@rikvanriel
Copy link

On line 69 of kiwiclientd.py we have this bit of code:

for i in range(0,10): try: self._player = speaker.player(samplerate=rate, blocksize=4096) self._player.__enter__() break except Exception as ex: print("speaker.player failed with ", ex) time.sleep(0.1) pass

Do things work if you remove the ", blocksize=4096" bit, so that line looks like this:

self._player = speaker.player(samplerate=rate, blocksize=4096)

If everything works without a blocksize parameter, great. If you get audio skips when not specifying a blocksize at all, can you try it with blocksize=512?

Once we know what works on your system, we can adjust the code to get it to just work automatically on OS X again, too.

@jks-prv
Copy link
Owner

jks-prv commented Jun 13, 2021

Okay! Removing the blocksize parameter worked for me here. Older MacBook Pro running OS X 10.15.7 (Catalina, also old). I had to remove --snddev="Display Audio" and use the default sound out device since I don't know the proper device names that the soundcard module expects ("Display Audio" didn't work for me).

@hamav8tor
Copy link
Author

Thanks for the help! It works with no blocksize parameter and with a blocksize of 512. I am getting audio skips with both. Not sure how serious it is yet because I am listening to static at the moment, primarily. Once I hear some voice traffic I'll have a better idea of how bad it is. It may not be that bad.

@rikvanriel
Copy link

rikvanriel commented Jun 13, 2021 via email

@rikvanriel
Copy link

Filed a pull request with a fix for the immediate issue.

#85

@hamav8tor
Copy link
Author

I checked further and not 100% sure if I am getting audio dropouts...hearing what I think are some micro-dropouts but could use another pair of ears to check:

Sample sound file - HF radio via KiwiSDR

@jks-prv
Copy link
Owner

jks-prv commented Jun 14, 2021

I don't have my good headphones here (I'm on vacation) but it does sound like some drops and thumping going on. In fact it's reminiscent of the Chrome audio bug (pre-v90) that we had a while back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants