Add Go API examples for adding punctuations to text. (#1478)

This commit is contained in:
Fangjun Kuang
2024-10-27 09:04:05 +08:00
committed by GitHub
parent 4a4659aa4f
commit 052b8645ba
9 changed files with 74 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -ex
if [ ! -d ./sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12 ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
tar xvf sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
rm sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
fi
go mod tidy
go build
./add-punctuation