Voice recognition from PMA Voice

Hi I’m trying to make a script that would catch as soon as the player starts talking so it would write to the console what he said I want to add there this detection but it will be enough just if someone could advise me what event to use for this because I can not find out how I can detect that the player started talking I use PMA-VOICE.

My current code:

AddEventHandler("pma-voice:radioActive", function(active)
    if active then
        print("Player speaking.")
    end
end)

Here is a lot of info about pma voice GitHub - AvarianKnight/pma-voice: An easy drag n' drop resource that gives you a wrapper to use FiveM's built-in mumble voice.

Yes I looked at it but I can’t understand it, do you know how I can capture the event of starting and stopping talking?

Can’t you just use the NetworkIsPlayerTalking native to detect this? or do you want to specifically detect when PMA voice is being used?

I’m just not sure I would need to do at least a detection of when the player starts talking and when he stops, and preferably to write to the console some record. I’ll try to find something else how I could use it, as I wrote I’m trying to transcribe what the player said into text via script but currently I can’t do the basic detection of when the player speaks.

So far I’ve only been able to detect talking into the radio but I need the normal talking and I can’t find an event for that.