OSSLanguage
public struct OSSLanguage : Hashable, Identifiable, Sendable
Display metadata for a language or regional voice supported by Apple platforms.
The catalog is intentionally separate from runtime capabilities. Use
availableSynthesisVoices and supportsRecognition before presenting an
operation as available on the current device.
-
Stable identifier used by OSSSpeechKit to refer to this catalog entry.
Declaration
Swift
public let id: String -
Human-readable language or regional variant name for display.
Declaration
Swift
public let name: String -
Foundation locale that describes the language and region.
Declaration
Swift
public let locale: Locale -
Region override used when the locale alone cannot distinguish a variant.
Declaration
Swift
public let regionCode: String? -
Voice identifiers that should be preferred when matching installed voices.
Declaration
Swift
public let preferredVoiceIdentifiers: [String] -
Creates language metadata for the OSSSpeechKit catalog.
Declaration
Swift
public init( id: String, name: String, localeIdentifier: String, regionCode: String? = nil, preferredVoiceIdentifiers: [String] = [] )Parameters
idStable catalog identifier.
nameHuman-readable display name.
localeIdentifierBCP 47 identifier for the language and region.
regionCodeOptional region override for variants that share a locale.
preferredVoiceIdentifiersPreferred AVFoundation voice identifiers.
-
The canonicalized BCP 47 identifier used for runtime capability checks.
Declaration
Swift
public var localeIdentifier: String { get } -
Voices currently installed or exposed by the operating system.
Declaration
Swift
public var availableSynthesisVoices: [AVSpeechSynthesisVoice] { get } -
Whether the legacy Speech recognizer reports this locale as supported.
Support does not imply that Apple’s service is currently available.
Declaration
Swift
public var supportsRecognition: Bool { get } -
Returns the exact supported recognition locale, or a same-language, same-region canonical equivalent. It never silently changes regions.
Declaration
Swift
public static func supportedRecognitionLocale(equivalentTo locale: Locale) -> Locale? -
A Unicode flag suitable for labels, SwiftUI
Text, and accessibility.Declaration
Swift
var flagEmoji: String { get } -
Renders
flagEmojito an image for UIKit clients that require one.Declaration
Swift
func renderedFlagImage( pointSize: CGFloat = 24, scale: CGFloat = 1 ) -> UIImage -
Curated languages and regional variants described by Apple’s current VoiceOver and Dictation availability documentation.
Availability still varies by OS release, device, installed assets, and network access. Filter this catalog using the runtime capability APIs.
Declaration
Swift
static let catalog: [OSSLanguage]
View on GitHub
OSSLanguage Structure Reference