Skip to content

feat: OpenAI realtime api#935

Open
vladimir-a-sap wants to merge 13 commits into
mainfrom
feat/poc-openai-realtime-api
Open

feat: OpenAI realtime api#935
vladimir-a-sap wants to merge 13 commits into
mainfrom
feat/poc-openai-realtime-api

Conversation

@vladimir-a-sap

@vladimir-a-sap vladimir-a-sap commented Jul 7, 2026

Copy link
Copy Markdown

Context

AI/ai-sdk-java-backlog#386.

Adds OpenAI realtime API support

Feature scope:

  • Implemented destination selection, connection and authorization logic
  • Added heartbeat functionality to correctly manage conversation connections without unintended TCP resets
  • Implemented SDK Realtime API operations
    • Text to Speech
    • Speech to Speech
    • Speech to Text (implemented with a workaround but not exposed because of low reliability, update on the BE side needed)
  • Added sample app interactive examples
    • Text to Speech
    • Speech to Speech
    • Speech to Text (a blocker to be resolved on the BE side)
  • Added smoke test
    • Text to Speech
    • Speech to Speech
    • Speech to Text

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

Comment thread sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/Application.java Outdated
Comment thread sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/Application.java Outdated
Comment thread sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/Application.java Outdated
Comment thread orchestration/pom.xml Outdated
Comment thread orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java Outdated

@CharlesDuboisSAP CharlesDuboisSAP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we do about the previous realtime PR? Is it still valid? Why is it abandonned?

@vladimir-a-sap

vladimir-a-sap commented Jul 8, 2026

Copy link
Copy Markdown
Author

What do we do about the previous realtime PR? Is it still valid? Why is it abandonned?

My current understanding is that the mentioned PR cannot be completed to a SDK realtime solution. Here is the context and outcomes of my research why I think so:

There are three ways to implement realtime API with OpenAPI:

  • WebRTC
  • Websockets
  • SIP (telephony)

The previous PR implements SIP - it is a way for client and server to communicate about a connection in order to pass data, but not to establish connection or pass data in fact. The data layer should be implemented separately from the SIP protocol.

OpenAPI SIP protocol by design works with client-side web hooks as a mean to pass data and accept incoming connections (calls). Outgoing calls (client initiated) are not seem to be possible at all using solely SIP API.

We cannot expect SDK environment to have public http endpoints accessible from the internet to expose hooks. AI Core does not implement hook functionality either AFAIK.

Given that WebRTC is difficult to support on the BE and, AFAIK, our backend only supports Websockets at the moment, Websockets seem to be the only option we have.

@vladimir-a-sap vladimir-a-sap changed the title DRAFT: Feat/poc OpenAI realtime api Feat/poc OpenAI realtime api Jul 13, 2026
@vladimir-a-sap vladimir-a-sap changed the title Feat/poc OpenAI realtime api feat: OpenAI realtime api Jul 13, 2026
@vladimir-a-sap vladimir-a-sap marked this pull request as ready for review July 13, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants