Reorganized the Recording package target into folders.

This commit is contained in:
2026-07-04 00:07:42 +02:00
parent fe08548b08
commit aa9ec01611
19 changed files with 103 additions and 112 deletions
@@ -0,0 +1,38 @@
import Foundation
/// The transcribing service used for development, which simulates the transcription work.
///
/// The service is internal on purpose: it only backs the feature's previews and the default values of its model, and is not part of the
/// package's public interface.
struct DummyTranscribingService: TranscribingService {
// MARK: Methods
/// Simulates the transcription of the given recorded audio with a two-second delay.
///
/// - Parameter audio: The recorded audio to transcribe.
/// - Returns: A dummy transcription.
func transcribe(_ audio: Data) async throws -> String {
try await Task.sleep(for: Constant.Delay.transcribing)
return Constant.Text.transcription
}
}
// MARK: - Constants
/// The constant values used across the transcribing services.
private enum Constant {
/// The delay constants.
enum Delay {
/// The duration of the simulated transcription work.
static let transcribing: Duration = .seconds(2)
}
/// The text constants.
enum Text {
/// The dummy transcription of a recorded audio.
static let transcription = "This is a dummy transcription of the recorded audio."
}
}