Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 22 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ hypr-transcribe-aws = { path = "crates/transcribe-aws", package = "transcribe-aw
hypr-transcribe-azure = { path = "crates/transcribe-azure", package = "transcribe-azure" }
hypr-transcribe-deepgram = { path = "crates/transcribe-deepgram", package = "transcribe-deepgram" }
hypr-transcribe-gcp = { path = "crates/transcribe-gcp", package = "transcribe-gcp" }
hypr-transcribe-interface = { path = "crates/transcribe-interface", package = "transcribe-interface" }
hypr-transcribe-whisper-local = { path = "crates/transcribe-whisper-local", package = "transcribe-whisper-local" }
hypr-turso = { path = "crates/turso", package = "turso" }
hypr-whisper = { path = "crates/whisper", package = "whisper" }
Expand Down Expand Up @@ -114,6 +115,7 @@ tauri-plugin-tray = { path = "plugins/tray" }
tauri-plugin-windows = { path = "plugins/windows" }

async-stream = "0.3.6"
async-trait = "0.1.88"
futures-channel = "0.3.31"
futures-core = "0.3.31"
futures-util = "0.3.31"
Expand Down Expand Up @@ -214,7 +216,8 @@ kalosm-model-types = { git = "https://github.com/floneum/floneum", rev = "52967a
kalosm-sound = { git = "https://github.com/floneum/floneum", rev = "52967ae", default-features = false }
kalosm-streams = { git = "https://github.com/floneum/floneum", rev = "52967ae" }

deepgram = { version = "0.6.8", default-features = false }
deepgram = { version = "0.7.0", default-features = false }

libsql = "0.9.17"

block2 = "0.6"
Expand Down
4 changes: 1 addition & 3 deletions admin/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"strict": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"types": [
"node"
],
"types": ["node"],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx",
"outDir": "./dist"
Expand Down
21 changes: 8 additions & 13 deletions apps/desktop/src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,27 @@
"keygen:default",
{
"identifier": "opener:allow-open-url",
"allow": [{ "url": "https://**" }, { "url": "mailto:*" }, { "url": "obsidian://**" }]
"allow": [
{ "url": "https://**" },
{ "url": "mailto:*" },
{ "url": "obsidian://**" }
]
},
{
"identifier": "opener:allow-open-path",
"allow": [
{ "path": "$APPDATA/*" },
{ "path": "$APPDATA/**" }
]
"allow": [{ "path": "$APPDATA/*" }, { "path": "$APPDATA/**" }]
},
{
"identifier": "fs:allow-exists",
"allow": [{ "path": "/Applications/*" }]
},
{
"identifier": "fs:allow-watch",
"allow": [
{ "path": "$APPDATA/*" },
{ "path": "$APPDATA/**" }
]
"allow": [{ "path": "$APPDATA/*" }, { "path": "$APPDATA/**" }]
},
{
"identifier": "fs:allow-write-file",
"allow": [
{ "path": "$APPDATA/*" },
{ "path": "$APPDATA/**" }
]
"allow": [{ "path": "$APPDATA/*" }, { "path": "$APPDATA/**" }]
},
{
"identifier": "http:default",
Expand Down
4 changes: 1 addition & 3 deletions apps/desktop/src-tauri/capabilities/macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
"description": "macos specific capabilities",
"windows": ["*"],
"platforms": ["macOS"],
"permissions": [
"apple-calendar:default"
]
"permissions": ["apple-calendar:default"]
}
12 changes: 3 additions & 9 deletions apps/desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,15 @@
"localePath": "./windows/locales/en-US.wxl"
}
},
"fragmentPaths": [
"./windows/fragments/registry.wxs"
],
"componentRefs": [
"HyprnoteRegistryEntries"
]
"fragmentPaths": ["./windows/fragments/registry.wxs"],
"componentRefs": ["HyprnoteRegistryEntries"]
}
}
},
"plugins": {
"deep-link": {
"desktop": {
"schemes": [
"hypr"
]
"schemes": ["hypr"]
}
},
"updater": {
Expand Down
14 changes: 13 additions & 1 deletion crates/audio-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub fn f32_to_i16_samples(samples: &[f32]) -> Vec<i16> {
pub fn f32_to_i16_bytes(chunk: Vec<f32>) -> bytes::Bytes {
let mut bytes = Vec::with_capacity(chunk.len() * 2);
for sample in chunk {
let i16_sample = (sample * I16_SCALE) as i16;
let scaled = (sample * I16_SCALE).clamp(-I16_SCALE, I16_SCALE);
let i16_sample = scaled as i16;
bytes.extend_from_slice(&i16_sample.to_le_bytes());
}
bytes::Bytes::from(bytes)
Expand Down Expand Up @@ -116,3 +117,14 @@ where

Ok(output)
}

pub fn mix_audio_channels(mic: &[f32], speaker: &[f32]) -> Vec<f32> {
let max_len = mic.len().max(speaker.len());
(0..max_len)
.map(|i| {
let mic_sample = mic.get(i).copied().unwrap_or(0.0);
let speaker_sample = speaker.get(i).copied().unwrap_or(0.0);
(mic_sample + speaker_sample).clamp(-1.0, 1.0)
})
.collect()
}
6 changes: 3 additions & 3 deletions crates/data/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use owhisper_interface::{SpeakerIdentity, Word};
use owhisper_interface::{SpeakerIdentity, Word2};

fn run(name: &str) {
let raw_path = format!("src/{}/raw.json", name);
Expand All @@ -7,11 +7,11 @@ fn run(name: &str) {
let raw: serde_json::Value = serde_json::from_str(&raw_content).unwrap();
let raw_words = raw["results"]["channels"][0]["alternatives"][0]["words"].clone();

let words: Vec<Word> = raw_words
let words: Vec<Word2> = raw_words
.as_array()
.unwrap()
.iter()
.map(|v| Word {
.map(|v| Word2 {
text: v["word"].as_str().unwrap().trim().to_string(),
speaker: Some(SpeakerIdentity::Unassigned {
index: v["speaker"].as_u64().unwrap() as u8,
Expand Down
4 changes: 1 addition & 3 deletions crates/data/src/english_3/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"created": "2025-03-29T00:23:01.963Z",
"duration": 245.136,
"channels": 1,
"models": [
"3b3aabe4-608a-46ac-9585-7960a25daf1a"
],
"models": ["3b3aabe4-608a-46ac-9585-7960a25daf1a"],
"model_info": {
"3b3aabe4-608a-46ac-9585-7960a25daf1a": {
"name": "general-nova-3",
Expand Down
4 changes: 1 addition & 3 deletions crates/data/src/english_4/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"created": "2025-04-09T11:06:10.609Z",
"duration": 80.496,
"channels": 1,
"models": [
"3b3aabe4-608a-46ac-9585-7960a25daf1a"
],
"models": ["3b3aabe4-608a-46ac-9585-7960a25daf1a"],
"model_info": {
"3b3aabe4-608a-46ac-9585-7960a25daf1a": {
"name": "general-nova-3",
Expand Down
4 changes: 1 addition & 3 deletions crates/data/src/english_5/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"created": "2025-04-12T14:21:05.804Z",
"duration": 2562.888,
"channels": 1,
"models": [
"3b3aabe4-608a-46ac-9585-7960a25daf1a"
],
"models": ["3b3aabe4-608a-46ac-9585-7960a25daf1a"],
"model_info": {
"3b3aabe4-608a-46ac-9585-7960a25daf1a": {
"name": "general-nova-3",
Expand Down
4 changes: 1 addition & 3 deletions crates/data/src/english_7/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"created": "2025-07-28T00:50:32.281Z",
"duration": 58.344,
"channels": 1,
"models": [
"3b3aabe4-608a-46ac-9585-7960a25daf1a"
],
"models": ["3b3aabe4-608a-46ac-9585-7960a25daf1a"],
"model_info": {
"3b3aabe4-608a-46ac-9585-7960a25daf1a": {
"name": "general-nova-3",
Expand Down
4 changes: 2 additions & 2 deletions crates/db-script/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pub mod conversation_to_words {
fn transform(
conversation: Vec<owhisper_interface::ConversationChunk>,
) -> Vec<owhisper_interface::Word> {
) -> Vec<owhisper_interface::Word2> {
conversation
.into_iter()
.flat_map(|chunk| chunk.transcripts)
Expand All @@ -11,7 +11,7 @@ pub mod conversation_to_words {
.text
.split_whitespace()
.filter(|s| !s.is_empty())
.map(|word| owhisper_interface::Word {
.map(|word| owhisper_interface::Word2 {
text: word.trim().to_string(),
speaker: None,
confidence: transcript.confidence,
Expand Down
Loading