seeed-voicecard icon indicating copy to clipboard operation
seeed-voicecard copied to clipboard

[Bug]: Can not use sounddeivce to simultaneously play a sound while record 6 Channel microphone data

Open ZitongLan opened this issue 9 months ago • 0 comments

Describe the bug

To Reproduce I am using the following code that is implemented in the raspberry pi 4 platform to use sounddeivce play a sound while record the sound in the same time. I am using kernel 6.6 and the sound card driver is from https://github.com/HinTak/seeed-voicecard/tree/v6.6.

If I comment sd.rec, the speaker will actually play the respected sound in playback_data. However, if I un-comment like below, the sound will not be played, but the microphone is recording well. What should I do?

sd.play(playback_data, samplerate=sample_rate, device=playback_device)
recorded_data = sd.rec(int(record_duration * sample_rate), samplerate=sample_rate, channels=8, device=recording_device)
sd.wait()

Expected behavior

As describe above

Platform

  • Device: [e.g. Raspberry Pi 4]
  • OS: [Raspbian OS 64bit kernel version ...]

Relevant log output

No response

ZitongLan avatar May 26 '24 21:05 ZitongLan