Skip to content

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

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

Steven Enamakel9dc2e21f2004
diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rs
index e7680c77eb..f95274c98f 100644
--- a/crates/openhuman-core/src/config/mod.rs
+++ b/crates/openhuman-core/src/config/mod.rs
@@ -61,7 +61,7 @@ pub use schema::{
SearchConfig, SearchEngineCredentials, SearchHostCredential, SearchProviderSettings,
SearxngConfig, SecretsConfig, SecurityConfig, ShellConfig, SlackConfig, StreamMode, SttEngine,
TeamModelConfig, TelegramConfig, TokenjuiceConfig, UnknownKeyedSearchProvider, UpdateConfig,
- UpdateRestartStrategy, VoiceActivationMode, VoiceServerConfig, WebSearchConfig, WebhookConfig,
+ UpdateRestartStrategy, VoiceServerConfig, WebSearchConfig, WebhookConfig,
YuanbaoConfig, DEFAULT_MODEL, LEGACY_TIER_MODELS, MANAGED_MULTIMODAL_MODELS,
MANAGED_SEARCH_PROVIDERS, MODEL_IMAGE_GENERATION_AGENT, MODEL_MANAGED_DEFAULT,
MODEL_MEDIA_UNDERSTANDING, MODEL_VIDEO_GENERATION_AGENT, SEARCH_ENGINE_BRAVE,
diff --git a/crates/openhuman-core/src/config/schema/dictation.rs b/crates/openhuman-core/src/config/schema/dictation.rs
deleted file mode 100644
index 8ce43230b7..0000000000
--- a/crates/openhuman-core/src/config/schema/dictation.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-//! Voice dictation configuration.
-
-use schemars::JsonSchema;
-use serde::{Deserialize, Serialize};
-
-/// Activation mode for the dictation hotkey.
-#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
-#[serde(rename_all = "lowercase")]
-#[derive(Default)]
-pub enum DictationActivationMode {
- /// Press once to start, press again to stop.
- Toggle,
- /// Hold to record, release to stop (push-to-talk).
- #[default]
- Push,
-}
-
-#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
-#[serde(default)]
-pub struct DictationConfig {
- /// Whether voice dictation is enabled.
- #[serde(default = "default_enabled")]
- pub enabled: bool,
-
- /// Global hotkey for activating dictation (e.g. "Fn").
- #[serde(default = "default_hotkey")]
- pub hotkey: String,
-
- /// Activation mode: "toggle" (press to start/stop) or "push" (hold to record).
- #[serde(default)]
- pub activation_mode: DictationActivationMode,
-
- /// Whether to refine raw transcription through a local LLM for grammar/punctuation.
- #[serde(default = "default_llm_refinement")]
- pub llm_refinement: bool,
-
- /// Whether to use WebSocket streaming transcription (chunks sent in real-time)
- /// instead of batch transcription after recording stops.
- #[serde(default = "default_streaming")]
- pub streaming: bool,
-
- /// Interval in milliseconds between streaming inference passes on accumulated audio.
- #[serde(default = "default_streaming_interval_ms")]
- pub streaming_interval_ms: u64,
-}
-
-fn default_enabled() -> bool {
- false
-}
-
-fn default_hotkey() -> String {
- "Fn".to_string()
-}
-
-fn default_llm_refinement() -> bool {
- true
-}
-
-fn default_streaming() -> bool {
- true
-}
-
-fn default_streaming_interval_ms() -> u64 {
- 2000
-}
-
-impl Default for DictationConfig {
- fn default() -> Self {
- Self {
- enabled: default_enabled(),
- hotkey: default_hotkey(),
- activation_mode: DictationActivationMode::default(),
- llm_refinement: default_llm_refinement(),
- streaming: default_streaming(),
- streaming_interval_ms: default_streaming_interval_ms(),
- }
- }
-}
diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay.rs b/crates/openhuman-core/src/config/schema/load/env_overlay.rs
index 97f93ebc1f..cd4d8b94f7 100644
--- a/crates/openhuman-core/src/config/schema/load/env_overlay.rs
+++ b/crates/openhuman-core/src/config/schema/load/env_overlay.rs
@@ -4,7 +4,7 @@
//! config section's overrides live in a submodule below.
mod components;
-mod dictation_context;
+mod context;
mod embeddings;
mod modules;
mod observability;
@@ -252,7 +252,6 @@ impl Config {
self.apply_update_env(env);
self.apply_modules_env(env);
self.apply_components_env(env);
- self.apply_dictation_env(env);
self.apply_context_env(env);
// Not an env override: the one load step every config passes through,
diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/context.rs
similarity index 64%
rename from crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rs
rename to crates/openhuman-core/src/config/schema/load/env_overlay/context.rs
index a20260b7ab..648869190f 100644
--- a/crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rs
+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/context.rs
@@ -1,64 +1,9 @@
-//! Env overrides for dictation and the context-management budget.
+//! Env overrides for the context-management budget.
use crate::config::schema::load::env::EnvLookup;
use crate::config::schema::Config;
impl Config {
- pub(super) fn apply_dictation_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {
- if let Some(flag) = env.get("OPENHUMAN_DICTATION_ENABLED") {
- let normalized = flag.trim().to_ascii_lowercase();
- match normalized.as_str() {
- "1" | "true" | "yes" | "on" => self.dictation.enabled = true,
- "0" | "false" | "no" | "off" => self.dictation.enabled = false,
- _ => {}
- }
- }
- if let Some(hotkey) = env.get("OPENHUMAN_DICTATION_HOTKEY") {
- let hotkey = hotkey.trim();
- if !hotkey.is_empty() {
- self.dictation.hotkey = hotkey.to_string();
- }
- }
- if let Some(mode) = env.get("OPENHUMAN_DICTATION_ACTIVATION_MODE") {
- let normalized = mode.trim().to_ascii_lowercase();
- match normalized.as_str() {
- "toggle" => {
- self.dictation.activation_mode = crate::config::DictationActivationMode::Toggle
- }
- "push" => {
- self.dictation.activation_mode = crate::config::DictationActivationMode::Push
- }
- _ => {
- tracing::warn!(
- mode = %mode,
- "ignoring invalid OPENHUMAN_DICTATION_ACTIVATION_MODE (valid: toggle, push)"
- );
- }
- }
- }
- if let Some(flag) = env.get("OPENHUMAN_DICTATION_LLM_REFINEMENT") {
- let normalized = flag.trim().to_ascii_lowercase();
- match normalized.as_str() {
- "1" | "true" | "yes" | "on" => self.dictation.llm_refinement = true,
- "0" | "false" | "no" | "off" => self.dictation.llm_refinement = false,
- _ => {}
- }
- }
- if let Some(flag) = env.get("OPENHUMAN_DICTATION_STREAMING") {
- let normalized = flag.trim().to_ascii_lowercase();
- match normalized.as_str() {
- "1" | "true" | "yes" | "on" => self.dictation.streaming = true,
- "0" | "false" | "no" | "off" => self.dictation.streaming = false,
- _ => {}
- }
- }
- if let Some(val) = env.get("OPENHUMAN_DICTATION_STREAMING_INTERVAL_MS") {
- if let Ok(ms) = val.trim().parse::<u64>() {
- self.dictation.streaming_interval_ms = ms;
- }
- }
- }
-
pub(super) fn apply_context_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {
if let Some(flag) = env.get("OPENHUMAN_CONTEXT_ENABLED") {
let normalized = flag.trim().to_ascii_lowercase();
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 60cab1af0a..1b9aff7ff7 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -23,7 +23,6 @@ mod dashboard;
mod desktop;
pub use desktop::DesktopConfig;
mod defaults;
-mod dictation;
mod hooks;
pub use hooks::HooksConfig;
pub mod components;
@@ -93,7 +92,6 @@ pub(crate) use cli_overrides::set_cli_inference_overrides;
pub use context::{CompactionSettings, CompactionStrategy, ContextConfig};
pub use cron::CronConfig;
pub use dashboard::{DashboardConfig, DiagramViewerConfig, EventStreamConfig, ModelHealthConfig};
-pub use dictation::{DictationActivationMode, DictationConfig};
pub use identity_cost::{
BudgetAction, BudgetPeriod, BudgetPolicy, BudgetScope, CostConfig, ModelPricing,
};
@@ -138,7 +136,7 @@ pub use tools::{
pub use update::{UpdateConfig, UpdateRestartStrategy};
pub use web_chat_config::WebChatConfig;
mod voice_server;
-pub use voice_server::{SttEngine, VoiceActivationMode, VoiceServerConfig};
+pub use voice_server::{SttEngine, VoiceServerConfig};
pub mod voice_live;
pub mod voice_providers;
pub use voice_live::LiveVoiceConfig;
diff --git a/crates/openhuman-core/src/config/schema/types/config.rs b/crates/openhuman-core/src/config/schema/types/config.rs
index 6164681f1c..9bf5bb721e 100644
--- a/crates/openhuman-core/src/config/schema/types/config.rs
+++ b/crates/openhuman-core/src/config/schema/types/config.rs
@@ -490,7 +490,6 @@ pub struct Config {
pub update: UpdateConfig,
#[serde(default)]
- pub dictation: DictationConfig,
/// Whether the user has completed the **React UI** onboarding flow.
///
diff --git a/crates/openhuman-core/src/config/schema/types/config_clone.rs b/crates/openhuman-core/src/config/schema/types/config_clone.rs
index 3c4cd44ea3..f09a5597ba 100644
--- a/crates/openhuman-core/src/config/schema/types/config_clone.rs
+++ b/crates/openhuman-core/src/config/schema/types/config_clone.rs
@@ -102,7 +102,6 @@ impl Clone for Config {
tts_provider: self.tts_provider.clone(),
integrations: self.integrations.clone(),
update: self.update.clone(),
- dictation: self.dictation.clone(),
onboarding_completed: self.onboarding_completed,
chat_onboarding_completed: self.chat_onboarding_completed,
model_registry: self.model_registry.clone(),
diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rs
index 2be9b50145..ba3c253fbd 100644
--- a/crates/openhuman-core/src/config/schema/types/defaults.rs
+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs
@@ -115,7 +115,6 @@ impl Default for Config {
tts_provider: None,
integrations: IntegrationsConfig::default(),
update: UpdateConfig::default(),
- dictation: DictationConfig::default(),
onboarding_completed: false,
chat_onboarding_completed: false,
model_registry: Vec::new(),
diff --git a/crates/openhuman-core/src/config/schema/voice_server.rs b/crates/openhuman-core/src/config/schema/voice_server.rs
index 421942e098..52092a8793 100644
--- a/crates/openhuman-core/src/config/schema/voice_server.rs
+++ b/crates/openhuman-core/src/config/schema/voice_server.rs
@@ -3,18 +3,6 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
-/// Activation mode for the voice server hotkey.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
-#[serde(rename_all = "snake_case")]
-#[derive(Default)]
-pub enum VoiceActivationMode {
- /// Single press toggles recording on/off.
- Tap,
- /// Hold to record, release to stop.
- #[default]
- Push,
-}
-
/// Which speech-to-text engine transcribes audio.
///
/// Replaces the removed local whisper.cpp engine: STT is a hosted round trip
@@ -75,74 +63,22 @@ impl SttEngine {
}
}
-/// Configuration for the voice dictation server.
+/// Persisted STT routing fallback for voice providers.
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(default)]
pub struct VoiceServerConfig {
- /// Whether the voice server should start automatically with the core.
- #[serde(default)]
- pub auto_start: bool,
-
- /// Hotkey combination to trigger recording (e.g. "Fn").
- #[serde(default = "default_hotkey")]
- pub hotkey: String,
-
- /// Activation mode: "tap" (toggle) or "push" (hold-to-record).
- #[serde(default)]
- pub activation_mode: VoiceActivationMode,
-
/// Which hosted engine transcribes audio. See [`SttEngine`]. An explicit
/// `stt_provider` routing string (top-level or legacy `local_ai`) still
/// wins — this field is what the `"cloud"`/unset case resolves to.
#[serde(default)]
pub stt_engine: SttEngine,
- /// Skip LLM post-processing for transcriptions.
- /// Default: false (cleanup enabled — matches OpenWhispr behavior).
- #[serde(default)]
- pub skip_cleanup: bool,
-
- /// Minimum recording duration in seconds. Recordings shorter than
- /// this are discarded.
- #[serde(default = "default_min_duration")]
- pub min_duration_secs: f32,
-
- /// RMS energy threshold for silence detection. Recordings with peak
- /// energy below this value are treated as silence and skipped without
- /// reaching the STT engine, preventing hallucinated output.
- #[serde(default = "default_silence_threshold")]
- pub silence_threshold: f32,
-
- /// Custom dictionary words to bias the STT engine toward. Passed as the
- /// engine's `initial_prompt`-equivalent where one exists, improving
- /// recognition of names, technical terms, and domain-specific vocabulary.
- #[serde(default)]
- pub custom_dictionary: Vec<String>,
-}
-
-fn default_hotkey() -> String {
- "Fn".to_string()
-}
-
-fn default_min_duration() -> f32 {
- 0.3
-}
-
-fn default_silence_threshold() -> f32 {
- 0.002
}
impl Default for VoiceServerConfig {
fn default() -> Self {
Self {
- auto_start: false,
- hotkey: default_hotkey(),
- activation_mode: VoiceActivationMode::default(),
stt_engine: SttEngine::default(),
- skip_cleanup: false,
- min_duration_secs: default_min_duration(),
- silence_threshold: default_silence_threshold(),
- custom_dictionary: Vec::new(),
}
}
}