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

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

Open
ZitongLan opened this issue May 26, 2024 · 0 comments
Labels

Comments

@ZitongLan
Copy link

ZitongLan commented May 26, 2024

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 ZitongLan added the bug label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant