NixOS + Microsoft SDK Speech + Python

Hello guys! Reference: Install the Speech SDK - Azure AI services | Microsoft Learn

I’m trying to use the pip of MS to transform txt into audio, with MS TTS (Speech SDK).

After a lot of trial and error, I was able to solve most of the issues. But now I’m stuck into this error:

/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0xf3) [0x7f375d8a1bd8]
/nix/store/dmrgjkzbj4pbml4r2l0zlh871z2pvar4-libffi-3.4.4/lib/libffi.so.8(+0x784a) [0x7f375f02984a]
/nix/store/dmrgjkzbj4pbml4r2l0zlh871z2pvar4-libffi-3.4.4/lib/libffi.so.8(+0x689e) [0x7f375f02889e]
/nix/store/dmrgjkzbj4pbml4r2l0zlh871z2pvar4-libffi-3.4.4/lib/libffi.so.8(ffi_call+0xcd) [0x7f375f0292bd]
[CALL STACK END]

Runtime error: Failed to initialize platform (azure-c-shared). Error: 2153

It looks very general and I am not able to identify the problem. One possible issue I saw was the version of OpenSSL. But even after I downgrade to 1.1.1u I have received the same error.

Any ideas?