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

Invalid rates #344

Open
Psychokiller1888 opened this issue Nov 11, 2020 · 0 comments
Open

Invalid rates #344

Psychokiller1888 opened this issue Nov 11, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Psychokiller1888
Copy link
Member

We keep having issues with sound on Alice. This is mainly due to the fact that I don't really understand the entire sound thing, with frames, channels, buffer per frames etc etc and the online guides mixing between them all add to the comprehension complexity.

Concerning the two main errors we usually see:

sounddevice.PortAudioError: Error opening RawInputStream: Invalid sample rate [PaErrorCode -9997]
Playing wav failed with error: Error opening RawOutputStream: Invalid sample rate [PaErrorCode -9997]

Playing to fix these got me to those conclusions:

  • For the input, we need a setting for sound input rate. I fixed my mic by setting the input framerate in AudioServer/publishAudio to 48000, because 48k seems to be the frame rate my mic supports

    • This leads the the next problem, the packets sent over mqtt are then sent using a framerate of 48k which is a problem for the sound output
  • For the output, after trying 8k to 48k I did not find any that fits. Which is strange, because technically I use the same speakers all the time, the mic changes, but almost never the speakers. And if I instal lthe respeaker drivers, the sound output is ok.

  • My understanding being limited here, the wild guesses I can make ares:

    • respeaker drivers include a resampler?
    • we need to learn python/linux sound for better understanding
    • we most probably will need to resample both input and output as well as playing to get a unified solution
    • we need a mic samplerate config as well as a speaker samplerate config.
@Psychokiller1888 Psychokiller1888 added the enhancement New feature or request label Nov 11, 2020
@Psychokiller1888 Psychokiller1888 added this to the 1.0.0 milestone Nov 11, 2020
@Psychokiller1888 Psychokiller1888 self-assigned this Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant