Made the transcribing callable and per-call for the transcribing protocol in the Recording package target.
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user