Interaction API Not Returning STT text from user

Hi there! - Apologies, I did a search but couldn’t find anything similar. I’m really hoping that the get-response API endpoint could return the text of the player’s audio that is sent to the endpoint.

I’ve been using the Interaction API with success, but this really bugs me and it honestly looks and feels like a mistake by the Convai team.

I’m submitting audio only, currently, to the get-response endpoint, and it does all of the STT on the server, and hands back the results with audio data generated for the NPC.

Documentations shows this as the expected response:

{
    "charID": "<character id sent in the request body>",
    "text": "<response generated by the language model to the query>",
    "audio": null / "<base64 encoded audio>"
    "sample_rate": null / "<sample rate of the audio in Hz>"
    "sessionID": "<your session id. In case of a new session, it returns a newly generated value or returns the old one>"
}

But in reality this is the actual response I’m getting:

{
  "sessionID": "<your session id. In case of a new session, it returns a newly generated value or returns the old one>",
  "actionSequence": "None",
  "sample_rate": null / "<sample rate of the audio in Hz>"
  "text": "<response generated by the language model to the query>",
  "response": "<response generated by the language model to the query>",
  "audio": null / "<base64 encoded audio>"
}

Different fields returned, but the important one for my question here is the duplicated NPC response. Both text and response have the NPC’s text. To me, it would make 100% more sense if one of those fields (probably text) was the STT text of the audio I sent as the player. It would also be very helpful for what I’m trying to do.

Any chance this could be fixed or updated to include this? Thanks!

Hello,

Welcome to the Convai Developer Forum!

Which platform are you working on?

Hi K3! Thanks for the reply. I am working in Unity 6, but intentionally building with the REST interaction api instead of the standard websocket based sdk.