Repository navigation
Stt streaming - #730
Merged
Merged
Stt streaming#730
Conversation
…onfidence threshold in response JSON Signed-off-by: jakmro <kubamroz124@gmail.com>
Contributor
There was a problem hiding this comment.
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 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 on lines
+96
to
+99
| if (!g_transcription_model_path) { | ||
| std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n"; | ||
| return true; | ||
| } |
Comment on lines
+145
to
+148
| if (!g_transcription_model_path) { | ||
| std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n"; | ||
| return true; | ||
| } |
Comment on lines
+229
to
+232
| if (!g_transcription_model_path) { | ||
| std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n"; | ||
| return true; | ||
| } |
Comment on lines
+321
to
+324
| if (!g_transcription_model_path) { | ||
| std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n"; | ||
| return true; | ||
| } |
Comment on lines
+448
to
+451
| if (!g_transcription_model_path) { | ||
| std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n"; | ||
| return true; | ||
| } |
Comment on lines
+497
to
+500
| if (!g_transcription_model_path) { | ||
| std::cout << "⊘ SKIP │ CACTUS_TEST_TRANSCRIPTION_MODEL not set\n"; | ||
| return true; | ||
| } |
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 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; | ||
| } |
…e testing adjustments
jakmro
marked this pull request as draft
June 16, 2026 12:51
…eamline confirmed text handling Signed-off-by: jakmro <kubamroz124@gmail.com>
jakmro
marked this pull request as ready for review
June 17, 2026 15:10
…ription functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.