Repository navigation
refactor(inference): adopt native voice runtime helpers - #604
Merged
senamakel merged 9 commits intoOct 21, 2026
Merged
Conversation
…service Status snapshots now come from the service with the configured provider applied, and readiness is handled by ensure_ready instead of an inline state check. Raw audio transcription passes bytes straight to the service rather than round-tripping through a temporary file. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Speech transcription now accepts raw audio bytes alongside the existing file-path entry point, sharing a common provider adapter so both routes dispatch through the configured STT provider. The piper TTS invocation was also reworked to use the shared process helper. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a capturing STT provider and a test asserting that the native transcription helpers forward audio bytes, mime type, and file name to the host provider, including normalization of an uppercase mime type and a default file name for buffer input. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Shortened the provider-overlay comment in the local AI status snapshot to state the behaviour without the stale-cache history, and dropped the audio byte count from the STT completion log since the metadata read only fed that message. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The configured STT provider now holds a factory closure instead of a pre-built provider, so the provider is constructed lazily when a transcription is actually requested. This avoids building the provider during dispatch setup and keeps construction errors scoped to the call that needs it. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduced a type alias for the boxed provider factory closure used by ConfiguredSttProvider, replacing the inline trait object type. This keeps the struct definition readable and gives the factory signature a single place to change. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted the speech service and runtime ops to match rustfmt output, including import ordering, line wrapping, and function signature layout. No behaviour change. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Transcription failures from the voice layer were surfaced with the internal `[voice-stt]` prefix and without the audio path, making them hard to attribute. Errors for unreadable or empty audio files are now rewritten to include the host path, and a test covers the mapping. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted the transcribe_file call chain so the await and error mapping wrap onto their own lines. No behaviour change. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
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.
Adopt TinyInference's native voice runtime helpers for local-AI readiness/status, file and byte transcription, and Piper synthesis while keeping OpenHuman's STT provider selection, credentials, prompt guard, inference gate, and TTS output-path security checks in the host.
The STT adapter constructs the configured host provider lazily so native audio validation preserves the existing error precedence. It also retains OpenHuman's path-bearing missing/empty-file error messages while leaving provider errors untouched.
Validation on source
6bbc9a73426b25e13ac697e6fe13f06408f5873b:cargo fmt --all -- --check— passcargo check --manifest-path Cargo.toml— passcargo check --manifest-path crates/openhuman-app/Cargo.toml— passpnpm rust:layoutstill reports six existing over-limit files on the epic base; none are changed by this PR.