Land release blocker fixes and workspace cleanup
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user