Skip to content

Commit

Permalink
Add OCI transcriber silence threshold properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rpurdel committed Feb 4, 2025
1 parent 995a8b2 commit 9f86dcd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,20 @@ XMPP account must also be set to make Jigasi be able to join a conference room.
transcription service.
</td>
</tr>
<tr>
<td>org.jitsi.jigasi.transcription.oci.finalThresholdMs</td>
<td>500</td>
<td>
The time in milliseconds after which the final transcript will be sent.
</td>
</tr>
<tr>
<td>org.jitsi.jigasi.transcription.oci.interimThresholdMs</td>
<td>500</td>
<td>
The time in milliseconds after which the interim transcript will be sent.
</td>
</tr>
</table>

Call control MUCs (brewery)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public AudioMixerMediaDevice getMediaDevice(ReceiveStreamBufferListener listener
public final static String COMPARTMENT_ID
= "org.jitsi.jigasi.transcription.oci.compartmentId";

public final static String OCI_FINAL_THRESHOLD_MS
= "org.jitsi.jigasi.transcription.oci.finalThresholdMs";

public final static String OCI_INTERIM_THRESHOLD_MS
= "org.jitsi.jigasi.transcription.oci.interimThresholdMs";

public final static String DEFAULT_WEBSOCKET_URL = "ws://localhost:8000/ws";

private BasicAuthenticationDetailsProvider authProvider;
Expand All @@ -99,6 +105,18 @@ public AudioMixerMediaDevice getMediaDevice(ReceiveStreamBufferListener listener
*/
private final String websocketUrlConfig;

/**
* The final threshold in milliseconds
*/
private final int finalThresholdMs = JigasiBundleActivator.getConfigurationService()
.getInt(OCI_FINAL_THRESHOLD_MS, 500);

/**
* The interim threshold in milliseconds
*/
private final int interimThresholdMs = JigasiBundleActivator.getConfigurationService()
.getInt(OCI_INTERIM_THRESHOLD_MS, 500);


/**
* Create a TranscriptionService which will send audio to the OCI service
Expand Down Expand Up @@ -232,7 +250,8 @@ private void connect(TranscriptionRequest request)
final RealtimeParameters realtimeClientParameters = RealtimeParameters.builder()
.isAckEnabled(false)
.languageCode(languageCode)
.finalSilenceThresholdInMs(1000)
.partialSilenceThresholdInMs(interimThresholdMs)
.finalSilenceThresholdInMs(finalThresholdMs)
.build();
try
{
Expand Down

0 comments on commit 9f86dcd

Please sign in to comment.