Skip to content

feat(plugins): added new POC transcription node using Kroko ASR - #178

Merged
b3by merged 3 commits into
mainfrom
kroko-proc-node
May 12, 2026
Merged

feat(plugins): added new POC transcription node using Kroko ASR#178
b3by merged 3 commits into
mainfrom
kroko-proc-node

Conversation

@lminiero

Copy link
Copy Markdown
Member

Description

This PR provides a new processor node to Juturna, implementing transcriptions via Kroko ASR. It's meant mostly as a proof-of-concept, as I used this code to demonstrate how easy it would be to add a new node to Juturna in a Dangerous Demos session during Kamailio World.

PR type
Select all the labels that apply to this PR.

  • New feature (non-breaking change which adds functionality)
  • Other (please describe): new plugin

Key modifications and changes

As anticipated in the intro, this PR provides a new processor node to Juturna, implementing transcriptions via Kroko ASR. It's meant mostly as a proof-of-concept, as the code will definitely need some refactoring before it can actually be relied upon for more than a simple demo.

It leverages the WebSocket API that Kroko ASR exposes as a way to send audio samples and receive transcription data back. The implementation is currently naive, as WebSocket interaction is only performed contextually to update() calls: any time samples come in via update, they are sent to Kroko via WebSocket, after which the code tries to perform one or more WebSocket reads, until there's no more data to receive. This is supposed to ensure we get all transcription data that Kroko processed in the meanwhile, but is probably a suboptimal way to handle this, as:

  1. this may delay the reception of already available transcribed data until the next update call, and
  2. marks the same unrelated incoming message as the origin for one or more outgoing messages with transcribed data.

A queue and/or a separate thread for handling incoming data will probably be a better way to handle that.

Considering that the language. model and other settings are configured when launching the separate Kroko ASR binaries, these settings are not exposed in this node, as there would be no way to enforce them: this may be possible using the SDK APIs, but I haven't investigated this yet. The only argument that can currently be passed to the node is the WebSocket address to contact (ws://localhost:6006 by default). The node expects 16khz mono float samples, as that's what Kroko ASR requires.

This was tested using the source/audio_rtp_av node feeding flt samples, and using precompiled Kroko ASR binaries that Banafo graciously provided us with, as I had problems building the project from the repo myself. While Kroko ASR requires licensing to use pro models, there are community models that can be used for testing, and community licenses that allow for free limited testing, so that's what I used in my tests of the node.

@b3by

b3by commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this contribution!

@b3by
b3by merged commit d3fa393 into main May 12, 2026
1 of 2 checks passed
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