Skip to content

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

chore(channels): drop voice feature from native session restart test

Steven Enamakel031f47e317fd
diff --git a/crates/openhuman-cli/Cargo.toml b/crates/openhuman-cli/Cargo.toml
index 4211377277..9aaf12f6bb 100644
--- a/crates/openhuman-cli/Cargo.toml
+++ b/crates/openhuman-cli/Cargo.toml
@@ -145,7 +145,7 @@ path = "../../tests/storage_scope_e2e.rs"
name = "native_channel_session_restart_e2e"
path = "../../tests/native_channel_session_restart_e2e.rs"
# Boots the CLI's real native Telegram listener via a compiled TinyBus artifact.
-required-features = ["modules", "inference", "channels", "storage-sqlite", "voice"]
+required-features = ["modules", "inference", "channels", "storage-sqlite"]
[[test]]
# Its own binary: two agents on one backend keep cron jobs and flows apart.
diff --git a/crates/openhuman-core/src/channels/runtime/startup/callback.rs b/crates/openhuman-core/src/channels/runtime/startup/callback.rs
index f042fada71..179583abcd 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/callback.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/callback.rs
@@ -247,9 +247,7 @@ impl ChannelHostCallbacks {
&self,
request: tinychannels_bus::HostStoreVoiceMediaRequest,
) -> Result<tinychannels_bus::HostStoreVoiceMediaResult> {
- if serde_json::to_vec(&request)
- .map_or(true, |bytes| bytes.len() > MAX_VOICE_MEDIA_BYTES)
- {
+ if serde_json::to_vec(&request).map_or(true, |bytes| bytes.len() > MAX_VOICE_MEDIA_BYTES) {
return Err(Error::failed("voice media callback exceeds its limit"));
}
let decoded = base64::Engine::decode(
@@ -262,8 +260,7 @@ impl ChannelHostCallbacks {
}
let scope = &request.scope;
let context = self.context()?;
- let Some(channel) = context.channels_by_name.get(&scope.configured_instance)
- else {
+ let Some(channel) = context.channels_by_name.get(&scope.configured_instance) else {
return Err(Error::failed("voice media account is not configured"));
};
if scope.configured_instance.trim().is_empty()
diff --git a/tests/native_channel_session_restart_e2e.rs b/tests/native_channel_session_restart_e2e.rs
index 53dbc0374c..b8c9decc88 100644
--- a/tests/native_channel_session_restart_e2e.rs
+++ b/tests/native_channel_session_restart_e2e.rs
@@ -212,9 +212,9 @@ async fn synthesize_voice(
);
let audio = base64::Engine::encode(
&base64::engine::general_purpose::STANDARD,
- include_bytes!("../vendor/tinychannels/src/providers/telegram/fixtures/sine-ogg-opus.ogg"),
+ include_bytes!("../vendor/tinyvoice/crates/tinyvoice/tests/fixtures/voice-envelope.wav"),
);
- Json(json!({ "audio_base64": audio, "audio_mime": "audio/ogg" }))
+ Json(json!({ "audio_base64": audio, "audio_mime": "audio/wav" }))
}
async fn chat_completion(State(state): State<Arc<MockState>>, Json(body): Json<Value>) -> Response {
@@ -805,8 +805,7 @@ async fn telegram_voice_note_runs_scoped_stt_agent_and_mirror_tts_through_module
);
assert!(
model_saw_user_text(&requests[0], "the dictated voice request"),
- "the model receives the transcript produced by the scoped cloud STT callback; mock request={:?}, file requests={:?}, transcription uploads={}",
- requests[0],
+ "the model receives the transcript produced by the scoped cloud STT callback; file requests={:?}, transcription uploads={}",
mocks.state.voice_file_requests.lock().expect("voice file requests"),
mocks.state.transcription_uploads.lock().expect("STT uploads").len()
);
@@ -866,7 +865,7 @@ async fn telegram_voice_note_runs_scoped_stt_agent_and_mirror_tts_through_module
.expect("voice uploads")[0]
.windows(4)
.any(|window| window == b"OggS"),
- "mirror mode uploads encoded Ogg audio through Telegram sendVoice"
+ "TinyVoice converts the WAV TTS response to Ogg before Telegram sendVoice"
);
core.stop();
}