Skip to content

Stt streaming - #730

Merged
HenryNdubuaku merged 12 commits into
mainfrom
stt-streaming
Jun 17, 2026
Merged

HenryNdubuaku merged 12 commits into
mainfrom
stt-streaming

Conversation

@jakmro

@jakmro jakmro commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

jakmro added 4 commits June 16, 2026 02:54
…onfidence threshold in response JSON

Signed-off-by: jakmro <kubamroz124@gmail.com>
Copilot AI review requested due to automatic review settings June 16, 2026 10:47

Copilot AI 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.

Pull request overview

Adds end-to-end streaming speech-to-text (STT) support to Cactus by introducing a native streaming transcription session API (start/process/stop), wiring it through multiple language bindings, and updating CLI/docs to cover both live mic and file-based transcription.

Changes:

  • Added native streaming transcription FFI (cactus_stream_transcribe_*) and an engine implementation for incremental “confirmed/pending” text.
  • Exposed streaming transcription across bindings (Python, Rust, Swift, Kotlin, Flutter, React Native, Android JNI) and expanded documentation accordingly.
  • Updated CLI/docs around transcription, platform defaults (--platform auto), and added new/updated engine tests and examples for streaming + live mic.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
README.md Documents new response fields and updates CLI help text/models table.
python/README.md Updates Python API docs and adds streaming transcription section.
python/cactus/transpile/README.md Updates bundle/artifact location docs (weights/ vs transpiled/).
python/cactus/cli/transcribe.py Allows cactus transcribe to run without --file (live mic path).
python/cactus/cli/init.py Makes --file optional for transcribe subcommand.
python/cactus/bindings/cactus.py Adds ctypes bindings + Python wrappers for streaming transcription.
python/cactus/init.py Re-exports streaming transcription functions at package top-level.
docs/quickstart.md Adds “Speech Transcription” next-step link.
docs/finetuning.md Minor doc fixes and updated instructions/examples.
docs/cactus_transpiler.md Documents --artifact-dir usage and adds seq2seq_transcription task.
docs/cactus_kernels.md Renames parameters/fields in kernel docs for clarity/consistency.
docs/cactus_hybrid.md Updates hybrid response example with confidence_threshold and Python snippet.
docs/cactus_graph.md Updates graph persistence docs/examples (GraphFile snippet touched).
docs/cactus_engine.md Adds streaming transcription API reference + cactus_render_prompt docs.
CONTRIBUTING.md Updates testing guidance wording.
cactus-engine/tests/transcribe.cpp Expands transcribe tool: file transcription + live mic streaming via SDL2.
cactus-engine/tests/test_stream.cpp Adds streaming transcription test coverage and edge-case tests.
cactus-engine/tests/CMakeLists.txt Links SDL2 into transcribe test tool when available.
cactus-engine/src/transcribe.cpp Adds Whisper language option handling via prompt token substitution.
cactus-engine/src/stream.cpp Implements streaming transcription session logic (VAD + incremental commit).
cactus-engine/CMakeLists.txt Adds src/stream.cpp to engine build.
cactus-engine/cactus_engine.h Declares cactus_stream_transcribe_* FFI and stream handle type.
blog/parakeet.md Updates examples/imports for new bundle resolution and binding snippets.
blog/lfm2_24b_a2b.md Updates setup and Python example usage (dict return from bindings).
blog/hybrid_transcription.md Updates “See Also” to include streaming transcription API.
bindings/swift/README.md Adds Swift example for streaming transcription FFI usage.
bindings/rust/README.md Adds Rust example for streaming transcription FFI usage.
bindings/rust/cactus.rs Adds Rust FFI declarations/types for streaming transcription.
bindings/react-native/README.md Adds React Native streaming transcription usage docs.
bindings/react-native/index.ts Extends native module interface with streaming transcription methods.
bindings/react-native/apple/Cactus.swift Implements iOS React Native bridge methods for stream start/process/stop.
bindings/react-native/apple/Cactus.m Exposes React Native iOS bridge methods for streaming transcription.
bindings/react-native/android/CactusModule.kt Implements Android React Native bridge methods for stream start/process/stop.
bindings/python/README.md Updates Python binding library load paths documentation.
bindings/kotlin/README.md Adds Kotlin usage docs for streaming transcription.
bindings/kotlin/Cactus.kt Adds JNI extern declarations for streaming transcription.
bindings/kotlin/Cactus.ios.kt Adds iOS KMP implementations for streaming transcription calls.
bindings/kotlin/Cactus.common.kt Adds KMP expect declarations for streaming transcription APIs.
bindings/kotlin/Cactus.android.kt Adds Android actual implementations for streaming transcription calls.
bindings/flutter/README.md Adds Flutter streaming transcription usage docs and required imports.
bindings/flutter/cactus.dart Adds Dart FFI bindings for streaming transcription functions/types.
android/cactus_jni.cpp Adds Android JNI wrappers for streaming transcription start/process/stop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +15 to +17
static const char* g_transcription_model_path = std::getenv("CACTUS_TEST_TRANSCRIPTION_MODEL");
static const char* g_assets_path = std::getenv("CACTUS_TEST_ASSETS");

Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +96 to +99
if (!g_transcription_model_path) {
std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n";
return true;
}
Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +145 to +148
if (!g_transcription_model_path) {
std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n";
return true;
}
Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +229 to +232
if (!g_transcription_model_path) {
std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n";
return true;
}
Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +321 to +324
if (!g_transcription_model_path) {
std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n";
return true;
}
Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +448 to +451
if (!g_transcription_model_path) {
std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n";
return true;
}
Comment thread cactus-engine/tests/test_stream.cpp Outdated
Comment on lines +497 to +500
if (!g_transcription_model_path) {
std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n";
return true;
}
Comment thread docs/cactus_graph.md Resolved
Comment on lines +18 to +23
#ifdef HAVE_SDL2
#include <SDL.h>
#include <SDL_audio.h>
#include <sys/ioctl.h>
#include <unistd.h>
#endif
Comment thread cactus-engine/tests/transcribe.cpp Outdated
Comment on lines +223 to +227
size_t terminal_width() {
struct winsize w;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) == -1 || w.ws_col < 20) return 80;
return w.ws_col;
}
@jakmro
jakmro marked this pull request as draft June 16, 2026 12:51
jakmro and others added 6 commits June 16, 2026 19:06
…eamline confirmed text handling

Signed-off-by: jakmro <kubamroz124@gmail.com>
Signed-off-by: jakmro <kubamroz124@gmail.com>
@jakmro
jakmro marked this pull request as ready for review June 17, 2026 15:10
@HenryNdubuaku
HenryNdubuaku merged commit da5649f into main Jun 17, 2026
3 of 5 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.

3 participants