Code Monkey home page Code Monkey logo

directkiwi's People

Contributors

ab9il avatar llinkz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

directkiwi's Issues

Does not work on Pipewire

I use pipewire as my audio backend, which supports ALSA with pipewire-alsa. Using python3.11 on ArchLinux, I get this error while trying to play anything:

Traceback (most recent call last):
  File "/home/tlh/myownstuff/directcheck/kiwiclient/kiwirecorder.py", line 10, in <module>
    from kiwi import KiwiSDRStream, KiwiWorker
  File "/home/tlh/myownstuff/directcheck/kiwiclient/kiwi/__init__.py", line 8, in <module>
    from .wavreader import *
  File "/home/tlh/myownstuff/directcheck/kiwiclient/kiwi/wavreader.py", line 11, in <module>
    class KiwiIQWavReader(collections.Iterator):
                          ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Iterator'

I fixed it by updating the code to use collections.abc, however, now I get yet another error, this time because of python-sounddevice.

Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2050
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2724
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2845
Traceback (most recent call last):
  File "/home/tlh/myownstuff/directcheck/kiwiclient/kiwirecorder.py", line 15, in <module>
    stream = sounddevice.OutputStream(12000, 2048, channels=1, dtype='int16')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tlh/myownstuff/directcheck/.venv/lib/python3.11/site-packages/sounddevice.py", line 1494, in __init__
    _StreamBase.__init__(self, kind='output', wrap_callback='array',
  File "/home/tlh/myownstuff/directcheck/.venv/lib/python3.11/site-packages/sounddevice.py", line 898, in __init__
    _check(_lib.Pa_OpenStream(self._ptr, iparameters, oparameters,
  File "/home/tlh/myownstuff/directcheck/.venv/lib/python3.11/site-packages/sounddevice.py", line 2747, in _check
    raise PortAudioError(errormsg, err)
sounddevice.PortAudioError: Error opening OutputStream: Invalid sample rate [PaErrorCode -9997]

This seems to be a error because portaudio isn't able to find the right devices.

Client does not adjust samplerate for high rate servers

I'm not completely sure how to fix it, but directKiwi continues to run at 12000 samples / sec when connecting to servers running at 20250 samples / sec. It probably needs to pull status data from the server and use the reported sample rate.

For example, connect to the KiwiSDR at k3fef.com. Audio sounds like a "slow record" because of the rate mismatch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.