feat(polish): add context safeguards, layered prompts, and output validation
Use redacted cursor neighborhood and pause-aware chunks for more natural polish, validate protected terms with retry/local fallback, and structure bilingual prompts for consistency and provider prefix caching.
This commit is contained in:
@@ -101,11 +101,18 @@ public struct UtteranceAudioChunk: Sendable, Equatable {
|
||||
public let index: Int
|
||||
public let samples: [Float]
|
||||
public let isLast: Bool
|
||||
public let trailingPauseSeconds: Double
|
||||
|
||||
public init(index: Int, samples: [Float], isLast: Bool) {
|
||||
public init(
|
||||
index: Int,
|
||||
samples: [Float],
|
||||
isLast: Bool,
|
||||
trailingPauseSeconds: Double = 0
|
||||
) {
|
||||
self.index = index
|
||||
self.samples = samples
|
||||
self.isLast = isLast
|
||||
self.trailingPauseSeconds = trailingPauseSeconds
|
||||
}
|
||||
|
||||
public var durationSeconds: Double {
|
||||
|
||||
Reference in New Issue
Block a user