diff --git a/Cargo.toml b/Cargo.toml index ad57d80e74..963211b8c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,11 @@ members = [ ] exclude = [ "plugins/apple-calendar", + "plugins/apple-contact", "plugins/cli2", "plugins/db", "plugins/extensions", + "plugins/pdf", "crates/vad-ext", ] diff --git a/crates/listener-core/src/actors/session/supervisor/children.rs b/crates/listener-core/src/actors/session/supervisor/children.rs index 5b28f390e3..9bac09eb3d 100644 --- a/crates/listener-core/src/actors/session/supervisor/children.rs +++ b/crates/listener-core/src/actors/session/supervisor/children.rs @@ -174,7 +174,7 @@ pub(super) async fn try_restart_recorder( let cell = spawn_with_retry(&RETRY_STRATEGY, || { let sup = sup.clone(); let ctx = ctx.clone(); - async move { Ok(spawn_recorder(sup, &ctx).await?) } + async move { spawn_recorder(sup, &ctx).await } }) .await; diff --git a/crates/owhisper-client/src/adapter/cactus/batch.rs b/crates/owhisper-client/src/adapter/cactus/batch.rs index eb2bc25916..659f291349 100644 --- a/crates/owhisper-client/src/adapter/cactus/batch.rs +++ b/crates/owhisper-client/src/adapter/cactus/batch.rs @@ -310,14 +310,13 @@ impl SseParserState { &mut self, response: StreamResponse, ) -> Option> { - if let StreamResponse::TranscriptResponse { channel, .. } = &response { - if channel + if let StreamResponse::TranscriptResponse { channel, .. } = &response + && channel .alternatives .first() .is_some_and(|a| !a.words.is_empty()) - { - self.saw_segment_words = true; - } + { + self.saw_segment_words = true; } let segment_end = match &response { diff --git a/crates/owhisper-client/src/adapter/soniox/live.rs b/crates/owhisper-client/src/adapter/soniox/live.rs index eef52d7895..ce3d4bcc7d 100644 --- a/crates/owhisper-client/src/adapter/soniox/live.rs +++ b/crates/owhisper-client/src/adapter/soniox/live.rs @@ -293,9 +293,9 @@ fn build_words(tokens: &[&soniox::Token]) -> Vec( - tokens: &'a [soniox::Token], -) -> (Vec<&'a soniox::Token>, Vec<&'a soniox::Token>) { +fn partition_tokens_by_word_finality( + tokens: &[soniox::Token], +) -> (Vec<&soniox::Token>, Vec<&soniox::Token>) { let mut final_tokens = Vec::new(); let mut non_final_tokens = Vec::new(); for group in token_groups_from_values(tokens) { diff --git a/crates/transcript/src/label.rs b/crates/transcript/src/label.rs index bf18f53c5d..7cfdb8ea52 100644 --- a/crates/transcript/src/label.rs +++ b/crates/transcript/src/label.rs @@ -77,13 +77,13 @@ pub fn render_speaker_label( return human_id.clone(); } - if key.channel == ChannelProfile::DirectMic { - if let Some(self_human_id) = ctx.self_human_id.as_ref() { - if let Some(name) = ctx.human_name_by_id.get(self_human_id) { - return name.clone(); - } - return "You".to_string(); + if key.channel == ChannelProfile::DirectMic + && let Some(self_human_id) = ctx.self_human_id.as_ref() + { + if let Some(name) = ctx.human_name_by_id.get(self_human_id) { + return name.clone(); } + return "You".to_string(); } } else if let Some(human_id) = key.speaker_human_id.as_ref() { return human_id.clone(); diff --git a/crates/transcript/src/segments/collect.rs b/crates/transcript/src/segments/collect.rs index 69c0ae50e6..fb76532267 100644 --- a/crates/transcript/src/segments/collect.rs +++ b/crates/transcript/src/segments/collect.rs @@ -95,10 +95,10 @@ fn determine_key( segments: &[ProtoSegment], last_segment_by_channel: &HashMap, ) -> SegmentKey { - if !frame.word.is_final { - if let Some(&index) = last_segment_by_channel.get(&frame.word.channel) { - return segments[index].key.clone(); - } + if !frame.word.is_final + && let Some(&index) = last_segment_by_channel.get(&frame.word.channel) + { + return segments[index].key.clone(); } create_segment_key(frame.word.channel, frame.identity.as_ref()) diff --git a/crates/transcript/src/segments/speakers.rs b/crates/transcript/src/segments/speakers.rs index bd1bd3a6e9..86b2bcf230 100644 --- a/crates/transcript/src/segments/speakers.rs +++ b/crates/transcript/src/segments/speakers.rs @@ -118,28 +118,29 @@ fn apply_identity_rules( ) -> SpeakerIdentity { let mut identity = assignment.cloned().unwrap_or_default(); - if identity.speaker_index.is_some() && identity.human_id.is_none() { - if let Some(speaker_index) = identity.speaker_index { - if let Some(human_id) = state.human_id_by_speaker_index.get(&speaker_index) { - identity.human_id = Some(human_id.clone()); - } - } + if identity.speaker_index.is_some() + && identity.human_id.is_none() + && let Some(speaker_index) = identity.speaker_index + && let Some(human_id) = state.human_id_by_speaker_index.get(&speaker_index) + { + identity.human_id = Some(human_id.clone()); } - if identity.human_id.is_none() && state.complete_channels.contains(&word.channel) { - if let Some(human_id) = state.human_id_by_channel.get(&word.channel) { - identity.human_id = Some(human_id.clone()); - } + if identity.human_id.is_none() + && state.complete_channels.contains(&word.channel) + && let Some(human_id) = state.human_id_by_channel.get(&word.channel) + { + identity.human_id = Some(human_id.clone()); } - if !word.is_final && !(identity.speaker_index.is_some() && identity.human_id.is_some()) { - if let Some(last) = state.last_speaker_by_channel.get(&word.channel) { - if identity.speaker_index.is_none() { - identity.speaker_index = last.speaker_index; - } - if identity.human_id.is_none() { - identity.human_id = last.human_id.clone(); - } + if !(word.is_final || identity.speaker_index.is_some() && identity.human_id.is_some()) + && let Some(last) = state.last_speaker_by_channel.get(&word.channel) + { + if identity.speaker_index.is_none() { + identity.speaker_index = last.speaker_index; + } + if identity.human_id.is_none() { + identity.human_id = last.human_id.clone(); } } @@ -165,10 +166,9 @@ fn remember_identity( if state.complete_channels.contains(&word.channel) && identity.human_id.is_some() && identity.speaker_index.is_none() + && let Some(human_id) = identity.human_id.clone() { - if let Some(human_id) = identity.human_id.clone() { - state.human_id_by_channel.insert(word.channel, human_id); - } + state.human_id_by_channel.insert(word.channel, human_id); } if (!word.is_final || identity.speaker_index.is_some() || has_explicit_assignment)