Hello, I have a bit of a borderline use case. I’m trying to intercept the player-to-character messages (sent via voice/chat ui) to pre-process them before they get sent to the convAI API.
Is there any easy way to add this functionality without either editing or rewriting the core Unity plugin classes?
I’m trying to intercept the player-to-character messages to perform a set of language processing tasks on their content (sentiment analysis, to give an example), update a set of game state variables, and only then pass the player message to the convAI API.
I know this may add significant latency, but I need a more flexible solution than the one provided by the NarrativeDesign module.
For this level of customization, you can indeed record the audio yourself, perform your desired language processing tasks, and then send the audio to Convai manually once it’s ready.
While we don’t provide direct support for these kinds of custom workflows, we encourage you to explore the existing integration as a reference. Specifically, you may want to review the logic in: