go : add wrapper for system info (#456)

This commit is contained in:
Lukas Rist
2023-01-28 17:44:56 +01:00
committed by GitHub
parent beb9512be3
commit 2bee2650c6
4 changed files with 22 additions and 1 deletions

View File

@@ -66,6 +66,11 @@ func (p *Params) Language() int {
return int(C.whisper_lang_id(p.language))
}
// Threads available
func (p *Params) Threads() int {
return int(p.n_threads)
}
// Set number of threads to use
func (p *Params) SetThreads(threads int) {
p.n_threads = C.int(threads)