Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Connect to OpenAI's real-time API using an audio connector.

    Posted 09-12-2025 00:49

    I want to connect to OpenAI's real-time API using an audio connector.

    What I implemented in Genesys Cloud was:
    Installing the "AudioConnector" integration and configuring the API Key with the key obtained from OpenAI. I did not configure any other integrations.
    I set up the task "Call Audio Connector" in Architect, configuring the integration and connector ID (setting the integration ID as the connector ID), but an error occurs.
    The error is of type: NoResourceError.
    If anyone has connected to OpenAI using an audio connector, please share your experience in the comments.

    #Architect
    #Integrations

    ------------------------------
    Yonezawa Takuya
    ------------------------------


  • 2.  RE: Connect to OpenAI's real-time API using an audio connector.

    Posted 09-12-2025 05:29

    Hello,

    As Cameron recently explained in this other post, "the Audio Connector has specific requirements for the connection and message format"

    AudioConnector is based on the use of the AudioHook Protocol. You can find information on the "About Audio Connector" page. It contains a link to the AudioHook Protocol specification. You'll need an intermediate server/gateway (code) so the two sides can communicate.

    A great blog, with a code example, was recently published by Faisal, one of our colleagues. I'd suggest to have a look at it as it will likely help you connecting Genesys Cloud with a 3rd party system: Audio Connector: Sample Integration with OpenAI Realtime Voice API

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 3.  RE: Connect to OpenAI's real-time API using an audio connector.

    Posted 09-25-2025 20:14
    Hello,
    Thank you for your response.
     
    I understand that an intermediate server/gateway is required.
     
    I am trying to test the sample you provided.
    Within that, I would appreciate clarification on two points if possible.

    ①4. Configure Genesys Cloud Integration
     "Ensure that credentials align with the secret key defined in ./src/services/secret-service.ts."
     →Where do I obtain this secret key? Is it separate from the API Key?

    ②5. Architect Flow Setup
     "Add a Call Audio Connector action to the flow."
     →I assume the Connector ID is required for the Audio Connector action. What exactly is this Connector ID?


    ------------------------------
    Yonezawa Takuya
    ------------------------------



  • 4.  RE: Connect to OpenAI's real-time API using an audio connector.

    Posted 09-30-2025 03:01

    Hi Yonezawa Takuya,

    Genesys Cloud uses the HTTP Message Signing protocol for authenticating Audio Connector / Audio Hook connections. When Genesys Cloud connects to your Audio Connector WebSocket server, it generates an HMAC using SHA-256 based on the KeyId and Secret Key you configure in the Audio Connector integration credentials. For the sample GitHub implementation, the key is hardcoded, so to make it work you just need to ensure the KeyId and Secret in your integration match exactly what's set in the secretservice file. In production, you'd typically manage keys securely with a proper key management service.

    The connectorID parameter in an Architect flow simply appends to your WebSocket URL so you can route to different bots or experiences from the same middleware. For example, if your integration is configured with wss://audio-connector-websocket-mw and you set connectorID = Test, Genesys Cloud will open a connection at:

    wss://audio-connector-websocket-mw/Test

    Your middleware can then use this value to start the correct bot experience.

    Reference URLs

    https://developer.genesys.cloud/devapps/audiohook/security#client-authentication

    https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-11



    ------------------------------
    Faisal Yousuf
    Manager, Customer Success & Services AI Solution Team
    ------------------------------



  • 5.  RE: Connect to OpenAI's real-time API using an audio connector.

    Posted 09-30-2025 04:49

    @Faisal Yousuf

    Thank you for your reply.
     
    I am continuing to verify the sample program, but it is not working properly.
     
    I am initiating a call from a mobile phone and invoking the call flow configured with AudioConnector.
     
    The logs show that my side's speech reaches OpenAI, and I can confirm that OpenAI responds.
     
    However, that audio is not returning to the mobile phone.
    Even when checking the interaction on Genesys Cloud, the audio from OpenAI is not present.

    Regarding the above solution, I would appreciate it if you could let me know if you have any insights.
     
    Also, the connector ID currently works regardless of what I enter,
    so I suspect this might be the cause.
     
    Following the sample procedure, I have configured the ngrok domain for integration.
     
    wss://ngrok domain
     
    For the connector ID mentioned in your reply,
    could you please advise how it should be configured in the sample case?


    ------------------------------
    Yonezawa Takuya
    ------------------------------



  • 6.  RE: Connect to OpenAI's real-time API using an audio connector.

    Posted 13 days ago
    Edited by francois-regis plagnol 13 days ago

    Hello @Faisal Yousuf and @Jerome Saint-Marc,

    I've masked all sensitive information below with XXXX for security reasons.

    I'm facing an issue when trying to connect Genesys Cloud Audio Connector to a third-party WebSocket endpoint hosted on AWS API Gateway.

    My setup

    • Region: EU (Frankfurt) – apps.mypurecloud.de

    • Integration: [FRP] Audio Connector

    • Base Connection URI:
      wss://XXXXXXXXXXXX.execute-api.eu-central-1.amazonaws.com/production

    • API Key: pgl_XXXXXXXXXXXXXXXXXXXXXXXXXXXX

    • Client Secret: left empty (no HMAC signature configured yet)

    • Architect flow: Call Audio Connector action with Connector ID = "YYYY" where "YYYYYYYYYYYYYYYYYYYY" = "https://apps.mypurecloud.de/directory/#/admin/integrations/apps/audio-connector/YYYYYYYYYYYYYYYYYYYY/details

    What works

    When testing manually from the command line using wscat, the WebSocket connection is successful and confirmed by my AWS Lambda logs:

    C:\> npx wscat -H "X-API-KEY: pgl_XXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ -c wss://XXXXXXXXXXXX.execute-api.eu-central-1.amazonaws.com/production Connected (press CTRL+C to quit)

    The $connect event appears in CloudWatch with a 200 response, confirming the endpoint and authentication are working properly.

    What fails

    However, when using the same configuration in Genesys Architect, the Call Audio Connector action fails immediately with the following error message:

    There was a problem communicating with the AudioConnector Bot. This is typically caused by it being incorrectly installed or configured. Check the installation and configuration of your AudioConnector Bot, and if the problem persists please contact Genesys customer support.

    In addition, no $connect event appears in my CloudWatch logs during these failed attempts - it seems Genesys Cloud does not initiate the WebSocket connection at all.

    My questions

    1. Is a Client Secret (HTTP Message Signing) required for Genesys Cloud to establish the connection, or should a simple X-API-KEY header be sufficient?

    2. If the Client Secret is optional, what could prevent Genesys from even attempting the connection while wscat connects successfully?

    3. Are there known limitations or special requirements when using AWS API Gateway WebSocket endpoints as the Audio Connector target?

    Thank you very much for your help and clarification.

    Best regards,
    François-Régis PLAGNOL



    ------------------------------
    francois-regis plagnol
    Consultant
    ------------------------------



  • 7.  RE: Connect to OpenAI's real-time API using an audio connector.

    Posted 13 days ago

    Hello,

    I have not used audio connector so my answer will just be based on the doc (https://help.mypurecloud.com/articles/configure-and-activate-audio-connector-in-genesys-cloud/ and https://developer.genesys.cloud/devapps/audiohook/introduction) and Faisal's previous answer.

    * Client Secret: No, it is not necessary to establish the connection. It is meant for the server to verify the signature sent in the wss GET request (https://developer.genesys.cloud/devapps/audiohook/session-walkthrough#establishing-connection and https://developer.genesys.cloud/devapps/audiohook/security#client-authentication). Still, I would not leave an empty value in the configuration (Genesys Cloud side). Set a dummy value even if you don't use it to verify the signature.

    * WSS URL: As Faisal wrote above: "The connectorID parameter in an Architect flow simply appends to your WebSocket URL so you can route to different bots or experiences from the same middleware. For example, if your integration is configured with wss://audio-connector-websocket-mw and you set connectorID = Test, Genesys Cloud will open a connection at:"wss://audio-connector-websocket-mw/Test""

    With your configuration, it means Genesys Cloud is likely contacting "wss://XXXXXXXXXXXX.execute-api.eu-central-1.amazonaws.com/production/YYYY"

    Which leads me to one comment - don't use a full url as a connector ID. Just a "normal" text entry (name, identifier, ...).

    And listen on that address.

    * AudioHook protocol: I don't know what is behind your api gateway (sample code from Faisal or this other sample code) but it needs to implement audiohook protocol which is just not websocket to send raw audio to but a protocol (with states, ...)

    * Connection Probe: In addition to this, if this still exists (I only used audiohook a couple of times 3 or 4 years ago), there is a "verification" done when you configure the audiohook/audioconnector integration in Genesys Cloud (and save changes on your integration). See: https://developer.genesys.cloud/devapps/audiohook/patterns-and-practices#connection-probe

    That would be on the configured wss url: "wss://XXXXXXXXXXXX.execute-api.eu-central-1.amazonaws.com/production"

    Note: I am off tonight for a week or so (holidays)

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------