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

[Linux] Process TTS callback on the main thread to avoid speech-dispatcher deadlock. #73671

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Feb 21, 2023

Fixes #73605

@bruvzg bruvzg added this to the 4.0 milestone Feb 21, 2023
@bruvzg bruvzg requested a review from a team as a code owner February 21, 2023 08:46
@akien-mga akien-mga merged commit 662d0b1 into godotengine:master Feb 21, 2023
@akien-mga
Copy link
Member

Thanks!

String mark = String::utf8(p_index_mark);
DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_BOUNDARY, tts->ids[p_msg_id], mark.to_int());
if (tts) {
tts->call_deferred(SNAME("_speech_index_mark"), p_msg_id, p_client_id, (int)p_type, String::utf8(p_index_mark));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work with callable_mp(...).call_deferred() instead of binding the methods?

Registering this with GDCLASS has made it show up in the GDExtension API: godotengine/godot-cpp@c1ff169#diff-fc336699721277f071b492b7c4006667e3073bb75cef6ddf75721ba8a61d12daR217376-R217382

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this will work as well - #73764

@bruvzg bruvzg deleted the linux_tts_lock branch February 22, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tts_stop freezes Godot under Godot 4 on Linux
2 participants