Fix CI errors introduced by supporting loading keywords from buffers (#1366)

This commit is contained in:
Fangjun Kuang
2024-09-20 19:04:21 +08:00
committed by GitHub
parent 06b61ccad8
commit d8809b520e
8 changed files with 55 additions and 7 deletions

View File

@@ -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,
@@ -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)
)
}