Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(voice): remove unused server lifecycle and overlay STT handlers

Steven Enamakelfbd080607a39
diff --git a/crates/openhuman-core/src/voice/schemas/handlers.rs b/crates/openhuman-core/src/voice/schemas/handlers.rs
index ed0df19d5e..e5f5b3da4d 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers.rs
@@ -2,14 +2,13 @@
//!
//! Handlers are split into two sub-modules by concern:
//! - `transcribe_tts`: transcription, synthesis, and factory-dispatch handlers
-//! - `provider_server`: provider settings, model listing, testing, and server lifecycle
+//! - `provider_server`: provider settings, model listing, and testing
mod provider_server;
mod transcribe_tts;
pub(super) use provider_server::{
- handle_overlay_stt_notify, handle_voice_list_models, handle_voice_server_start,
- handle_voice_server_status, handle_voice_server_stop, handle_voice_set_providers,
+ handle_voice_list_models, handle_voice_set_providers,
handle_voice_test_provider, handle_voice_update_provider_settings,
};
pub(super) use transcribe_tts::{
diff --git a/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs b/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
index 41bca07ded..3d11875ce1 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
@@ -1,4 +1,4 @@
-//! Handlers for provider settings, model listing, provider testing, and server lifecycle.
+//! Handlers for provider settings, model listing, and provider testing.
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
@@ -10,8 +10,8 @@ use crate::voice::schemas::helpers::{
validate_tts_provider,
};
use crate::voice::schemas::params::{
- OverlaySttNotifyParams, OverlaySttState, SetProvidersParams, VoiceListModelsParams,
- VoiceTestProviderParams, VoiceUpdateProviderSettingsParams,
+ SetProvidersParams, VoiceListModelsParams, VoiceTestProviderParams,
+ VoiceUpdateProviderSettingsParams,
};
// ---------------------------------------------------------------------------
@@ -419,10 +419,6 @@ pub(crate) fn handle_voice_test_provider(
})
}
-// ---------------------------------------------------------------------------
-// Voice server lifecycle handlers
-// ---------------------------------------------------------------------------
-
pub(crate) fn handle_voice_server_start(
ctx: DispatchCtx,
params: Map<String, Value>,
diff --git a/crates/openhuman-core/src/voice/schemas/params.rs b/crates/openhuman-core/src/voice/schemas/params.rs
index a961a0ae77..2a0e117a87 100644
--- a/crates/openhuman-core/src/voice/schemas/params.rs
+++ b/crates/openhuman-core/src/voice/schemas/params.rs
@@ -167,21 +167,3 @@ impl std::fmt::Debug for VoiceTestProviderParams {
.finish()
}
}
-
-#[derive(Debug, Deserialize)]
-#[serde(rename_all = "snake_case")]
-pub(super) enum OverlaySttState {
- RecordingStarted,
- TranscriptionDone,
- Cancelled,
- Error,
-}
-
-#[derive(Debug, Deserialize)]
-pub(super) struct OverlaySttNotifyParams {
- /// Voice state transition.
- pub(super) state: OverlaySttState,
- /// Transcribed text (required when state is "transcription_done").
- #[serde(default)]
- pub(super) text: Option<String>,
-}
diff --git a/crates/openhuman-core/src/voice/schemas/registry.rs b/crates/openhuman-core/src/voice/schemas/registry.rs
index 5e4fe0090f..d0f33fbd70 100644
--- a/crates/openhuman-core/src/voice/schemas/registry.rs
+++ b/crates/openhuman-core/src/voice/schemas/registry.rs
@@ -4,8 +4,7 @@ use crate::core::all::RegisteredController;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
use super::handlers::{
- handle_overlay_stt_notify, handle_voice_list_models, handle_voice_reply_synthesize,
- handle_voice_server_start, handle_voice_server_status, handle_voice_server_stop,
+ handle_voice_list_models, handle_voice_reply_synthesize,
handle_voice_set_providers, handle_voice_status, handle_voice_stt_dispatch,
handle_voice_test_provider, handle_voice_transcribe, handle_voice_transcribe_bytes,
handle_voice_tts, handle_voice_tts_dispatch, handle_voice_update_provider_settings,
@@ -25,10 +24,6 @@ pub fn all_voice_controller_schemas() -> Vec<ControllerSchema> {
voice_schemas("voice_update_provider_settings"),
voice_schemas("voice_list_models"),
voice_schemas("voice_test_provider"),
- voice_schemas("voice_server_start"),
- voice_schemas("voice_server_stop"),
- voice_schemas("voice_server_status"),
- voice_schemas("overlay_stt_notify"),
]
.into_iter()
.chain(crate::voice::live::live_controller_schemas())
@@ -81,22 +76,6 @@ pub fn all_voice_registered_controllers() -> Vec<RegisteredController> {
schema: voice_schemas("voice_test_provider"),
handler: handle_voice_test_provider,
},
- RegisteredController {
- schema: voice_schemas("voice_server_start"),
- handler: handle_voice_server_start,
- },
- RegisteredController {
- schema: voice_schemas("voice_server_stop"),
- handler: handle_voice_server_stop,
- },
- RegisteredController {
- schema: voice_schemas("voice_server_status"),
- handler: handle_voice_server_status,
- },
- RegisteredController {
- schema: voice_schemas("overlay_stt_notify"),
- handler: handle_overlay_stt_notify,
- },
]
.into_iter()
.chain(crate::voice::live::live_registered_controllers())
@@ -333,52 +312,6 @@ pub fn voice_schemas(function: &str) -> ControllerSchema {
"{ ok: bool, detail: string, latency_ms?: number }",
)],
},
- "voice_server_start" => ControllerSchema {
- namespace: "voice",
- function: "server_start",
- description:
- "Start the voice dictation server (hotkey → record → transcribe → insert text).",
- inputs: vec![
- optional_string("hotkey", "Hotkey combination (default: Fn)."),
- optional_string(
- "activation_mode",
- "Activation mode: tap or push (default: push).",
- ),
- optional_bool("skip_cleanup", "Skip LLM post-processing."),
- ],
- outputs: vec![json_output("status", "Voice server status after start.")],
- },
- "voice_server_stop" => ControllerSchema {
- namespace: "voice",
- function: "server_stop",
- description: "Stop the voice dictation server.",
- inputs: vec![],
- outputs: vec![json_output("status", "Voice server status after stop.")],
- },
- "voice_server_status" => ControllerSchema {
- namespace: "voice",
- function: "server_status",
- description: "Get the current voice dictation server status.",
- inputs: vec![],
- outputs: vec![json_output("status", "Current voice server status.")],
- },
- "overlay_stt_notify" => ControllerSchema {
- namespace: "voice",
- function: "overlay_stt_notify",
- description:
- "Notify the overlay of a voice/STT state change from the chat prompt button.",
- inputs: vec![
- required_string(
- "state",
- "State transition: recording_started, transcription_done, cancelled, error.",
- ),
- optional_string(
- "text",
- "Transcribed text (when state is transcription_done).",
- ),
- ],
- outputs: vec![json_output("result", "Notification acknowledgement.")],
- },
_ => ControllerSchema {
namespace: "voice",
function: "unknown",