Update sherpa-onnx-go package version (#233)

This commit is contained in:
Fangjun Kuang
2023-08-04 12:33:06 +08:00
committed by GitHub
parent 801693a4d4
commit 92976b04a0
9 changed files with 39 additions and 62 deletions

View File

@@ -1,13 +1,12 @@
package main
import (
"fmt"
"github.com/gordonklaus/portaudio"
sherpa "github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx"
flag "github.com/spf13/pflag"
"strings"
"fmt"
"log"
"strings"
)
func main() {
@@ -57,6 +56,7 @@ func main() {
defer sherpa.DeleteOnlineRecognizer(recognizer)
stream := sherpa.NewOnlineStream(recognizer)
defer sherpa.NewOfflineStream(stream)
// you can choose another value for 0.1 if you want
samplesPerCall := int32(param.SampleRate * 0.1) // 0.1 second
@@ -99,8 +99,6 @@ func main() {
}
chk(s.Stop())
return
}
func chk(err error) {