Skip to content

feat(transcription): add OCI Speech model domain config support (GENERIC/MEDICAL) - #642

Open
felipeavilis wants to merge 1 commit into
jitsi:masterfrom
felipeavilis:fix/oci-model-domain-clean
Open

feat(transcription): add OCI Speech model domain config support (GENERIC/MEDICAL)#642
felipeavilis wants to merge 1 commit into
jitsi:masterfrom
felipeavilis:fix/oci-model-domain-clean

Conversation

@felipeavilis

Copy link
Copy Markdown

Summary

Adds support for selecting the OCI Speech Realtime API model domain in OracleTranscriptionService via a new configuration property:

  • New property: org.jitsi.jigasi.transcription.oci.modelDomain
  • Accepted values: GENERIC (API default, unchanged behavior when unset) or MEDICAL
  • The MEDICAL domain improves transcription accuracy on healthcare terminology
  • Logs a warning when MEDICAL is configured with a non-English locale, since the OCI MEDICAL model only supports English (en-*)

Configuration

Add to sip-communicator.properties:

# Optional — defaults to GENERIC when unset
org.jitsi.jigasi.transcription.oci.modelDomain=MEDICAL

Evidence

Successful connection with modelDomain=MEDICAL and en-US

INFO: Connecting to wss://realtime.aiservice.sa-saopaulo-1.oci.oraclecloud.com:443/ws/transcribe/stream
      ?isAckEnabled=false&partialSilenceThresholdInMs=200&finalSilenceThresholdInMs=300
      &languageCode=en-US&modelDomain=MEDICAL
INFO: Connected to: realtime.aiservice.sa-saopaulo-1.oci.oraclecloud.com/129.148.13.145:443
INFO: Connected to OCI Transcription Service
INFO: Received connect message: RealtimeMessageConnect(sessionId=55b80fbe-e7d9-4e8e-a764-9bfa1b8d668e)

Expected failure with modelDomain=MEDICAL and pt-BR (OCI does not support MEDICAL for non-English)

INFO: Connecting to wss://realtime.aiservice.sa-saopaulo-1.oci.oraclecloud.com:443/ws/transcribe/stream
      ?isAckEnabled=false&partialSilenceThresholdInMs=200&finalSilenceThresholdInMs=300
      &languageCode=pt-BR&modelDomain=MEDICAL
SEVERE: Failed to connect to OCI Transcriber
  java.util.concurrent.ExecutionException: org.eclipse.jetty.websocket.api.exceptions.UpgradeException:
  Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 400 Bad Request

The warning introduced in this PR surfaces this misconfiguration before the API rejects the connection.

Test plan

  • Build passes (mvn install -DskipTests)
  • Checkstyle passes (mvn checkstyle:check)
  • Existing unit tests pass (mvn test)
  • Tested on a live OCI Speech endpoint with modelDomain=MEDICAL + languageCode=en-US — connection established and transcription received
  • Verified that pt-BR + MEDICAL produces a 400 from the API (expected — OCI limitation)
  • Omitting the property preserves existing behavior (no modelDomain query parameter sent)

…RIC/MEDICAL)

Adds a new configuration property to OracleTranscriptionService that
allows selecting the OCI Speech Realtime API model domain:

  org.jitsi.jigasi.transcription.oci.modelDomain=MEDICAL

Accepted values are GENERIC (API default, used when unset) and MEDICAL.
The MEDICAL domain improves accuracy on healthcare terminology.

Logs a warning when MEDICAL is configured with a non-English locale,
since the OCI MEDICAL model only supports English (en-*).
@damencho

Copy link
Copy Markdown
Member

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.76%. Comparing base (e9a3acc) to head (70a2c0b).

Files with missing lines Patch % Lines
...gasi/transcription/OracleTranscriptionService.java 0.00% 13 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #642      +/-   ##
============================================
- Coverage     19.11%   18.76%   -0.36%     
+ Complexity      310      302       -8     
============================================
  Files            84       84              
  Lines          7223     7236      +13     
  Branches        958      962       +4     
============================================
- Hits           1381     1358      -23     
- Misses         5612     5651      +39     
+ Partials        230      227       -3     
Files with missing lines Coverage Δ
...gasi/transcription/OracleTranscriptionService.java 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9a3acc...70a2c0b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants