Skip to content

Commit

Permalink
Fix Swift APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Sep 20, 2024
1 parent 854f1e5 commit 6da8693
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions swift-api-examples/SherpaOnnx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,9 @@ func sherpaOnnxKeywordSpotterConfig(
maxActivePaths: Int = 4,
numTrailingBlanks: Int = 1,
keywordsScore: Float = 1.0,
keywordsThreshold: Float = 0.25
keywordsThreshold: Float = 0.25,
keywordsBuf: String = "",
keywordsBufSize: Int = 0
) -> SherpaOnnxKeywordSpotterConfig {
return SherpaOnnxKeywordSpotterConfig(
feat_config: featConfig,
Expand All @@ -975,7 +977,9 @@ func sherpaOnnxKeywordSpotterConfig(
num_trailing_blanks: Int32(numTrailingBlanks),
keywords_score: keywordsScore,
keywords_threshold: keywordsThreshold,
keywords_file: toCPointer(keywordsFile)
keywords_file: toCPointer(keywordsFile),
keywords_buf: toCPointer(keywordsBuf),
keywords_buf_size: Int32(keywordsBufSize)
)
}

Expand Down

0 comments on commit 6da8693

Please sign in to comment.