ForgeMedia
Swift ForgeMedia library product.
Swift ForgeMedia library product.
Package contract
| Field | Value |
|---|---|
| Language | swift |
| Source version | Swift package source snapshot |
| Manifest | forge-swift/Package.swift |
| Source files | 3 |
| Evidence | Source reference; registry publication and runtime conformance are separate checks |
Import boundary
import ForgeMediaUse a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.
Source reference
Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.
Image.swift
Read declaration text · 13 declaration entries
public struct ImageGenerationResult: Sendable
public let data: String
/// The MIME type of the image.
public let mediaType: String
/// The revised prompt (if the provider rewrote it).
public let revisedPrompt: String?
/// Token usage (if applicable).
public let usage: Usage?
public init(data: String, mediaType: String, revisedPrompt: String?;
public let mediaType: String
/// The revised prompt (if the provider rewrote it).
public let revisedPrompt: String?
/// Token usage (if applicable).
public let usage: Usage?
public init(data: String, mediaType: String, revisedPrompt: String?;
public let revisedPrompt: String?
/// Token usage (if applicable).
public let usage: Usage?
public init(data: String, mediaType: String, revisedPrompt: String?;
public let usage: Usage?
public init(data: String, mediaType: String, revisedPrompt: String?;
public init(data: String, mediaType: String, revisedPrompt: String?;
public struct ImageGenerationOptions: Codable, Sendable
public var size: String?
/// The image quality (e.g., "standard", "hd").
public var quality: String?
/// The number of images to generate.
public var count: Int?
/// The response format (e.g., "b64_json", "url").
public var responseFormat: String?
public init(size: String?;
public var quality: String?
/// The number of images to generate.
public var count: Int?
/// The response format (e.g., "b64_json", "url").
public var responseFormat: String?
public init(size: String?;
public var count: Int?
/// The response format (e.g., "b64_json", "url").
public var responseFormat: String?
public init(size: String?;
public var responseFormat: String?
public init(size: String?;
public init(size: String?;
public protocol ImageProvider: SendableSpeech.swift
Read declaration text · 11 declaration entries
public struct SpeechResult: Sendable
public let audioData: Data
/// The MIME type of the audio (e.g., "audio/mp3").
public let mimeType: String
/// Duration of the audio in seconds.
public let duration: Double?
public init(audioData: Data, mimeType: String, duration: Double?;
public let mimeType: String
/// Duration of the audio in seconds.
public let duration: Double?
public init(audioData: Data, mimeType: String, duration: Double?;
public let duration: Double?
public init(audioData: Data, mimeType: String, duration: Double?;
public init(audioData: Data, mimeType: String, duration: Double?;
public struct SpeechOptions: Codable, Sendable
public var voice: String?
/// The speed of speech (1.0;
public var speed: Double?
/// The output format (e.g., "mp3", "opus", "aac").
public var format: String?
public init(voice: String?;
public var format: String?
public init(voice: String?;
public init(voice: String?;
public protocol SpeechProvider: SendableTranscription.swift
Read declaration text · 17 declaration entries
public struct TranscriptionResult: Sendable
public let text: String
/// The detected language (ISO 639-1 code).
public let language: String?
/// Duration of the audio in seconds.
public let duration: Double?
/// Per-segment timestamps (if available).
public let segments: [TranscriptionSegment]?
public init(text: String, language: String?;
public let language: String?
/// Duration of the audio in seconds.
public let duration: Double?
/// Per-segment timestamps (if available).
public let segments: [TranscriptionSegment]?
public init(text: String, language: String?;
public let duration: Double?
/// Per-segment timestamps (if available).
public let segments: [TranscriptionSegment]?
public init(text: String, language: String?;
public let segments: [TranscriptionSegment]?
public init(text: String, language: String?;
public init(text: String, language: String?;
public struct TranscriptionSegment: Codable, Sendable
public let text: String
/// Start time in seconds.
public let start: Double
/// End time in seconds.
public let end: Double
public init(text: String, start: Double, end: Double)
public let start: Double
/// End time in seconds.
public let end: Double
public init(text: String, start: Double, end: Double)
public let end: Double
public init(text: String, start: Double, end: Double)
public init(text: String, start: Double, end: Double)
public struct TranscriptionOptions: Codable, Sendable
public var language: String?
/// Whether to include timestamps.
public var timestamps: Bool?
/// The response format.
public var responseFormat: String?
public init(language: String?;
public var timestamps: Bool?
/// The response format.
public var responseFormat: String?
public init(language: String?;
public var responseFormat: String?
public init(language: String?;
public init(language: String?;
public protocol TranscriptionProvider: Sendable