release: ship meeting minutes and portable DOCX in 0.2.2

This commit is contained in:
public-repo-gate
2026-09-13 19:23:19 +03:00
parent 50a5d4cedf
commit dfb97e9069
76 changed files with 65411 additions and 41977 deletions
+8 -6
View File
@@ -600,7 +600,8 @@ actor TranscriptionWorker {
func transcribe(samples: [Float],
language: DictationLanguage = .auto,
requestedAt: TimeInterval) async throws -> TranscriptionWorkerResult {
requestedAt: TimeInterval,
captureTokenTimings: Bool = false) async throws -> TranscriptionWorkerResult {
let workerEnteredAt = ProcessInfo.processInfo.systemUptime
guard let engine else {
throw NSError(domain: "smltlk.Dictation", code: -2,
@@ -635,13 +636,14 @@ actor TranscriptionWorker {
)
case .whisper(let whisper):
let callStartedAt = ProcessInfo.processInfo.systemUptime
let text = try whisper.transcribe(samples: samples, language: language)
let result = try whisper.transcribeWithDetails(samples: samples, language: language,
captureTokenTimings: captureTokenTimings)
let callSeconds = ProcessInfo.processInfo.systemUptime - callStartedAt
return TranscriptionWorkerResult(
text: text,
// whisper.cpp отдает время по СЕГМЕНТАМ, а не по токенам. Выдумывать
// потокенную разметку из сегментной нельзя - лента рисует по ней.
tokenTimings: [],
text: result.text,
// Настоящие token timestamps запрашиваются только файловым
// opt-in. Сегментные границы здесь не выдают за потокенные.
tokenTimings: result.tokenTimings,
audioSeconds: Double(samples.count) / SAMPLE_RATE,
workerQueueSeconds: workerEnteredAt - requestedAt,
// Отдельной стадии подготовки декодера у whisper нет: ноль здесь -