Implemented the Transcription model in the Recording package target.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import Foundation
|
||||
|
||||
/// A transcription of a processed recording.
|
||||
public struct Transcription {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// The unique identifier of the transcription.
|
||||
public let id: UUID = .init()
|
||||
|
||||
/// The transcribed text of the processed recording.
|
||||
public let text: String
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
/// Creates a transcription with a given text.
|
||||
/// - Parameter text: The transcribed text of the processed recording.
|
||||
public init(
|
||||
text: String
|
||||
) {
|
||||
self.text = text
|
||||
}
|
||||
|
||||
// MARK: Computed
|
||||
|
||||
/// A Boolean value that indicates whether the transcription has no text.
|
||||
var isEmpty: Bool {
|
||||
text.isEmpty
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Identifiable
|
||||
|
||||
extension Transcription: Identifiable {}
|
||||
Reference in New Issue
Block a user