Distorted audio recordings - audio libraries malfunctioning

OS: Win10
PsychoPy version: 2021.2.3 and 2022.1.1
Standard Standalone?: tried both standalone and pip-installed
What are you trying to achieve?: getting clean audio recordings from microphone component

I have been experiencing many issues with recordings and audio libraries in psychopy. I already asked on the forum months ago but no one has been able to help me.
https://discourse.psychopy.org/t/cant-record-speech-onset-with-mic-component/25325

Here’s a summary:

  1. I cannot produce speech onset times. The output csv file doesn’t even generate the dedicated column, I only get mic.clip, mic.started, mic.stopped. I can only output the audio clip recordings and the mic.started times.
  2. I can only get clean audio using the sounddevice library with latency 1 ; I get nothing setting it to 2,3,4. The other libraries, including ptb , just produce some weird crackly and slowed-down recordings.
  3. the task breaks randomly giving the “ I can’t stop a stream that has not been started error. I’m avoiding that by commenting out the first of the two mic.stop() in the script.

What did you try to make it work?:
Tried every sound parameter combination, different versions of psychopy; I even tried switching from standalone version to the pip-installed one. No results.

I don’t even care anymore about recording speech onset. I just wish I could get clean precise recordings.

Thanks to anyone who might be able to help.