Fangjun Kuang
Committed by GitHub

Release v1.10.46 (#1929)

正在显示 45 个修改的文件 包含 105 行增加79 行删除
  1 +## 1.10.46
  2 +
  3 +# Fix kokoro lexicon. (#1886)
  4 +# speaker-identification-with-vad-non-streaming-asr.py Lack of support for sense_voice. (#1884)
  5 +# Fix generating Chinese lexicon for Kokoro TTS 1.0 (#1888)
  6 +# Reduce vad-whisper-c-api example code. (#1891)
  7 +# JNI Exception Handling (#1452)
  8 +# Fix #1901: UnicodeEncodeError running export_bpe_vocab.py (#1902)
  9 +# Fix publishing pre-built windows libraries (#1905)
  10 +# Fixing Whisper Model Token Normalization (#1904)
  11 +# feat: add mic example for better compatibility (#1909)
  12 +# Add onnxruntime 1.18.1 for Linux aarch64 GPU (#1914)
  13 +# Add C++ API for streaming zipformer ASR on RK NPU (#1908)
  14 +# change [1<<28] to [1<<10], to fix build issues on GOARCH=386 that [1<<28] too large (#1916)
  15 +# Flutter Config toJson/fromJson (#1893)
  16 +# Fix publishing linux pre-built artifacts (#1919)
  17 +# go.mod set to use go 1.17, and use unsafe.Slice to optimize the code (#1920)
  18 +# fix: AddPunct panic for Go(#1921)
  19 +# Fix publishing macos pre-built artifacts (#1922)
  20 +# Minor fixes for rknn (#1925)
  21 +# Build wheels for rknn linux aarch64 (#1928)
  22 +
1 ## 1.10.45 23 ## 1.10.45
2 24
3 * [update] fixed bug: create golang instance succeed while the c struct create failed (#1860) 25 * [update] fixed bug: create golang instance succeed while the c struct create failed (#1860)
@@ -10,7 +10,7 @@ project(sherpa-onnx) @@ -10,7 +10,7 @@ project(sherpa-onnx)
10 # Remember to update 10 # Remember to update
11 # ./CHANGELOG.md 11 # ./CHANGELOG.md
12 # ./new-release.sh 12 # ./new-release.sh
13 -set(SHERPA_ONNX_VERSION "1.10.45") 13 +set(SHERPA_ONNX_VERSION "1.10.46")
14 14
15 # Disable warning about 15 # Disable warning about
16 # 16 #
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 git clone https://github.com/k2-fsa/sherpa-onnx 4 git clone https://github.com/k2-fsa/sherpa-onnx
5 cd sherpa-onnx 5 cd sherpa-onnx
6 6
7 -wget https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-v1.10.45-android.tar.bz2  
8 -tar xvf sherpa-onnx-v1.10.45-android.tar.bz2 7 +wget https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-v1.10.46-android.tar.bz2
  8 +tar xvf sherpa-onnx-v1.10.46-android.tar.bz2
9 9
10 cp -v jniLibs/arm64-v8a/* android/SherpaOnnxAar/sherpa_onnx/src/main/jniLibs/arm64-v8a/ 10 cp -v jniLibs/arm64-v8a/* android/SherpaOnnxAar/sherpa_onnx/src/main/jniLibs/arm64-v8a/
11 cp -v jniLibs/armeabi-v7a/* android/SherpaOnnxAar/sherpa_onnx/src/main/jniLibs/armeabi-v7a/ 11 cp -v jniLibs/armeabi-v7a/* android/SherpaOnnxAar/sherpa_onnx/src/main/jniLibs/armeabi-v7a/
@@ -16,5 +16,5 @@ cd android/SherpaOnnxAar @@ -16,5 +16,5 @@ cd android/SherpaOnnxAar
16 16
17 ./gradlew :sherpa_onnx:assembleRelease 17 ./gradlew :sherpa_onnx:assembleRelease
18 ls -lh ./sherpa_onnx/build/outputs/aar/sherpa_onnx-release.aar 18 ls -lh ./sherpa_onnx/build/outputs/aar/sherpa_onnx-release.aar
19 -cp ./sherpa_onnx/build/outputs/aar/sherpa_onnx-release.aar ../../sherpa-onnx-1.10.45.aar 19 +cp ./sherpa_onnx/build/outputs/aar/sherpa_onnx-release.aar ../../sherpa-onnx-1.10.46.aar
20 ``` 20 ```
@@ -34,5 +34,5 @@ dependencies { @@ -34,5 +34,5 @@ dependencies {
34 implementation 'pub.devrel:easypermissions:3.0.0' 34 implementation 'pub.devrel:easypermissions:3.0.0'
35 implementation 'androidx.core:core-ktx:1.7.0' 35 implementation 'androidx.core:core-ktx:1.7.0'
36 // implementation files('/Users/fangjun/open-source/sherpa-onnx/android/SherpaOnnxAar/sherpa_onnx/build/outputs/aar/sherpa_onnx-release.aar') 36 // implementation files('/Users/fangjun/open-source/sherpa-onnx/android/SherpaOnnxAar/sherpa_onnx/build/outputs/aar/sherpa_onnx-release.aar')
37 - implementation 'com.github.k2-fsa:sherpa-onnx:v1.10.45' 37 + implementation 'com.github.k2-fsa:sherpa-onnx:v1.10.46'
38 } 38 }
@@ -242,7 +242,7 @@ for d in ios-arm64_x86_64-simulator ios-arm64; do @@ -242,7 +242,7 @@ for d in ios-arm64_x86_64-simulator ios-arm64; do
242 <key>CFBundlePackageType</key> 242 <key>CFBundlePackageType</key>
243 <string>FMWK</string> 243 <string>FMWK</string>
244 <key>CFBundleShortVersionString</key> 244 <key>CFBundleShortVersionString</key>
245 - <string>1.10.45</string> 245 + <string>1.10.46</string>
246 <key>CFBundleSupportedPlatforms</key> 246 <key>CFBundleSupportedPlatforms</key>
247 <array> 247 <array>
248 <string>iPhoneOS</string> 248 <string>iPhoneOS</string>
@@ -9,7 +9,7 @@ environment: @@ -9,7 +9,7 @@ environment:
9 sdk: ">=3.0.0 <4.0.0" 9 sdk: ">=3.0.0 <4.0.0"
10 10
11 dependencies: 11 dependencies:
12 - sherpa_onnx: ^1.10.45 12 + sherpa_onnx: ^1.10.46
13 path: ^1.9.0 13 path: ^1.9.0
14 args: ^2.5.0 14 args: ^2.5.0
15 15
@@ -9,7 +9,7 @@ environment: @@ -9,7 +9,7 @@ environment:
9 sdk: ">=3.0.0 <4.0.0" 9 sdk: ">=3.0.0 <4.0.0"
10 10
11 dependencies: 11 dependencies:
12 - sherpa_onnx: ^1.10.45 12 + sherpa_onnx: ^1.10.46
13 path: ^1.9.0 13 path: ^1.9.0
14 args: ^2.5.0 14 args: ^2.5.0
15 15
@@ -9,7 +9,7 @@ environment: @@ -9,7 +9,7 @@ environment:
9 sdk: ">=3.0.0 <4.0.0" 9 sdk: ">=3.0.0 <4.0.0"
10 10
11 dependencies: 11 dependencies:
12 - sherpa_onnx: ^1.10.45 12 + sherpa_onnx: ^1.10.46
13 # sherpa_onnx: 13 # sherpa_onnx:
14 # path: ../../flutter/sherpa_onnx 14 # path: ../../flutter/sherpa_onnx
15 path: ^1.9.0 15 path: ^1.9.0
@@ -10,7 +10,7 @@ environment: @@ -10,7 +10,7 @@ environment:
10 10
11 # Add regular dependencies here. 11 # Add regular dependencies here.
12 dependencies: 12 dependencies:
13 - sherpa_onnx: ^1.10.45 13 + sherpa_onnx: ^1.10.46
14 path: ^1.9.0 14 path: ^1.9.0
15 args: ^2.5.0 15 args: ^2.5.0
16 16
@@ -8,7 +8,7 @@ environment: @@ -8,7 +8,7 @@ environment:
8 sdk: ">=3.0.0 <4.0.0" 8 sdk: ">=3.0.0 <4.0.0"
9 9
10 dependencies: 10 dependencies:
11 - sherpa_onnx: ^1.10.45 11 + sherpa_onnx: ^1.10.46
12 # sherpa_onnx: 12 # sherpa_onnx:
13 # path: ../../flutter/sherpa_onnx 13 # path: ../../flutter/sherpa_onnx
14 path: ^1.9.0 14 path: ^1.9.0
@@ -9,7 +9,7 @@ environment: @@ -9,7 +9,7 @@ environment:
9 sdk: ">=3.0.0 <4.0.0" 9 sdk: ">=3.0.0 <4.0.0"
10 10
11 dependencies: 11 dependencies:
12 - sherpa_onnx: ^1.10.45 12 + sherpa_onnx: ^1.10.46
13 path: ^1.9.0 13 path: ^1.9.0
14 args: ^2.5.0 14 args: ^2.5.0
15 15
@@ -11,7 +11,7 @@ environment: @@ -11,7 +11,7 @@ environment:
11 11
12 # Add regular dependencies here. 12 # Add regular dependencies here.
13 dependencies: 13 dependencies:
14 - sherpa_onnx: ^1.10.45 14 + sherpa_onnx: ^1.10.46
15 path: ^1.9.0 15 path: ^1.9.0
16 args: ^2.5.0 16 args: ^2.5.0
17 17
@@ -8,7 +8,7 @@ environment: @@ -8,7 +8,7 @@ environment:
8 8
9 # Add regular dependencies here. 9 # Add regular dependencies here.
10 dependencies: 10 dependencies:
11 - sherpa_onnx: ^1.10.45 11 + sherpa_onnx: ^1.10.46
12 path: ^1.9.0 12 path: ^1.9.0
13 args: ^2.5.0 13 args: ^2.5.0
14 14
@@ -10,7 +10,7 @@ environment: @@ -10,7 +10,7 @@ environment:
10 sdk: ">=3.0.0 <4.0.0" 10 sdk: ">=3.0.0 <4.0.0"
11 11
12 dependencies: 12 dependencies:
13 - sherpa_onnx: ^1.10.45 13 + sherpa_onnx: ^1.10.46
14 path: ^1.9.0 14 path: ^1.9.0
15 args: ^2.5.0 15 args: ^2.5.0
16 16
@@ -9,7 +9,7 @@ environment: @@ -9,7 +9,7 @@ environment:
9 sdk: ">=3.0.0 <4.0.0" 9 sdk: ">=3.0.0 <4.0.0"
10 10
11 dependencies: 11 dependencies:
12 - sherpa_onnx: ^1.10.45 12 + sherpa_onnx: ^1.10.46
13 path: ^1.9.0 13 path: ^1.9.0
14 args: ^2.5.0 14 args: ^2.5.0
15 15
@@ -5,7 +5,7 @@ description: > @@ -5,7 +5,7 @@ description: >
5 5
6 publish_to: 'none' 6 publish_to: 'none'
7 7
8 -version: 1.10.45 8 +version: 1.10.46
9 9
10 topics: 10 topics:
11 - speech-recognition 11 - speech-recognition
@@ -31,7 +31,7 @@ dependencies: @@ -31,7 +31,7 @@ dependencies:
31 record: ^5.1.0 31 record: ^5.1.0
32 url_launcher: ^6.2.6 32 url_launcher: ^6.2.6
33 33
34 - sherpa_onnx: ^1.10.45 34 + sherpa_onnx: ^1.10.46
35 # sherpa_onnx: 35 # sherpa_onnx:
36 # path: ../../flutter/sherpa_onnx 36 # path: ../../flutter/sherpa_onnx
37 37
@@ -5,7 +5,7 @@ description: > @@ -5,7 +5,7 @@ description: >
5 5
6 publish_to: 'none' # Remove this line if you wish to publish to pub.dev 6 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 7
8 -version: 1.10.45 8 +version: 1.10.46
9 9
10 environment: 10 environment:
11 sdk: ">=2.17.0 <4.0.0" 11 sdk: ">=2.17.0 <4.0.0"
@@ -18,7 +18,7 @@ dependencies: @@ -18,7 +18,7 @@ dependencies:
18 cupertino_icons: ^1.0.6 18 cupertino_icons: ^1.0.6
19 path_provider: ^2.1.3 19 path_provider: ^2.1.3
20 path: ^1.9.0 20 path: ^1.9.0
21 - sherpa_onnx: ^1.10.45 21 + sherpa_onnx: ^1.10.46
22 # sherpa_onnx: 22 # sherpa_onnx:
23 # path: ../../flutter/sherpa_onnx 23 # path: ../../flutter/sherpa_onnx
24 url_launcher: 6.2.6 24 url_launcher: 6.2.6
@@ -17,7 +17,7 @@ topics: @@ -17,7 +17,7 @@ topics:
17 - voice-activity-detection 17 - voice-activity-detection
18 18
19 # remember to change the version in ../sherpa_onnx_macos/macos/sherpa_onnx_macos.podspec 19 # remember to change the version in ../sherpa_onnx_macos/macos/sherpa_onnx_macos.podspec
20 -version: 1.10.45 20 +version: 1.10.46
21 21
22 homepage: https://github.com/k2-fsa/sherpa-onnx 22 homepage: https://github.com/k2-fsa/sherpa-onnx
23 23
@@ -30,23 +30,23 @@ dependencies: @@ -30,23 +30,23 @@ dependencies:
30 flutter: 30 flutter:
31 sdk: flutter 31 sdk: flutter
32 32
33 - sherpa_onnx_android: ^1.10.45 33 + sherpa_onnx_android: ^1.10.46
34 # sherpa_onnx_android: 34 # sherpa_onnx_android:
35 # path: ../sherpa_onnx_android 35 # path: ../sherpa_onnx_android
36 36
37 - sherpa_onnx_macos: ^1.10.45 37 + sherpa_onnx_macos: ^1.10.46
38 # sherpa_onnx_macos: 38 # sherpa_onnx_macos:
39 # path: ../sherpa_onnx_macos 39 # path: ../sherpa_onnx_macos
40 40
41 - sherpa_onnx_linux: ^1.10.45 41 + sherpa_onnx_linux: ^1.10.46
42 # sherpa_onnx_linux: 42 # sherpa_onnx_linux:
43 # path: ../sherpa_onnx_linux 43 # path: ../sherpa_onnx_linux
44 44
45 - sherpa_onnx_windows: ^1.10.45 45 + sherpa_onnx_windows: ^1.10.46
46 # sherpa_onnx_windows: 46 # sherpa_onnx_windows:
47 # path: ../sherpa_onnx_windows 47 # path: ../sherpa_onnx_windows
48 48
49 - sherpa_onnx_ios: ^1.10.45 49 + sherpa_onnx_ios: ^1.10.46
50 # sherpa_onnx_ios: 50 # sherpa_onnx_ios:
51 # path: ../sherpa_onnx_ios 51 # path: ../sherpa_onnx_ios
52 52
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 # https://groups.google.com/g/dart-ffi/c/nUATMBy7r0c 7 # https://groups.google.com/g/dart-ffi/c/nUATMBy7r0c
8 Pod::Spec.new do |s| 8 Pod::Spec.new do |s|
9 s.name = 'sherpa_onnx_ios' 9 s.name = 'sherpa_onnx_ios'
10 - s.version = '1.10.45' 10 + s.version = '1.10.46'
11 s.summary = 'A new Flutter FFI plugin project.' 11 s.summary = 'A new Flutter FFI plugin project.'
12 s.description = <<-DESC 12 s.description = <<-DESC
13 A new Flutter FFI plugin project. 13 A new Flutter FFI plugin project.
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 # 4 #
5 Pod::Spec.new do |s| 5 Pod::Spec.new do |s|
6 s.name = 'sherpa_onnx_macos' 6 s.name = 'sherpa_onnx_macos'
7 - s.version = '1.10.45' 7 + s.version = '1.10.46'
8 s.summary = 'sherpa-onnx Flutter FFI plugin project.' 8 s.summary = 'sherpa-onnx Flutter FFI plugin project.'
9 s.description = <<-DESC 9 s.description = <<-DESC
10 sherpa-onnx Flutter FFI plugin project. 10 sherpa-onnx Flutter FFI plugin project.
@@ -23,7 +23,7 @@ or update your `oh-package.json5` to include the following: @@ -23,7 +23,7 @@ or update your `oh-package.json5` to include the following:
23 23
24 ``` 24 ```
25 "dependencies": { 25 "dependencies": {
26 - "sherpa_onnx": "1.10.45", 26 + "sherpa_onnx": "1.10.46",
27 }, 27 },
28 ``` 28 ```
29 29
1 { 1 {
2 "name": "sherpa_onnx", 2 "name": "sherpa_onnx",
3 - "version": "1.10.45", 3 + "version": "1.10.46",
4 "description": "On-device speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without Internet connection", 4 "description": "On-device speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without Internet connection",
5 "main": "Index.ets", 5 "main": "Index.ets",
6 "author": "The next-gen Kaldi team", 6 "author": "The next-gen Kaldi team",
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 "author": "", 6 "author": "",
7 "license": "", 7 "license": "",
8 "dependencies": { 8 "dependencies": {
9 - "sherpa_onnx": "1.10.45" 9 + "sherpa_onnx": "1.10.46"
10 } 10 }
11 } 11 }
12 12
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 "author": "", 6 "author": "",
7 "license": "", 7 "license": "",
8 "dependencies": { 8 "dependencies": {
9 - "sherpa_onnx": "1.10.45", 9 + "sherpa_onnx": "1.10.46",
10 } 10 }
11 } 11 }
12 12
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 "author": "", 6 "author": "",
7 "license": "", 7 "license": "",
8 "dependencies": { 8 "dependencies": {
9 - "sherpa_onnx": "1.10.45", 9 + "sherpa_onnx": "1.10.46",
10 } 10 }
11 } 11 }
12 12
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 "author": "", 6 "author": "",
7 "license": "", 7 "license": "",
8 "dependencies": { 8 "dependencies": {
9 - "sherpa_onnx": "1.10.45", 9 + "sherpa_onnx": "1.10.46",
10 } 10 }
11 } 11 }
12 12
1 # Introduction 1 # Introduction
2 2
3 -Please download ./sherpa_onnx-v1.10.45.har 3 +Please download ./sherpa_onnx-v1.10.46.har
4 from <https://huggingface.co/csukuangfj/sherpa-onnx-harmony-os/tree/main/har> 4 from <https://huggingface.co/csukuangfj/sherpa-onnx-harmony-os/tree/main/har>
5 5
6 Hint: For users who have no access to huggingface, please use 6 Hint: For users who have no access to huggingface, please use
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "license": "", 7 "license": "",
8 "dependencies": { 8 "dependencies": {
9 // please see https://ohpm.openharmony.cn/#/cn/detail/sherpa_onnx 9 // please see https://ohpm.openharmony.cn/#/cn/detail/sherpa_onnx
10 - "sherpa_onnx": "1.10.45", 10 + "sherpa_onnx": "1.10.46",
11 } 11 }
12 } 12 }
13 13
@@ -2,8 +2,8 @@ jdk: @@ -2,8 +2,8 @@ jdk:
2 - openjdk17 2 - openjdk17
3 3
4 before_install: 4 before_install:
5 - - wget https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-1.10.45.aar 5 + - wget https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-1.10.46.aar
6 6
7 install: 7 install:
8 - - FILE="-Dfile=sherpa-onnx-1.10.45.aar"  
9 - - mvn install:install-file $FILE -DgroupId=com.k2fsa.sherpa.onnx -DartifactId=sherpa-onnx -Dversion=1.10.45 -Dpackaging=aar -DgeneratePom=true 8 + - FILE="-Dfile=sherpa-onnx-1.10.46.aar"
  9 + - mvn install:install-file $FILE -DgroupId=com.k2fsa.sherpa.onnx -DartifactId=sherpa-onnx -Dversion=1.10.46 -Dpackaging=aar -DgeneratePom=true
@@ -5,9 +5,9 @@ for speech recognition. @@ -5,9 +5,9 @@ for speech recognition.
5 5
6 |Directory| Pre-built exe (x64)|Pre-built exe (x86)| Description| 6 |Directory| Pre-built exe (x64)|Pre-built exe (x86)| Description|
7 |---------|--------------------|-------------------|------------| 7 |---------|--------------------|-------------------|------------|
8 -|[./NonStreamingSpeechRecognition](./NonStreamingSpeechRecognition)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-non-streaming-asr-x64-v1.10.45.exe)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-non-streaming-asr-x86-v1.10.45.exe)| Non-streaming speech recognition|  
9 -|[./StreamingSpeechRecognition](./StreamingSpeechRecognition)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-streaming-asr-x64-v1.10.45.exe)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-streaming-asr-x86-v1.10.45.exe)| Streaming speech recognition|  
10 -|[./NonStreamingTextToSpeech](./NonStreamingTextToSpeech)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-non-streaming-tts-x64-v1.10.45.exe)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.45/sherpa-onnx-non-streaming-tts-x86-v1.10.45.exe)| Non-streaming text to speech| 8 +|[./NonStreamingSpeechRecognition](./NonStreamingSpeechRecognition)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-non-streaming-asr-x64-v1.10.46.exe)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-non-streaming-asr-x86-v1.10.46.exe)| Non-streaming speech recognition|
  9 +|[./StreamingSpeechRecognition](./StreamingSpeechRecognition)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-streaming-asr-x64-v1.10.46.exe)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-streaming-asr-x86-v1.10.46.exe)| Streaming speech recognition|
  10 +|[./NonStreamingTextToSpeech](./NonStreamingTextToSpeech)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-non-streaming-tts-x64-v1.10.46.exe)|[URL](https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.46/sherpa-onnx-non-streaming-tts-x86-v1.10.46.exe)| Non-streaming text to speech|
11 11
12 Caution: You need to use Windows and install Visual Studio 2022 in order to 12 Caution: You need to use Windows and install Visual Studio 2022 in order to
13 compile it. 13 compile it.
@@ -2,23 +2,23 @@ @@ -2,23 +2,23 @@
2 2
3 set -ex 3 set -ex
4 4
5 -sed -i.bak 's/1\.10\.44/1\.10\.45/g' ./build-ios-shared.sh  
6 -sed -i.bak 's/1\.10\.44/1\.10\.45/g' ./pom.xml  
7 -sed -i.bak 's/1\.10\.44/1\.10\.45/g' ./jitpack.yml  
8 -sed -i.bak 's/1\.10\.44/1\.10\.45/g' ./android/SherpaOnnxAar/README.md 5 +sed -i.bak 's/1\.10\.45/1\.10\.46/g' ./build-ios-shared.sh
  6 +sed -i.bak 's/1\.10\.45/1\.10\.46/g' ./pom.xml
  7 +sed -i.bak 's/1\.10\.45/1\.10\.46/g' ./jitpack.yml
  8 +sed -i.bak 's/1\.10\.45/1\.10\.46/g' ./android/SherpaOnnxAar/README.md
9 9
10 -find android -name build.gradle -type f -exec sed -i.bak 's/sherpa-onnx:v1\.10\.44/sherpa-onnx:v1\.10\.45/g' {} \; 10 +find android -name build.gradle -type f -exec sed -i.bak 's/sherpa-onnx:v1\.10\.45/sherpa-onnx:v1\.10\.46/g' {} \;
11 11
12 -find flutter -name *.yaml -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \;  
13 -find dart-api-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \;  
14 -find flutter-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \;  
15 -find flutter -name *.podspec -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \;  
16 -find nodejs-addon-examples -name package.json -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \;  
17 -find nodejs-examples -name package.json -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \; 12 +find flutter -name *.yaml -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
  13 +find dart-api-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
  14 +find flutter-examples -name *.yaml -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
  15 +find flutter -name *.podspec -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
  16 +find nodejs-addon-examples -name package.json -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
  17 +find nodejs-examples -name package.json -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
18 18
19 -find harmony-os -name "README.md" -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \;  
20 -find harmony-os -name oh-package.json5 -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \; 19 +find harmony-os -name "README.md" -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
  20 +find harmony-os -name oh-package.json5 -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
21 21
22 -find mfc-examples -name "README.md" -type f -exec sed -i.bak 's/1\.10\.44/1\.10\.45/g' {} \; 22 +find mfc-examples -name "README.md" -type f -exec sed -i.bak 's/1\.10\.45/1\.10\.46/g' {} \;
23 23
24 find . -name "*.bak" -exec rm {} \; 24 find . -name "*.bak" -exec rm {} \;
1 { 1 {
2 "dependencies": { 2 "dependencies": {
3 - "sherpa-onnx-node": "^1.10.45" 3 + "sherpa-onnx-node": "^1.10.46"
4 } 4 }
5 } 5 }
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 "dependencies": { 2 "dependencies": {
3 "mic": "^2.1.2", 3 "mic": "^2.1.2",
4 "naudiodon2": "^2.4.0", 4 "naudiodon2": "^2.4.0",
5 - "sherpa-onnx": "^1.10.45", 5 + "sherpa-onnx": "^1.10.46",
6 "wav": "^1.0.2" 6 "wav": "^1.0.2"
7 } 7 }
8 } 8 }
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <modelVersion>4.0.0</modelVersion> 4 <modelVersion>4.0.0</modelVersion>
5 <groupId>com.k2fsa.sherpa.onnx</groupId> 5 <groupId>com.k2fsa.sherpa.onnx</groupId>
6 <artifactId>sherpa-onnx-android</artifactId> 6 <artifactId>sherpa-onnx-android</artifactId>
7 - <version>1.10.45</version> 7 + <version>1.10.46</version>
8 <url>https://github.com/k2-fsa/sherpa-onnx</url> 8 <url>https://github.com/k2-fsa/sherpa-onnx</url>
9 <packaging>pom</packaging> 9 <packaging>pom</packaging>
10 <description>First Android Library</description> 10 <description>First Android Library</description>
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 #include "android/asset_manager_jni.h" 15 #include "android/asset_manager_jni.h"
16 #endif 16 #endif
17 17
  18 +#include "sherpa-onnx/csrc/file-utils.h"
18 #include "sherpa-onnx/csrc/macros.h" 19 #include "sherpa-onnx/csrc/macros.h"
19 -#include "sherpa-onnx/csrc/onnx-utils.h"  
20 #include "sherpa-onnx/csrc/text-utils.h" 20 #include "sherpa-onnx/csrc/text-utils.h"
21 21
22 namespace sherpa_onnx { 22 namespace sherpa_onnx {
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
  9 +#include <sstream>
9 #include <string> 10 #include <string>
10 11
11 #include "sherpa-onnx/csrc/macros.h" 12 #include "sherpa-onnx/csrc/macros.h"
@@ -22,8 +22,8 @@ @@ -22,8 +22,8 @@
22 #include "rawfile/raw_file_manager.h" 22 #include "rawfile/raw_file_manager.h"
23 #endif 23 #endif
24 24
  25 +#include "sherpa-onnx/csrc/file-utils.h"
25 #include "sherpa-onnx/csrc/macros.h" 26 #include "sherpa-onnx/csrc/macros.h"
26 -#include "sherpa-onnx/csrc/onnx-utils.h"  
27 #include "sherpa-onnx/csrc/symbol-table.h" 27 #include "sherpa-onnx/csrc/symbol-table.h"
28 #include "sherpa-onnx/csrc/text-utils.h" 28 #include "sherpa-onnx/csrc/text-utils.h"
29 29
@@ -20,9 +20,9 @@ @@ -20,9 +20,9 @@
20 #include "rawfile/raw_file_manager.h" 20 #include "rawfile/raw_file_manager.h"
21 #endif 21 #endif
22 22
  23 +#include "sherpa-onnx/csrc/file-utils.h"
23 #include "sherpa-onnx/csrc/macros.h" 24 #include "sherpa-onnx/csrc/macros.h"
24 #include "sherpa-onnx/csrc/offline-tts-character-frontend.h" 25 #include "sherpa-onnx/csrc/offline-tts-character-frontend.h"
25 -#include "sherpa-onnx/csrc/onnx-utils.h"  
26 26
27 namespace sherpa_onnx { 27 namespace sherpa_onnx {
28 28
@@ -15,13 +15,13 @@ @@ -15,13 +15,13 @@
15 #include "fst/extensions/far/far.h" 15 #include "fst/extensions/far/far.h"
16 #include "kaldifst/csrc/kaldi-fst-io.h" 16 #include "kaldifst/csrc/kaldi-fst-io.h"
17 #include "kaldifst/csrc/text-normalizer.h" 17 #include "kaldifst/csrc/text-normalizer.h"
  18 +#include "sherpa-onnx/csrc/file-utils.h"
18 #include "sherpa-onnx/csrc/kokoro-multi-lang-lexicon.h" 19 #include "sherpa-onnx/csrc/kokoro-multi-lang-lexicon.h"
19 #include "sherpa-onnx/csrc/lexicon.h" 20 #include "sherpa-onnx/csrc/lexicon.h"
20 #include "sherpa-onnx/csrc/macros.h" 21 #include "sherpa-onnx/csrc/macros.h"
21 #include "sherpa-onnx/csrc/offline-tts-frontend.h" 22 #include "sherpa-onnx/csrc/offline-tts-frontend.h"
22 #include "sherpa-onnx/csrc/offline-tts-impl.h" 23 #include "sherpa-onnx/csrc/offline-tts-impl.h"
23 #include "sherpa-onnx/csrc/offline-tts-kokoro-model.h" 24 #include "sherpa-onnx/csrc/offline-tts-kokoro-model.h"
24 -#include "sherpa-onnx/csrc/onnx-utils.h"  
25 #include "sherpa-onnx/csrc/piper-phonemize-lexicon.h" 25 #include "sherpa-onnx/csrc/piper-phonemize-lexicon.h"
26 #include "sherpa-onnx/csrc/text-utils.h" 26 #include "sherpa-onnx/csrc/text-utils.h"
27 27
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 #include "fst/extensions/far/far.h" 13 #include "fst/extensions/far/far.h"
14 #include "kaldifst/csrc/kaldi-fst-io.h" 14 #include "kaldifst/csrc/kaldi-fst-io.h"
15 #include "kaldifst/csrc/text-normalizer.h" 15 #include "kaldifst/csrc/text-normalizer.h"
  16 +#include "sherpa-onnx/csrc/file-utils.h"
16 #include "sherpa-onnx/csrc/jieba-lexicon.h" 17 #include "sherpa-onnx/csrc/jieba-lexicon.h"
17 #include "sherpa-onnx/csrc/lexicon.h" 18 #include "sherpa-onnx/csrc/lexicon.h"
18 #include "sherpa-onnx/csrc/macros.h" 19 #include "sherpa-onnx/csrc/macros.h"
@@ -21,7 +22,6 @@ @@ -21,7 +22,6 @@
21 #include "sherpa-onnx/csrc/offline-tts-frontend.h" 22 #include "sherpa-onnx/csrc/offline-tts-frontend.h"
22 #include "sherpa-onnx/csrc/offline-tts-impl.h" 23 #include "sherpa-onnx/csrc/offline-tts-impl.h"
23 #include "sherpa-onnx/csrc/offline-tts-vits-model.h" 24 #include "sherpa-onnx/csrc/offline-tts-vits-model.h"
24 -#include "sherpa-onnx/csrc/onnx-utils.h"  
25 #include "sherpa-onnx/csrc/piper-phonemize-lexicon.h" 25 #include "sherpa-onnx/csrc/piper-phonemize-lexicon.h"
26 #include "sherpa-onnx/csrc/text-utils.h" 26 #include "sherpa-onnx/csrc/text-utils.h"
27 27
@@ -20,13 +20,13 @@ @@ -20,13 +20,13 @@
20 20
21 #include <chrono> // NOLINT 21 #include <chrono> // NOLINT
22 22
  23 +#include "sherpa-onnx/csrc/file-utils.h"
23 #include "sherpa-onnx/csrc/macros.h" 24 #include "sherpa-onnx/csrc/macros.h"
24 #include "sherpa-onnx/csrc/math.h" 25 #include "sherpa-onnx/csrc/math.h"
25 #include "sherpa-onnx/csrc/online-cnn-bilstm-model-meta-data.h" 26 #include "sherpa-onnx/csrc/online-cnn-bilstm-model-meta-data.h"
26 #include "sherpa-onnx/csrc/online-cnn-bilstm-model.h" 27 #include "sherpa-onnx/csrc/online-cnn-bilstm-model.h"
27 #include "sherpa-onnx/csrc/online-punctuation-impl.h" 28 #include "sherpa-onnx/csrc/online-punctuation-impl.h"
28 #include "sherpa-onnx/csrc/online-punctuation.h" 29 #include "sherpa-onnx/csrc/online-punctuation.h"
29 -#include "sherpa-onnx/csrc/onnx-utils.h"  
30 #include "sherpa-onnx/csrc/text-utils.h" 30 #include "sherpa-onnx/csrc/text-utils.h"
31 #include "ssentencepiece/csrc/ssentencepiece.h" 31 #include "ssentencepiece/csrc/ssentencepiece.h"
32 32
@@ -27,8 +27,8 @@ @@ -27,8 +27,8 @@
27 #include "espeak-ng/speak_lib.h" 27 #include "espeak-ng/speak_lib.h"
28 #include "phoneme_ids.hpp" 28 #include "phoneme_ids.hpp"
29 #include "phonemize.hpp" 29 #include "phonemize.hpp"
  30 +#include "sherpa-onnx/csrc/file-utils.h"
30 #include "sherpa-onnx/csrc/macros.h" 31 #include "sherpa-onnx/csrc/macros.h"
31 -#include "sherpa-onnx/csrc/onnx-utils.h"  
32 32
33 namespace sherpa_onnx { 33 namespace sherpa_onnx {
34 34
@@ -25,8 +25,8 @@ @@ -25,8 +25,8 @@
25 25
26 #include "sherpa-onnx/csrc/base64-decode.h" 26 #include "sherpa-onnx/csrc/base64-decode.h"
27 #include "sherpa-onnx/csrc/bbpe.h" 27 #include "sherpa-onnx/csrc/bbpe.h"
  28 +#include "sherpa-onnx/csrc/file-utils.h"
28 #include "sherpa-onnx/csrc/lexicon.h" 29 #include "sherpa-onnx/csrc/lexicon.h"
29 -#include "sherpa-onnx/csrc/onnx-utils.h"  
30 #include "sherpa-onnx/csrc/text-utils.h" 30 #include "sherpa-onnx/csrc/text-utils.h"
31 31
32 namespace sherpa_onnx { 32 namespace sherpa_onnx {
@@ -220,17 +220,20 @@ JNIEXPORT jlong JNICALL Java_com_k2fsa_sherpa_onnx_OfflineTts_newFromAsset( @@ -220,17 +220,20 @@ JNIEXPORT jlong JNICALL Java_com_k2fsa_sherpa_onnx_OfflineTts_newFromAsset(
220 SHERPA_ONNX_EXTERN_C 220 SHERPA_ONNX_EXTERN_C
221 JNIEXPORT jlong JNICALL Java_com_k2fsa_sherpa_onnx_OfflineTts_newFromFile( 221 JNIEXPORT jlong JNICALL Java_com_k2fsa_sherpa_onnx_OfflineTts_newFromFile(
222 JNIEnv *env, jobject /*obj*/, jobject _config) { 222 JNIEnv *env, jobject /*obj*/, jobject _config) {
223 - return SafeJNI(env, "OfflineTts_newFromFile", [&] -> jlong {  
224 - auto config = sherpa_onnx::GetOfflineTtsConfig(env, _config);  
225 - SHERPA_ONNX_LOGE("config:\n%s", config.ToString().c_str());  
226 -  
227 - if (!config.Validate()) {  
228 - SHERPA_ONNX_LOGE("Errors found in config!");  
229 - }  
230 -  
231 - auto tts = new sherpa_onnx::OfflineTts(config);  
232 - return reinterpret_cast<jlong>(tts);  
233 - }, 0L); 223 + return SafeJNI(
  224 + env, "OfflineTts_newFromFile",
  225 + [&]() -> jlong {
  226 + auto config = sherpa_onnx::GetOfflineTtsConfig(env, _config);
  227 + SHERPA_ONNX_LOGE("config:\n%s", config.ToString().c_str());
  228 +
  229 + if (!config.Validate()) {
  230 + SHERPA_ONNX_LOGE("Errors found in config!");
  231 + }
  232 +
  233 + auto tts = new sherpa_onnx::OfflineTts(config);
  234 + return reinterpret_cast<jlong>(tts);
  235 + },
  236 + 0L);
234 } 237 }
235 238
236 SHERPA_ONNX_EXTERN_C 239 SHERPA_ONNX_EXTERN_C
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 5
6 #include <fstream> 6 #include <fstream>
7 7
  8 +#include "sherpa-onnx/csrc/file-utils.h"
8 #include "sherpa-onnx/csrc/macros.h" 9 #include "sherpa-onnx/csrc/macros.h"
9 -#include "sherpa-onnx/csrc/onnx-utils.h"  
10 #include "sherpa-onnx/jni/common.h" 10 #include "sherpa-onnx/jni/common.h"
11 11
12 static jobjectArray ReadWaveImpl(JNIEnv *env, std::istream &is, 12 static jobjectArray ReadWaveImpl(JNIEnv *env, std::istream &is,