0 votes

Hi! We're trying to call a Windows WinRT API, specifically the Windows.Media.SpeechSynthesis.SpeechSynthesizer class.

Method A: going the C# route.
This C# .NET class is not implemented in Mono. Is it possible to call a .NET class (that seems to require the WinRT runtime, though I'm not sure) from Godot_Mono, and if yes, how?

Method B: going the GDNative and C++ Route.
While the class documentation mentions C++ examples, they're confusing because they use Microsoft's C++/CX:

https://docs.microsoft.com/en-us/uwp/api/Windows.Media.SpeechSynthesis.SpeechSynthesizer

Additionally, we lack the knowledge around the seemingly pretty complex preconditions before being able to call these Windows APIs from a non-UWP C++ project. But supposedly it should be possible to call these APIs from a Win32 project, so I guess it should be possible from Godot too.

Does anyone happen to have a working sample of a call to any Windows WinRT API?

Or does anyone have any pointers to a relevant tutorial that actually applies to the specific case of a WinRT API being called from a plain C++ project?

Godot version 3.2.3
in Engine by (19 points)
retagged by

Does it have to be C++? If you didn't know, the engine does support C#. If speed and/or efficiency are not much of a problem, consider using the C# API.

You're right, I completely forgot that at first we researched a way to call this .NET C# class from Godot_Mono and couldn't find a solution. I've edited the question.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.