Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Nov 23, 2023
1 parent 913d6cc commit 17c9d12
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions binding/ios/Leopard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ public struct LeopardWord {
/// - startSec: Start of word in seconds.
/// - endSec: End of word in seconds.
/// - confidence: Transcription confidence. It is a number within [0, 1].
/// - speakerTag: Integer identifying unique speakers, `0` reserved for unknown speakers.
public init(word: String, startSec: Float, endSec: Float, confidence: Float, speakerTag: Int) {
/// - speakerTag: he speaker tag is `-1` if diarization is not enabled during initialization;
/// otherwise, it's a non-negative integer identifying unique speakers, with `0` reserved for
/// unknown speakers.
public init(
word: String,
startSec: Float,
endSec: Float,
confidence: Float,
speakerTag: Int) {
self.word = word
self.startSec = startSec
self.endSec = endSec
Expand Down Expand Up @@ -64,6 +71,11 @@ public class Leopard {

public static let sampleRate = UInt32(pv_sample_rate())
public static let version = String(cString: pv_leopard_version())
private static var sdk = "ios"

public static func setSdk(sdk: String) {
self.sdk = sdk
}

/// Constructor.
///
Expand Down

0 comments on commit 17c9d12

Please sign in to comment.