Jump to content

Loud audio "noise spike" at the end of an audio play in a python script - driving me crazy :)


bbence84

Recommended Posts

I am getting a quite loud audio spike / noise sound at the end of an audio play in python when using the following script:

https://gist.github.com/bbence84/04d1935a92a4b4ab3d44bf182ea4bcc1

Wav to be played, but it does it with any other wav or mp3 file: https://easyupload.io/vbat12

 

It uses the speech_recognition package and the preferredsoundplayer package, but also the VLC python package shows the same when playing the audio.

When changing the audio play to be non-blocking for the python script, the issue goes away... Very strange. 

 

This is driviging me nuts. :)

 

I'm on Armbian 22.11.1 Jammy / 22.04.1 LTS, kernel 5.15.80-sunxi. Orange Pi Zero LTS.

 

Thanks for any ideas! :)

 

Bence

 

 

Link to comment
Share on other sites

I assume the audio chip or some sort of circuit is disabled once no longer audio is played. I don't know a fix but maybe as a workaround try playing an either very quite or high/low tone that keeps it enabled.

 

This distinctively cracking noise is known across all audio equipment where on better this issue is mitigated while on cheaper mostly ignored :lol:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines