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

Audio Input issue #51195

Closed
CystalCore opened this issue Aug 2, 2021 · 26 comments
Closed

Audio Input issue #51195

CystalCore opened this issue Aug 2, 2021 · 26 comments

Comments

@CystalCore
Copy link

CystalCore commented Aug 2, 2021

Godot version

3.3.2 Stable

System information

Windows 10

Issue description

I'm trying to make a PNGtuber program for my friends but after about an hour of running the audio input starts having a double effect and after a second hour it has a full 1 second delay.

Steps to reproduce

to reproducer this take the recording demo,
add a spectrum analyzer and remove record,
setup a way to see the spectrum,
run the program for an hour then say something into the mic.

Minimal reproduction project

https://github.com/CystalCore/Godot-audio-error

@fire
Copy link
Member

fire commented Aug 2, 2021

@ellenhp Could take a look if she wants.

@ellenhp
Copy link
Contributor

ellenhp commented Aug 2, 2021

When you say it has a double effect, do you mean that you can hear two voices (one second apart) in your stream whenever you say anything, or do you mean that you can say something and then you hear your own voice a full second after you'd expect to? I assume it's the latter, but I want to confirm.

My plate is pretty full right now but I'll try and take a look sometime.

@CystalCore
Copy link
Author

CystalCore commented Aug 2, 2021

the visual effect from the audio happens twice
I will run an unmuted test to see if it is feed back or the audio double playing
I will have details in about an hour

@CystalCore
Copy link
Author

CystalCore commented Aug 2, 2021

so at 37 minutes i started to get feedback
i will make a video once it gets worse
(the audio feedback is the audio doubling back)

@Calinou
Copy link
Member

Calinou commented Aug 2, 2021

The link to your minimal reproduction project doesn't work, as you posted the issue while the project was still uploading. Can you edit your original post and try to upload the project again?

@CystalCore
Copy link
Author

here is a video of the issue after about an hour of using the program with audio on
https://youtu.be/8PXOiIqEP1g
I will make a repo of the project and link that

@CystalCore
Copy link
Author

https://github.com/CystalCore/Godot-audio-error
here is a link to the project on git

@CystalCore
Copy link
Author

CystalCore commented Aug 5, 2021

also this could be part of the issue, I use a custom built PC that doesn't have a sound card so I don't have an audio mixer. I don't see how it could be an issue but if it works fine for you and not for me then that is probably the issue.

@Calinou
Copy link
Member

Calinou commented Aug 5, 2021

also this could be part of the issue, I use a custom built PC that doesn't have a sound card so I don't have an audio mixer. I don't see how it could be an issue but if it works fine for you and not for me then that is probably the issue.

Dedicated sound cards are uncommon nowadays, so I don't think that's the source of the issue.

@CystalCore
Copy link
Author

is there any way to turn off and on the Enable Audio Input option of the project and would that somehow reset the audio so that it doesn't get feed back? also my mic goes to Voicemod and that goes to Godot could that be causing the issue?

@CystalCore
Copy link
Author

Godot 3.3.3 has this in the update notes "Audio: Fix cubic resampling algorithm (GH-51082)." I will see if this somehow fixes the issue and I will follow up with results.

@CystalCore
Copy link
Author

update 3.3.3 audio changes did not change the outcome of the project

@Calinou
Copy link
Member

Calinou commented Aug 19, 2021

Godot 3.3.3 has this in the update notes "Audio: Fix cubic resampling algorithm (GH-51082)." I will see if this somehow fixes the issue and I will follow up with results.

This pull request only affects audio output, not input. Therefore, it's expected that the pull request you linked doesn't fix the issue you're encountering 🙂

@CystalCore
Copy link
Author

Is there any way to reset the Audio Stream after a amount of time has elapsed

@Calinou
Copy link
Member

Calinou commented Nov 6, 2021

Is there any way to reset the Audio Stream after a amount of time has elapsed

Godot doesn't have a way to reset the sound engine without restarting the rest of the engine.

PS: Are you using an USB microphone? If so, this issue's cause could be the same as #54544.

@CystalCore
Copy link
Author

I am i will check this out

@risunz
Copy link

risunz commented Nov 6, 2021

@CystalCore Can you try this project file? Try it with voicemod and without voicemod. And are u using usb microphone?
Mic Testing.zip

@CystalCore
Copy link
Author

It is a USB mic plugged into a USB 3.0

@CystalCore
Copy link
Author

im using godot 3.4 and so far the test project it hasn't broke yet, i have yet to try it with my project which uses Spectrum and not Volume Peak to see if that causes a difference.

@risunz
Copy link

risunz commented Nov 8, 2021

With my project file, It works just fine for analog microphone with audio jack. For usb mic or microphone with audio interface, it will face a latency issue. Either right from the beginning or after about 30 minutes of usage.

@CystalCore
Copy link
Author

yeah I updated to godot 3.4 and it hasn't happened yet with your setup or mine so 3.4 might have fixed it

@risunz
Copy link

risunz commented Nov 8, 2021

Well you can try run the test for awhile and see if the issue is still there

@CystalCore
Copy link
Author

I ran both yours and mine for 2 to 3 hours and didn't get any feedback what so ever.

@CystalCore
Copy link
Author

however there is a chance where exporting and running in the engine cause a difference but that wasn't making a difference before 3.4

@CystalCore
Copy link
Author

The Godot 3.4 change log has "Fix cubic resampling algorithm (GH-51082)" which appears to have issues I had but with proper terminology, I was experience audio artifacts after an amount of time. This does appear to be fixed.

@Calinou
Copy link
Member

Calinou commented Nov 8, 2021

Closing as resolved in 3.4.

@Calinou Calinou closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants