Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/SwiftWhisper/Whisper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down