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

AudioEffectRecord has more latency when using an USB microphone compared to an analog microphone #54544

Open
Tracked by #76797
risunz opened this issue Nov 3, 2021 · 11 comments

Comments

@risunz
Copy link

risunz commented Nov 3, 2021

Godot version

3.3 Stable

System information

Solus OS 4.3

Issue description

I make a software that capture a voice input using a microphone. I realize that analog microphone with audio jack works perfectly fine but usb mic will have a latency issue. It takes time bofore showing an output that "audio is captured"

Steps to reproduce

this line of code:
var power = AudioServer.get_bus_peak_volume_left_db(AudioServer.get_bus_index("Record"), 0)

with the attached bus and audiostreamplayer setups
image
image

For some reason, usb mic user will get a delay for the output.

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Nov 3, 2021

@airisun Can you reproduce this delay in other recording applications such as Audacity (when using the USB microphone)?

Also, can you reproduce this if you make the project use ALSA instead of PulseAudio by changing the audio driver field in the Project Settings from PulseAudio to ALSA (case-sensitive)?

@risunz
Copy link
Author

risunz commented Nov 3, 2021

I forgot to mention that I'm reporting this because my software users (Windows users and usb mic users) are having the delay with the exported software. Since I don't have usb mic right now, I cannot confirm if the problem is only after exporting or in the editor too. Anyone with usb microphone can try this project file.
Mic Testing.zip

This is the software: https://ai-risun.itch.io/gazo-tuber

@Calinou Calinou changed the title USB Mic Input Latency AudioEffectRecord has more latency when using an USB microphone compared to an analog microphone Nov 3, 2021
@fire
Copy link
Member

fire commented Nov 3, 2021

I am wondering if moving to lower level AudioEffectCapture from AudioEffectRecord will allow you to remove the latency.

@risunz
Copy link
Author

risunz commented Nov 9, 2021

Based on issue #51195 it is fixed. But I can confirm it is still not fixed for mine. Im using Godont 3.4 Beta6.
Godot seems to repeat my voice twice. Im using USB Mic

2021-11-09.14-40-47.mp4

.

@risunz
Copy link
Author

risunz commented Nov 9, 2021

My thought is, it's wasn't a delay but Godot is repeating the captured audio twice. Thus it makes Godot seems to showing a delay.

@risunz
Copy link
Author

risunz commented Nov 9, 2021

In my case, Godot repeat my audio for awhile. After than, it's not repeating but just delay.

@risunz
Copy link
Author

risunz commented Mar 2, 2022

I got another report from a Mac user. They are using Blue Snowball and it seems godot cant catch the input too.

@vgf89
Copy link

vgf89 commented Mar 21, 2022

I also get this issue or something very similar. I haven't tried 3.4.3 yet (just 3.4.2) but my blue snowball also seems to get doubling, a build up of delay, and popping on both Windows 10 and 11. It works properly in every other application except for Godot.

I'm not using the record effect, instead I'm just using SpectrumAnalyzer

@risunz
Copy link
Author

risunz commented Aug 13, 2022

Your issue is probably the same as mine. I really hope someone in the community have some ideas regarding this issue. I really don't know what to do haahhaa. I love Godot and I want to continue working my software with it. I hope the issue will be resolved later. Thank you.

@fire
Copy link
Member

fire commented Aug 13, 2022

There is less people in the audio team so this may not be resolved soon.

godotengine/godot-proposals#2013 was the lower level replacement for audio record we wrote for voice calls in games.

@risunz
Copy link
Author

risunz commented Aug 13, 2022

Aww I see. It's fine then. Thanks for the hardwork!

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

4 participants