Land release blocker fixes and workspace cleanup
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled

This commit is contained in:
2026-04-23 00:16:09 +01:00
parent d7363cc913
commit 9b0067b4c0
36 changed files with 1529 additions and 418 deletions

View File

@@ -62,10 +62,9 @@ impl Transcriber for WhisperRsBackend {
"WhisperRsBackend::transcribe_sync entering"
);
let mut state = self
.ctx
.create_state()
.map_err(|e| KonError::TranscriptionFailed(WhisperBackendError::State(e.to_string()).to_string()))?;
let mut state = self.ctx.create_state().map_err(|e| {
KonError::TranscriptionFailed(WhisperBackendError::State(e.to_string()).to_string())
})?;
let mut params = FullParams::new(SamplingStrategy::Greedy { best_of: 1 });
if let Some(lang) = options.language.as_deref() {
@@ -83,9 +82,11 @@ impl Transcriber for WhisperRsBackend {
params.set_print_progress(false);
params.set_print_realtime(false);
state
.full(params, samples)
.map_err(|e| KonError::TranscriptionFailed(WhisperBackendError::Transcribe(e.to_string()).to_string()))?;
state.full(params, samples).map_err(|e| {
KonError::TranscriptionFailed(
WhisperBackendError::Transcribe(e.to_string()).to_string(),
)
})?;
let n = state.full_n_segments();
@@ -96,7 +97,11 @@ impl Transcriber for WhisperRsBackend {
};
let text = seg
.to_str()
.map_err(|e| KonError::TranscriptionFailed(WhisperBackendError::Transcribe(e.to_string()).to_string()))?
.map_err(|e| {
KonError::TranscriptionFailed(
WhisperBackendError::Transcribe(e.to_string()).to_string(),
)
})?
.to_string();
// whisper-rs timestamps are centiseconds (10ms units). Convert to seconds (f64).
let start = seg.start_timestamp() as f64 * 0.01;