Skip to content

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

feat(voice): add recorder module for voice server

Steven Enamakel729bab0d223c
diff --git a/crates/openhuman-core/src/voice/server/recorder.rs b/crates/openhuman-core/src/voice/server/recorder.rs
index e7567bb5f0..5efdfb1e9f 100644
--- a/crates/openhuman-core/src/voice/server/recorder.rs
+++ b/crates/openhuman-core/src/voice/server/recorder.rs
@@ -32,7 +32,11 @@ impl Recorder {
/// Report `input`; `None` when the module could not be reached or the
/// session is gone. A failure is logged, never fatal: a stale pipeline
/// finishing after the server stopped lands here by design.
- pub(super) async fn advance(&self, config: &Config, input: SessionInput) -> Option<SessionAdvance> {
+ pub(super) async fn advance(
+ &self,
+ config: &Config,
+ input: SessionInput,
+ ) -> Option<SessionAdvance> {
let mut state = self.state.lock().await;
match self.session.advance(config, input).await {
Ok(reply) => {
diff --git a/crates/openhuman-core/src/voice/server_tests.rs b/crates/openhuman-core/src/voice/server_tests.rs
index 77db934101..8021be6241 100644
--- a/crates/openhuman-core/src/voice/server_tests.rs
+++ b/crates/openhuman-core/src/voice/server_tests.rs
@@ -24,9 +24,15 @@ async fn server_status_initial() {
#[test]
fn server_state_follows_the_module_session_phase() {
use crate::modules::voice::SessionPhase;
- assert_eq!(ServerState::from(SessionPhase::Stopped), ServerState::Stopped);
+ assert_eq!(
+ ServerState::from(SessionPhase::Stopped),
+ ServerState::Stopped
+ );
assert_eq!(ServerState::from(SessionPhase::Idle), ServerState::Idle);
- assert_eq!(ServerState::from(SessionPhase::Recording), ServerState::Recording);
+ assert_eq!(
+ ServerState::from(SessionPhase::Recording),
+ ServerState::Recording
+ );
assert_eq!(
ServerState::from(SessionPhase::Transcribing),
ServerState::Transcribing