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

The signal collected fron SoundCard lib #180

Open
cyber211 opened this issue Sep 19, 2024 · 3 comments
Open

The signal collected fron SoundCard lib #180

cyber211 opened this issue Sep 19, 2024 · 3 comments

Comments

@cyber211
Copy link

cyber211 commented Sep 19, 2024

The original signal is not continous that cause the fft curve is not right, How do i configure to make the collected data continously?
image

@bastibe
Copy link
Owner

bastibe commented Sep 19, 2024

What OS are you running, and do you get any warnings or errors?

@cyber211
Copy link
Author

Thanks for your response,
OS version:

OS: Windows 10 Enterprise
Ver 22H2
OS internal version 19045.4780
Windows Feature Experience Pack 1000.19060.1000.0

Warnings:

C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\site-packages\soundcard\mediafoundation.py:772: SoundcardRuntimeWarning: data discontinuity in recording
warnings.warn("data discontinuity in recording", SoundcardRuntimeWarning)

@bastibe
Copy link
Owner

bastibe commented Sep 22, 2024

There can be various reasons for this. Perhaps your computer is doing too much at the same time, or you're doing too much processing with the recorded data, or your block size is too low. In either case, SoundCard is not invoked quickly enough, and misses frames. Try lengthening your block size, reducing your sampling rate, and stripping all extraneous processing out of the audio thread. Real time does not wait for anybody, especially not in a single-threaded program like Python, and especially not on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants