Made the transcribing callable and per-call for the transcribing protocol in the Recording package target.

This commit is contained in:
2026-07-04 12:03:19 +02:00
parent 8b46c4e7d1
commit 68c070948e
9 changed files with 60 additions and 57 deletions
@@ -26,12 +26,12 @@ public struct RecordingView: View {
/// - onTranscription: The closure invoked with the transcribed text of every processed recording. Defaults to a closure that does nothing.
public init(
recorder: any RecordingService,
transcriber: any TranscribingService,
transcriber: any Transcribing,
onTranscription: @escaping (String) -> Void = { _ in }
) {
self.model = .init(
recorder: recorder,
transcriber: transcriber
transcribe: transcriber
)
self.onTranscription = onTranscription
}
@@ -130,6 +130,6 @@ private enum Constant {
) {
RecordingView(
recorder: DummyRecordingService(),
transcriber: DummyTranscribingService()
transcriber: DummyTranscribing()
)
}