The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(voice): migrate reply types to tinyinference_voice
Steven Enamakel162c596a704c
diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lockindex 82ec611e45..c5bbfb72a0 100644--- a/crates/openhuman-app/Cargo.lock+++ b/crates/openhuman-app/Cargo.lock@@ -7623,6 +7623,7 @@ version = "0.3.0"dependencies = ["base64 0.23.1","reqwest 0.12.28",+ "schemars 1.2.2","serde","serde_json","tinyinference-core",diff --git a/crates/openhuman-core/src/voice/README.md b/crates/openhuman-core/src/voice/README.mdindex 07b8613a88..cfafd1ab86 100644--- a/crates/openhuman-core/src/voice/README.md+++ b/crates/openhuman-core/src/voice/README.md@@ -49,7 +49,7 @@ Keeping the two surfaces in lockstep is enforced by the disabled-build check| `audio_toolkit/` | Podcast generation + email delivery (`audio_toolkit` RPC namespace), gated by the same `voice` feature. See its own [README](audio_toolkit/README.md). || `text_input.rs` | Clipboard-paste text insertion (`insert_text`): writes clipboard then simulates Cmd/Ctrl+V via enigo, restoring prior clipboard. || `dictation_listener.rs` | Core-side dictation broadcast bus: `DictationEvent`, `publish_dictation_event` / `subscribe_dictation_events`, `publish_transcription` / `subscribe_transcription_results`, rdev listener lifecycle (`start_if_enabled` / `stop`), `normalize_hotkey_for_rdev`. |-| `reply_speech.rs` | Agent reply synthesis via backend `/openai/v1/audio/speech`; `ReplySpeechResult`, `VisemeFrame`, `AlignmentFrame`, `ReplySpeechOptions`, `synthesize_reply`, tolerant response normalization. |+| `reply_speech.rs` | Agent reply synthesis via backend `/openai/v1/audio/speech`; `ReplySpeechOptions`, `synthesize_reply`; the response types (`ReplySpeech`, `VisemeFrame`, `AlignmentFrame`) and tolerant response normalization live in `tinyinference_voice::reply`. || `realtime.rs` | Mints a short-lived signed WebSocket URL from the backend's `/voice-agent/get-signed-url` so the desktop client can open an ElevenLabs Agents session directly (#5399); the provider API key never leaves the server. || `realtime_harness.rs` (+ `realtime_harness/turn_handler.rs`, `realtime_harness/chat_delivery.rs`, `realtime_harness/agent.rs`, `realtime_harness/prompt.rs`) | `voice:harness` socket turn handler for realtime sessions: runs the local orchestrator agent (same brain as chat/meet) on each turn the backend relays from the ElevenLabs Custom-LLM proxy, streaming `voice:harness:delta` / `:done` / `:error` back. || `stub.rs` | Disabled-voice facade compiled when `voice` is OFF; mirrors the real public surface with no-op / error bodies. |diff --git a/crates/openhuman-core/src/voice/factory/traits.rs b/crates/openhuman-core/src/voice/factory/traits.rsindex e27e324652..733d464db2 100644--- a/crates/openhuman-core/src/voice/factory/traits.rs+++ b/crates/openhuman-core/src/voice/factory/traits.rs@@ -3,9 +3,9 @@use async_trait::async_trait;use serde::{Deserialize, Serialize};-use super::super::reply_speech::ReplySpeechResult;use crate::config::Config;use crate::core::Outcome;+use tinyinference_voice::reply::ReplySpeech as ReplySpeechResult;// ---------------------------------------------------------------------------// Shared result typediff --git a/crates/openhuman-core/src/voice/factory/tts_providers.rs b/crates/openhuman-core/src/voice/factory/tts_providers.rsindex 7da204262c..3b7d443dd8 100644--- a/crates/openhuman-core/src/voice/factory/tts_providers.rs+++ b/crates/openhuman-core/src/voice/factory/tts_providers.rs@@ -4,12 +4,13 @@ use async_trait::async_trait;use log::debug;use super::super::local_speech::{synthesize_piper, PiperOptions};-use super::super::reply_speech::{synthesize_reply, ReplySpeechOptions, ReplySpeechResult};+use super::super::reply_speech::{synthesize_reply, ReplySpeechOptions};use super::traits::TtsProvider;use crate::config::schema::voice_providers::TtsApiStyle;use crate::config::Config;use crate::core::Outcome;use tinyinference_voice::external_tts::ExternalTtsClient;+use tinyinference_voice::reply::ReplySpeech as ReplySpeechResult;const LOG_PREFIX: &str = "[voice-factory]";diff --git a/crates/openhuman-core/src/voice/local_speech.rs b/crates/openhuman-core/src/voice/local_speech.rsindex 7ecd179af3..6ce7e3117b 100644--- a/crates/openhuman-core/src/voice/local_speech.rs+++ b/crates/openhuman-core/src/voice/local_speech.rs@@ -2,9 +2,10 @@use crate::config::Config;use crate::core::Outcome;-use crate::voice::reply_speech::{ReplySpeechResult, VisemeFrame};#[cfg(test)]use tinyinference_voice::piper::synthetic_viseme_timeline;+use tinyinference_voice::reply::ReplySpeech as ReplySpeechResult;+use tinyinference_voice::VisemeFrame;/// Default Piper voice id.pub const DEFAULT_PIPER_VOICE: &str = "en_US-lessac-medium";diff --git a/crates/openhuman-core/src/voice/reply_speech.rs b/crates/openhuman-core/src/voice/reply_speech.rsindex 0e879ff3e7..f9d640066a 100644--- a/crates/openhuman-core/src/voice/reply_speech.rs+++ b/crates/openhuman-core/src/voice/reply_speech.rs@@ -72,10 +72,7 @@ pub mod test_seam {// The response types and the tolerant-shape parsers live in// `tinyinference_voice::reply`; the UI contract is unchanged.-pub use tinyinference_voice::reply::{- normalize_response, AlignmentFrame, ReplySpeech as ReplySpeechResult,-};-pub use tinyinference_voice::VisemeFrame;+use tinyinference_voice::reply::{normalize_response, ReplySpeech as ReplySpeechResult};/// Caller-tunable knobs.#[derive(Debug, Default, Clone)]