Skip to content

Commit 17108f6

Browse files
committed
fix(macOS): bundle ffmpeg/ffprobe via platform config and resolve lookup in Contents/MacOS to prevent normalization failures in packaged app; chore(stt/soniox): update async model to stt-async-v3
1 parent fbc3514 commit 17108f6

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src-tauri/src/commands/audio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,7 @@ async fn soniox_transcribe_async(
22362236

22372237
// 2) Create transcription -> transcription_id
22382238
let mut payload = serde_json::json!({
2239-
"model": "stt-async-preview",
2239+
"model": "stt-async-v3",
22402240
"file_id": file_id,
22412241
});
22422242
if let Some(lang) = language {

src-tauri/src/ffmpeg/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@ fn resolve_binary(app: &AppHandle, names: &[&str], label: &str) -> Result<PathBu
3434
if let Ok(resource_dir) = app.path().resource_dir() {
3535
push_dir(resource_dir.clone());
3636
push_dir(resource_dir.join("sidecar").join("ffmpeg").join("dist"));
37+
// On macOS, externalBin are placed under Contents/MacOS; include that sibling of Resources
38+
#[cfg(target_os = "macos")]
39+
if let Some(contents_dir) = resource_dir.parent() {
40+
let macos_dir = contents_dir.join("MacOS");
41+
push_dir(macos_dir);
42+
}
3743
}
3844

3945
if let Ok(exe_path) = std::env::current_exe() {
4046
let mut dir_opt = exe_path.parent();
4147
while let Some(dir) = dir_opt {
48+
// Search the executable directory itself (e.g., .../Contents/MacOS)
49+
push_dir(dir.to_path_buf());
4250
push_dir(dir.join("sidecar").join("ffmpeg").join("dist"));
4351
push_dir(
4452
dir.join("Resources")

src-tauri/tauri.macos.conf.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
},
77
"bundle": {
88
"externalBin": [
9+
"../sidecar/ffmpeg/dist/ffmpeg",
10+
"../sidecar/ffmpeg/dist/ffprobe",
911
"../sidecar/parakeet-swift/dist/parakeet-sidecar"
1012
]
1113
}

0 commit comments

Comments
 (0)