I got it working in JavaScript, not sure if the code is entirely correct though.

const speechParams = new DataView(new ArrayBuffer(128));

const speechName = 'RE_PH_RHD_V3_AGGRO';
const voiceName = '0405_U_M_M_RhdSheriff_01';

const string1 = CreateVarString(10, "LITERAL_STRING", speechName);
const string2 = CreateVarString(10, "LITERAL_STRING", voiceName);

speechParams.setBigInt64(0, BigInt(string1), true);
speechParams.setBigInt64(8, BigInt(string2), true);
speechParams.setInt32(16, 1, true);
speechParams.setInt32(24, 0x67f3ab43, true);
speechParams.setBigInt64(32, BigInt(PlayerPedId()), true);
speechParams.setBigInt64(40, BigInt(true), true);
speechParams.setInt32(48, 1, true);
speechParams.setInt32(56, 1, true);

Citizen.invokeNative('0x8E04FEDD28D42462', PlayerPedId(), speechParams);
1 Like