diff --git a/Sources/SwiftWhisper/Whisper.swift b/Sources/SwiftWhisper/Whisper.swift index dfbea17..0fb7dd3 100644 --- a/Sources/SwiftWhisper/Whisper.swift +++ b/Sources/SwiftWhisper/Whisper.swift @@ -175,6 +175,10 @@ public class Whisper { cancelCallback = completionHandler } + public func getLanguage() -> String { + return String(cString: whisper_lang_str(whisper_full_lang_id(whisperContext))) + } + @available(iOS 13, macOS 10.15, watchOS 6.0, tvOS 13.0, *) public func transcribe(audioFrames: [Float]) async throws -> [Segment] { return try await withCheckedThrowingContinuation { cont in