@@ -302,16 +302,16 @@ function testInverseTextNormalizationOnlineAsr() {
302302 java -Djava.library.path=../build/lib -jar $out_filename
303303}
304304
305- function testPunctuation () {
305+ function testOfflinePunctuation () {
306306 if [ ! -f ./sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12/model.onnx ]; then
307307 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
308308 tar xvf sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
309309 rm sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
310310 fi
311311
312- out_filename=test_punctuation .jar
312+ out_filename=test_offline_punctuation .jar
313313 kotlinc-jvm -include-runtime -d $out_filename \
314- ./test_punctuation .kt \
314+ ./test_offline_punctuation .kt \
315315 ./OfflinePunctuation.kt \
316316 faked-asset-manager.kt \
317317 faked-log.kt
@@ -321,6 +321,25 @@ function testPunctuation() {
321321 java -Djava.library.path=../build/lib -jar $out_filename
322322}
323323
324+ function testOnlinePunctuation() {
325+ if [ ! -f ./sherpa-onnx-online-punct-en-2024-08-06/model.int8.onnx ]; then
326+ curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
327+ tar xvf sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
328+ rm sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
329+ fi
330+
331+ out_filename=test_online_punctuation.jar
332+ kotlinc-jvm -include-runtime -d $out_filename \
333+ ./test_online_punctuation.kt \
334+ ./OnlinePunctuation.kt \
335+ faked-asset-manager.kt \
336+ faked-log.kt
337+
338+ ls -lh $out_filename
339+
340+ java -Djava.library.path=../build/lib -jar $out_filename
341+ }
342+
324343function testOfflineSpeakerDiarization() {
325344 if [ ! -f ./sherpa-onnx-pyannote-segmentation-3-0/model.onnx ]; then
326345 curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-segmentation-models/sherpa-onnx-pyannote-segmentation-3-0.tar.bz2
@@ -359,6 +378,7 @@ testTts
359378testAudioTagging
360379testSpokenLanguageIdentification
361380testOfflineAsr
362- testPunctuation
381+ testOfflinePunctuation
382+ testOnlinePunctuation
363383testInverseTextNormalizationOfflineAsr
364384testInverseTextNormalizationOnlineAsr
0 commit comments