-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Text to speech draining CPU with Pulse Audio when not in use #77124
Comments
@bruvzg are you able to add the project setting to turn TTS off in 3.x and 4.x? I've just had a look and I could do it, but I'm totally unfamiliar with the TTS so it would likely be quicker for you, and you would likely make a better job of it. Also it might be an idea to have a command line switch at runtime to override the project setting, turning it on or off. 🤔 |
Sure, I'll do it. |
Reopening as this still needs a 3.x version. I started looking but there are some differences in the Android in 3.x and I'm not familiar with this area so might require @bruvzg to backport. |
Fixed by #77352. |
Godot version
Present in 3.x and master, I've milestoned for 3.6 as I'm investigating in 3.x but same will apply in master.
3.x current (16 may 2023) (567128b), 4.x (last week)
System information
Linux Mint 20.1
Issue description
Note - This issue is related (but not the same) as #55608 . That issue was due to the engine using Pulse Audio, this is due to text to speech (TTS).
System monitor shows that running even the project manager, speech dispatcher is using Pulse Audio which uses significant CPU (11% in my case) even when Godot audio output is switched off (using dummy driver).
By using
pactl list clients
you can list which apps are causing PulseAudio to use CPU.This info here regards 3.x, but reports indicate the same problem in 4.x. See #55608 (comment) .
The normal for the engine audio output is:
When text to speech is active you get this:
This problem may also occur in different form on other platforms, but both my and @wb14123 's reports are on Linux, so can only confirm there so far.
Steps to reproduce
Just run the engine to get the project manager, examine system monitor to see CPU use per process, and run
pactl list clients
.What makes this more tricky is that this problem appears to be intermittent. I haven't quite pinned down why it is occurring some runs / builds and not others, will add more info as it becomes apparent.
EDIT: Ah the intermittent nature may be because I get
Warning: Speech Dispatcher development libraries not found. Disabling Text-to-Speech support.
on local builds, but production builds presumably are compiling with text to speech, and getting the problem.Minimal reproduction project
N/A
Discussion
The issue appears to be caused because Godot's TTS is always on. It will probably be fixed if we can add a project setting whether to use TTS or not. See:
#55608 (comment)
Presumably the issue is caused by #61316 / #56192 .
The text was updated successfully, but these errors were encountered: