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
8 changes: 4 additions & 4 deletions src-tauri/Cargo.lock

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

6 changes: 3 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ natural = "0.5.0"
version = "=2.0.0-rc.9"

[target.'cfg(target_os = "macos")'.dependencies]
whisper-rs = { version = "0.14.4", features = ["metal", "log_backend"] }
whisper-rs = { version = "0.15.0", features = ["metal", "log_backend"] }

[target.'cfg(target_os = "windows")'.dependencies]
whisper-rs = { version = "0.14.4", features = ["vulkan", "log_backend"] }
whisper-rs = { version = "0.15.0", features = ["vulkan", "log_backend"] }

[target.'cfg(target_os = "linux")'.dependencies]
whisper-rs = { version = "0.14.4", features = ["vulkan", "log_backend"] }
whisper-rs = { version = "0.15.0", features = ["vulkan", "log_backend"] }

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-autostart = "2"
Expand Down
20 changes: 7 additions & 13 deletions src-tauri/src/managers/transcription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ impl TranscriptionManager {
let settings = get_settings(&self.app_handle);

// Initialize parameters
let mut params = FullParams::new(SamplingStrategy::default());
let mut params = FullParams::new(SamplingStrategy::BeamSearch {
beam_size: 5,
patience: -1.0,
});
let language = Some(settings.selected_language.as_str());
params.set_language(language);
params.set_print_special(false);
Expand All @@ -303,19 +306,10 @@ impl TranscriptionManager {
params.set_translate(true);
}

state
.full(params, &audio)
.expect("failed to convert samples");
state.full(params, &audio).expect("failed to run model");

let num_segments = state
.full_n_segments()
.expect("failed to get number of segments");

for i in 0..num_segments {
let segment = state
.full_get_segment_text(i)
.expect("failed to get segment");
result.push_str(&segment);
for segment in state.as_iter() {
result.push_str(segment.to_str().expect("failed to get string from segment"));
}

// Apply word correction if custom words are configured
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"macOS": {
"files": {},
"hardenedRuntime": true,
"minimumSystemVersion": "10.13",
"minimumSystemVersion": "10.15",
"signingIdentity": "-",
"entitlements": "Entitlements.plist"
},
Expand Down
Loading