Skip to content

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

refactor(config): stop re-exporting API-style enums from voice_providers

Steven Enamakel31146f38e65c
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 216937f3f9..35cb99c9a9 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -135,8 +135,8 @@ mod voice_server;
pub use voice_server::{SttEngine, VoiceActivationMode, VoiceServerConfig};
pub mod voice_providers;
pub use voice_providers::{
- generate_voice_provider_id, is_voice_slug_reserved, BuiltinVoiceProvider, SttApiStyle,
- TtsApiStyle, VoiceCapability, VoiceProviderCreds, BUILTIN_VOICE_PROVIDERS,
+ generate_voice_provider_id, is_voice_slug_reserved, BuiltinVoiceProvider,
+ VoiceCapability, VoiceProviderCreds, BUILTIN_VOICE_PROVIDERS,
};
mod types;
pub use types::*;
diff --git a/crates/openhuman-core/src/config/schema/voice_providers.rs b/crates/openhuman-core/src/config/schema/voice_providers.rs
index b1df572346..6ab679a998 100644
--- a/crates/openhuman-core/src/config/schema/voice_providers.rs
+++ b/crates/openhuman-core/src/config/schema/voice_providers.rs
@@ -44,10 +44,10 @@ impl VoiceCapability {
}
}
-// The API-style enums live with the HTTP clients that dispatch on them; the
-// TOML shape (`rename_all = "lowercase"`) and JSON schema are unchanged.
-pub use tinyinference_voice::external_stt::SttApiStyle;
-pub use tinyinference_voice::external_tts::TtsApiStyle;
+// The API-style enums live with the HTTP clients that dispatch on them
+// (`tinyinference_voice::external_{stt,tts}`); the TOML shape (`rename_all = "lowercase"`) and JSON schema are unchanged.
+use tinyinference_voice::external_stt::SttApiStyle;
+use tinyinference_voice::external_tts::TtsApiStyle;
/// Endpoint config for one voice (STT/TTS) provider.
///
diff --git a/crates/openhuman-core/src/voice/factory/factory_tests.rs b/crates/openhuman-core/src/voice/factory/factory_tests.rs
index c05fb57684..b5ac66dd4c 100644
--- a/crates/openhuman-core/src/voice/factory/factory_tests.rs
+++ b/crates/openhuman-core/src/voice/factory/factory_tests.rs
@@ -5,9 +5,10 @@ use super::entry::{
resolve_tts_voice, DEFAULT_PIPER_VOICE,
};
use super::helpers::{effective_stt_provider, effective_tts_provider, split_slug_model};
-use crate::config::schema::voice_providers::{SttApiStyle, VoiceCapability};
+use crate::config::schema::voice_providers::VoiceCapability;
use crate::config::schema::SttEngine;
use crate::config::Config;
+use tinyinference_voice::external_stt::SttApiStyle;
fn cfg() -> Config {
Config::default()
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 519653efc0..191cceb8e8 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
@@ -83,9 +83,10 @@ pub(crate) fn handle_voice_update_provider_settings(
) -> ControllerFuture {
Box::pin(async move {
use crate::config::schema::voice_providers::{
- generate_voice_provider_id, is_voice_slug_reserved, SttApiStyle, TtsApiStyle,
- VoiceCapability, VoiceProviderCreds,
+ generate_voice_provider_id, is_voice_slug_reserved, VoiceCapability, VoiceProviderCreds,
};
+ use tinyinference_voice::external_stt::SttApiStyle;
+ use tinyinference_voice::external_tts::TtsApiStyle;
let p = deserialize_params::<VoiceUpdateProviderSettingsParams>(params)?;
let mut config = config_rpc::load_config_with_timeout().await?;