Skip to content

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

refactor(config): remove voice dictation and voice server settings

Steven Enamakel3f1ee9734d64
diff --git a/crates/openhuman-core/src/config/ops/mod.rs b/crates/openhuman-core/src/config/ops/mod.rs
index cec6facc77..f708296123 100644
--- a/crates/openhuman-core/src/config/ops/mod.rs
+++ b/crates/openhuman-core/src/config/ops/mod.rs
@@ -80,7 +80,6 @@ pub use ui::{
load_and_apply_browser_settings, load_and_apply_user_timezone, set_onboarding_completed,
user_timezone_json, workspace_onboarding_flag_exists, workspace_onboarding_flag_resolve,
workspace_onboarding_flag_set, AnalyticsSettingsPatch, BrowserSettingsPatch,
- DictationSettingsPatch, VoiceServerSettingsPatch,
};
#[cfg(test)]
diff --git a/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs b/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs
index 49ea2e5a2f..36c6dd384b 100644
--- a/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs
+++ b/crates/openhuman-core/src/config/schema/load_corruption_recovery_tests.rs
@@ -18,7 +18,6 @@ fn env_overlay_empty_lookup_leaves_defaults_intact() {
cfg.default_temperature,
cfg.runtime.reasoning_enabled,
cfg.update.enabled,
- cfg.dictation.enabled,
);
cfg.apply_env_overlay_with(&HashMapEnv::new());
let after = (
@@ -26,7 +25,6 @@ fn env_overlay_empty_lookup_leaves_defaults_intact() {
cfg.default_temperature,
cfg.runtime.reasoning_enabled,
cfg.update.enabled,
- cfg.dictation.enabled,
);
assert_eq!(before, after);
}
diff --git a/crates/openhuman-core/src/config/schemas/controllers/registry.rs b/crates/openhuman-core/src/config/schemas/controllers/registry.rs
index cfcd616b35..66214f8e02 100644
--- a/crates/openhuman-core/src/config/schemas/controllers/registry.rs
+++ b/crates/openhuman-core/src/config/schemas/controllers/registry.rs
@@ -171,22 +171,6 @@ pub fn all_registered_controllers() -> Vec<RegisteredController> {
schema: schemas("set_onboarding_completed"),
handler: handle_set_onboarding_completed,
},
- RegisteredController {
- schema: schemas("get_dictation_settings"),
- handler: handle_get_dictation_settings,
- },
- RegisteredController {
- schema: schemas("update_dictation_settings"),
- handler: handle_update_dictation_settings,
- },
- RegisteredController {
- schema: schemas("get_voice_server_settings"),
- handler: handle_get_voice_server_settings,
- },
- RegisteredController {
- schema: schemas("update_voice_server_settings"),
- handler: handle_update_voice_server_settings,
- },
RegisteredController {
schema: schemas("update_composio_trigger_settings"),
handler: handle_update_composio_trigger_settings,
diff --git a/crates/openhuman-core/src/config/schemas/controllers/voice.rs b/crates/openhuman-core/src/config/schemas/controllers/voice.rs
deleted file mode 100644
index 3a963f3a16..0000000000
--- a/crates/openhuman-core/src/config/schemas/controllers/voice.rs
+++ /dev/null
@@ -1,64 +0,0 @@
-//! Handlers for voice dictation and voice-server settings.
-
-use crate::core::runtime::DispatchCtx;
-use serde_json::{Map, Value};
-
-use crate::config::rpc as config_rpc;
-use crate::core::all::ControllerFuture;
-
-use super::super::helpers::{
- deserialize_params, to_json, DictationSettingsUpdate, VoiceServerSettingsUpdate,
-};
-
-pub(super) fn handle_get_dictation_settings(
- ctx: DispatchCtx,
- _params: Map<String, Value>,
-) -> ControllerFuture {
- Box::pin(async move { to_json(config_rpc::get_dictation_settings(&ctx).await?) })
-}
-
-pub(super) fn handle_update_dictation_settings(
- ctx: DispatchCtx,
- params: Map<String, Value>,
-) -> ControllerFuture {
- Box::pin(async move {
- let update = deserialize_params::<DictationSettingsUpdate>(params)?;
- let patch = config_rpc::DictationSettingsPatch {
- enabled: update.enabled,
- hotkey: update.hotkey,
- activation_mode: update.activation_mode,
- llm_refinement: update.llm_refinement,
- streaming: update.streaming,
- streaming_interval_ms: update.streaming_interval_ms,
- };
- to_json(config_rpc::load_and_apply_dictation_settings(&ctx, patch).await?)
- })
-}
-
-pub(super) fn handle_get_voice_server_settings(
- ctx: DispatchCtx,
- _params: Map<String, Value>,
-) -> ControllerFuture {
- Box::pin(async move { to_json(config_rpc::get_voice_server_settings(&ctx).await?) })
-}
-
-pub(super) fn handle_update_voice_server_settings(
- ctx: DispatchCtx,
- params: Map<String, Value>,
-) -> ControllerFuture {
- Box::pin(async move {
- let update = deserialize_params::<VoiceServerSettingsUpdate>(params)?;
- let patch = config_rpc::VoiceServerSettingsPatch {
- auto_start: update.auto_start,
- hotkey: update.hotkey,
- activation_mode: update.activation_mode,
- skip_cleanup: update.skip_cleanup,
- min_duration_secs: update.min_duration_secs,
- silence_threshold: update.silence_threshold,
- custom_dictionary: update.custom_dictionary,
- stt_engine: update.stt_engine,
- };
- let result = config_rpc::load_and_apply_voice_server_settings(&ctx, patch).await?;
- to_json(result)
- })
-}
diff --git a/crates/openhuman-core/src/config/schemas/helpers.rs b/crates/openhuman-core/src/config/schemas/helpers.rs
index 8042d8bbda..c0753faa80 100644
--- a/crates/openhuman-core/src/config/schemas/helpers.rs
+++ b/crates/openhuman-core/src/config/schemas/helpers.rs
@@ -166,28 +166,6 @@ pub(super) struct OnboardingCompletedSetParams {
pub(super) value: bool,
}
-#[derive(Debug, Deserialize)]
-pub(super) struct DictationSettingsUpdate {
- pub(super) enabled: Option<bool>,
- pub(super) hotkey: Option<String>,
- pub(super) activation_mode: Option<String>,
- pub(super) llm_refinement: Option<bool>,
- pub(super) streaming: Option<bool>,
- pub(super) streaming_interval_ms: Option<u64>,
-}
-
-#[derive(Debug, Deserialize)]
-pub(super) struct VoiceServerSettingsUpdate {
- pub(super) auto_start: Option<bool>,
- pub(super) hotkey: Option<String>,
- pub(super) activation_mode: Option<String>,
- pub(super) skip_cleanup: Option<bool>,
- pub(super) min_duration_secs: Option<f32>,
- pub(super) silence_threshold: Option<f32>,
- pub(super) custom_dictionary: Option<Vec<String>>,
- pub(super) stt_engine: Option<String>,
-}
-
#[derive(Debug, Deserialize)]
pub(super) struct ComposioTriggerSettingsUpdate {
pub(super) triage_disabled: Option<bool>,
diff --git a/crates/openhuman-core/src/config/schemas/schema_defs/voice.rs b/crates/openhuman-core/src/config/schemas/schema_defs/voice.rs
deleted file mode 100644
index fb731d9d15..0000000000
--- a/crates/openhuman-core/src/config/schemas/schema_defs/voice.rs
+++ /dev/null
@@ -1,87 +0,0 @@
-//! Schemas for voice dictation and voice-server settings.
-
-use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
-
-use super::super::helpers::{json_output, optional_bool, optional_string};
-
-pub(super) fn lookup(function: &str) -> Option<ControllerSchema> {
- match function {
- "get_dictation_settings" => Some(ControllerSchema {
- namespace: "config",
- function: "get_dictation_settings",
- description: "Read current voice dictation settings.",
- inputs: vec![],
- outputs: vec![json_output("settings", "Dictation settings payload.")],
- }),
- "update_dictation_settings" => Some(ControllerSchema {
- namespace: "config",
- function: "update_dictation_settings",
- description: "Update voice dictation settings.",
- inputs: vec![
- optional_bool("enabled", "Enable voice dictation."),
- optional_string("hotkey", "Global hotkey string (e.g. Fn)."),
- optional_string("activation_mode", "Activation mode: toggle or push."),
- optional_bool(
- "llm_refinement",
- "Enable LLM post-processing of transcription.",
- ),
- optional_bool("streaming", "Enable WebSocket streaming transcription."),
- FieldSchema {
- name: "streaming_interval_ms",
- ty: TypeSchema::Option(Box::new(TypeSchema::U64)),
- comment: "Interval between streaming inference passes (ms).",
- required: false,
- },
- ],
- outputs: vec![json_output("snapshot", "Updated config snapshot.")],
- }),
- "get_voice_server_settings" => Some(ControllerSchema {
- namespace: "config",
- function: "get_voice_server_settings",
- description: "Read current voice server settings.",
- inputs: vec![],
- outputs: vec![json_output("settings", "Voice server settings payload.")],
- }),
- "update_voice_server_settings" => Some(ControllerSchema {
- namespace: "config",
- function: "update_voice_server_settings",
- description: "Update voice server settings.",
- inputs: vec![
- optional_bool(
- "auto_start",
- "Start the voice server automatically with the core.",
- ),
- optional_string("hotkey", "Voice server hotkey string (e.g. Fn)."),
- optional_string("activation_mode", "Activation mode: tap or push."),
- optional_bool(
- "skip_cleanup",
- "Skip LLM cleanup and keep dictation verbatim.",
- ),
- FieldSchema {
- name: "min_duration_secs",
- ty: TypeSchema::Option(Box::new(TypeSchema::F64)),
- comment: "Minimum recording duration in seconds.",
- required: false,
- },
- FieldSchema {
- name: "silence_threshold",
- ty: TypeSchema::Option(Box::new(TypeSchema::F64)),
- comment: "RMS energy threshold for silence detection.",
- required: false,
- },
- FieldSchema {
- name: "custom_dictionary",
- ty: TypeSchema::Option(Box::new(TypeSchema::Json)),
- comment: "Custom vocabulary words to bias the STT engine toward.",
- required: false,
- },
- optional_string(
- "stt_engine",
- "Hosted speech-to-text engine: backend, elevenlabs, or openai.",
- ),
- ],
- outputs: vec![json_output("snapshot", "Updated config snapshot.")],
- }),
- _ => None,
- }
-}