Skip to content

PortAudio segmentation fault #1

@SaneBow

Description

@SaneBow

Hardware:
Respeaker 2mic Pi Hat, with settings:

defaults.pcm.aec.playback_hw.rate 48000
defaults.pcm.aec.capture_hw.rate 16000

Steps to reproduce:

  1. run NS: python3 ns.py -o aec_internal (PiDTLN)
  2. run KWS: python3 mic_streaming.py -i aec -m ../g-kws/my_quant.tflite (tflite-kws)
  3. NS script segmentation fault

After this any re-run of 1 will directly result in segmentation fault. If I set loopback_out device to dmix with a different period_size 1 can run normally again.

If replace step 2 with arecord -D aec then no problem.

There are a number of strange crashes that are likely to be caused by PortAudio (see 2c59e8a), so maybe drop PortAudio (sounddevice) and use ALSA API directly. I've played with pyalsaaudio before and it's not hard to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions