Committed by
GitHub
Publish flutter packages for Android (#1074)
正在显示
90 个修改的文件
包含
628 行增加
和
3940 行删除
| @@ -14,10 +14,11 @@ concurrency: | @@ -14,10 +14,11 @@ concurrency: | ||
| 14 | cancel-in-progress: true | 14 | cancel-in-progress: true |
| 15 | 15 | ||
| 16 | jobs: | 16 | jobs: |
| 17 | - release_dart: | 17 | + sherpa_onnx_linux: |
| 18 | + # if: false | ||
| 18 | permissions: | 19 | permissions: |
| 19 | id-token: write # Required for authentication using OIDC | 20 | id-token: write # Required for authentication using OIDC |
| 20 | - name: Release dart | 21 | + name: sherpa_onnx_linux |
| 21 | runs-on: ubuntu-latest | 22 | runs-on: ubuntu-latest |
| 22 | 23 | ||
| 23 | steps: | 24 | steps: |
| @@ -31,21 +32,470 @@ jobs: | @@ -31,21 +32,470 @@ jobs: | ||
| 31 | 32 | ||
| 32 | - uses: dart-lang/setup-dart@v1 | 33 | - uses: dart-lang/setup-dart@v1 |
| 33 | 34 | ||
| 34 | - - name: Copy pre-build libs | 35 | + - name: Fix version |
| 35 | shell: bash | 36 | shell: bash |
| 36 | run: | | 37 | run: | |
| 37 | - cd scripts/dart | ||
| 38 | - ./release.sh | ||
| 39 | - cd ../.. | 38 | + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) |
| 40 | 39 | ||
| 41 | - mv -v sherpa-onnx/flutter /tmp/to-be-published | 40 | + src_dir=$PWD/flutter/sherpa_onnx_linux |
| 41 | + pushd $src_dir | ||
| 42 | + v="version: $SHERPA_ONNX_VERSION" | ||
| 43 | + echo "v: $v" | ||
| 44 | + sed -i.bak s"/^version: .*/$v/" ./pubspec.yaml | ||
| 45 | + rm *.bak | ||
| 46 | + git status | ||
| 47 | + git diff | ||
| 42 | 48 | ||
| 43 | - cp -v README.md /tmp/to-be-published | 49 | + - name: Copy extra files |
| 50 | + shell: bash | ||
| 51 | + run: | | ||
| 52 | + dst=flutter/sherpa_onnx_linux | ||
| 53 | + | ||
| 54 | + mkdir $dst/example | ||
| 55 | + | ||
| 56 | + cp -v flutter/sherpa_onnx/example/* $dst/example | ||
| 57 | + cp -v LICENSE $dst/ | ||
| 58 | + cp -v CHANGELOG.md $dst/ | ||
| 59 | + | ||
| 60 | + git status | ||
| 61 | + | ||
| 62 | + - name: Build sherpa-onnx | ||
| 63 | + uses: addnab/docker-run-action@v3 | ||
| 64 | + with: | ||
| 65 | + image: quay.io/pypa/manylinux2014_x86_64 | ||
| 66 | + options: | | ||
| 67 | + --volume ${{ github.workspace }}/:/home/runner/work/sherpa-onnx/sherpa-onnx | ||
| 68 | + shell: bash | ||
| 69 | + run: | | ||
| 70 | + uname -a | ||
| 71 | + gcc --version | ||
| 72 | + cmake --version | ||
| 73 | + cat /etc/*release | ||
| 74 | + id | ||
| 75 | + pwd | ||
| 76 | + | ||
| 77 | + cd /home/runner/work/sherpa-onnx/sherpa-onnx | ||
| 78 | + | ||
| 79 | + mkdir build | ||
| 80 | + cd build | ||
| 81 | + | ||
| 82 | + cmake \ | ||
| 83 | + -D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \ | ||
| 84 | + -D SHERPA_ONNX_ENABLE_TTS=ON \ | ||
| 85 | + -D CMAKE_BUILD_TYPE=Release \ | ||
| 86 | + -D BUILD_SHARED_LIBS=ON \ | ||
| 87 | + -D CMAKE_INSTALL_PREFIX=./install \ | ||
| 88 | + -D SHERPA_ONNX_ENABLE_JNI=OFF \ | ||
| 89 | + -D SHERPA_ONNX_ENABLE_BINARY=OFF \ | ||
| 90 | + .. | ||
| 91 | + | ||
| 92 | + make -j2 | ||
| 93 | + make install | ||
| 94 | + | ||
| 95 | + ls -lh ./install/lib | ||
| 96 | + | ||
| 97 | + - name: Copy pre-built libs | ||
| 98 | + shell: bash | ||
| 99 | + run: | | ||
| 100 | + cp -v build/install/lib/lib*.so* flutter/sherpa_onnx_linux/linux/ | ||
| 101 | + pushd flutter/sherpa_onnx_linux/linux/ | ||
| 102 | + | ||
| 103 | + rm libonnxruntime.so | ||
| 104 | + ln -s libonnxruntime.so.* ./libonnxruntime.so | ||
| 105 | + | ||
| 106 | + popd | ||
| 107 | + | ||
| 108 | + mv -v flutter/sherpa_onnx_linux /tmp/to_be_published | ||
| 109 | + | ||
| 110 | + ls -lh /tmp/to_be_published/linux | ||
| 111 | + | ||
| 112 | + - name: Release | ||
| 113 | + shell: bash | ||
| 114 | + run: | | ||
| 115 | + cd /tmp/to_be_published | ||
| 116 | + flutter pub get | ||
| 117 | + flutter pub publish --dry-run | ||
| 118 | + flutter pub publish --force | ||
| 119 | + | ||
| 120 | + sherpa_onnx_macos: | ||
| 121 | + # if: false | ||
| 122 | + permissions: | ||
| 123 | + id-token: write # Required for authentication using OIDC | ||
| 124 | + name: sherpa_onnx_macos | ||
| 125 | + runs-on: macos-latest | ||
| 126 | + | ||
| 127 | + steps: | ||
| 128 | + - uses: actions/checkout@v4 | ||
| 129 | + | ||
| 130 | + - name: ccache | ||
| 131 | + uses: hendrikmuhs/ccache-action@v1.2 | ||
| 132 | + with: | ||
| 133 | + key: ${{ matrix.os }}-flutter-release-package | ||
| 134 | + | ||
| 135 | + - name: Setup Flutter SDK | ||
| 136 | + uses: flutter-actions/setup-flutter@v3 | ||
| 137 | + with: | ||
| 138 | + channel: stable | ||
| 139 | + version: latest | ||
| 140 | + | ||
| 141 | + - uses: dart-lang/setup-dart@v1 | ||
| 142 | + | ||
| 143 | + - name: Fix version | ||
| 144 | + shell: bash | ||
| 145 | + run: | | ||
| 146 | + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 147 | + | ||
| 148 | + src_dir=$PWD/flutter/sherpa_onnx_macos | ||
| 149 | + pushd $src_dir | ||
| 150 | + v="version: $SHERPA_ONNX_VERSION" | ||
| 151 | + echo "v: $v" | ||
| 152 | + sed -i.bak s"/^version: .*/$v/" ./pubspec.yaml | ||
| 153 | + rm *.bak | ||
| 154 | + git status | ||
| 155 | + git diff | ||
| 156 | + | ||
| 157 | + - name: Copy extra files | ||
| 158 | + shell: bash | ||
| 159 | + run: | | ||
| 160 | + dst=flutter/sherpa_onnx_macos | ||
| 161 | + | ||
| 162 | + mkdir $dst/example | ||
| 163 | + | ||
| 164 | + cp -v flutter/sherpa_onnx/example/* $dst/example | ||
| 165 | + cp -v LICENSE $dst/ | ||
| 166 | + cp -v CHANGELOG.md $dst/ | ||
| 167 | + | ||
| 168 | + git status | ||
| 169 | + | ||
| 170 | + - name: Configure CMake | ||
| 171 | + shell: bash | ||
| 172 | + run: | | ||
| 173 | + export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 174 | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
| 175 | + cmake --version | ||
| 176 | + | ||
| 177 | + mkdir build | ||
| 178 | + cd build | ||
| 179 | + cmake \ | ||
| 180 | + -D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \ | ||
| 181 | + -D SHERPA_ONNX_ENABLE_TTS=ON \ | ||
| 182 | + -D CMAKE_BUILD_TYPE=Release \ | ||
| 183 | + -D BUILD_SHARED_LIBS=ON \ | ||
| 184 | + -D CMAKE_INSTALL_PREFIX=./install \ | ||
| 185 | + -D SHERPA_ONNX_ENABLE_JNI=OFF \ | ||
| 186 | + -D SHERPA_ONNX_ENABLE_BINARY=OFF \ | ||
| 187 | + -D CMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ | ||
| 188 | + .. | ||
| 189 | + | ||
| 190 | + - name: Build sherpa-onnx | ||
| 191 | + shell: bash | ||
| 192 | + run: | | ||
| 193 | + export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 194 | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
| 195 | + cmake --version | ||
| 196 | + | ||
| 197 | + cd build | ||
| 198 | + make -j2 install | ||
| 199 | + | ||
| 200 | + ls -lh install/lib/libsherpa-onnx-core.dylib | ||
| 201 | + file install/lib/libsherpa-onnx-core.dylib | ||
| 202 | + | ||
| 203 | + - name: Copy pre-built libs | ||
| 204 | + shell: bash | ||
| 205 | + run: | | ||
| 206 | + cp -v build/install/lib/lib*.dylib* flutter/sherpa_onnx_macos/macos/ | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + mv -v flutter/sherpa_onnx_macos /tmp/to_be_published | ||
| 210 | + | ||
| 211 | + ls -lh /tmp/to_be_published/macos | ||
| 212 | + | ||
| 213 | + pushd /tmp/to_be_published/macos | ||
| 214 | + | ||
| 215 | + rm libonnxruntime.dylib | ||
| 216 | + | ||
| 217 | + ls -lh | ||
| 218 | + | ||
| 219 | + popd | ||
| 220 | + | ||
| 221 | + - name: Release | ||
| 222 | + shell: bash | ||
| 223 | + run: | | ||
| 224 | + cd /tmp/to_be_published | ||
| 225 | + du -h -d1 . | ||
| 226 | + flutter pub get | ||
| 227 | + flutter pub publish --dry-run | ||
| 228 | + flutter pub publish --force | ||
| 229 | + | ||
| 230 | + sherpa_onnx_windows: | ||
| 231 | + # if: false | ||
| 232 | + permissions: | ||
| 233 | + id-token: write # Required for authentication using OIDC | ||
| 234 | + name: sherpa_onnx_windows | ||
| 235 | + runs-on: windows-2019 | ||
| 236 | + | ||
| 237 | + steps: | ||
| 238 | + - uses: actions/checkout@v4 | ||
| 239 | + | ||
| 240 | + - name: Fix version | ||
| 241 | + shell: bash | ||
| 242 | + run: | | ||
| 243 | + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 244 | + | ||
| 245 | + src_dir=$PWD/flutter/sherpa_onnx_windows | ||
| 246 | + pushd $src_dir | ||
| 247 | + v="version: $SHERPA_ONNX_VERSION" | ||
| 248 | + echo "v: $v" | ||
| 249 | + sed -i.bak s"/^version: .*/$v/" ./pubspec.yaml | ||
| 250 | + rm *.bak | ||
| 251 | + git status | ||
| 252 | + git diff | ||
| 253 | + | ||
| 254 | + - name: Copy extra files | ||
| 255 | + shell: bash | ||
| 256 | + run: | | ||
| 257 | + dst=flutter/sherpa_onnx_windows | ||
| 258 | + | ||
| 259 | + mkdir $dst/example | ||
| 260 | + | ||
| 261 | + cp -v flutter/sherpa_onnx/example/* $dst/example | ||
| 262 | + cp -v LICENSE $dst/ | ||
| 263 | + cp -v CHANGELOG.md $dst/ | ||
| 264 | + | ||
| 265 | + git status | ||
| 266 | + | ||
| 267 | + - name: Configure CMake | ||
| 268 | + shell: bash | ||
| 269 | + run: | | ||
| 270 | + mkdir build | ||
| 271 | + cd build | ||
| 272 | + cmake \ | ||
| 273 | + -D SHERPA_ONNX_ENABLE_PORTAUDIO=OFF \ | ||
| 274 | + -D SHERPA_ONNX_ENABLE_TTS=ON \ | ||
| 275 | + -D CMAKE_BUILD_TYPE=Release \ | ||
| 276 | + -D BUILD_SHARED_LIBS=ON \ | ||
| 277 | + -D CMAKE_INSTALL_PREFIX=./install \ | ||
| 278 | + -D SHERPA_ONNX_ENABLE_JNI=OFF \ | ||
| 279 | + -D SHERPA_ONNX_ENABLE_BINARY=OFF \ | ||
| 280 | + .. | ||
| 281 | + | ||
| 282 | + - name: Build sherpa-onnx | ||
| 283 | + shell: bash | ||
| 284 | + run: | | ||
| 285 | + cd build | ||
| 286 | + cmake --build . --target install --config Release | ||
| 287 | + | ||
| 288 | + ls -lh install/lib/*.dll | ||
| 289 | + | ||
| 290 | + - name: Copy pre-built libs | ||
| 291 | + shell: bash | ||
| 292 | + run: | | ||
| 293 | + cp -v build/install/lib/*.dll flutter/sherpa_onnx_windows/windows/ | ||
| 294 | + mv -v flutter/sherpa_onnx_windows /tmp/to_be_published | ||
| 295 | + | ||
| 296 | + ls -lh /tmp/to_be_published/windows | ||
| 297 | + | ||
| 298 | + - name: Setup Flutter SDK | ||
| 299 | + uses: flutter-actions/setup-flutter@v3 | ||
| 300 | + with: | ||
| 301 | + channel: stable | ||
| 302 | + version: latest | ||
| 303 | + | ||
| 304 | + - uses: dart-lang/setup-dart@v1 | ||
| 44 | 305 | ||
| 45 | - name: Release | 306 | - name: Release |
| 46 | shell: bash | 307 | shell: bash |
| 47 | run: | | 308 | run: | |
| 48 | - cd /tmp/to-be-published | 309 | + cd /tmp/to_be_published |
| 310 | + flutter pub get | ||
| 311 | + flutter pub publish --dry-run | ||
| 312 | + flutter pub publish --force | ||
| 313 | + | ||
| 314 | + sherpa_onnx_android: | ||
| 315 | + # if: false | ||
| 316 | + permissions: | ||
| 317 | + id-token: write # Required for authentication using OIDC | ||
| 318 | + name: sherpa_onnx_android | ||
| 319 | + runs-on: ubuntu-latest | ||
| 320 | + | ||
| 321 | + steps: | ||
| 322 | + - uses: actions/checkout@v4 | ||
| 323 | + | ||
| 324 | + - name: ccache | ||
| 325 | + uses: hendrikmuhs/ccache-action@v1.2 | ||
| 326 | + with: | ||
| 327 | + key: ${{ matrix.os }}-flutter-release-package-android | ||
| 328 | + | ||
| 329 | + - name: Fix version | ||
| 330 | + shell: bash | ||
| 331 | + run: | | ||
| 332 | + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 333 | + | ||
| 334 | + src_dir=$PWD/flutter/sherpa_onnx_android | ||
| 335 | + pushd $src_dir | ||
| 336 | + v="version: $SHERPA_ONNX_VERSION" | ||
| 337 | + echo "v: $v" | ||
| 338 | + sed -i.bak s"/^version: .*/$v/" ./pubspec.yaml | ||
| 339 | + rm *.bak | ||
| 340 | + git status | ||
| 341 | + git diff | ||
| 342 | + | ||
| 343 | + - name: Copy extra files | ||
| 344 | + shell: bash | ||
| 345 | + run: | | ||
| 346 | + dst=flutter/sherpa_onnx_android | ||
| 347 | + | ||
| 348 | + mkdir $dst/example | ||
| 349 | + | ||
| 350 | + cp -v flutter/sherpa_onnx/example/* $dst/example | ||
| 351 | + cp -v LICENSE $dst/ | ||
| 352 | + cp -v CHANGELOG.md $dst/ | ||
| 353 | + | ||
| 354 | + git status | ||
| 355 | + | ||
| 356 | + - name: Build android-arm64-v8a | ||
| 357 | + shell: bash | ||
| 358 | + run: | | ||
| 359 | + export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 360 | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
| 361 | + cmake --version | ||
| 362 | + | ||
| 363 | + export SHERPA_ONNX_ENABLE_C_API=ON | ||
| 364 | + export SHERPA_ONNX_ENABLE_JNI=OFF | ||
| 365 | + export SHERPA_ONNX_ENABLE_BINARY=OFF | ||
| 366 | + | ||
| 367 | + ./build-android-arm64-v8a.sh | ||
| 368 | + | ||
| 369 | + - name: Build android-armv7-eabi | ||
| 370 | + shell: bash | ||
| 371 | + run: | | ||
| 372 | + export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 373 | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
| 374 | + cmake --version | ||
| 375 | + | ||
| 376 | + export SHERPA_ONNX_ENABLE_C_API=ON | ||
| 377 | + export SHERPA_ONNX_ENABLE_JNI=OFF | ||
| 378 | + export SHERPA_ONNX_ENABLE_BINARY=OFF | ||
| 379 | + | ||
| 380 | + ./build-android-armv7-eabi.sh | ||
| 381 | + | ||
| 382 | + - name: Build android-x86 | ||
| 383 | + shell: bash | ||
| 384 | + run: | | ||
| 385 | + export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 386 | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
| 387 | + cmake --version | ||
| 388 | + | ||
| 389 | + export SHERPA_ONNX_ENABLE_C_API=ON | ||
| 390 | + export SHERPA_ONNX_ENABLE_JNI=OFF | ||
| 391 | + export SHERPA_ONNX_ENABLE_BINARY=OFF | ||
| 392 | + | ||
| 393 | + ./build-android-x86.sh | ||
| 394 | + | ||
| 395 | + - name: Build android-x86-64 | ||
| 396 | + shell: bash | ||
| 397 | + run: | | ||
| 398 | + export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 399 | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
| 400 | + cmake --version | ||
| 401 | + | ||
| 402 | + export SHERPA_ONNX_ENABLE_C_API=ON | ||
| 403 | + export SHERPA_ONNX_ENABLE_JNI=OFF | ||
| 404 | + export SHERPA_ONNX_ENABLE_BINARY=OFF | ||
| 405 | + | ||
| 406 | + ./build-android-x86-64.sh | ||
| 407 | + | ||
| 408 | + - name: Copy pre-built libs | ||
| 409 | + shell: bash | ||
| 410 | + run: | | ||
| 411 | + echo "----arm64-v8a----" | ||
| 412 | + cp -v build-android-arm64-v8a/install/lib/lib*.so flutter/sherpa_onnx_android/android/src/main/jniLibs/arm64-v8a/ | ||
| 413 | + | ||
| 414 | + echo "----armv7-eabi----" | ||
| 415 | + cp -v build-android-armv7-eabi/install/lib/lib*.so flutter/sherpa_onnx_android/android/src/main/jniLibs/armeabi-v7a | ||
| 416 | + | ||
| 417 | + echo "----x86----" | ||
| 418 | + cp -v build-android-x86/install/lib/lib*.so flutter/sherpa_onnx_android/android/src/main/jniLibs/x86 | ||
| 419 | + | ||
| 420 | + echo "----x86_64----" | ||
| 421 | + cp -v build-android-x86-64/install/lib/lib*.so flutter/sherpa_onnx_android/android/src/main/jniLibs/x86_64 | ||
| 422 | + | ||
| 423 | + mv -v flutter/sherpa_onnx_android /tmp/to_be_published | ||
| 424 | + | ||
| 425 | + ls -lh /tmp/to_be_published | ||
| 426 | + | ||
| 427 | + - name: Setup Flutter SDK | ||
| 428 | + uses: flutter-actions/setup-flutter@v3 | ||
| 429 | + with: | ||
| 430 | + channel: stable | ||
| 431 | + version: latest | ||
| 432 | + | ||
| 433 | + - uses: dart-lang/setup-dart@v1 | ||
| 434 | + | ||
| 435 | + - name: Release | ||
| 436 | + shell: bash | ||
| 437 | + run: | | ||
| 438 | + cd /tmp/to_be_published | ||
| 439 | + du -h -d1 . | ||
| 440 | + | ||
| 441 | + flutter pub get | ||
| 442 | + flutter pub publish --dry-run | ||
| 443 | + flutter pub publish --force | ||
| 444 | + | ||
| 445 | + sherpa_onnx: | ||
| 446 | + # needs: [sherpa_onnx_linux, sherpa_onnx_macos, sherpa_onnx_windows, sherpa_onnx_android] | ||
| 447 | + # if: false | ||
| 448 | + permissions: | ||
| 449 | + id-token: write # Required for authentication using OIDC | ||
| 450 | + name: sherpa_onnx | ||
| 451 | + runs-on: ubuntu-latest | ||
| 452 | + | ||
| 453 | + steps: | ||
| 454 | + - uses: actions/checkout@v4 | ||
| 455 | + | ||
| 456 | + - name: Setup Flutter SDK | ||
| 457 | + uses: flutter-actions/setup-flutter@v3 | ||
| 458 | + with: | ||
| 459 | + channel: stable | ||
| 460 | + version: latest | ||
| 461 | + | ||
| 462 | + - uses: dart-lang/setup-dart@v1 | ||
| 463 | + | ||
| 464 | + - name: Fix version | ||
| 465 | + shell: bash | ||
| 466 | + run: | | ||
| 467 | + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) | ||
| 468 | + | ||
| 469 | + src_dir=$PWD/flutter/sherpa_onnx | ||
| 470 | + pushd $src_dir | ||
| 471 | + v="version: $SHERPA_ONNX_VERSION" | ||
| 472 | + echo "v: $v" | ||
| 473 | + sed -i.bak s"/^version: .*/$v/" ./pubspec.yaml | ||
| 474 | + rm *.bak | ||
| 475 | + git status | ||
| 476 | + git diff | ||
| 477 | + | ||
| 478 | + - name: Copy extra files | ||
| 479 | + shell: bash | ||
| 480 | + run: | | ||
| 481 | + dst=flutter/sherpa_onnx | ||
| 482 | + | ||
| 483 | + cp -v LICENSE $dst/ | ||
| 484 | + cp -v CHANGELOG.md $dst/ | ||
| 485 | + cp -v README.md $dst/ | ||
| 486 | + | ||
| 487 | + git status | ||
| 488 | + | ||
| 489 | + mv -v flutter/sherpa_onnx /tmp/to_be_published | ||
| 490 | + | ||
| 491 | + ls -lh /tmp/to_be_published | ||
| 492 | + | ||
| 493 | + - name: Release | ||
| 494 | + shell: bash | ||
| 495 | + run: | | ||
| 496 | + cd /tmp/to_be_published | ||
| 497 | + du -h -d1 . | ||
| 498 | + | ||
| 49 | flutter pub get | 499 | flutter pub get |
| 50 | flutter pub publish --dry-run | 500 | flutter pub publish --dry-run |
| 51 | flutter pub publish --force | 501 | flutter pub publish --force |
| @@ -46,6 +46,51 @@ jobs: | @@ -46,6 +46,51 @@ jobs: | ||
| 46 | dart --version | 46 | dart --version |
| 47 | flutter doctor | 47 | flutter doctor |
| 48 | 48 | ||
| 49 | + - name: Display sherpa-onnx package info | ||
| 50 | + shell: bash | ||
| 51 | + run: | | ||
| 52 | + cd dart-api-examples/vad | ||
| 53 | + flutter pub get | ||
| 54 | + | ||
| 55 | + if [[ ${{ matrix.os }} == ubuntu-latest ]]; then | ||
| 56 | + echo "-----" | ||
| 57 | + ls -lh /home/runner/work/_temp/pub-cache/hosted/pub.dev | ||
| 58 | + | ||
| 59 | + echo "-----" | ||
| 60 | + ls -lh /home/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx* | ||
| 61 | + | ||
| 62 | + echo "-----" | ||
| 63 | + ls -lh /home/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx*/* | ||
| 64 | + | ||
| 65 | + echo "-----" | ||
| 66 | + ls -lh /home/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_linux-* | ||
| 67 | + | ||
| 68 | + # sudo mkdir /home/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_linux-1.10.7/lib | ||
| 69 | + # sudo touch /home/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_linux-1.10.7/lib/.gitkeep | ||
| 70 | + | ||
| 71 | + echo "-----" | ||
| 72 | + ls -lh /home/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_linux-*/linux | ||
| 73 | + elif [[ ${{ matrix.os }} == macos-latest ]]; then | ||
| 74 | + echo "-----" | ||
| 75 | + ls -lh /Users/runner/work/_temp/pub-cache/hosted/pub.dev | ||
| 76 | + | ||
| 77 | + echo "-----" | ||
| 78 | + ls -lh /Users/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx* | ||
| 79 | + | ||
| 80 | + echo "-----" | ||
| 81 | + ls -lh /Users/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx*/* | ||
| 82 | + | ||
| 83 | + echo "-----" | ||
| 84 | + ls -lh /Users/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_macos-*/ | ||
| 85 | + | ||
| 86 | + echo "-----" | ||
| 87 | + ls -lh /Users/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_macos-*/macos | ||
| 88 | + | ||
| 89 | + # sudo mkdir /Users/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_macos-1.10.7/lib | ||
| 90 | + # sudo touch /Users/runner/work/_temp/pub-cache/hosted/pub.dev/sherpa_onnx_macos-1.10.7/lib/.gitkeep | ||
| 91 | + fi | ||
| 92 | + | ||
| 93 | + | ||
| 49 | - name: Run tests | 94 | - name: Run tests |
| 50 | shell: bash | 95 | shell: bash |
| 51 | run: | | 96 | run: | |
| @@ -8,7 +8,7 @@ project(sherpa-onnx) | @@ -8,7 +8,7 @@ project(sherpa-onnx) | ||
| 8 | # ./nodejs-addon-examples | 8 | # ./nodejs-addon-examples |
| 9 | # ./dart-api-examples/ | 9 | # ./dart-api-examples/ |
| 10 | # ./sherpa-onnx/flutter/CHANGELOG.md | 10 | # ./sherpa-onnx/flutter/CHANGELOG.md |
| 11 | -set(SHERPA_ONNX_VERSION "1.10.6") | 11 | +set(SHERPA_ONNX_VERSION "1.10.9") |
| 12 | 12 | ||
| 13 | # Disable warning about | 13 | # Disable warning about |
| 14 | # | 14 | # |
| @@ -61,7 +61,7 @@ if(NOT CMAKE_BUILD_TYPE) | @@ -61,7 +61,7 @@ if(NOT CMAKE_BUILD_TYPE) | ||
| 61 | set(CMAKE_BUILD_TYPE Release) | 61 | set(CMAKE_BUILD_TYPE Release) |
| 62 | endif() | 62 | endif() |
| 63 | 63 | ||
| 64 | -if(DEFINED ANDROID_ABI AND NOT SHERPA_ONNX_ENABLE_JNI) | 64 | +if(DEFINED ANDROID_ABI AND NOT SHERPA_ONNX_ENABLE_JNI AND NOT SHERPA_ONNX_ENABLE_C_API) |
| 65 | message(STATUS "Set SHERPA_ONNX_ENABLE_JNI to ON for Android") | 65 | message(STATUS "Set SHERPA_ONNX_ENABLE_JNI to ON for Android") |
| 66 | set(SHERPA_ONNX_ENABLE_JNI ON CACHE BOOL "" FORCE) | 66 | set(SHERPA_ONNX_ENABLE_JNI ON CACHE BOOL "" FORCE) |
| 67 | endif() | 67 | endif() |
| @@ -30,7 +30,7 @@ dependencies: | @@ -30,7 +30,7 @@ dependencies: | ||
| 30 | record: ^5.1.0 | 30 | record: ^5.1.0 |
| 31 | url_launcher: ^6.2.6 | 31 | url_launcher: ^6.2.6 |
| 32 | 32 | ||
| 33 | - sherpa_onnx: ^1.10.0 | 33 | + sherpa_onnx: ^1.10.9 |
| 34 | # sherpa_onnx: | 34 | # sherpa_onnx: |
| 35 | # path: ../../flutter/sherpa_onnx | 35 | # path: ../../flutter/sherpa_onnx |
| 36 | 36 |
flutter/sherpa_onnx/README.md
已删除
100644 → 0
| 1 | # sherpa-onnx app example | 1 | # sherpa-onnx app example |
| 2 | 2 | ||
| 3 | -See also <https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples> | 3 | +## Flutter examples |
| 4 | 4 | ||
| 5 | -## Streaming speech recognition | 5 | +| Functions | URL | Supported Platforms| |
| 6 | +|---|---|---| | ||
| 7 | +|Streaming speech recognition| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter-examples/streaming_asr)| Android, macOS, Windows| | ||
| 6 | 8 | ||
| 7 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr | ||
| 8 | - | ||
| 9 | -## Non-streaming speech recognition | ||
| 10 | - | ||
| 11 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr | ||
| 12 | - | ||
| 13 | -## Text to speech (TTS) | ||
| 14 | - | ||
| 15 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts | ||
| 16 | - | ||
| 17 | -## Voice activity detection (VAD) | ||
| 18 | - | ||
| 19 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad | 9 | +## Pure dart-examples |
| 20 | 10 | ||
| 11 | +| Functions | URL | Supported Platforms| | ||
| 12 | +|---|---|---| | ||
| 13 | +|Streaming speech recognition| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr)| macOS, Windows, Linux| | ||
| 14 | +|Non-Streaming speech recognition| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr)| macOS, Windows, Linux| | ||
| 15 | +|Text to speech| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts)| macOS, Windows, Linux| | ||
| 16 | +|Voice activity detection (VAD)| [Address](https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad)| macOS, Windows, Linux| |
| @@ -4,7 +4,7 @@ description: > | @@ -4,7 +4,7 @@ description: > | ||
| 4 | Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi | 4 | Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi |
| 5 | with onnxruntime without Internet connection. | 5 | with onnxruntime without Internet connection. |
| 6 | 6 | ||
| 7 | -repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/sherpa-onnx/flutter | 7 | +repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter |
| 8 | 8 | ||
| 9 | issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues | 9 | issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues |
| 10 | documentation: https://k2-fsa.github.io/sherpa/onnx/ | 10 | documentation: https://k2-fsa.github.io/sherpa/onnx/ |
| @@ -16,8 +16,8 @@ topics: | @@ -16,8 +16,8 @@ topics: | ||
| 16 | - audio-tagging | 16 | - audio-tagging |
| 17 | - voice-activity-detection | 17 | - voice-activity-detection |
| 18 | 18 | ||
| 19 | -# remember to change the version in ../sherpa_onnx_macos/macos/sherpa_onnx.podspec | ||
| 20 | -version: 1.10.7 | 19 | +# remember to change the version in ../sherpa_onnx_macos/macos/sherpa_onnx_macos.podspec |
| 20 | +version: 1.10.9 | ||
| 21 | 21 | ||
| 22 | homepage: https://github.com/k2-fsa/sherpa-onnx | 22 | homepage: https://github.com/k2-fsa/sherpa-onnx |
| 23 | 23 | ||
| @@ -30,16 +30,16 @@ dependencies: | @@ -30,16 +30,16 @@ dependencies: | ||
| 30 | flutter: | 30 | flutter: |
| 31 | sdk: flutter | 31 | sdk: flutter |
| 32 | 32 | ||
| 33 | - sherpa_onnx_android: | 33 | + sherpa_onnx_android: ^1.10.9 |
| 34 | # path: ../sherpa_onnx_android | 34 | # path: ../sherpa_onnx_android |
| 35 | 35 | ||
| 36 | - sherpa_onnx_macos: | 36 | + sherpa_onnx_macos: ^1.10.9 |
| 37 | # path: ../sherpa_onnx_macos | 37 | # path: ../sherpa_onnx_macos |
| 38 | 38 | ||
| 39 | - sherpa_onnx_linux: | 39 | + sherpa_onnx_linux: ^1.10.9 |
| 40 | # path: ../sherpa_onnx_linux | 40 | # path: ../sherpa_onnx_linux |
| 41 | # | 41 | # |
| 42 | - sherpa_onnx_windows: | 42 | + sherpa_onnx_windows: ^1.10.9 |
| 43 | # path: ../sherpa_onnx_windows | 43 | # path: ../sherpa_onnx_windows |
| 44 | 44 | ||
| 45 | flutter: | 45 | flutter: |
| 1 | -# Miscellaneous | ||
| 2 | -*.class | ||
| 3 | -*.log | ||
| 4 | -*.pyc | ||
| 5 | -*.swp | ||
| 6 | -.DS_Store | ||
| 7 | -.atom/ | ||
| 8 | -.buildlog/ | ||
| 9 | -.history | ||
| 10 | -.svn/ | ||
| 11 | -migrate_working_dir/ | ||
| 12 | - | ||
| 13 | -# IntelliJ related | ||
| 14 | -*.iml | ||
| 15 | -*.ipr | ||
| 16 | -*.iws | ||
| 17 | -.idea/ | ||
| 18 | - | ||
| 19 | -# The .vscode folder contains launch configuration and tasks you configure in | ||
| 20 | -# VS Code which you may wish to be included in version control, so this line | ||
| 21 | -# is commented out by default. | ||
| 22 | -#.vscode/ | ||
| 23 | - | ||
| 24 | -# Flutter/Dart/Pub related | ||
| 25 | -**/doc/api/ | ||
| 26 | -**/ios/Flutter/.last_build_id | ||
| 27 | -.dart_tool/ | ||
| 28 | -.flutter-plugins | ||
| 29 | -.flutter-plugins-dependencies | ||
| 30 | -.pub-cache/ | ||
| 31 | -.pub/ | ||
| 32 | -/build/ | ||
| 33 | - | ||
| 34 | -# Symbolication related | ||
| 35 | -app.*.symbols | ||
| 36 | - | ||
| 37 | -# Obfuscation related | ||
| 38 | -app.*.map.json | ||
| 39 | - | ||
| 40 | -# Android Studio will place build artifacts here | ||
| 41 | -/android/app/debug | ||
| 42 | -/android/app/profile | ||
| 43 | -/android/app/release |
| 1 | -# sherpa-onnx app example | ||
| 2 | - | ||
| 3 | -## Streaming speech recognition | ||
| 4 | - | ||
| 5 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr | ||
| 6 | - | ||
| 7 | -## Non-streaming speech recognition | ||
| 8 | - | ||
| 9 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr | ||
| 10 | - | ||
| 11 | -## Text to speech (TTS) | ||
| 12 | - | ||
| 13 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts | ||
| 14 | - | ||
| 15 | -## Voice activity detection (VAD) | ||
| 16 | - | ||
| 17 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad | ||
| 18 | - |
flutter/sherpa_onnx_android/lib/README.md
0 → 100644
| 1 | name: sherpa_onnx_android | 1 | name: sherpa_onnx_android |
| 2 | -description: "A new Flutter FFI plugin project." | 2 | + |
| 3 | +description: > | ||
| 4 | + Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi | ||
| 5 | + with onnxruntime without Internet connection. | ||
| 6 | + | ||
| 3 | version: 0.0.1 | 7 | version: 0.0.1 |
| 4 | -homepage: | 8 | + |
| 9 | +repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter | ||
| 10 | + | ||
| 11 | +issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues | ||
| 12 | +documentation: https://k2-fsa.github.io/sherpa/onnx/ | ||
| 13 | + | ||
| 14 | +homepage: https://github.com/k2-fsa/sherpa-onnx | ||
| 15 | + | ||
| 16 | +topics: | ||
| 17 | + - speech-recognition | ||
| 18 | + - speech-synthesis | ||
| 19 | + - speaker-identification | ||
| 20 | + - audio-tagging | ||
| 21 | + - voice-activity-detection | ||
| 5 | 22 | ||
| 6 | environment: | 23 | environment: |
| 7 | sdk: '>=3.4.0 <4.0.0' | 24 | sdk: '>=3.4.0 <4.0.0' |
| 1 | -# Miscellaneous | ||
| 2 | -*.class | ||
| 3 | -*.log | ||
| 4 | -*.pyc | ||
| 5 | -*.swp | ||
| 6 | -.DS_Store | ||
| 7 | -.atom/ | ||
| 8 | -.buildlog/ | ||
| 9 | -.history | ||
| 10 | -.svn/ | ||
| 11 | -migrate_working_dir/ | ||
| 12 | - | ||
| 13 | -# IntelliJ related | ||
| 14 | -*.iml | ||
| 15 | -*.ipr | ||
| 16 | -*.iws | ||
| 17 | -.idea/ | ||
| 18 | - | ||
| 19 | -# The .vscode folder contains launch configuration and tasks you configure in | ||
| 20 | -# VS Code which you may wish to be included in version control, so this line | ||
| 21 | -# is commented out by default. | ||
| 22 | -#.vscode/ | ||
| 23 | - | ||
| 24 | -# Flutter/Dart/Pub related | ||
| 25 | -**/doc/api/ | ||
| 26 | -**/ios/Flutter/.last_build_id | ||
| 27 | -.dart_tool/ | ||
| 28 | -.flutter-plugins | ||
| 29 | -.flutter-plugins-dependencies | ||
| 30 | -.pub-cache/ | ||
| 31 | -.pub/ | ||
| 32 | -/build/ | ||
| 33 | - | ||
| 34 | -# Symbolication related | ||
| 35 | -app.*.symbols | ||
| 36 | - | ||
| 37 | -# Obfuscation related | ||
| 38 | -app.*.map.json | ||
| 39 | - | ||
| 40 | -# Android Studio will place build artifacts here | ||
| 41 | -/android/app/debug | ||
| 42 | -/android/app/profile | ||
| 43 | -/android/app/release |
| 1 | -# sherpa-onnx app example | ||
| 2 | - | ||
| 3 | -## Streaming speech recognition | ||
| 4 | - | ||
| 5 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr | ||
| 6 | - | ||
| 7 | -## Non-streaming speech recognition | ||
| 8 | - | ||
| 9 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr | ||
| 10 | - | ||
| 11 | -## Text to speech (TTS) | ||
| 12 | - | ||
| 13 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts | ||
| 14 | - | ||
| 15 | -## Voice activity detection (VAD) | ||
| 16 | - | ||
| 17 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad | ||
| 18 | - |
flutter/sherpa_onnx_linux/lib/README.md
0 → 100644
| 1 | name: sherpa_onnx_linux | 1 | name: sherpa_onnx_linux |
| 2 | -description: "A new Flutter FFI plugin project." | 2 | +description: > |
| 3 | + Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi | ||
| 4 | + with onnxruntime without Internet connection. | ||
| 5 | + | ||
| 3 | version: 0.0.1 | 6 | version: 0.0.1 |
| 4 | -homepage: | 7 | + |
| 8 | +repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter | ||
| 9 | + | ||
| 10 | +issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues | ||
| 11 | +documentation: https://k2-fsa.github.io/sherpa/onnx/ | ||
| 12 | + | ||
| 13 | +homepage: https://github.com/k2-fsa/sherpa-onnx | ||
| 14 | + | ||
| 15 | +topics: | ||
| 16 | + - speech-recognition | ||
| 17 | + - speech-synthesis | ||
| 18 | + - speaker-identification | ||
| 19 | + - audio-tagging | ||
| 20 | + - voice-activity-detection | ||
| 5 | 21 | ||
| 6 | environment: | 22 | environment: |
| 7 | sdk: '>=3.4.0 <4.0.0' | 23 | sdk: '>=3.4.0 <4.0.0' |
| 1 | -# sherpa-onnx app example | ||
| 2 | - | ||
| 3 | -## Streaming speech recognition | ||
| 4 | - | ||
| 5 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr | ||
| 6 | - | ||
| 7 | -## Non-streaming speech recognition | ||
| 8 | - | ||
| 9 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr | ||
| 10 | - | ||
| 11 | -## Text to speech (TTS) | ||
| 12 | - | ||
| 13 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts | ||
| 14 | - | ||
| 15 | -## Voice activity detection (VAD) | ||
| 16 | - | ||
| 17 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad | ||
| 18 | - |
flutter/sherpa_onnx_macos/lib/README.md
0 → 100644
| @@ -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.6' | 7 | + s.version = '1.10.7' |
| 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. |
| 1 | name: sherpa_onnx_macos | 1 | name: sherpa_onnx_macos |
| 2 | -description: "A new Flutter FFI plugin project." | 2 | + |
| 3 | +description: > | ||
| 4 | + Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi | ||
| 5 | + with onnxruntime without Internet connection. | ||
| 6 | + | ||
| 3 | version: 0.0.1 | 7 | version: 0.0.1 |
| 4 | -homepage: | 8 | + |
| 9 | +repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter | ||
| 10 | + | ||
| 11 | +issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues | ||
| 12 | +documentation: https://k2-fsa.github.io/sherpa/onnx/ | ||
| 13 | + | ||
| 14 | +homepage: https://github.com/k2-fsa/sherpa-onnx | ||
| 15 | + | ||
| 16 | +topics: | ||
| 17 | + - speech-recognition | ||
| 18 | + - speech-synthesis | ||
| 19 | + - speaker-identification | ||
| 20 | + - audio-tagging | ||
| 21 | + - voice-activity-detection | ||
| 5 | 22 | ||
| 6 | environment: | 23 | environment: |
| 7 | sdk: '>=3.4.0 <4.0.0' | 24 | sdk: '>=3.4.0 <4.0.0' |
| 1 | -# Miscellaneous | ||
| 2 | -*.class | ||
| 3 | -*.log | ||
| 4 | -*.pyc | ||
| 5 | -*.swp | ||
| 6 | -.DS_Store | ||
| 7 | -.atom/ | ||
| 8 | -.buildlog/ | ||
| 9 | -.history | ||
| 10 | -.svn/ | ||
| 11 | -migrate_working_dir/ | ||
| 12 | - | ||
| 13 | -# IntelliJ related | ||
| 14 | -*.iml | ||
| 15 | -*.ipr | ||
| 16 | -*.iws | ||
| 17 | -.idea/ | ||
| 18 | - | ||
| 19 | -# The .vscode folder contains launch configuration and tasks you configure in | ||
| 20 | -# VS Code which you may wish to be included in version control, so this line | ||
| 21 | -# is commented out by default. | ||
| 22 | -#.vscode/ | ||
| 23 | - | ||
| 24 | -# Flutter/Dart/Pub related | ||
| 25 | -**/doc/api/ | ||
| 26 | -**/ios/Flutter/.last_build_id | ||
| 27 | -.dart_tool/ | ||
| 28 | -.flutter-plugins | ||
| 29 | -.flutter-plugins-dependencies | ||
| 30 | -.pub-cache/ | ||
| 31 | -.pub/ | ||
| 32 | -/build/ | ||
| 33 | - | ||
| 34 | -# Symbolication related | ||
| 35 | -app.*.symbols | ||
| 36 | - | ||
| 37 | -# Obfuscation related | ||
| 38 | -app.*.map.json | ||
| 39 | - | ||
| 40 | -# Android Studio will place build artifacts here | ||
| 41 | -/android/app/debug | ||
| 42 | -/android/app/profile | ||
| 43 | -/android/app/release |
| 1 | -# sherpa-onnx app example | ||
| 2 | - | ||
| 3 | -## Streaming speech recognition | ||
| 4 | - | ||
| 5 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr | ||
| 6 | - | ||
| 7 | -## Non-streaming speech recognition | ||
| 8 | - | ||
| 9 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr | ||
| 10 | - | ||
| 11 | -## Text to speech (TTS) | ||
| 12 | - | ||
| 13 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts | ||
| 14 | - | ||
| 15 | -## Voice activity detection (VAD) | ||
| 16 | - | ||
| 17 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad | ||
| 18 | - |
flutter/sherpa_onnx_windows/lib/README.md
0 → 100644
| 1 | name: sherpa_onnx_windows | 1 | name: sherpa_onnx_windows |
| 2 | -description: "A new Flutter FFI plugin project." | 2 | + |
| 3 | +description: > | ||
| 4 | + Speech recognition, speech synthesis, and speaker recognition using next-gen Kaldi | ||
| 5 | + with onnxruntime without Internet connection. | ||
| 6 | + | ||
| 3 | version: 0.0.1 | 7 | version: 0.0.1 |
| 4 | -homepage: | 8 | + |
| 9 | +repository: https://github.com/k2-fsa/sherpa-onnx/tree/master/flutter | ||
| 10 | + | ||
| 11 | +issue_tracker: https://github.com/k2-fsa/sherpa-onnx/issues | ||
| 12 | +documentation: https://k2-fsa.github.io/sherpa/onnx/ | ||
| 13 | + | ||
| 14 | +homepage: https://github.com/k2-fsa/sherpa-onnx | ||
| 15 | + | ||
| 16 | +topics: | ||
| 17 | + - speech-recognition | ||
| 18 | + - speech-synthesis | ||
| 19 | + - speaker-identification | ||
| 20 | + - audio-tagging | ||
| 21 | + - voice-activity-detection | ||
| 5 | 22 | ||
| 6 | environment: | 23 | environment: |
| 7 | sdk: '>=3.4.0 <4.0.0' | 24 | sdk: '>=3.4.0 <4.0.0' |
sherpa-onnx/flutter/.gitignore
已删除
100644 → 0
| 1 | -# Do not remove or rename entries in this file, only add new ones | ||
| 2 | -# See https://github.com/flutter/flutter/issues/128635 for more context. | ||
| 3 | - | ||
| 4 | -# Miscellaneous | ||
| 5 | -*.class | ||
| 6 | -*.lock | ||
| 7 | -*.log | ||
| 8 | -*.pyc | ||
| 9 | -*.swp | ||
| 10 | -.DS_Store | ||
| 11 | -.atom/ | ||
| 12 | -.buildlog/ | ||
| 13 | -.history | ||
| 14 | -.svn/ | ||
| 15 | - | ||
| 16 | -# IntelliJ related | ||
| 17 | -*.iml | ||
| 18 | -*.ipr | ||
| 19 | -*.iws | ||
| 20 | -.idea/ | ||
| 21 | - | ||
| 22 | -# Visual Studio Code related | ||
| 23 | -.classpath | ||
| 24 | -.project | ||
| 25 | -.settings/ | ||
| 26 | -.vscode/* | ||
| 27 | - | ||
| 28 | -# Flutter repo-specific | ||
| 29 | -/bin/cache/ | ||
| 30 | -/bin/internal/bootstrap.bat | ||
| 31 | -/bin/internal/bootstrap.sh | ||
| 32 | -/bin/mingit/ | ||
| 33 | -/dev/benchmarks/mega_gallery/ | ||
| 34 | -/dev/bots/.recipe_deps | ||
| 35 | -/dev/bots/android_tools/ | ||
| 36 | -/dev/devicelab/ABresults*.json | ||
| 37 | -/dev/docs/doc/ | ||
| 38 | -/dev/docs/api_docs.zip | ||
| 39 | -/dev/docs/flutter.docs.zip | ||
| 40 | -/dev/docs/lib/ | ||
| 41 | -/dev/docs/pubspec.yaml | ||
| 42 | -/dev/integration_tests/**/xcuserdata | ||
| 43 | -/dev/integration_tests/**/Pods | ||
| 44 | -/packages/flutter/coverage/ | ||
| 45 | -version | ||
| 46 | -analysis_benchmark.json | ||
| 47 | - | ||
| 48 | -# packages file containing multi-root paths | ||
| 49 | -.packages.generated | ||
| 50 | - | ||
| 51 | -# Flutter/Dart/Pub related | ||
| 52 | -**/doc/api/ | ||
| 53 | -.dart_tool/ | ||
| 54 | -.flutter-plugins | ||
| 55 | -.flutter-plugins-dependencies | ||
| 56 | -**/generated_plugin_registrant.dart | ||
| 57 | -.packages | ||
| 58 | -.pub-preload-cache/ | ||
| 59 | -.pub-cache/ | ||
| 60 | -.pub/ | ||
| 61 | -build/ | ||
| 62 | -flutter_*.png | ||
| 63 | -linked_*.ds | ||
| 64 | -unlinked.ds | ||
| 65 | -unlinked_spec.ds | ||
| 66 | - | ||
| 67 | -# Android related | ||
| 68 | -**/android/**/gradle-wrapper.jar | ||
| 69 | -.gradle/ | ||
| 70 | -**/android/captures/ | ||
| 71 | -**/android/gradlew | ||
| 72 | -**/android/gradlew.bat | ||
| 73 | -**/android/local.properties | ||
| 74 | -**/android/**/GeneratedPluginRegistrant.java | ||
| 75 | -**/android/key.properties | ||
| 76 | -*.jks | ||
| 77 | - | ||
| 78 | -# iOS/XCode related | ||
| 79 | -**/ios/**/*.mode1v3 | ||
| 80 | -**/ios/**/*.mode2v3 | ||
| 81 | -**/ios/**/*.moved-aside | ||
| 82 | -**/ios/**/*.pbxuser | ||
| 83 | -**/ios/**/*.perspectivev3 | ||
| 84 | -**/ios/**/*sync/ | ||
| 85 | -**/ios/**/.sconsign.dblite | ||
| 86 | -**/ios/**/.tags* | ||
| 87 | -**/ios/**/.vagrant/ | ||
| 88 | -**/ios/**/DerivedData/ | ||
| 89 | -**/ios/**/Icon? | ||
| 90 | -**/ios/**/Pods/ | ||
| 91 | -**/ios/**/.symlinks/ | ||
| 92 | -**/ios/**/profile | ||
| 93 | -**/ios/**/xcuserdata | ||
| 94 | -**/ios/.generated/ | ||
| 95 | -**/ios/Flutter/.last_build_id | ||
| 96 | -**/ios/Flutter/App.framework | ||
| 97 | -**/ios/Flutter/Flutter.framework | ||
| 98 | -**/ios/Flutter/Flutter.podspec | ||
| 99 | -**/ios/Flutter/Generated.xcconfig | ||
| 100 | -**/ios/Flutter/ephemeral | ||
| 101 | -**/ios/Flutter/app.flx | ||
| 102 | -**/ios/Flutter/app.zip | ||
| 103 | -**/ios/Flutter/flutter_assets/ | ||
| 104 | -**/ios/Flutter/flutter_export_environment.sh | ||
| 105 | -**/ios/ServiceDefinitions.json | ||
| 106 | -**/ios/Runner/GeneratedPluginRegistrant.* | ||
| 107 | - | ||
| 108 | -# macOS | ||
| 109 | -**/Flutter/ephemeral/ | ||
| 110 | -**/Pods/ | ||
| 111 | -**/macos/Flutter/GeneratedPluginRegistrant.swift | ||
| 112 | -**/macos/Flutter/ephemeral | ||
| 113 | -**/xcuserdata/ | ||
| 114 | - | ||
| 115 | -# Windows | ||
| 116 | -**/windows/flutter/generated_plugin_registrant.cc | ||
| 117 | -**/windows/flutter/generated_plugin_registrant.h | ||
| 118 | -**/windows/flutter/generated_plugins.cmake | ||
| 119 | - | ||
| 120 | -# Linux | ||
| 121 | -**/linux/flutter/generated_plugin_registrant.cc | ||
| 122 | -**/linux/flutter/generated_plugin_registrant.h | ||
| 123 | -**/linux/flutter/generated_plugins.cmake | ||
| 124 | - | ||
| 125 | -# Coverage | ||
| 126 | -coverage/ | ||
| 127 | - | ||
| 128 | -# Symbols | ||
| 129 | -app.*.symbols | ||
| 130 | - | ||
| 131 | -# Exceptions to above rules. | ||
| 132 | -!**/ios/**/default.mode1v3 | ||
| 133 | -!**/ios/**/default.mode2v3 | ||
| 134 | -!**/ios/**/default.pbxuser | ||
| 135 | -!**/ios/**/default.perspectivev3 | ||
| 136 | -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | ||
| 137 | -!/dev/ci/**/Gemfile.lock | ||
| 138 | -!.vscode/settings.json | ||
| 139 | - | ||
| 140 | -## User settings | ||
| 141 | -xcuserdata/ | ||
| 142 | - | ||
| 143 | -## Xcode 8 and earlier | ||
| 144 | -*.xcscmblueprint | ||
| 145 | -*.xccheckout | ||
| 146 | - | ||
| 147 | -flutter_jank_metrics*.json |
sherpa-onnx/flutter/CHANGELOG.md
已删除
100644 → 0
| 1 | -## 1.10.2 | ||
| 2 | - | ||
| 3 | -* Fix passing C# string to C++ | ||
| 4 | - | ||
| 5 | -## 1.10.1 | ||
| 6 | - | ||
| 7 | -* Enable to stop TTS generation | ||
| 8 | - | ||
| 9 | -## 1.10.0 | ||
| 10 | - | ||
| 11 | -* Add inverse text normalization | ||
| 12 | - | ||
| 13 | -## 1.9.30 | ||
| 14 | - | ||
| 15 | -* Add TTS | ||
| 16 | - | ||
| 17 | -## 1.9.29 | ||
| 18 | - | ||
| 19 | -* Publish with CI | ||
| 20 | - | ||
| 21 | -## 0.0.3 | ||
| 22 | - | ||
| 23 | -* Fix path separator on Windows. | ||
| 24 | - | ||
| 25 | -## 0.0.2 | ||
| 26 | - | ||
| 27 | -* Support specifying lib path. | ||
| 28 | - | ||
| 29 | -## 0.0.1 | ||
| 30 | - | ||
| 31 | -* Initial release. |
sherpa-onnx/flutter/LICENSE
已删除
100644 → 0
| 1 | - | ||
| 2 | - Apache License | ||
| 3 | - Version 2.0, January 2004 | ||
| 4 | - http://www.apache.org/licenses/ | ||
| 5 | - | ||
| 6 | - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
| 7 | - | ||
| 8 | - 1. Definitions. | ||
| 9 | - | ||
| 10 | - "License" shall mean the terms and conditions for use, reproduction, | ||
| 11 | - and distribution as defined by Sections 1 through 9 of this document. | ||
| 12 | - | ||
| 13 | - "Licensor" shall mean the copyright owner or entity authorized by | ||
| 14 | - the copyright owner that is granting the License. | ||
| 15 | - | ||
| 16 | - "Legal Entity" shall mean the union of the acting entity and all | ||
| 17 | - other entities that control, are controlled by, or are under common | ||
| 18 | - control with that entity. For the purposes of this definition, | ||
| 19 | - "control" means (i) the power, direct or indirect, to cause the | ||
| 20 | - direction or management of such entity, whether by contract or | ||
| 21 | - otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
| 22 | - outstanding shares, or (iii) beneficial ownership of such entity. | ||
| 23 | - | ||
| 24 | - "You" (or "Your") shall mean an individual or Legal Entity | ||
| 25 | - exercising permissions granted by this License. | ||
| 26 | - | ||
| 27 | - "Source" form shall mean the preferred form for making modifications, | ||
| 28 | - including but not limited to software source code, documentation | ||
| 29 | - source, and configuration files. | ||
| 30 | - | ||
| 31 | - "Object" form shall mean any form resulting from mechanical | ||
| 32 | - transformation or translation of a Source form, including but | ||
| 33 | - not limited to compiled object code, generated documentation, | ||
| 34 | - and conversions to other media types. | ||
| 35 | - | ||
| 36 | - "Work" shall mean the work of authorship, whether in Source or | ||
| 37 | - Object form, made available under the License, as indicated by a | ||
| 38 | - copyright notice that is included in or attached to the work | ||
| 39 | - (an example is provided in the Appendix below). | ||
| 40 | - | ||
| 41 | - "Derivative Works" shall mean any work, whether in Source or Object | ||
| 42 | - form, that is based on (or derived from) the Work and for which the | ||
| 43 | - editorial revisions, annotations, elaborations, or other modifications | ||
| 44 | - represent, as a whole, an original work of authorship. For the purposes | ||
| 45 | - of this License, Derivative Works shall not include works that remain | ||
| 46 | - separable from, or merely link (or bind by name) to the interfaces of, | ||
| 47 | - the Work and Derivative Works thereof. | ||
| 48 | - | ||
| 49 | - "Contribution" shall mean any work of authorship, including | ||
| 50 | - the original version of the Work and any modifications or additions | ||
| 51 | - to that Work or Derivative Works thereof, that is intentionally | ||
| 52 | - submitted to Licensor for inclusion in the Work by the copyright owner | ||
| 53 | - or by an individual or Legal Entity authorized to submit on behalf of | ||
| 54 | - the copyright owner. For the purposes of this definition, "submitted" | ||
| 55 | - means any form of electronic, verbal, or written communication sent | ||
| 56 | - to the Licensor or its representatives, including but not limited to | ||
| 57 | - communication on electronic mailing lists, source code control systems, | ||
| 58 | - and issue tracking systems that are managed by, or on behalf of, the | ||
| 59 | - Licensor for the purpose of discussing and improving the Work, but | ||
| 60 | - excluding communication that is conspicuously marked or otherwise | ||
| 61 | - designated in writing by the copyright owner as "Not a Contribution." | ||
| 62 | - | ||
| 63 | - "Contributor" shall mean Licensor and any individual or Legal Entity | ||
| 64 | - on behalf of whom a Contribution has been received by Licensor and | ||
| 65 | - subsequently incorporated within the Work. | ||
| 66 | - | ||
| 67 | - 2. Grant of Copyright License. Subject to the terms and conditions of | ||
| 68 | - this License, each Contributor hereby grants to You a perpetual, | ||
| 69 | - worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
| 70 | - copyright license to reproduce, prepare Derivative Works of, | ||
| 71 | - publicly display, publicly perform, sublicense, and distribute the | ||
| 72 | - Work and such Derivative Works in Source or Object form. | ||
| 73 | - | ||
| 74 | - 3. Grant of Patent License. Subject to the terms and conditions of | ||
| 75 | - this License, each Contributor hereby grants to You a perpetual, | ||
| 76 | - worldwide, non-exclusive, no-charge, royalty-free, irrevocable | ||
| 77 | - (except as stated in this section) patent license to make, have made, | ||
| 78 | - use, offer to sell, sell, import, and otherwise transfer the Work, | ||
| 79 | - where such license applies only to those patent claims licensable | ||
| 80 | - by such Contributor that are necessarily infringed by their | ||
| 81 | - Contribution(s) alone or by combination of their Contribution(s) | ||
| 82 | - with the Work to which such Contribution(s) was submitted. If You | ||
| 83 | - institute patent litigation against any entity (including a | ||
| 84 | - cross-claim or counterclaim in a lawsuit) alleging that the Work | ||
| 85 | - or a Contribution incorporated within the Work constitutes direct | ||
| 86 | - or contributory patent infringement, then any patent licenses | ||
| 87 | - granted to You under this License for that Work shall terminate | ||
| 88 | - as of the date such litigation is filed. | ||
| 89 | - | ||
| 90 | - 4. Redistribution. You may reproduce and distribute copies of the | ||
| 91 | - Work or Derivative Works thereof in any medium, with or without | ||
| 92 | - modifications, and in Source or Object form, provided that You | ||
| 93 | - meet the following conditions: | ||
| 94 | - | ||
| 95 | - (a) You must give any other recipients of the Work or | ||
| 96 | - Derivative Works a copy of this License; and | ||
| 97 | - | ||
| 98 | - (b) You must cause any modified files to carry prominent notices | ||
| 99 | - stating that You changed the files; and | ||
| 100 | - | ||
| 101 | - (c) You must retain, in the Source form of any Derivative Works | ||
| 102 | - that You distribute, all copyright, patent, trademark, and | ||
| 103 | - attribution notices from the Source form of the Work, | ||
| 104 | - excluding those notices that do not pertain to any part of | ||
| 105 | - the Derivative Works; and | ||
| 106 | - | ||
| 107 | - (d) If the Work includes a "NOTICE" text file as part of its | ||
| 108 | - distribution, then any Derivative Works that You distribute must | ||
| 109 | - include a readable copy of the attribution notices contained | ||
| 110 | - within such NOTICE file, excluding those notices that do not | ||
| 111 | - pertain to any part of the Derivative Works, in at least one | ||
| 112 | - of the following places: within a NOTICE text file distributed | ||
| 113 | - as part of the Derivative Works; within the Source form or | ||
| 114 | - documentation, if provided along with the Derivative Works; or, | ||
| 115 | - within a display generated by the Derivative Works, if and | ||
| 116 | - wherever such third-party notices normally appear. The contents | ||
| 117 | - of the NOTICE file are for informational purposes only and | ||
| 118 | - do not modify the License. You may add Your own attribution | ||
| 119 | - notices within Derivative Works that You distribute, alongside | ||
| 120 | - or as an addendum to the NOTICE text from the Work, provided | ||
| 121 | - that such additional attribution notices cannot be construed | ||
| 122 | - as modifying the License. | ||
| 123 | - | ||
| 124 | - You may add Your own copyright statement to Your modifications and | ||
| 125 | - may provide additional or different license terms and conditions | ||
| 126 | - for use, reproduction, or distribution of Your modifications, or | ||
| 127 | - for any such Derivative Works as a whole, provided Your use, | ||
| 128 | - reproduction, and distribution of the Work otherwise complies with | ||
| 129 | - the conditions stated in this License. | ||
| 130 | - | ||
| 131 | - 5. Submission of Contributions. Unless You explicitly state otherwise, | ||
| 132 | - any Contribution intentionally submitted for inclusion in the Work | ||
| 133 | - by You to the Licensor shall be under the terms and conditions of | ||
| 134 | - this License, without any additional terms or conditions. | ||
| 135 | - Notwithstanding the above, nothing herein shall supersede or modify | ||
| 136 | - the terms of any separate license agreement you may have executed | ||
| 137 | - with Licensor regarding such Contributions. | ||
| 138 | - | ||
| 139 | - 6. Trademarks. This License does not grant permission to use the trade | ||
| 140 | - names, trademarks, service marks, or product names of the Licensor, | ||
| 141 | - except as required for reasonable and customary use in describing the | ||
| 142 | - origin of the Work and reproducing the content of the NOTICE file. | ||
| 143 | - | ||
| 144 | - 7. Disclaimer of Warranty. Unless required by applicable law or | ||
| 145 | - agreed to in writing, Licensor provides the Work (and each | ||
| 146 | - Contributor provides its Contributions) on an "AS IS" BASIS, | ||
| 147 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
| 148 | - implied, including, without limitation, any warranties or conditions | ||
| 149 | - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A | ||
| 150 | - PARTICULAR PURPOSE. You are solely responsible for determining the | ||
| 151 | - appropriateness of using or redistributing the Work and assume any | ||
| 152 | - risks associated with Your exercise of permissions under this License. | ||
| 153 | - | ||
| 154 | - 8. Limitation of Liability. In no event and under no legal theory, | ||
| 155 | - whether in tort (including negligence), contract, or otherwise, | ||
| 156 | - unless required by applicable law (such as deliberate and grossly | ||
| 157 | - negligent acts) or agreed to in writing, shall any Contributor be | ||
| 158 | - liable to You for damages, including any direct, indirect, special, | ||
| 159 | - incidental, or consequential damages of any character arising as a | ||
| 160 | - result of this License or out of the use or inability to use the | ||
| 161 | - Work (including but not limited to damages for loss of goodwill, | ||
| 162 | - work stoppage, computer failure or malfunction, or any and all | ||
| 163 | - other commercial damages or losses), even if such Contributor | ||
| 164 | - has been advised of the possibility of such damages. | ||
| 165 | - | ||
| 166 | - 9. Accepting Warranty or Additional Liability. While redistributing | ||
| 167 | - the Work or Derivative Works thereof, You may choose to offer, | ||
| 168 | - and charge a fee for, acceptance of support, warranty, indemnity, | ||
| 169 | - or other liability obligations and/or rights consistent with this | ||
| 170 | - License. However, in accepting such obligations, You may act only | ||
| 171 | - on Your own behalf and on Your sole responsibility, not on behalf | ||
| 172 | - of any other Contributor, and only if You agree to indemnify, | ||
| 173 | - defend, and hold each Contributor harmless for any liability | ||
| 174 | - incurred by, or claims asserted against, such Contributor by reason | ||
| 175 | - of your accepting any such warranty or additional liability. | ||
| 176 | - | ||
| 177 | - END OF TERMS AND CONDITIONS | ||
| 178 | - | ||
| 179 | - APPENDIX: How to apply the Apache License to your work. | ||
| 180 | - | ||
| 181 | - To apply the Apache License to your work, attach the following | ||
| 182 | - boilerplate notice, with the fields enclosed by brackets "[]" | ||
| 183 | - replaced with your own identifying information. (Don't include | ||
| 184 | - the brackets!) The text should be enclosed in the appropriate | ||
| 185 | - comment syntax for the file format. We also recommend that a | ||
| 186 | - file or class name and description of purpose be included on the | ||
| 187 | - same "printed page" as the copyright notice for easier | ||
| 188 | - identification within third-party archives. | ||
| 189 | - | ||
| 190 | - Copyright [yyyy] [name of copyright owner] | ||
| 191 | - | ||
| 192 | - Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 193 | - you may not use this file except in compliance with the License. | ||
| 194 | - You may obtain a copy of the License at | ||
| 195 | - | ||
| 196 | - http://www.apache.org/licenses/LICENSE-2.0 | ||
| 197 | - | ||
| 198 | - Unless required by applicable law or agreed to in writing, software | ||
| 199 | - distributed under the License is distributed on an "AS IS" BASIS, | ||
| 200 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 201 | - See the License for the specific language governing permissions and | ||
| 202 | - limitations under the License. |
| 1 | -# Introduction | ||
| 2 | - | ||
| 3 | -## Speaker identification | ||
| 4 | - | ||
| 5 | -```bash | ||
| 6 | -# switch to this directory and run | ||
| 7 | - | ||
| 8 | -wget https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_eres2net_base_sv_zh-cn_3dspeaker_16k.onnx | ||
| 9 | -wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx | ||
| 10 | -git clone https://github.com/csukuangfj/sr-data | ||
| 11 | - | ||
| 12 | -rm -rf sr-data/.git | ||
| 13 | -``` |
不能预览此文件类型
不能预览此文件类型
sherpa-onnx/flutter/example/example.md
已删除
100644 → 0
| 1 | -# sherpa-onnx app example | ||
| 2 | - | ||
| 3 | -## Streaming speech recognition | ||
| 4 | - | ||
| 5 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/streaming-asr | ||
| 6 | - | ||
| 7 | -## Non-streaming speech recognition | ||
| 8 | - | ||
| 9 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/non-streaming-asr | ||
| 10 | - | ||
| 11 | -## Text to speech (TTS) | ||
| 12 | - | ||
| 13 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/tts | ||
| 14 | - | ||
| 15 | -## Voice activity detection (VAD) | ||
| 16 | - | ||
| 17 | -Please see https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/vad | ||
| 18 | - |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'package:flutter/material.dart'; | ||
| 3 | -import 'package:url_launcher/url_launcher.dart'; | ||
| 4 | - | ||
| 5 | -class InfoScreen extends StatelessWidget { | ||
| 6 | - @override | ||
| 7 | - Widget build(BuildContext context) { | ||
| 8 | - const double height = 20; | ||
| 9 | - return Container( | ||
| 10 | - child: Padding( | ||
| 11 | - padding: const EdgeInsets.all(8.0), | ||
| 12 | - child: Column( | ||
| 13 | - crossAxisAlignment: CrossAxisAlignment.start, | ||
| 14 | - children: <Widget>[ | ||
| 15 | - Text('Everything is open-sourced.'), | ||
| 16 | - SizedBox(height: height), | ||
| 17 | - InkWell( | ||
| 18 | - child: Text('Code: https://github.com/k2-fsa/sherpa-onnx'), | ||
| 19 | - onTap: () => launch('https://k2-fsa.github.io/sherpa/onnx/'), | ||
| 20 | - ), | ||
| 21 | - SizedBox(height: height), | ||
| 22 | - InkWell( | ||
| 23 | - child: Text('Doc: https://k2-fsa.github.io/sherpa/onnx/'), | ||
| 24 | - onTap: () => launch('https://k2-fsa.github.io/sherpa/onnx/'), | ||
| 25 | - ), | ||
| 26 | - SizedBox(height: height), | ||
| 27 | - Text('QQ 群: 744602236'), | ||
| 28 | - SizedBox(height: height), | ||
| 29 | - InkWell( | ||
| 30 | - child: Text( | ||
| 31 | - '微信群: https://k2-fsa.github.io/sherpa/social-groups.html'), | ||
| 32 | - onTap: () => | ||
| 33 | - launch('https://k2-fsa.github.io/sherpa/social-groups.html'), | ||
| 34 | - ), | ||
| 35 | - ], | ||
| 36 | - ), | ||
| 37 | - ), | ||
| 38 | - ); | ||
| 39 | - } | ||
| 40 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 3 | -import 'package:flutter/material.dart'; | ||
| 4 | - | ||
| 5 | -import './vad.dart'; | ||
| 6 | -import './streaming_asr.dart'; | ||
| 7 | -import './info.dart'; | ||
| 8 | - | ||
| 9 | -void main() { | ||
| 10 | - runApp(const MyApp()); | ||
| 11 | -} | ||
| 12 | - | ||
| 13 | -class MyApp extends StatelessWidget { | ||
| 14 | - const MyApp({Key? key}) : super(key: key); | ||
| 15 | - @override | ||
| 16 | - Widget build(BuildContext context) { | ||
| 17 | - return MaterialApp( | ||
| 18 | - title: 'Next-gen Kaldi', | ||
| 19 | - theme: ThemeData( | ||
| 20 | - primarySwatch: Colors.blue, | ||
| 21 | - ), | ||
| 22 | - home: const MyHomePage(title: 'Next-gen Kaldi Demo'), | ||
| 23 | - ); | ||
| 24 | - } | ||
| 25 | -} | ||
| 26 | - | ||
| 27 | -class MyHomePage extends StatefulWidget { | ||
| 28 | - const MyHomePage({Key? key, required this.title}) : super(key: key); | ||
| 29 | - final String title; | ||
| 30 | - @override | ||
| 31 | - State<MyHomePage> createState() => _MyHomePageState(); | ||
| 32 | -} | ||
| 33 | - | ||
| 34 | -class _MyHomePageState extends State<MyHomePage> { | ||
| 35 | - int _currentIndex = 0; | ||
| 36 | - final List<Widget> _tabs = [ | ||
| 37 | - StreamingAsrScreen(), | ||
| 38 | - VadScreen(), | ||
| 39 | - InfoScreen(), | ||
| 40 | - ]; | ||
| 41 | - @override | ||
| 42 | - Widget build(BuildContext context) { | ||
| 43 | - return Scaffold( | ||
| 44 | - appBar: AppBar( | ||
| 45 | - title: Text(widget.title), | ||
| 46 | - ), | ||
| 47 | - body: _tabs[_currentIndex], | ||
| 48 | - bottomNavigationBar: BottomNavigationBar( | ||
| 49 | - currentIndex: _currentIndex, | ||
| 50 | - onTap: (int index) { | ||
| 51 | - setState(() { | ||
| 52 | - _currentIndex = index; | ||
| 53 | - }); | ||
| 54 | - }, | ||
| 55 | - // https://www.xiconeditor.com/ | ||
| 56 | - items: [ | ||
| 57 | - BottomNavigationBarItem( | ||
| 58 | - icon: new Image.asset("assets/streaming-asr.ico"), | ||
| 59 | - label: '', | ||
| 60 | - ), | ||
| 61 | - BottomNavigationBarItem( | ||
| 62 | - icon: new Image.asset("assets/vad.ico"), | ||
| 63 | - label: '', | ||
| 64 | - ), | ||
| 65 | - BottomNavigationBarItem( | ||
| 66 | - icon: Icon(Icons.info), | ||
| 67 | - label: 'Info', | ||
| 68 | - ), | ||
| 69 | - ], | ||
| 70 | - ), | ||
| 71 | - ); | ||
| 72 | - } | ||
| 73 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'package:path/path.dart'; | ||
| 3 | -import 'package:path_provider/path_provider.dart'; | ||
| 4 | -import 'package:flutter/services.dart' show rootBundle; | ||
| 5 | -import 'dart:typed_data'; | ||
| 6 | -import "dart:io"; | ||
| 7 | - | ||
| 8 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 9 | -import './utils.dart'; | ||
| 10 | - | ||
| 11 | -Future<void> testNonStreamingParaformerAsr() async { | ||
| 12 | - var model = 'assets/sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx'; | ||
| 13 | - var tokens = 'assets/sherpa-onnx-paraformer-zh-2023-03-28/tokens.txt'; | ||
| 14 | - var testWave = 'assets/sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/0.wav'; | ||
| 15 | - | ||
| 16 | - model = await copyAssetFile(src: model, dst: 'model.int8.onnx'); | ||
| 17 | - tokens = await copyAssetFile(src: tokens, dst: 'tokens.txt'); | ||
| 18 | - testWave = await copyAssetFile(src: testWave, dst: '0.wav'); | ||
| 19 | - | ||
| 20 | - final paraformer = sherpa_onnx.OfflineParaformerModelConfig( | ||
| 21 | - model: model, | ||
| 22 | - ); | ||
| 23 | - | ||
| 24 | - final modelConfig = sherpa_onnx.OfflineModelConfig( | ||
| 25 | - paraformer: paraformer, | ||
| 26 | - tokens: tokens, | ||
| 27 | - modelType: 'paraformer', | ||
| 28 | - ); | ||
| 29 | - | ||
| 30 | - final config = sherpa_onnx.OfflineRecognizerConfig(model: modelConfig); | ||
| 31 | - print(config); | ||
| 32 | - final recognizer = sherpa_onnx.OfflineRecognizer(config); | ||
| 33 | - | ||
| 34 | - final waveData = sherpa_onnx.readWave(testWave); | ||
| 35 | - final stream = recognizer.createStream(); | ||
| 36 | - | ||
| 37 | - stream.acceptWaveform( | ||
| 38 | - samples: waveData.samples, sampleRate: waveData.sampleRate); | ||
| 39 | - recognizer.decode(stream); | ||
| 40 | - | ||
| 41 | - final result = recognizer.getResult(stream); | ||
| 42 | - print('result is: ${result}'); | ||
| 43 | - | ||
| 44 | - print('recognizer: ${recognizer.ptr}'); | ||
| 45 | - stream.free(); | ||
| 46 | - recognizer.free(); | ||
| 47 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 3 | -import 'dart:typed_data'; | ||
| 4 | -import 'package:path/path.dart'; | ||
| 5 | -import './utils.dart'; | ||
| 6 | - | ||
| 7 | -Float32List computeEmbedding( | ||
| 8 | - {required sherpa_onnx.SpeakerEmbeddingExtractor extractor, | ||
| 9 | - required String filename}) { | ||
| 10 | - final stream = extractor.createStream(); | ||
| 11 | - final waveData = sherpa_onnx.readWave(filename); | ||
| 12 | - | ||
| 13 | - stream.acceptWaveform( | ||
| 14 | - samples: waveData.samples, sampleRate: waveData.sampleRate); | ||
| 15 | - | ||
| 16 | - stream.inputFinished(); | ||
| 17 | - | ||
| 18 | - final embedding = extractor.compute(stream); | ||
| 19 | - | ||
| 20 | - stream.free(); | ||
| 21 | - | ||
| 22 | - return embedding; | ||
| 23 | -} | ||
| 24 | - | ||
| 25 | -Future<void> testSpeakerID() async { | ||
| 26 | - final src = | ||
| 27 | - 'assets/3dspeaker_speech_eres2net_base_sv_zh-cn_3dspeaker_16k.onnx'; | ||
| 28 | - final modelPath = await copyAssetFile(src: src, dst: 'model.onnx'); | ||
| 29 | - | ||
| 30 | - final config = sherpa_onnx.SpeakerEmbeddingExtractorConfig(model: modelPath); | ||
| 31 | - final extractor = sherpa_onnx.SpeakerEmbeddingExtractor(config: config); | ||
| 32 | - | ||
| 33 | - const _spk1Files = [ | ||
| 34 | - 'assets/sr-data/enroll/fangjun-sr-1.wav', | ||
| 35 | - 'assets/sr-data/enroll/fangjun-sr-2.wav', | ||
| 36 | - 'assets/sr-data/enroll/fangjun-sr-3.wav', | ||
| 37 | - ]; | ||
| 38 | - final spk1Files = <String>[]; | ||
| 39 | - for (final f in _spk1Files) { | ||
| 40 | - spk1Files.add(await copyAssetFile(src: f, dst: basename(f))); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - final spk1Vec = <Float32List>[]; | ||
| 44 | - for (final f in spk1Files) { | ||
| 45 | - spk1Vec.add(computeEmbedding(extractor: extractor, filename: f)); | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - const _spk2Files = [ | ||
| 49 | - 'assets/sr-data/enroll/leijun-sr-1.wav', | ||
| 50 | - 'assets/sr-data/enroll/leijun-sr-2.wav', | ||
| 51 | - ]; | ||
| 52 | - final spk2Files = <String>[]; | ||
| 53 | - for (final f in _spk2Files) { | ||
| 54 | - spk2Files.add(await copyAssetFile(src: f, dst: basename(f))); | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - final spk2Vec = <Float32List>[]; | ||
| 58 | - for (final f in spk2Files) { | ||
| 59 | - spk2Vec.add(computeEmbedding(extractor: extractor, filename: f)); | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - final manager = sherpa_onnx.SpeakerEmbeddingManager(extractor.dim); | ||
| 63 | - assert(manager.numSpeakers == 0, '${manager.numSpeakers}'); | ||
| 64 | - | ||
| 65 | - bool ok = manager.addMulti(name: 'fangjun', embeddingList: spk1Vec); | ||
| 66 | - assert(ok, "Failed to add fangjun"); | ||
| 67 | - assert(manager.numSpeakers == 1, '${manager.numSpeakers}'); | ||
| 68 | - | ||
| 69 | - ok = manager.addMulti(name: 'leijun', embeddingList: spk2Vec); | ||
| 70 | - assert(ok, "Failed to add leijun"); | ||
| 71 | - assert(manager.numSpeakers == 2, '${manager.numSpeakers}'); | ||
| 72 | - | ||
| 73 | - bool found = manager.contains('fangjun'); | ||
| 74 | - assert(found, 'Failed to find fangjun'); | ||
| 75 | - | ||
| 76 | - found = manager.contains('leijun'); | ||
| 77 | - assert(found, 'Failed to find leijun'); | ||
| 78 | - | ||
| 79 | - print('---All speakers---'); | ||
| 80 | - | ||
| 81 | - print(manager.allSpeakerNames); | ||
| 82 | - | ||
| 83 | - print('------------'); | ||
| 84 | - | ||
| 85 | - const _testFiles = [ | ||
| 86 | - 'assets/sr-data/test/fangjun-test-sr-1.wav', | ||
| 87 | - 'assets/sr-data/test/leijun-test-sr-1.wav', | ||
| 88 | - 'assets/sr-data/test/liudehua-test-sr-1.wav', | ||
| 89 | - ]; | ||
| 90 | - | ||
| 91 | - final testFiles = <String>[]; | ||
| 92 | - for (final f in _testFiles) { | ||
| 93 | - testFiles.add(await copyAssetFile(src: f, dst: basename(f))); | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - const threshold = 0.6; | ||
| 97 | - | ||
| 98 | - for (final f in testFiles) { | ||
| 99 | - final embedding = computeEmbedding(extractor: extractor, filename: f); | ||
| 100 | - | ||
| 101 | - var name = manager.search(embedding: embedding, threshold: threshold); | ||
| 102 | - if (name == '') { | ||
| 103 | - name = '<Unknown>'; | ||
| 104 | - } | ||
| 105 | - print('${f}: ${name}'); | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - ok = manager.verify( | ||
| 109 | - name: 'fangjun', | ||
| 110 | - embedding: computeEmbedding(extractor: extractor, filename: testFiles[0]), | ||
| 111 | - threshold: threshold); | ||
| 112 | - assert(ok, 'Failed to verify fangjun using ${testFiles[0]}'); | ||
| 113 | - | ||
| 114 | - ok = manager.remove('fangjun'); | ||
| 115 | - assert(ok, 'Failed to remove fangjun'); | ||
| 116 | - assert(manager.numSpeakers == 1, '${manager.numSpeakers}'); | ||
| 117 | - | ||
| 118 | - found = manager.contains('fangjun'); | ||
| 119 | - assert(!found, 'Still found fangjun!'); | ||
| 120 | - | ||
| 121 | - ok = manager.verify( | ||
| 122 | - name: 'fangjun', | ||
| 123 | - embedding: computeEmbedding(extractor: extractor, filename: testFiles[0]), | ||
| 124 | - threshold: threshold); | ||
| 125 | - assert(!ok, '${testFiles[0]}'); | ||
| 126 | - | ||
| 127 | - manager.free(); | ||
| 128 | - extractor.free(); | ||
| 129 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'dart:async'; | ||
| 3 | - | ||
| 4 | -import 'package:flutter/foundation.dart'; | ||
| 5 | -import 'package:flutter/material.dart'; | ||
| 6 | -import 'package:path/path.dart' as p; | ||
| 7 | -import 'package:path_provider/path_provider.dart'; | ||
| 8 | -import 'package:record/record.dart'; | ||
| 9 | - | ||
| 10 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 11 | - | ||
| 12 | -import './utils.dart'; | ||
| 13 | - | ||
| 14 | -import './streaming_transducer_asr_test.dart'; // TODO(fangjun): remove it | ||
| 15 | - | ||
| 16 | -Future<sherpa_onnx.OnlineRecognizer> createOnlineRecognizer() async { | ||
| 17 | - var encoder = | ||
| 18 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/encoder-epoch-99-avg-1.int8.onnx'; | ||
| 19 | - var decoder = | ||
| 20 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/decoder-epoch-99-avg-1.onnx'; | ||
| 21 | - var joiner = | ||
| 22 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/joiner-epoch-99-avg-1.int8.onnx'; | ||
| 23 | - var tokens = | ||
| 24 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/tokens.txt'; | ||
| 25 | - | ||
| 26 | - encoder = await copyAssetFile(src: encoder, dst: 'encoder.onnx'); | ||
| 27 | - decoder = await copyAssetFile(src: decoder, dst: 'decoder.onnx'); | ||
| 28 | - joiner = await copyAssetFile(src: joiner, dst: 'joiner.onnx'); | ||
| 29 | - tokens = await copyAssetFile(src: tokens, dst: 'tokens.txt'); | ||
| 30 | - | ||
| 31 | - final transducer = sherpa_onnx.OnlineTransducerModelConfig( | ||
| 32 | - encoder: encoder, | ||
| 33 | - decoder: decoder, | ||
| 34 | - joiner: joiner, | ||
| 35 | - ); | ||
| 36 | - | ||
| 37 | - final modelConfig = sherpa_onnx.OnlineModelConfig( | ||
| 38 | - transducer: transducer, | ||
| 39 | - tokens: tokens, | ||
| 40 | - modelType: 'zipformer', | ||
| 41 | - ); | ||
| 42 | - | ||
| 43 | - final config = sherpa_onnx.OnlineRecognizerConfig(model: modelConfig); | ||
| 44 | - return sherpa_onnx.OnlineRecognizer(config); | ||
| 45 | -} | ||
| 46 | - | ||
| 47 | -class StreamingAsrScreen extends StatefulWidget { | ||
| 48 | - const StreamingAsrScreen({super.key}); | ||
| 49 | - | ||
| 50 | - @override | ||
| 51 | - State<StreamingAsrScreen> createState() => _StreamingAsrScreenState(); | ||
| 52 | -} | ||
| 53 | - | ||
| 54 | -class _StreamingAsrScreenState extends State<StreamingAsrScreen> { | ||
| 55 | - late final TextEditingController _controller; | ||
| 56 | - late final AudioRecorder _audioRecorder; | ||
| 57 | - | ||
| 58 | - String _title = 'Real-time speech recognition'; | ||
| 59 | - String _last = ''; | ||
| 60 | - int _index = 0; | ||
| 61 | - bool _isInitialized = false; | ||
| 62 | - | ||
| 63 | - sherpa_onnx.OnlineRecognizer? _recognizer; | ||
| 64 | - sherpa_onnx.OnlineStream? _stream; | ||
| 65 | - int _sampleRate = 16000; | ||
| 66 | - | ||
| 67 | - StreamSubscription<RecordState>? _recordSub; | ||
| 68 | - RecordState _recordState = RecordState.stop; | ||
| 69 | - | ||
| 70 | - @override | ||
| 71 | - void initState() { | ||
| 72 | - _audioRecorder = AudioRecorder(); | ||
| 73 | - _controller = TextEditingController(); | ||
| 74 | - | ||
| 75 | - _recordSub = _audioRecorder.onStateChanged().listen((recordState) { | ||
| 76 | - _updateRecordState(recordState); | ||
| 77 | - }); | ||
| 78 | - | ||
| 79 | - super.initState(); | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - Future<void> _start() async { | ||
| 83 | - if (!_isInitialized) { | ||
| 84 | - sherpa_onnx.initBindings(); | ||
| 85 | - _recognizer = await createOnlineRecognizer(); | ||
| 86 | - _stream = _recognizer?.createStream(); | ||
| 87 | - | ||
| 88 | - _isInitialized = true; | ||
| 89 | - } | ||
| 90 | - | ||
| 91 | - try { | ||
| 92 | - if (await _audioRecorder.hasPermission()) { | ||
| 93 | - const encoder = AudioEncoder.pcm16bits; | ||
| 94 | - | ||
| 95 | - if (!await _isEncoderSupported(encoder)) { | ||
| 96 | - return; | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | - final devs = await _audioRecorder.listInputDevices(); | ||
| 100 | - debugPrint(devs.toString()); | ||
| 101 | - | ||
| 102 | - const config = RecordConfig( | ||
| 103 | - encoder: encoder, | ||
| 104 | - sampleRate: 16000, | ||
| 105 | - numChannels: 1, | ||
| 106 | - ); | ||
| 107 | - | ||
| 108 | - final stream = await _audioRecorder.startStream(config); | ||
| 109 | - | ||
| 110 | - stream.listen( | ||
| 111 | - (data) { | ||
| 112 | - final samplesFloat32 = | ||
| 113 | - convertBytesToFloat32(Uint8List.fromList(data)); | ||
| 114 | - | ||
| 115 | - _stream!.acceptWaveform( | ||
| 116 | - samples: samplesFloat32, sampleRate: _sampleRate); | ||
| 117 | - while (_recognizer!.isReady(_stream!)) { | ||
| 118 | - _recognizer!.decode(_stream!); | ||
| 119 | - } | ||
| 120 | - final text = _recognizer!.getResult(_stream!).text; | ||
| 121 | - String textToDisplay = _last; | ||
| 122 | - if (text != '') { | ||
| 123 | - if (_last == '') { | ||
| 124 | - textToDisplay = '$_index: $text'; | ||
| 125 | - } else { | ||
| 126 | - textToDisplay = '$_index: $text\n$_last'; | ||
| 127 | - } | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - if (_recognizer!.isEndpoint(_stream!)) { | ||
| 131 | - _recognizer!.reset(_stream!); | ||
| 132 | - if (text != '') { | ||
| 133 | - _last = textToDisplay; | ||
| 134 | - _index += 1; | ||
| 135 | - } | ||
| 136 | - } | ||
| 137 | - print('text: $textToDisplay'); | ||
| 138 | - | ||
| 139 | - _controller.value = TextEditingValue( | ||
| 140 | - text: textToDisplay, | ||
| 141 | - selection: TextSelection.collapsed(offset: textToDisplay.length), | ||
| 142 | - ); | ||
| 143 | - }, | ||
| 144 | - onDone: () { | ||
| 145 | - print('stream stopped.'); | ||
| 146 | - }, | ||
| 147 | - ); | ||
| 148 | - } | ||
| 149 | - } catch (e) { | ||
| 150 | - print(e); | ||
| 151 | - } | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - Future<void> _stop() async { | ||
| 155 | - _stream!.free(); | ||
| 156 | - _stream = _recognizer!.createStream(); | ||
| 157 | - | ||
| 158 | - await _audioRecorder.stop(); | ||
| 159 | - } | ||
| 160 | - | ||
| 161 | - Future<void> _pause() => _audioRecorder.pause(); | ||
| 162 | - | ||
| 163 | - Future<void> _resume() => _audioRecorder.resume(); | ||
| 164 | - | ||
| 165 | - void _updateRecordState(RecordState recordState) { | ||
| 166 | - setState(() => _recordState = recordState); | ||
| 167 | - } | ||
| 168 | - | ||
| 169 | - Future<bool> _isEncoderSupported(AudioEncoder encoder) async { | ||
| 170 | - final isSupported = await _audioRecorder.isEncoderSupported( | ||
| 171 | - encoder, | ||
| 172 | - ); | ||
| 173 | - | ||
| 174 | - if (!isSupported) { | ||
| 175 | - debugPrint('${encoder.name} is not supported on this platform.'); | ||
| 176 | - debugPrint('Supported encoders are:'); | ||
| 177 | - | ||
| 178 | - for (final e in AudioEncoder.values) { | ||
| 179 | - if (await _audioRecorder.isEncoderSupported(e)) { | ||
| 180 | - debugPrint('- ${encoder.name}'); | ||
| 181 | - } | ||
| 182 | - } | ||
| 183 | - } | ||
| 184 | - | ||
| 185 | - return isSupported; | ||
| 186 | - } | ||
| 187 | - | ||
| 188 | - @override | ||
| 189 | - Widget build(BuildContext context) { | ||
| 190 | - return MaterialApp( | ||
| 191 | - home: Scaffold( | ||
| 192 | - body: Column( | ||
| 193 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 194 | - children: [ | ||
| 195 | - Text(_title), | ||
| 196 | - const SizedBox(height: 50), | ||
| 197 | - TextField( | ||
| 198 | - maxLines: 5, | ||
| 199 | - controller: _controller, | ||
| 200 | - readOnly: true, | ||
| 201 | - ), | ||
| 202 | - const SizedBox(height: 50), | ||
| 203 | - Row( | ||
| 204 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 205 | - children: <Widget>[ | ||
| 206 | - _buildRecordStopControl(), | ||
| 207 | - const SizedBox(width: 20), | ||
| 208 | - _buildText(), | ||
| 209 | - ], | ||
| 210 | - ), | ||
| 211 | - ], | ||
| 212 | - ), | ||
| 213 | - ), | ||
| 214 | - ); | ||
| 215 | - } | ||
| 216 | - | ||
| 217 | - @override | ||
| 218 | - void dispose() { | ||
| 219 | - _recordSub?.cancel(); | ||
| 220 | - _audioRecorder.dispose(); | ||
| 221 | - _stream?.free(); | ||
| 222 | - _recognizer?.free(); | ||
| 223 | - super.dispose(); | ||
| 224 | - } | ||
| 225 | - | ||
| 226 | - Widget _buildRecordStopControl() { | ||
| 227 | - late Icon icon; | ||
| 228 | - late Color color; | ||
| 229 | - | ||
| 230 | - if (_recordState != RecordState.stop) { | ||
| 231 | - icon = const Icon(Icons.stop, color: Colors.red, size: 30); | ||
| 232 | - color = Colors.red.withOpacity(0.1); | ||
| 233 | - } else { | ||
| 234 | - final theme = Theme.of(context); | ||
| 235 | - icon = Icon(Icons.mic, color: theme.primaryColor, size: 30); | ||
| 236 | - color = theme.primaryColor.withOpacity(0.1); | ||
| 237 | - } | ||
| 238 | - | ||
| 239 | - return ClipOval( | ||
| 240 | - child: Material( | ||
| 241 | - color: color, | ||
| 242 | - child: InkWell( | ||
| 243 | - child: SizedBox(width: 56, height: 56, child: icon), | ||
| 244 | - onTap: () { | ||
| 245 | - (_recordState != RecordState.stop) ? _stop() : _start(); | ||
| 246 | - }, | ||
| 247 | - ), | ||
| 248 | - ), | ||
| 249 | - ); | ||
| 250 | - } | ||
| 251 | - | ||
| 252 | - Widget _buildText() { | ||
| 253 | - if (_recordState == RecordState.stop) { | ||
| 254 | - return const Text("Start"); | ||
| 255 | - } else { | ||
| 256 | - return const Text("Stop"); | ||
| 257 | - } | ||
| 258 | - } | ||
| 259 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'package:path/path.dart'; | ||
| 3 | -import 'package:path_provider/path_provider.dart'; | ||
| 4 | -import 'package:flutter/services.dart' show rootBundle; | ||
| 5 | -import 'dart:typed_data'; | ||
| 6 | -import "dart:io"; | ||
| 7 | - | ||
| 8 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 9 | -import './utils.dart'; | ||
| 10 | - | ||
| 11 | -Future<void> testStreamingTransducerAsr() async { | ||
| 12 | - var encoder = | ||
| 13 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/encoder-epoch-99-avg-1.int8.onnx'; | ||
| 14 | - var decoder = | ||
| 15 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/decoder-epoch-99-avg-1.onnx'; | ||
| 16 | - var joiner = | ||
| 17 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/joiner-epoch-99-avg-1.int8.onnx'; | ||
| 18 | - var tokens = | ||
| 19 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/tokens.txt'; | ||
| 20 | - | ||
| 21 | - var testWave = | ||
| 22 | - 'assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/test_wavs/0.wav'; | ||
| 23 | - | ||
| 24 | - encoder = await copyAssetFile(src: encoder, dst: 'encoder.onnx'); | ||
| 25 | - decoder = await copyAssetFile(src: decoder, dst: 'decoder.onnx'); | ||
| 26 | - joiner = await copyAssetFile(src: joiner, dst: 'joiner.onnx'); | ||
| 27 | - tokens = await copyAssetFile(src: tokens, dst: 'tokens.txt'); | ||
| 28 | - testWave = await copyAssetFile(src: testWave, dst: 'test.wav'); | ||
| 29 | - | ||
| 30 | - final transducer = sherpa_onnx.OnlineTransducerModelConfig( | ||
| 31 | - encoder: encoder, | ||
| 32 | - decoder: decoder, | ||
| 33 | - joiner: joiner, | ||
| 34 | - ); | ||
| 35 | - | ||
| 36 | - final modelConfig = sherpa_onnx.OnlineModelConfig( | ||
| 37 | - transducer: transducer, | ||
| 38 | - tokens: tokens, | ||
| 39 | - modelType: 'zipformer', | ||
| 40 | - ); | ||
| 41 | - | ||
| 42 | - final config = sherpa_onnx.OnlineRecognizerConfig(model: modelConfig); | ||
| 43 | - print(config); | ||
| 44 | - final recognizer = sherpa_onnx.OnlineRecognizer(config); | ||
| 45 | - | ||
| 46 | - final waveData = sherpa_onnx.readWave(testWave); | ||
| 47 | - final stream = recognizer.createStream(); | ||
| 48 | - | ||
| 49 | - stream.acceptWaveform( | ||
| 50 | - samples: waveData.samples, sampleRate: waveData.sampleRate); | ||
| 51 | - while (recognizer.isReady(stream)) { | ||
| 52 | - recognizer.decode(stream); | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - final result = recognizer.getResult(stream); | ||
| 56 | - print('result is: ${result}'); | ||
| 57 | - | ||
| 58 | - print('recognizer: ${recognizer.ptr}'); | ||
| 59 | - stream.free(); | ||
| 60 | - recognizer.free(); | ||
| 61 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'package:path/path.dart'; | ||
| 3 | -import 'package:path_provider/path_provider.dart'; | ||
| 4 | -import 'package:flutter/services.dart' show rootBundle; | ||
| 5 | -import 'dart:typed_data'; | ||
| 6 | -import "dart:io"; | ||
| 7 | - | ||
| 8 | -// Copy the asset file from src to dst | ||
| 9 | -Future<String> copyAssetFile({required String src, required String dst}) async { | ||
| 10 | - final Directory directory = await getApplicationDocumentsDirectory(); | ||
| 11 | - final target = join(directory.path, dst); | ||
| 12 | - | ||
| 13 | - final data = await rootBundle.load(src); | ||
| 14 | - final List<int> bytes = | ||
| 15 | - data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes); | ||
| 16 | - await File(target).writeAsBytes(bytes); | ||
| 17 | - | ||
| 18 | - return target; | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -Float32List convertBytesToFloat32(Uint8List bytes, [endian = Endian.little]) { | ||
| 22 | - final values = Float32List(bytes.length ~/ 2); | ||
| 23 | - | ||
| 24 | - final data = ByteData.view(bytes.buffer); | ||
| 25 | - | ||
| 26 | - for (var i = 0; i < bytes.length; i += 2) { | ||
| 27 | - int short = data.getInt16(i, endian); | ||
| 28 | - values[i ~/ 2] = short / 32678.0; | ||
| 29 | - } | ||
| 30 | - | ||
| 31 | - return values; | ||
| 32 | -} |
sherpa-onnx/flutter/example/lib/vad.dart
已删除
100644 → 0
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'dart:async'; | ||
| 3 | - | ||
| 4 | -import 'package:flutter/foundation.dart'; | ||
| 5 | -import 'package:flutter/material.dart'; | ||
| 6 | -import 'package:path/path.dart' as p; | ||
| 7 | -import 'package:path_provider/path_provider.dart'; | ||
| 8 | -import 'package:record/record.dart'; | ||
| 9 | - | ||
| 10 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 11 | - | ||
| 12 | -import './utils.dart'; | ||
| 13 | - | ||
| 14 | -class VadScreen extends StatefulWidget { | ||
| 15 | - const VadScreen({super.key}); | ||
| 16 | - | ||
| 17 | - @override | ||
| 18 | - State<VadScreen> createState() => _VadScreenState(); | ||
| 19 | -} | ||
| 20 | - | ||
| 21 | -class _VadScreenState extends State<VadScreen> { | ||
| 22 | - late final AudioRecorder _audioRecorder; | ||
| 23 | - | ||
| 24 | - bool _printed = false; | ||
| 25 | - var _color = Colors.black; | ||
| 26 | - bool _isInitialized = false; | ||
| 27 | - | ||
| 28 | - sherpa_onnx.VoiceActivityDetector? _vad; | ||
| 29 | - sherpa_onnx.CircularBuffer? _buffer; | ||
| 30 | - | ||
| 31 | - StreamSubscription<RecordState>? _recordSub; | ||
| 32 | - RecordState _recordState = RecordState.stop; | ||
| 33 | - | ||
| 34 | - @override | ||
| 35 | - void initState() { | ||
| 36 | - _audioRecorder = AudioRecorder(); | ||
| 37 | - | ||
| 38 | - _recordSub = _audioRecorder.onStateChanged().listen((recordState) { | ||
| 39 | - _updateRecordState(recordState); | ||
| 40 | - }); | ||
| 41 | - | ||
| 42 | - super.initState(); | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - Future<void> _start() async { | ||
| 46 | - if (!_isInitialized) { | ||
| 47 | - sherpa_onnx.initBindings(); | ||
| 48 | - final src = 'assets/silero_vad.onnx'; | ||
| 49 | - final modelPath = await copyAssetFile(src: src, dst: 'silero_vad.onnx'); | ||
| 50 | - | ||
| 51 | - final sileroVadConfig = sherpa_onnx.SileroVadModelConfig( | ||
| 52 | - model: modelPath, | ||
| 53 | - minSpeechDuration: 0.25, | ||
| 54 | - minSilenceDuration: 0.5, | ||
| 55 | - ); | ||
| 56 | - | ||
| 57 | - final config = sherpa_onnx.VadModelConfig( | ||
| 58 | - sileroVad: sileroVadConfig, | ||
| 59 | - numThreads: 1, | ||
| 60 | - debug: true, | ||
| 61 | - ); | ||
| 62 | - | ||
| 63 | - _vad = sherpa_onnx.VoiceActivityDetector( | ||
| 64 | - config: config, bufferSizeInSeconds: 30); | ||
| 65 | - | ||
| 66 | - _buffer = sherpa_onnx.CircularBuffer(capacity: 16000 * 30); | ||
| 67 | - print(_buffer!.ptr); | ||
| 68 | - | ||
| 69 | - _isInitialized = true; | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - try { | ||
| 73 | - if (await _audioRecorder.hasPermission()) { | ||
| 74 | - const encoder = AudioEncoder.pcm16bits; | ||
| 75 | - | ||
| 76 | - if (!await _isEncoderSupported(encoder)) { | ||
| 77 | - return; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - final devs = await _audioRecorder.listInputDevices(); | ||
| 81 | - debugPrint(devs.toString()); | ||
| 82 | - | ||
| 83 | - const config = RecordConfig( | ||
| 84 | - encoder: encoder, | ||
| 85 | - sampleRate: 16000, | ||
| 86 | - numChannels: 1, | ||
| 87 | - ); | ||
| 88 | - | ||
| 89 | - final stream = await _audioRecorder.startStream(config); | ||
| 90 | - | ||
| 91 | - final dir = await getApplicationDocumentsDirectory(); | ||
| 92 | - | ||
| 93 | - stream.listen( | ||
| 94 | - (data) { | ||
| 95 | - final samplesFloat32 = | ||
| 96 | - convertBytesToFloat32(Uint8List.fromList(data)); | ||
| 97 | - | ||
| 98 | - _buffer!.push(samplesFloat32); | ||
| 99 | - | ||
| 100 | - final windowSize = _vad!.config.sileroVad.windowSize; | ||
| 101 | - while (_buffer!.size > windowSize) { | ||
| 102 | - final samples = | ||
| 103 | - _buffer!.get(startIndex: _buffer!.head, n: windowSize); | ||
| 104 | - _buffer!.pop(windowSize); | ||
| 105 | - _vad!.acceptWaveform(samples); | ||
| 106 | - if (_vad!.isDetected() && !_printed) { | ||
| 107 | - print('detected'); | ||
| 108 | - _printed = true; | ||
| 109 | - | ||
| 110 | - setState(() => _color = Colors.red); | ||
| 111 | - } | ||
| 112 | - | ||
| 113 | - if (!_vad!.isDetected()) { | ||
| 114 | - _printed = false; | ||
| 115 | - setState(() => _color = Colors.black); | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - while (!_vad!.isEmpty()) { | ||
| 119 | - final segment = _vad!.front(); | ||
| 120 | - final duration = segment.samples.length / 16000; | ||
| 121 | - final d = DateTime.now(); | ||
| 122 | - final filename = p.join(dir.path, | ||
| 123 | - '${d.year}-${d.month}-${d.day}-${d.hour}-${d.minute}-${d.second}-duration-${duration.toStringAsPrecision(3)}s.wav'); | ||
| 124 | - | ||
| 125 | - bool ok = sherpa_onnx.writeWave( | ||
| 126 | - filename: filename, | ||
| 127 | - samples: segment.samples, | ||
| 128 | - sampleRate: 16000); | ||
| 129 | - if (!ok) { | ||
| 130 | - print('Failed to write $filename'); | ||
| 131 | - } else { | ||
| 132 | - print('Saved to write $filename'); | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | - _vad!.pop(); | ||
| 136 | - } | ||
| 137 | - } | ||
| 138 | - }, | ||
| 139 | - onDone: () { | ||
| 140 | - print('stream stopped.'); | ||
| 141 | - }, | ||
| 142 | - ); | ||
| 143 | - } | ||
| 144 | - } catch (e) { | ||
| 145 | - print(e); | ||
| 146 | - } | ||
| 147 | - } | ||
| 148 | - | ||
| 149 | - Future<void> _stop() async { | ||
| 150 | - _buffer!.reset(); | ||
| 151 | - _vad!.clear(); | ||
| 152 | - | ||
| 153 | - await _audioRecorder.stop(); | ||
| 154 | - } | ||
| 155 | - | ||
| 156 | - Future<void> _pause() => _audioRecorder.pause(); | ||
| 157 | - | ||
| 158 | - Future<void> _resume() => _audioRecorder.resume(); | ||
| 159 | - | ||
| 160 | - void _updateRecordState(RecordState recordState) { | ||
| 161 | - setState(() => _recordState = recordState); | ||
| 162 | - } | ||
| 163 | - | ||
| 164 | - Future<bool> _isEncoderSupported(AudioEncoder encoder) async { | ||
| 165 | - final isSupported = await _audioRecorder.isEncoderSupported( | ||
| 166 | - encoder, | ||
| 167 | - ); | ||
| 168 | - | ||
| 169 | - if (!isSupported) { | ||
| 170 | - debugPrint('${encoder.name} is not supported on this platform.'); | ||
| 171 | - debugPrint('Supported encoders are:'); | ||
| 172 | - | ||
| 173 | - for (final e in AudioEncoder.values) { | ||
| 174 | - if (await _audioRecorder.isEncoderSupported(e)) { | ||
| 175 | - debugPrint('- ${encoder.name}'); | ||
| 176 | - } | ||
| 177 | - } | ||
| 178 | - } | ||
| 179 | - | ||
| 180 | - return isSupported; | ||
| 181 | - } | ||
| 182 | - | ||
| 183 | - @override | ||
| 184 | - Widget build(BuildContext context) { | ||
| 185 | - return MaterialApp( | ||
| 186 | - home: Scaffold( | ||
| 187 | - body: Column( | ||
| 188 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 189 | - children: [ | ||
| 190 | - Container( | ||
| 191 | - width: 100.0, | ||
| 192 | - height: 100.0, | ||
| 193 | - decoration: BoxDecoration( | ||
| 194 | - shape: BoxShape.circle, | ||
| 195 | - color: _color, | ||
| 196 | - ), | ||
| 197 | - ), | ||
| 198 | - const SizedBox(height: 50), | ||
| 199 | - Row( | ||
| 200 | - mainAxisAlignment: MainAxisAlignment.center, | ||
| 201 | - children: <Widget>[ | ||
| 202 | - _buildRecordStopControl(), | ||
| 203 | - const SizedBox(width: 20), | ||
| 204 | - _buildText(), | ||
| 205 | - ], | ||
| 206 | - ), | ||
| 207 | - ], | ||
| 208 | - ), | ||
| 209 | - ), | ||
| 210 | - ); | ||
| 211 | - } | ||
| 212 | - | ||
| 213 | - @override | ||
| 214 | - void dispose() { | ||
| 215 | - _recordSub?.cancel(); | ||
| 216 | - _audioRecorder.dispose(); | ||
| 217 | - _vad?.free(); | ||
| 218 | - _buffer?.free(); | ||
| 219 | - super.dispose(); | ||
| 220 | - } | ||
| 221 | - | ||
| 222 | - Widget _buildRecordStopControl() { | ||
| 223 | - late Icon icon; | ||
| 224 | - late Color color; | ||
| 225 | - | ||
| 226 | - if (_recordState != RecordState.stop) { | ||
| 227 | - icon = const Icon(Icons.stop, color: Colors.red, size: 30); | ||
| 228 | - color = Colors.red.withOpacity(0.1); | ||
| 229 | - } else { | ||
| 230 | - final theme = Theme.of(context); | ||
| 231 | - icon = Icon(Icons.mic, color: theme.primaryColor, size: 30); | ||
| 232 | - color = theme.primaryColor.withOpacity(0.1); | ||
| 233 | - } | ||
| 234 | - | ||
| 235 | - return ClipOval( | ||
| 236 | - child: Material( | ||
| 237 | - color: color, | ||
| 238 | - child: InkWell( | ||
| 239 | - child: SizedBox(width: 56, height: 56, child: icon), | ||
| 240 | - onTap: () { | ||
| 241 | - (_recordState != RecordState.stop) ? _stop() : _start(); | ||
| 242 | - }, | ||
| 243 | - ), | ||
| 244 | - ), | ||
| 245 | - ); | ||
| 246 | - } | ||
| 247 | - | ||
| 248 | - Widget _buildText() { | ||
| 249 | - if (_recordState == RecordState.stop) { | ||
| 250 | - return const Text("Start"); | ||
| 251 | - } else { | ||
| 252 | - return const Text("Stop"); | ||
| 253 | - } | ||
| 254 | - } | ||
| 255 | -} |
| 1 | -// Copyright (c) 2024 Xiaomi Corporation | ||
| 2 | -import 'dart:typed_data'; | ||
| 3 | -import 'package:sherpa_onnx/sherpa_onnx.dart' as sherpa_onnx; | ||
| 4 | -import './utils.dart'; | ||
| 5 | - | ||
| 6 | -Future<void> testVad() async { | ||
| 7 | - final src = 'assets/silero_vad.onnx'; | ||
| 8 | - final modelPath = await copyAssetFile(src: src, dst: 'silero_vad.onnx'); | ||
| 9 | - | ||
| 10 | - final sileroVadConfig = sherpa_onnx.SileroVadModelConfig(model: modelPath); | ||
| 11 | - final config = sherpa_onnx.VadModelConfig( | ||
| 12 | - sileroVad: sileroVadConfig, | ||
| 13 | - numThreads: 1, | ||
| 14 | - debug: true, | ||
| 15 | - ); | ||
| 16 | - | ||
| 17 | - final vad = sherpa_onnx.VoiceActivityDetector( | ||
| 18 | - config: config, bufferSizeInSeconds: 10); | ||
| 19 | - print('before vad.free(): ${vad.ptr}'); | ||
| 20 | - vad.free(); | ||
| 21 | - print('after vad.free(): ${vad.ptr}'); | ||
| 22 | - | ||
| 23 | - final buffer = sherpa_onnx.CircularBuffer(capacity: 16000 * 2); | ||
| 24 | - | ||
| 25 | - final d = Float32List.fromList([0, 10, 20, 30]); | ||
| 26 | - buffer.push(d); | ||
| 27 | - assert(d.length == buffer.size, '${d.length} vs ${buffer.size}'); | ||
| 28 | - | ||
| 29 | - final f = Float32List.fromList([-5, 100.25, 599]); | ||
| 30 | - buffer.push(f); | ||
| 31 | - | ||
| 32 | - assert(buffer.size == d.length + f.length); | ||
| 33 | - final g = buffer.get(startIndex: 0, n: 5); | ||
| 34 | - | ||
| 35 | - assert(g.length == 5); | ||
| 36 | - assert(g[0] == 0); | ||
| 37 | - assert(g[1] == 10); | ||
| 38 | - assert(g[2] == 20); | ||
| 39 | - assert(g[3] == 30); | ||
| 40 | - assert(g[4] == -5); | ||
| 41 | - | ||
| 42 | - assert(buffer.size == d.length + f.length); | ||
| 43 | - | ||
| 44 | - buffer.pop(3); | ||
| 45 | - assert(buffer.size == d.length + f.length - 3); | ||
| 46 | - | ||
| 47 | - final h = buffer.get(startIndex: buffer.head, n: 4); | ||
| 48 | - assert(h.length == 4); | ||
| 49 | - assert(h[0] == 30); | ||
| 50 | - assert(h[1] == -5); | ||
| 51 | - assert(h[2] == 100.25); | ||
| 52 | - assert(h[3] == 599); | ||
| 53 | - | ||
| 54 | - buffer.reset(); | ||
| 55 | - | ||
| 56 | - assert(buffer.size == 0); | ||
| 57 | - assert(buffer.head == 0); | ||
| 58 | - | ||
| 59 | - print('before free: ${buffer.ptr}'); | ||
| 60 | - buffer.free(); | ||
| 61 | - print('after free: ${buffer.ptr}'); | ||
| 62 | -} |
| 1 | -flutter/ephemeral |
| 1 | -# Project-level configuration. | ||
| 2 | -cmake_minimum_required(VERSION 3.10) | ||
| 3 | -project(runner LANGUAGES CXX) | ||
| 4 | - | ||
| 5 | -# The name of the executable created for the application. Change this to change | ||
| 6 | -# the on-disk name of your application. | ||
| 7 | -set(BINARY_NAME "sherpa_onnx") | ||
| 8 | -# The unique GTK application identifier for this application. See: | ||
| 9 | -# https://wiki.gnome.org/HowDoI/ChooseApplicationID | ||
| 10 | -set(APPLICATION_ID "com.k2fsa.sherpa.onnx") | ||
| 11 | - | ||
| 12 | -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent | ||
| 13 | -# versions of CMake. | ||
| 14 | -cmake_policy(SET CMP0063 NEW) | ||
| 15 | - | ||
| 16 | -# Load bundled libraries from the lib/ directory relative to the binary. | ||
| 17 | -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") | ||
| 18 | - | ||
| 19 | -# Root filesystem for cross-building. | ||
| 20 | -if(FLUTTER_TARGET_PLATFORM_SYSROOT) | ||
| 21 | - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) | ||
| 22 | - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) | ||
| 23 | - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
| 24 | - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) | ||
| 25 | - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
| 26 | - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
| 27 | -endif() | ||
| 28 | - | ||
| 29 | -# Define build configuration options. | ||
| 30 | -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
| 31 | - set(CMAKE_BUILD_TYPE "Debug" CACHE | ||
| 32 | - STRING "Flutter build mode" FORCE) | ||
| 33 | - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS | ||
| 34 | - "Debug" "Profile" "Release") | ||
| 35 | -endif() | ||
| 36 | - | ||
| 37 | -# Compilation settings that should be applied to most targets. | ||
| 38 | -# | ||
| 39 | -# Be cautious about adding new options here, as plugins use this function by | ||
| 40 | -# default. In most cases, you should add new options to specific targets instead | ||
| 41 | -# of modifying this function. | ||
| 42 | -function(APPLY_STANDARD_SETTINGS TARGET) | ||
| 43 | - target_compile_features(${TARGET} PUBLIC cxx_std_14) | ||
| 44 | - target_compile_options(${TARGET} PRIVATE -Wall -Werror) | ||
| 45 | - target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>") | ||
| 46 | - target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>") | ||
| 47 | -endfunction() | ||
| 48 | - | ||
| 49 | -# Flutter library and tool build rules. | ||
| 50 | -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") | ||
| 51 | -add_subdirectory(${FLUTTER_MANAGED_DIR}) | ||
| 52 | - | ||
| 53 | -# System-level dependencies. | ||
| 54 | -find_package(PkgConfig REQUIRED) | ||
| 55 | -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) | ||
| 56 | - | ||
| 57 | -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") | ||
| 58 | - | ||
| 59 | -# Define the application target. To change its name, change BINARY_NAME above, | ||
| 60 | -# not the value here, or `flutter run` will no longer work. | ||
| 61 | -# | ||
| 62 | -# Any new source files that you add to the application should be added here. | ||
| 63 | -add_executable(${BINARY_NAME} | ||
| 64 | - "main.cc" | ||
| 65 | - "my_application.cc" | ||
| 66 | - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" | ||
| 67 | -) | ||
| 68 | - | ||
| 69 | -# Apply the standard set of build settings. This can be removed for applications | ||
| 70 | -# that need different build settings. | ||
| 71 | -apply_standard_settings(${BINARY_NAME}) | ||
| 72 | - | ||
| 73 | -# Add dependency libraries. Add any application-specific dependencies here. | ||
| 74 | -target_link_libraries(${BINARY_NAME} PRIVATE flutter) | ||
| 75 | -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) | ||
| 76 | - | ||
| 77 | -# Run the Flutter tool portions of the build. This must not be removed. | ||
| 78 | -add_dependencies(${BINARY_NAME} flutter_assemble) | ||
| 79 | - | ||
| 80 | -# Only the install-generated bundle's copy of the executable will launch | ||
| 81 | -# correctly, since the resources must in the right relative locations. To avoid | ||
| 82 | -# people trying to run the unbundled copy, put it in a subdirectory instead of | ||
| 83 | -# the default top-level location. | ||
| 84 | -set_target_properties(${BINARY_NAME} | ||
| 85 | - PROPERTIES | ||
| 86 | - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" | ||
| 87 | -) | ||
| 88 | - | ||
| 89 | - | ||
| 90 | -# Generated plugin build rules, which manage building the plugins and adding | ||
| 91 | -# them to the application. | ||
| 92 | -include(flutter/generated_plugins.cmake) | ||
| 93 | - | ||
| 94 | - | ||
| 95 | -# === Installation === | ||
| 96 | -# By default, "installing" just makes a relocatable bundle in the build | ||
| 97 | -# directory. | ||
| 98 | -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") | ||
| 99 | -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
| 100 | - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) | ||
| 101 | -endif() | ||
| 102 | - | ||
| 103 | -# Start with a clean build bundle directory every time. | ||
| 104 | -install(CODE " | ||
| 105 | - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") | ||
| 106 | - " COMPONENT Runtime) | ||
| 107 | - | ||
| 108 | -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") | ||
| 109 | -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") | ||
| 110 | - | ||
| 111 | -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" | ||
| 112 | - COMPONENT Runtime) | ||
| 113 | - | ||
| 114 | -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" | ||
| 115 | - COMPONENT Runtime) | ||
| 116 | - | ||
| 117 | -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 118 | - COMPONENT Runtime) | ||
| 119 | - | ||
| 120 | -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) | ||
| 121 | - install(FILES "${bundled_library}" | ||
| 122 | - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 123 | - COMPONENT Runtime) | ||
| 124 | -endforeach(bundled_library) | ||
| 125 | - | ||
| 126 | -# Copy the native assets provided by the build.dart from all packages. | ||
| 127 | -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") | ||
| 128 | -install(DIRECTORY "${NATIVE_ASSETS_DIR}" | ||
| 129 | - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 130 | - COMPONENT Runtime) | ||
| 131 | - | ||
| 132 | -# Fully re-copy the assets directory on each build to avoid having stale files | ||
| 133 | -# from a previous install. | ||
| 134 | -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") | ||
| 135 | -install(CODE " | ||
| 136 | - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") | ||
| 137 | - " COMPONENT Runtime) | ||
| 138 | -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" | ||
| 139 | - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) | ||
| 140 | - | ||
| 141 | -# Install the AOT library on non-Debug builds only. | ||
| 142 | -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") | ||
| 143 | - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 144 | - COMPONENT Runtime) | ||
| 145 | -endif() |
| 1 | -# This file controls Flutter-level build steps. It should not be edited. | ||
| 2 | -cmake_minimum_required(VERSION 3.10) | ||
| 3 | - | ||
| 4 | -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") | ||
| 5 | - | ||
| 6 | -# Configuration provided via flutter tool. | ||
| 7 | -include(${EPHEMERAL_DIR}/generated_config.cmake) | ||
| 8 | - | ||
| 9 | -# TODO: Move the rest of this into files in ephemeral. See | ||
| 10 | -# https://github.com/flutter/flutter/issues/57146. | ||
| 11 | - | ||
| 12 | -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), | ||
| 13 | -# which isn't available in 3.10. | ||
| 14 | -function(list_prepend LIST_NAME PREFIX) | ||
| 15 | - set(NEW_LIST "") | ||
| 16 | - foreach(element ${${LIST_NAME}}) | ||
| 17 | - list(APPEND NEW_LIST "${PREFIX}${element}") | ||
| 18 | - endforeach(element) | ||
| 19 | - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) | ||
| 20 | -endfunction() | ||
| 21 | - | ||
| 22 | -# === Flutter Library === | ||
| 23 | -# System-level dependencies. | ||
| 24 | -find_package(PkgConfig REQUIRED) | ||
| 25 | -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) | ||
| 26 | -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) | ||
| 27 | -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) | ||
| 28 | - | ||
| 29 | -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") | ||
| 30 | - | ||
| 31 | -# Published to parent scope for install step. | ||
| 32 | -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) | ||
| 33 | -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) | ||
| 34 | -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) | ||
| 35 | -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) | ||
| 36 | - | ||
| 37 | -list(APPEND FLUTTER_LIBRARY_HEADERS | ||
| 38 | - "fl_basic_message_channel.h" | ||
| 39 | - "fl_binary_codec.h" | ||
| 40 | - "fl_binary_messenger.h" | ||
| 41 | - "fl_dart_project.h" | ||
| 42 | - "fl_engine.h" | ||
| 43 | - "fl_json_message_codec.h" | ||
| 44 | - "fl_json_method_codec.h" | ||
| 45 | - "fl_message_codec.h" | ||
| 46 | - "fl_method_call.h" | ||
| 47 | - "fl_method_channel.h" | ||
| 48 | - "fl_method_codec.h" | ||
| 49 | - "fl_method_response.h" | ||
| 50 | - "fl_plugin_registrar.h" | ||
| 51 | - "fl_plugin_registry.h" | ||
| 52 | - "fl_standard_message_codec.h" | ||
| 53 | - "fl_standard_method_codec.h" | ||
| 54 | - "fl_string_codec.h" | ||
| 55 | - "fl_value.h" | ||
| 56 | - "fl_view.h" | ||
| 57 | - "flutter_linux.h" | ||
| 58 | -) | ||
| 59 | -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") | ||
| 60 | -add_library(flutter INTERFACE) | ||
| 61 | -target_include_directories(flutter INTERFACE | ||
| 62 | - "${EPHEMERAL_DIR}" | ||
| 63 | -) | ||
| 64 | -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") | ||
| 65 | -target_link_libraries(flutter INTERFACE | ||
| 66 | - PkgConfig::GTK | ||
| 67 | - PkgConfig::GLIB | ||
| 68 | - PkgConfig::GIO | ||
| 69 | -) | ||
| 70 | -add_dependencies(flutter flutter_assemble) | ||
| 71 | - | ||
| 72 | -# === Flutter tool backend === | ||
| 73 | -# _phony_ is a non-existent file to force this command to run every time, | ||
| 74 | -# since currently there's no way to get a full input/output list from the | ||
| 75 | -# flutter tool. | ||
| 76 | -add_custom_command( | ||
| 77 | - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} | ||
| 78 | - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ | ||
| 79 | - COMMAND ${CMAKE_COMMAND} -E env | ||
| 80 | - ${FLUTTER_TOOL_ENVIRONMENT} | ||
| 81 | - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" | ||
| 82 | - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} | ||
| 83 | - VERBATIM | ||
| 84 | -) | ||
| 85 | -add_custom_target(flutter_assemble DEPENDS | ||
| 86 | - "${FLUTTER_LIBRARY}" | ||
| 87 | - ${FLUTTER_LIBRARY_HEADERS} | ||
| 88 | -) |
| 1 | -#include "my_application.h" | ||
| 2 | - | ||
| 3 | -#include <flutter_linux/flutter_linux.h> | ||
| 4 | -#ifdef GDK_WINDOWING_X11 | ||
| 5 | -#include <gdk/gdkx.h> | ||
| 6 | -#endif | ||
| 7 | - | ||
| 8 | -#include "flutter/generated_plugin_registrant.h" | ||
| 9 | - | ||
| 10 | -struct _MyApplication { | ||
| 11 | - GtkApplication parent_instance; | ||
| 12 | - char** dart_entrypoint_arguments; | ||
| 13 | -}; | ||
| 14 | - | ||
| 15 | -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) | ||
| 16 | - | ||
| 17 | -// Implements GApplication::activate. | ||
| 18 | -static void my_application_activate(GApplication* application) { | ||
| 19 | - MyApplication* self = MY_APPLICATION(application); | ||
| 20 | - GtkWindow* window = | ||
| 21 | - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); | ||
| 22 | - | ||
| 23 | - // Use a header bar when running in GNOME as this is the common style used | ||
| 24 | - // by applications and is the setup most users will be using (e.g. Ubuntu | ||
| 25 | - // desktop). | ||
| 26 | - // If running on X and not using GNOME then just use a traditional title bar | ||
| 27 | - // in case the window manager does more exotic layout, e.g. tiling. | ||
| 28 | - // If running on Wayland assume the header bar will work (may need changing | ||
| 29 | - // if future cases occur). | ||
| 30 | - gboolean use_header_bar = TRUE; | ||
| 31 | -#ifdef GDK_WINDOWING_X11 | ||
| 32 | - GdkScreen* screen = gtk_window_get_screen(window); | ||
| 33 | - if (GDK_IS_X11_SCREEN(screen)) { | ||
| 34 | - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); | ||
| 35 | - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { | ||
| 36 | - use_header_bar = FALSE; | ||
| 37 | - } | ||
| 38 | - } | ||
| 39 | -#endif | ||
| 40 | - if (use_header_bar) { | ||
| 41 | - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); | ||
| 42 | - gtk_widget_show(GTK_WIDGET(header_bar)); | ||
| 43 | - gtk_header_bar_set_title(header_bar, "sherpa_onnx"); | ||
| 44 | - gtk_header_bar_set_show_close_button(header_bar, TRUE); | ||
| 45 | - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); | ||
| 46 | - } else { | ||
| 47 | - gtk_window_set_title(window, "sherpa_onnx"); | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - gtk_window_set_default_size(window, 1280, 720); | ||
| 51 | - gtk_widget_show(GTK_WIDGET(window)); | ||
| 52 | - | ||
| 53 | - g_autoptr(FlDartProject) project = fl_dart_project_new(); | ||
| 54 | - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); | ||
| 55 | - | ||
| 56 | - FlView* view = fl_view_new(project); | ||
| 57 | - gtk_widget_show(GTK_WIDGET(view)); | ||
| 58 | - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); | ||
| 59 | - | ||
| 60 | - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); | ||
| 61 | - | ||
| 62 | - gtk_widget_grab_focus(GTK_WIDGET(view)); | ||
| 63 | -} | ||
| 64 | - | ||
| 65 | -// Implements GApplication::local_command_line. | ||
| 66 | -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { | ||
| 67 | - MyApplication* self = MY_APPLICATION(application); | ||
| 68 | - // Strip out the first argument as it is the binary name. | ||
| 69 | - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); | ||
| 70 | - | ||
| 71 | - g_autoptr(GError) error = nullptr; | ||
| 72 | - if (!g_application_register(application, nullptr, &error)) { | ||
| 73 | - g_warning("Failed to register: %s", error->message); | ||
| 74 | - *exit_status = 1; | ||
| 75 | - return TRUE; | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | - g_application_activate(application); | ||
| 79 | - *exit_status = 0; | ||
| 80 | - | ||
| 81 | - return TRUE; | ||
| 82 | -} | ||
| 83 | - | ||
| 84 | -// Implements GApplication::startup. | ||
| 85 | -static void my_application_startup(GApplication* application) { | ||
| 86 | - //MyApplication* self = MY_APPLICATION(object); | ||
| 87 | - | ||
| 88 | - // Perform any actions required at application startup. | ||
| 89 | - | ||
| 90 | - G_APPLICATION_CLASS(my_application_parent_class)->startup(application); | ||
| 91 | -} | ||
| 92 | - | ||
| 93 | -// Implements GApplication::shutdown. | ||
| 94 | -static void my_application_shutdown(GApplication* application) { | ||
| 95 | - //MyApplication* self = MY_APPLICATION(object); | ||
| 96 | - | ||
| 97 | - // Perform any actions required at application shutdown. | ||
| 98 | - | ||
| 99 | - G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); | ||
| 100 | -} | ||
| 101 | - | ||
| 102 | -// Implements GObject::dispose. | ||
| 103 | -static void my_application_dispose(GObject* object) { | ||
| 104 | - MyApplication* self = MY_APPLICATION(object); | ||
| 105 | - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); | ||
| 106 | - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); | ||
| 107 | -} | ||
| 108 | - | ||
| 109 | -static void my_application_class_init(MyApplicationClass* klass) { | ||
| 110 | - G_APPLICATION_CLASS(klass)->activate = my_application_activate; | ||
| 111 | - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; | ||
| 112 | - G_APPLICATION_CLASS(klass)->startup = my_application_startup; | ||
| 113 | - G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; | ||
| 114 | - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; | ||
| 115 | -} | ||
| 116 | - | ||
| 117 | -static void my_application_init(MyApplication* self) {} | ||
| 118 | - | ||
| 119 | -MyApplication* my_application_new() { | ||
| 120 | - return MY_APPLICATION(g_object_new(my_application_get_type(), | ||
| 121 | - "application-id", APPLICATION_ID, | ||
| 122 | - "flags", G_APPLICATION_NON_UNIQUE, | ||
| 123 | - nullptr)); | ||
| 124 | -} |
| 1 | -#ifndef FLUTTER_MY_APPLICATION_H_ | ||
| 2 | -#define FLUTTER_MY_APPLICATION_H_ | ||
| 3 | - | ||
| 4 | -#include <gtk/gtk.h> | ||
| 5 | - | ||
| 6 | -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, | ||
| 7 | - GtkApplication) | ||
| 8 | - | ||
| 9 | -/** | ||
| 10 | - * my_application_new: | ||
| 11 | - * | ||
| 12 | - * Creates a new Flutter-based application. | ||
| 13 | - * | ||
| 14 | - * Returns: a new #MyApplication. | ||
| 15 | - */ | ||
| 16 | -MyApplication* my_application_new(); | ||
| 17 | - | ||
| 18 | -#endif // FLUTTER_MY_APPLICATION_H_ |
| 1 | -platform :osx, '10.15' | ||
| 2 | - | ||
| 3 | -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
| 4 | -ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
| 5 | - | ||
| 6 | -project 'Runner', { | ||
| 7 | - 'Debug' => :debug, | ||
| 8 | - 'Profile' => :release, | ||
| 9 | - 'Release' => :release, | ||
| 10 | -} | ||
| 11 | - | ||
| 12 | -def flutter_root | ||
| 13 | - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) | ||
| 14 | - unless File.exist?(generated_xcode_build_settings_path) | ||
| 15 | - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" | ||
| 16 | - end | ||
| 17 | - | ||
| 18 | - File.foreach(generated_xcode_build_settings_path) do |line| | ||
| 19 | - matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
| 20 | - return matches[1].strip if matches | ||
| 21 | - end | ||
| 22 | - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" | ||
| 23 | -end | ||
| 24 | - | ||
| 25 | -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
| 26 | - | ||
| 27 | -flutter_macos_podfile_setup | ||
| 28 | - | ||
| 29 | -target 'Runner' do | ||
| 30 | - use_frameworks! | ||
| 31 | - use_modular_headers! | ||
| 32 | - | ||
| 33 | - flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) | ||
| 34 | - target 'RunnerTests' do | ||
| 35 | - inherit! :search_paths | ||
| 36 | - end | ||
| 37 | -end | ||
| 38 | - | ||
| 39 | -post_install do |installer| | ||
| 40 | - installer.pods_project.targets.each do |target| | ||
| 41 | - flutter_additional_macos_build_settings(target) | ||
| 42 | - end | ||
| 43 | -end |
| 1 | -// !$*UTF8*$! | ||
| 2 | -{ | ||
| 3 | - archiveVersion = 1; | ||
| 4 | - classes = { | ||
| 5 | - }; | ||
| 6 | - objectVersion = 54; | ||
| 7 | - objects = { | ||
| 8 | - | ||
| 9 | -/* Begin PBXAggregateTarget section */ | ||
| 10 | - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { | ||
| 11 | - isa = PBXAggregateTarget; | ||
| 12 | - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; | ||
| 13 | - buildPhases = ( | ||
| 14 | - 33CC111E2044C6BF0003C045 /* ShellScript */, | ||
| 15 | - ); | ||
| 16 | - dependencies = ( | ||
| 17 | - ); | ||
| 18 | - name = "Flutter Assemble"; | ||
| 19 | - productName = FLX; | ||
| 20 | - }; | ||
| 21 | -/* End PBXAggregateTarget section */ | ||
| 22 | - | ||
| 23 | -/* Begin PBXBuildFile section */ | ||
| 24 | - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; | ||
| 25 | - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; | ||
| 26 | - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; | ||
| 27 | - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; | ||
| 28 | - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; | ||
| 29 | - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; | ||
| 30 | - AD18C81BD25EB64A10A74721 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EEF159F4D7912B9311CB282 /* Pods_Runner.framework */; }; | ||
| 31 | - F1F6B0C655533B7F45E75DA0 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA92A3C1CA5533C24C7C7468 /* Pods_RunnerTests.framework */; }; | ||
| 32 | -/* End PBXBuildFile section */ | ||
| 33 | - | ||
| 34 | -/* Begin PBXContainerItemProxy section */ | ||
| 35 | - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { | ||
| 36 | - isa = PBXContainerItemProxy; | ||
| 37 | - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; | ||
| 38 | - proxyType = 1; | ||
| 39 | - remoteGlobalIDString = 33CC10EC2044A3C60003C045; | ||
| 40 | - remoteInfo = Runner; | ||
| 41 | - }; | ||
| 42 | - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { | ||
| 43 | - isa = PBXContainerItemProxy; | ||
| 44 | - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; | ||
| 45 | - proxyType = 1; | ||
| 46 | - remoteGlobalIDString = 33CC111A2044C6BA0003C045; | ||
| 47 | - remoteInfo = FLX; | ||
| 48 | - }; | ||
| 49 | -/* End PBXContainerItemProxy section */ | ||
| 50 | - | ||
| 51 | -/* Begin PBXCopyFilesBuildPhase section */ | ||
| 52 | - 33CC110E2044A8840003C045 /* Bundle Framework */ = { | ||
| 53 | - isa = PBXCopyFilesBuildPhase; | ||
| 54 | - buildActionMask = 2147483647; | ||
| 55 | - dstPath = ""; | ||
| 56 | - dstSubfolderSpec = 10; | ||
| 57 | - files = ( | ||
| 58 | - ); | ||
| 59 | - name = "Bundle Framework"; | ||
| 60 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 61 | - }; | ||
| 62 | -/* End PBXCopyFilesBuildPhase section */ | ||
| 63 | - | ||
| 64 | -/* Begin PBXFileReference section */ | ||
| 65 | - 09EF98B2CF4F049F4C7B5BAA /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; | ||
| 66 | - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 67 | - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; }; | ||
| 68 | - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; | ||
| 69 | - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; | ||
| 70 | - 33CC10ED2044A3C60003C045 /* sherpa_onnx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sherpa_onnx.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 71 | - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | ||
| 72 | - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; }; | ||
| 73 | - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; | ||
| 74 | - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; }; | ||
| 75 | - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; }; | ||
| 76 | - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; }; | ||
| 77 | - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; }; | ||
| 78 | - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; }; | ||
| 79 | - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; | ||
| 80 | - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; | ||
| 81 | - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; | ||
| 82 | - 3EEF159F4D7912B9311CB282 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 83 | - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; | ||
| 84 | - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; | ||
| 85 | - A1236548122E91133BF39DA1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; | ||
| 86 | - BA92A3C1CA5533C24C7C7468 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
| 87 | - C9A014A0AF0A3CC243C5BA0C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; }; | ||
| 88 | - CDC9FAA17691FA4BA5F49074 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; | ||
| 89 | - E3A16097032C820A141E3D0C /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; }; | ||
| 90 | - F7379309434F931B509C87FA /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; }; | ||
| 91 | -/* End PBXFileReference section */ | ||
| 92 | - | ||
| 93 | -/* Begin PBXFrameworksBuildPhase section */ | ||
| 94 | - 331C80D2294CF70F00263BE5 /* Frameworks */ = { | ||
| 95 | - isa = PBXFrameworksBuildPhase; | ||
| 96 | - buildActionMask = 2147483647; | ||
| 97 | - files = ( | ||
| 98 | - F1F6B0C655533B7F45E75DA0 /* Pods_RunnerTests.framework in Frameworks */, | ||
| 99 | - ); | ||
| 100 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 101 | - }; | ||
| 102 | - 33CC10EA2044A3C60003C045 /* Frameworks */ = { | ||
| 103 | - isa = PBXFrameworksBuildPhase; | ||
| 104 | - buildActionMask = 2147483647; | ||
| 105 | - files = ( | ||
| 106 | - AD18C81BD25EB64A10A74721 /* Pods_Runner.framework in Frameworks */, | ||
| 107 | - ); | ||
| 108 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 109 | - }; | ||
| 110 | -/* End PBXFrameworksBuildPhase section */ | ||
| 111 | - | ||
| 112 | -/* Begin PBXGroup section */ | ||
| 113 | - 331C80D6294CF71000263BE5 /* RunnerTests */ = { | ||
| 114 | - isa = PBXGroup; | ||
| 115 | - children = ( | ||
| 116 | - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, | ||
| 117 | - ); | ||
| 118 | - path = RunnerTests; | ||
| 119 | - sourceTree = "<group>"; | ||
| 120 | - }; | ||
| 121 | - 33BA886A226E78AF003329D5 /* Configs */ = { | ||
| 122 | - isa = PBXGroup; | ||
| 123 | - children = ( | ||
| 124 | - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, | ||
| 125 | - 9740EEB21CF90195004384FC /* Debug.xcconfig */, | ||
| 126 | - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, | ||
| 127 | - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, | ||
| 128 | - ); | ||
| 129 | - path = Configs; | ||
| 130 | - sourceTree = "<group>"; | ||
| 131 | - }; | ||
| 132 | - 33CC10E42044A3C60003C045 = { | ||
| 133 | - isa = PBXGroup; | ||
| 134 | - children = ( | ||
| 135 | - 33FAB671232836740065AC1E /* Runner */, | ||
| 136 | - 33CEB47122A05771004F2AC0 /* Flutter */, | ||
| 137 | - 331C80D6294CF71000263BE5 /* RunnerTests */, | ||
| 138 | - 33CC10EE2044A3C60003C045 /* Products */, | ||
| 139 | - D73912EC22F37F3D000D13A0 /* Frameworks */, | ||
| 140 | - 782733D97D5852B42F7DAD3B /* Pods */, | ||
| 141 | - ); | ||
| 142 | - sourceTree = "<group>"; | ||
| 143 | - }; | ||
| 144 | - 33CC10EE2044A3C60003C045 /* Products */ = { | ||
| 145 | - isa = PBXGroup; | ||
| 146 | - children = ( | ||
| 147 | - 33CC10ED2044A3C60003C045 /* sherpa_onnx.app */, | ||
| 148 | - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, | ||
| 149 | - ); | ||
| 150 | - name = Products; | ||
| 151 | - sourceTree = "<group>"; | ||
| 152 | - }; | ||
| 153 | - 33CC11242044D66E0003C045 /* Resources */ = { | ||
| 154 | - isa = PBXGroup; | ||
| 155 | - children = ( | ||
| 156 | - 33CC10F22044A3C60003C045 /* Assets.xcassets */, | ||
| 157 | - 33CC10F42044A3C60003C045 /* MainMenu.xib */, | ||
| 158 | - 33CC10F72044A3C60003C045 /* Info.plist */, | ||
| 159 | - ); | ||
| 160 | - name = Resources; | ||
| 161 | - path = ..; | ||
| 162 | - sourceTree = "<group>"; | ||
| 163 | - }; | ||
| 164 | - 33CEB47122A05771004F2AC0 /* Flutter */ = { | ||
| 165 | - isa = PBXGroup; | ||
| 166 | - children = ( | ||
| 167 | - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, | ||
| 168 | - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, | ||
| 169 | - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, | ||
| 170 | - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, | ||
| 171 | - ); | ||
| 172 | - path = Flutter; | ||
| 173 | - sourceTree = "<group>"; | ||
| 174 | - }; | ||
| 175 | - 33FAB671232836740065AC1E /* Runner */ = { | ||
| 176 | - isa = PBXGroup; | ||
| 177 | - children = ( | ||
| 178 | - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, | ||
| 179 | - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, | ||
| 180 | - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, | ||
| 181 | - 33E51914231749380026EE4D /* Release.entitlements */, | ||
| 182 | - 33CC11242044D66E0003C045 /* Resources */, | ||
| 183 | - 33BA886A226E78AF003329D5 /* Configs */, | ||
| 184 | - ); | ||
| 185 | - path = Runner; | ||
| 186 | - sourceTree = "<group>"; | ||
| 187 | - }; | ||
| 188 | - 782733D97D5852B42F7DAD3B /* Pods */ = { | ||
| 189 | - isa = PBXGroup; | ||
| 190 | - children = ( | ||
| 191 | - A1236548122E91133BF39DA1 /* Pods-Runner.debug.xcconfig */, | ||
| 192 | - 09EF98B2CF4F049F4C7B5BAA /* Pods-Runner.release.xcconfig */, | ||
| 193 | - CDC9FAA17691FA4BA5F49074 /* Pods-Runner.profile.xcconfig */, | ||
| 194 | - E3A16097032C820A141E3D0C /* Pods-RunnerTests.debug.xcconfig */, | ||
| 195 | - C9A014A0AF0A3CC243C5BA0C /* Pods-RunnerTests.release.xcconfig */, | ||
| 196 | - F7379309434F931B509C87FA /* Pods-RunnerTests.profile.xcconfig */, | ||
| 197 | - ); | ||
| 198 | - name = Pods; | ||
| 199 | - path = Pods; | ||
| 200 | - sourceTree = "<group>"; | ||
| 201 | - }; | ||
| 202 | - D73912EC22F37F3D000D13A0 /* Frameworks */ = { | ||
| 203 | - isa = PBXGroup; | ||
| 204 | - children = ( | ||
| 205 | - 3EEF159F4D7912B9311CB282 /* Pods_Runner.framework */, | ||
| 206 | - BA92A3C1CA5533C24C7C7468 /* Pods_RunnerTests.framework */, | ||
| 207 | - ); | ||
| 208 | - name = Frameworks; | ||
| 209 | - sourceTree = "<group>"; | ||
| 210 | - }; | ||
| 211 | -/* End PBXGroup section */ | ||
| 212 | - | ||
| 213 | -/* Begin PBXNativeTarget section */ | ||
| 214 | - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { | ||
| 215 | - isa = PBXNativeTarget; | ||
| 216 | - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; | ||
| 217 | - buildPhases = ( | ||
| 218 | - A6B10289F00794F0134DF87E /* [CP] Check Pods Manifest.lock */, | ||
| 219 | - 331C80D1294CF70F00263BE5 /* Sources */, | ||
| 220 | - 331C80D2294CF70F00263BE5 /* Frameworks */, | ||
| 221 | - 331C80D3294CF70F00263BE5 /* Resources */, | ||
| 222 | - ); | ||
| 223 | - buildRules = ( | ||
| 224 | - ); | ||
| 225 | - dependencies = ( | ||
| 226 | - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, | ||
| 227 | - ); | ||
| 228 | - name = RunnerTests; | ||
| 229 | - productName = RunnerTests; | ||
| 230 | - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; | ||
| 231 | - productType = "com.apple.product-type.bundle.unit-test"; | ||
| 232 | - }; | ||
| 233 | - 33CC10EC2044A3C60003C045 /* Runner */ = { | ||
| 234 | - isa = PBXNativeTarget; | ||
| 235 | - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; | ||
| 236 | - buildPhases = ( | ||
| 237 | - 1CEDB7D27400A1C1B87B926C /* [CP] Check Pods Manifest.lock */, | ||
| 238 | - 33CC10E92044A3C60003C045 /* Sources */, | ||
| 239 | - 33CC10EA2044A3C60003C045 /* Frameworks */, | ||
| 240 | - 33CC10EB2044A3C60003C045 /* Resources */, | ||
| 241 | - 33CC110E2044A8840003C045 /* Bundle Framework */, | ||
| 242 | - 3399D490228B24CF009A79C7 /* ShellScript */, | ||
| 243 | - C2CEDA50A000327A806944DD /* [CP] Embed Pods Frameworks */, | ||
| 244 | - ); | ||
| 245 | - buildRules = ( | ||
| 246 | - ); | ||
| 247 | - dependencies = ( | ||
| 248 | - 33CC11202044C79F0003C045 /* PBXTargetDependency */, | ||
| 249 | - ); | ||
| 250 | - name = Runner; | ||
| 251 | - productName = Runner; | ||
| 252 | - productReference = 33CC10ED2044A3C60003C045 /* sherpa_onnx.app */; | ||
| 253 | - productType = "com.apple.product-type.application"; | ||
| 254 | - }; | ||
| 255 | -/* End PBXNativeTarget section */ | ||
| 256 | - | ||
| 257 | -/* Begin PBXProject section */ | ||
| 258 | - 33CC10E52044A3C60003C045 /* Project object */ = { | ||
| 259 | - isa = PBXProject; | ||
| 260 | - attributes = { | ||
| 261 | - BuildIndependentTargetsInParallel = YES; | ||
| 262 | - LastSwiftUpdateCheck = 0920; | ||
| 263 | - LastUpgradeCheck = 1510; | ||
| 264 | - ORGANIZATIONNAME = ""; | ||
| 265 | - TargetAttributes = { | ||
| 266 | - 331C80D4294CF70F00263BE5 = { | ||
| 267 | - CreatedOnToolsVersion = 14.0; | ||
| 268 | - TestTargetID = 33CC10EC2044A3C60003C045; | ||
| 269 | - }; | ||
| 270 | - 33CC10EC2044A3C60003C045 = { | ||
| 271 | - CreatedOnToolsVersion = 9.2; | ||
| 272 | - LastSwiftMigration = 1100; | ||
| 273 | - ProvisioningStyle = Automatic; | ||
| 274 | - SystemCapabilities = { | ||
| 275 | - com.apple.Sandbox = { | ||
| 276 | - enabled = 1; | ||
| 277 | - }; | ||
| 278 | - }; | ||
| 279 | - }; | ||
| 280 | - 33CC111A2044C6BA0003C045 = { | ||
| 281 | - CreatedOnToolsVersion = 9.2; | ||
| 282 | - ProvisioningStyle = Manual; | ||
| 283 | - }; | ||
| 284 | - }; | ||
| 285 | - }; | ||
| 286 | - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; | ||
| 287 | - compatibilityVersion = "Xcode 9.3"; | ||
| 288 | - developmentRegion = en; | ||
| 289 | - hasScannedForEncodings = 0; | ||
| 290 | - knownRegions = ( | ||
| 291 | - en, | ||
| 292 | - Base, | ||
| 293 | - ); | ||
| 294 | - mainGroup = 33CC10E42044A3C60003C045; | ||
| 295 | - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; | ||
| 296 | - projectDirPath = ""; | ||
| 297 | - projectRoot = ""; | ||
| 298 | - targets = ( | ||
| 299 | - 33CC10EC2044A3C60003C045 /* Runner */, | ||
| 300 | - 331C80D4294CF70F00263BE5 /* RunnerTests */, | ||
| 301 | - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, | ||
| 302 | - ); | ||
| 303 | - }; | ||
| 304 | -/* End PBXProject section */ | ||
| 305 | - | ||
| 306 | -/* Begin PBXResourcesBuildPhase section */ | ||
| 307 | - 331C80D3294CF70F00263BE5 /* Resources */ = { | ||
| 308 | - isa = PBXResourcesBuildPhase; | ||
| 309 | - buildActionMask = 2147483647; | ||
| 310 | - files = ( | ||
| 311 | - ); | ||
| 312 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 313 | - }; | ||
| 314 | - 33CC10EB2044A3C60003C045 /* Resources */ = { | ||
| 315 | - isa = PBXResourcesBuildPhase; | ||
| 316 | - buildActionMask = 2147483647; | ||
| 317 | - files = ( | ||
| 318 | - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, | ||
| 319 | - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, | ||
| 320 | - ); | ||
| 321 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 322 | - }; | ||
| 323 | -/* End PBXResourcesBuildPhase section */ | ||
| 324 | - | ||
| 325 | -/* Begin PBXShellScriptBuildPhase section */ | ||
| 326 | - 1CEDB7D27400A1C1B87B926C /* [CP] Check Pods Manifest.lock */ = { | ||
| 327 | - isa = PBXShellScriptBuildPhase; | ||
| 328 | - buildActionMask = 2147483647; | ||
| 329 | - files = ( | ||
| 330 | - ); | ||
| 331 | - inputFileListPaths = ( | ||
| 332 | - ); | ||
| 333 | - inputPaths = ( | ||
| 334 | - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
| 335 | - "${PODS_ROOT}/Manifest.lock", | ||
| 336 | - ); | ||
| 337 | - name = "[CP] Check Pods Manifest.lock"; | ||
| 338 | - outputFileListPaths = ( | ||
| 339 | - ); | ||
| 340 | - outputPaths = ( | ||
| 341 | - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | ||
| 342 | - ); | ||
| 343 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 344 | - shellPath = /bin/sh; | ||
| 345 | - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | ||
| 346 | - showEnvVarsInLog = 0; | ||
| 347 | - }; | ||
| 348 | - 3399D490228B24CF009A79C7 /* ShellScript */ = { | ||
| 349 | - isa = PBXShellScriptBuildPhase; | ||
| 350 | - alwaysOutOfDate = 1; | ||
| 351 | - buildActionMask = 2147483647; | ||
| 352 | - files = ( | ||
| 353 | - ); | ||
| 354 | - inputFileListPaths = ( | ||
| 355 | - ); | ||
| 356 | - inputPaths = ( | ||
| 357 | - ); | ||
| 358 | - outputFileListPaths = ( | ||
| 359 | - ); | ||
| 360 | - outputPaths = ( | ||
| 361 | - ); | ||
| 362 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 363 | - shellPath = /bin/sh; | ||
| 364 | - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; | ||
| 365 | - }; | ||
| 366 | - 33CC111E2044C6BF0003C045 /* ShellScript */ = { | ||
| 367 | - isa = PBXShellScriptBuildPhase; | ||
| 368 | - buildActionMask = 2147483647; | ||
| 369 | - files = ( | ||
| 370 | - ); | ||
| 371 | - inputFileListPaths = ( | ||
| 372 | - Flutter/ephemeral/FlutterInputs.xcfilelist, | ||
| 373 | - ); | ||
| 374 | - inputPaths = ( | ||
| 375 | - Flutter/ephemeral/tripwire, | ||
| 376 | - ); | ||
| 377 | - outputFileListPaths = ( | ||
| 378 | - Flutter/ephemeral/FlutterOutputs.xcfilelist, | ||
| 379 | - ); | ||
| 380 | - outputPaths = ( | ||
| 381 | - ); | ||
| 382 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 383 | - shellPath = /bin/sh; | ||
| 384 | - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; | ||
| 385 | - }; | ||
| 386 | - A6B10289F00794F0134DF87E /* [CP] Check Pods Manifest.lock */ = { | ||
| 387 | - isa = PBXShellScriptBuildPhase; | ||
| 388 | - buildActionMask = 2147483647; | ||
| 389 | - files = ( | ||
| 390 | - ); | ||
| 391 | - inputFileListPaths = ( | ||
| 392 | - ); | ||
| 393 | - inputPaths = ( | ||
| 394 | - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||
| 395 | - "${PODS_ROOT}/Manifest.lock", | ||
| 396 | - ); | ||
| 397 | - name = "[CP] Check Pods Manifest.lock"; | ||
| 398 | - outputFileListPaths = ( | ||
| 399 | - ); | ||
| 400 | - outputPaths = ( | ||
| 401 | - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", | ||
| 402 | - ); | ||
| 403 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 404 | - shellPath = /bin/sh; | ||
| 405 | - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | ||
| 406 | - showEnvVarsInLog = 0; | ||
| 407 | - }; | ||
| 408 | - C2CEDA50A000327A806944DD /* [CP] Embed Pods Frameworks */ = { | ||
| 409 | - isa = PBXShellScriptBuildPhase; | ||
| 410 | - buildActionMask = 2147483647; | ||
| 411 | - files = ( | ||
| 412 | - ); | ||
| 413 | - inputFileListPaths = ( | ||
| 414 | - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", | ||
| 415 | - ); | ||
| 416 | - name = "[CP] Embed Pods Frameworks"; | ||
| 417 | - outputFileListPaths = ( | ||
| 418 | - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", | ||
| 419 | - ); | ||
| 420 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 421 | - shellPath = /bin/sh; | ||
| 422 | - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | ||
| 423 | - showEnvVarsInLog = 0; | ||
| 424 | - }; | ||
| 425 | -/* End PBXShellScriptBuildPhase section */ | ||
| 426 | - | ||
| 427 | -/* Begin PBXSourcesBuildPhase section */ | ||
| 428 | - 331C80D1294CF70F00263BE5 /* Sources */ = { | ||
| 429 | - isa = PBXSourcesBuildPhase; | ||
| 430 | - buildActionMask = 2147483647; | ||
| 431 | - files = ( | ||
| 432 | - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, | ||
| 433 | - ); | ||
| 434 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 435 | - }; | ||
| 436 | - 33CC10E92044A3C60003C045 /* Sources */ = { | ||
| 437 | - isa = PBXSourcesBuildPhase; | ||
| 438 | - buildActionMask = 2147483647; | ||
| 439 | - files = ( | ||
| 440 | - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, | ||
| 441 | - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, | ||
| 442 | - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, | ||
| 443 | - ); | ||
| 444 | - runOnlyForDeploymentPostprocessing = 0; | ||
| 445 | - }; | ||
| 446 | -/* End PBXSourcesBuildPhase section */ | ||
| 447 | - | ||
| 448 | -/* Begin PBXTargetDependency section */ | ||
| 449 | - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { | ||
| 450 | - isa = PBXTargetDependency; | ||
| 451 | - target = 33CC10EC2044A3C60003C045 /* Runner */; | ||
| 452 | - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; | ||
| 453 | - }; | ||
| 454 | - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { | ||
| 455 | - isa = PBXTargetDependency; | ||
| 456 | - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; | ||
| 457 | - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; | ||
| 458 | - }; | ||
| 459 | -/* End PBXTargetDependency section */ | ||
| 460 | - | ||
| 461 | -/* Begin PBXVariantGroup section */ | ||
| 462 | - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { | ||
| 463 | - isa = PBXVariantGroup; | ||
| 464 | - children = ( | ||
| 465 | - 33CC10F52044A3C60003C045 /* Base */, | ||
| 466 | - ); | ||
| 467 | - name = MainMenu.xib; | ||
| 468 | - path = Runner; | ||
| 469 | - sourceTree = "<group>"; | ||
| 470 | - }; | ||
| 471 | -/* End PBXVariantGroup section */ | ||
| 472 | - | ||
| 473 | -/* Begin XCBuildConfiguration section */ | ||
| 474 | - 331C80DB294CF71000263BE5 /* Debug */ = { | ||
| 475 | - isa = XCBuildConfiguration; | ||
| 476 | - baseConfigurationReference = E3A16097032C820A141E3D0C /* Pods-RunnerTests.debug.xcconfig */; | ||
| 477 | - buildSettings = { | ||
| 478 | - BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 479 | - CURRENT_PROJECT_VERSION = 1; | ||
| 480 | - GENERATE_INFOPLIST_FILE = YES; | ||
| 481 | - MARKETING_VERSION = 1.0; | ||
| 482 | - PRODUCT_BUNDLE_IDENTIFIER = com.k2fsa.sherpa.onnx.RunnerTests; | ||
| 483 | - PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 484 | - SWIFT_VERSION = 5.0; | ||
| 485 | - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/sherpa_onnx.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/sherpa_onnx"; | ||
| 486 | - }; | ||
| 487 | - name = Debug; | ||
| 488 | - }; | ||
| 489 | - 331C80DC294CF71000263BE5 /* Release */ = { | ||
| 490 | - isa = XCBuildConfiguration; | ||
| 491 | - baseConfigurationReference = C9A014A0AF0A3CC243C5BA0C /* Pods-RunnerTests.release.xcconfig */; | ||
| 492 | - buildSettings = { | ||
| 493 | - BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 494 | - CURRENT_PROJECT_VERSION = 1; | ||
| 495 | - GENERATE_INFOPLIST_FILE = YES; | ||
| 496 | - MARKETING_VERSION = 1.0; | ||
| 497 | - PRODUCT_BUNDLE_IDENTIFIER = com.k2fsa.sherpa.onnx.RunnerTests; | ||
| 498 | - PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 499 | - SWIFT_VERSION = 5.0; | ||
| 500 | - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/sherpa_onnx.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/sherpa_onnx"; | ||
| 501 | - }; | ||
| 502 | - name = Release; | ||
| 503 | - }; | ||
| 504 | - 331C80DD294CF71000263BE5 /* Profile */ = { | ||
| 505 | - isa = XCBuildConfiguration; | ||
| 506 | - baseConfigurationReference = F7379309434F931B509C87FA /* Pods-RunnerTests.profile.xcconfig */; | ||
| 507 | - buildSettings = { | ||
| 508 | - BUNDLE_LOADER = "$(TEST_HOST)"; | ||
| 509 | - CURRENT_PROJECT_VERSION = 1; | ||
| 510 | - GENERATE_INFOPLIST_FILE = YES; | ||
| 511 | - MARKETING_VERSION = 1.0; | ||
| 512 | - PRODUCT_BUNDLE_IDENTIFIER = com.k2fsa.sherpa.onnx.RunnerTests; | ||
| 513 | - PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 514 | - SWIFT_VERSION = 5.0; | ||
| 515 | - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/sherpa_onnx.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/sherpa_onnx"; | ||
| 516 | - }; | ||
| 517 | - name = Profile; | ||
| 518 | - }; | ||
| 519 | - 338D0CE9231458BD00FA5F75 /* Profile */ = { | ||
| 520 | - isa = XCBuildConfiguration; | ||
| 521 | - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 522 | - buildSettings = { | ||
| 523 | - ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 524 | - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
| 525 | - CLANG_ANALYZER_NONNULL = YES; | ||
| 526 | - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
| 527 | - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
| 528 | - CLANG_CXX_LIBRARY = "libc++"; | ||
| 529 | - CLANG_ENABLE_MODULES = YES; | ||
| 530 | - CLANG_ENABLE_OBJC_ARC = YES; | ||
| 531 | - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 532 | - CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 533 | - CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 534 | - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 535 | - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 536 | - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
| 537 | - CLANG_WARN_EMPTY_BODY = YES; | ||
| 538 | - CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 539 | - CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 540 | - CLANG_WARN_INT_CONVERSION = YES; | ||
| 541 | - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 542 | - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 543 | - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 544 | - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 545 | - CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 546 | - CODE_SIGN_IDENTITY = "-"; | ||
| 547 | - COPY_PHASE_STRIP = NO; | ||
| 548 | - DEAD_CODE_STRIPPING = YES; | ||
| 549 | - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 550 | - ENABLE_NS_ASSERTIONS = NO; | ||
| 551 | - ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 552 | - ENABLE_USER_SCRIPT_SANDBOXING = NO; | ||
| 553 | - GCC_C_LANGUAGE_STANDARD = gnu11; | ||
| 554 | - GCC_NO_COMMON_BLOCKS = YES; | ||
| 555 | - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 556 | - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 557 | - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 558 | - GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 559 | - GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 560 | - MACOSX_DEPLOYMENT_TARGET = 10.15; | ||
| 561 | - MTL_ENABLE_DEBUG_INFO = NO; | ||
| 562 | - SDKROOT = macosx; | ||
| 563 | - SWIFT_COMPILATION_MODE = wholemodule; | ||
| 564 | - SWIFT_OPTIMIZATION_LEVEL = "-O"; | ||
| 565 | - }; | ||
| 566 | - name = Profile; | ||
| 567 | - }; | ||
| 568 | - 338D0CEA231458BD00FA5F75 /* Profile */ = { | ||
| 569 | - isa = XCBuildConfiguration; | ||
| 570 | - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
| 571 | - buildSettings = { | ||
| 572 | - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 573 | - CLANG_ENABLE_MODULES = YES; | ||
| 574 | - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; | ||
| 575 | - CODE_SIGN_STYLE = Automatic; | ||
| 576 | - COMBINE_HIDPI_IMAGES = YES; | ||
| 577 | - INFOPLIST_FILE = Runner/Info.plist; | ||
| 578 | - LD_RUNPATH_SEARCH_PATHS = ( | ||
| 579 | - "$(inherited)", | ||
| 580 | - "@executable_path/../Frameworks", | ||
| 581 | - ); | ||
| 582 | - PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 583 | - SWIFT_VERSION = 5.0; | ||
| 584 | - }; | ||
| 585 | - name = Profile; | ||
| 586 | - }; | ||
| 587 | - 338D0CEB231458BD00FA5F75 /* Profile */ = { | ||
| 588 | - isa = XCBuildConfiguration; | ||
| 589 | - buildSettings = { | ||
| 590 | - CODE_SIGN_STYLE = Manual; | ||
| 591 | - PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 592 | - }; | ||
| 593 | - name = Profile; | ||
| 594 | - }; | ||
| 595 | - 33CC10F92044A3C60003C045 /* Debug */ = { | ||
| 596 | - isa = XCBuildConfiguration; | ||
| 597 | - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | ||
| 598 | - buildSettings = { | ||
| 599 | - ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 600 | - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
| 601 | - CLANG_ANALYZER_NONNULL = YES; | ||
| 602 | - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
| 603 | - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
| 604 | - CLANG_CXX_LIBRARY = "libc++"; | ||
| 605 | - CLANG_ENABLE_MODULES = YES; | ||
| 606 | - CLANG_ENABLE_OBJC_ARC = YES; | ||
| 607 | - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 608 | - CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 609 | - CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 610 | - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 611 | - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 612 | - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
| 613 | - CLANG_WARN_EMPTY_BODY = YES; | ||
| 614 | - CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 615 | - CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 616 | - CLANG_WARN_INT_CONVERSION = YES; | ||
| 617 | - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 618 | - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 619 | - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 620 | - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 621 | - CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 622 | - CODE_SIGN_IDENTITY = "-"; | ||
| 623 | - COPY_PHASE_STRIP = NO; | ||
| 624 | - DEAD_CODE_STRIPPING = YES; | ||
| 625 | - DEBUG_INFORMATION_FORMAT = dwarf; | ||
| 626 | - ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 627 | - ENABLE_TESTABILITY = YES; | ||
| 628 | - ENABLE_USER_SCRIPT_SANDBOXING = NO; | ||
| 629 | - GCC_C_LANGUAGE_STANDARD = gnu11; | ||
| 630 | - GCC_DYNAMIC_NO_PIC = NO; | ||
| 631 | - GCC_NO_COMMON_BLOCKS = YES; | ||
| 632 | - GCC_OPTIMIZATION_LEVEL = 0; | ||
| 633 | - GCC_PREPROCESSOR_DEFINITIONS = ( | ||
| 634 | - "DEBUG=1", | ||
| 635 | - "$(inherited)", | ||
| 636 | - ); | ||
| 637 | - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 638 | - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 639 | - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 640 | - GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 641 | - GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 642 | - MACOSX_DEPLOYMENT_TARGET = 10.15; | ||
| 643 | - MTL_ENABLE_DEBUG_INFO = YES; | ||
| 644 | - ONLY_ACTIVE_ARCH = YES; | ||
| 645 | - SDKROOT = macosx; | ||
| 646 | - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; | ||
| 647 | - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
| 648 | - }; | ||
| 649 | - name = Debug; | ||
| 650 | - }; | ||
| 651 | - 33CC10FA2044A3C60003C045 /* Release */ = { | ||
| 652 | - isa = XCBuildConfiguration; | ||
| 653 | - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||
| 654 | - buildSettings = { | ||
| 655 | - ALWAYS_SEARCH_USER_PATHS = NO; | ||
| 656 | - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
| 657 | - CLANG_ANALYZER_NONNULL = YES; | ||
| 658 | - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
| 659 | - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | ||
| 660 | - CLANG_CXX_LIBRARY = "libc++"; | ||
| 661 | - CLANG_ENABLE_MODULES = YES; | ||
| 662 | - CLANG_ENABLE_OBJC_ARC = YES; | ||
| 663 | - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | ||
| 664 | - CLANG_WARN_BOOL_CONVERSION = YES; | ||
| 665 | - CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
| 666 | - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | ||
| 667 | - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
| 668 | - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | ||
| 669 | - CLANG_WARN_EMPTY_BODY = YES; | ||
| 670 | - CLANG_WARN_ENUM_CONVERSION = YES; | ||
| 671 | - CLANG_WARN_INFINITE_RECURSION = YES; | ||
| 672 | - CLANG_WARN_INT_CONVERSION = YES; | ||
| 673 | - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | ||
| 674 | - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | ||
| 675 | - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
| 676 | - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | ||
| 677 | - CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
| 678 | - CODE_SIGN_IDENTITY = "-"; | ||
| 679 | - COPY_PHASE_STRIP = NO; | ||
| 680 | - DEAD_CODE_STRIPPING = YES; | ||
| 681 | - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
| 682 | - ENABLE_NS_ASSERTIONS = NO; | ||
| 683 | - ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
| 684 | - ENABLE_USER_SCRIPT_SANDBOXING = NO; | ||
| 685 | - GCC_C_LANGUAGE_STANDARD = gnu11; | ||
| 686 | - GCC_NO_COMMON_BLOCKS = YES; | ||
| 687 | - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
| 688 | - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
| 689 | - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | ||
| 690 | - GCC_WARN_UNUSED_FUNCTION = YES; | ||
| 691 | - GCC_WARN_UNUSED_VARIABLE = YES; | ||
| 692 | - MACOSX_DEPLOYMENT_TARGET = 10.15; | ||
| 693 | - MTL_ENABLE_DEBUG_INFO = NO; | ||
| 694 | - SDKROOT = macosx; | ||
| 695 | - SWIFT_COMPILATION_MODE = wholemodule; | ||
| 696 | - SWIFT_OPTIMIZATION_LEVEL = "-O"; | ||
| 697 | - }; | ||
| 698 | - name = Release; | ||
| 699 | - }; | ||
| 700 | - 33CC10FC2044A3C60003C045 /* Debug */ = { | ||
| 701 | - isa = XCBuildConfiguration; | ||
| 702 | - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
| 703 | - buildSettings = { | ||
| 704 | - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 705 | - CLANG_ENABLE_MODULES = YES; | ||
| 706 | - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; | ||
| 707 | - CODE_SIGN_STYLE = Automatic; | ||
| 708 | - COMBINE_HIDPI_IMAGES = YES; | ||
| 709 | - INFOPLIST_FILE = Runner/Info.plist; | ||
| 710 | - LD_RUNPATH_SEARCH_PATHS = ( | ||
| 711 | - "$(inherited)", | ||
| 712 | - "@executable_path/../Frameworks", | ||
| 713 | - ); | ||
| 714 | - PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 715 | - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
| 716 | - SWIFT_VERSION = 5.0; | ||
| 717 | - }; | ||
| 718 | - name = Debug; | ||
| 719 | - }; | ||
| 720 | - 33CC10FD2044A3C60003C045 /* Release */ = { | ||
| 721 | - isa = XCBuildConfiguration; | ||
| 722 | - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; | ||
| 723 | - buildSettings = { | ||
| 724 | - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||
| 725 | - CLANG_ENABLE_MODULES = YES; | ||
| 726 | - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; | ||
| 727 | - CODE_SIGN_STYLE = Automatic; | ||
| 728 | - COMBINE_HIDPI_IMAGES = YES; | ||
| 729 | - INFOPLIST_FILE = Runner/Info.plist; | ||
| 730 | - LD_RUNPATH_SEARCH_PATHS = ( | ||
| 731 | - "$(inherited)", | ||
| 732 | - "@executable_path/../Frameworks", | ||
| 733 | - ); | ||
| 734 | - PROVISIONING_PROFILE_SPECIFIER = ""; | ||
| 735 | - SWIFT_VERSION = 5.0; | ||
| 736 | - }; | ||
| 737 | - name = Release; | ||
| 738 | - }; | ||
| 739 | - 33CC111C2044C6BA0003C045 /* Debug */ = { | ||
| 740 | - isa = XCBuildConfiguration; | ||
| 741 | - buildSettings = { | ||
| 742 | - CODE_SIGN_STYLE = Manual; | ||
| 743 | - PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 744 | - }; | ||
| 745 | - name = Debug; | ||
| 746 | - }; | ||
| 747 | - 33CC111D2044C6BA0003C045 /* Release */ = { | ||
| 748 | - isa = XCBuildConfiguration; | ||
| 749 | - buildSettings = { | ||
| 750 | - CODE_SIGN_STYLE = Automatic; | ||
| 751 | - PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| 752 | - }; | ||
| 753 | - name = Release; | ||
| 754 | - }; | ||
| 755 | -/* End XCBuildConfiguration section */ | ||
| 756 | - | ||
| 757 | -/* Begin XCConfigurationList section */ | ||
| 758 | - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { | ||
| 759 | - isa = XCConfigurationList; | ||
| 760 | - buildConfigurations = ( | ||
| 761 | - 331C80DB294CF71000263BE5 /* Debug */, | ||
| 762 | - 331C80DC294CF71000263BE5 /* Release */, | ||
| 763 | - 331C80DD294CF71000263BE5 /* Profile */, | ||
| 764 | - ); | ||
| 765 | - defaultConfigurationIsVisible = 0; | ||
| 766 | - defaultConfigurationName = Release; | ||
| 767 | - }; | ||
| 768 | - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { | ||
| 769 | - isa = XCConfigurationList; | ||
| 770 | - buildConfigurations = ( | ||
| 771 | - 33CC10F92044A3C60003C045 /* Debug */, | ||
| 772 | - 33CC10FA2044A3C60003C045 /* Release */, | ||
| 773 | - 338D0CE9231458BD00FA5F75 /* Profile */, | ||
| 774 | - ); | ||
| 775 | - defaultConfigurationIsVisible = 0; | ||
| 776 | - defaultConfigurationName = Release; | ||
| 777 | - }; | ||
| 778 | - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { | ||
| 779 | - isa = XCConfigurationList; | ||
| 780 | - buildConfigurations = ( | ||
| 781 | - 33CC10FC2044A3C60003C045 /* Debug */, | ||
| 782 | - 33CC10FD2044A3C60003C045 /* Release */, | ||
| 783 | - 338D0CEA231458BD00FA5F75 /* Profile */, | ||
| 784 | - ); | ||
| 785 | - defaultConfigurationIsVisible = 0; | ||
| 786 | - defaultConfigurationName = Release; | ||
| 787 | - }; | ||
| 788 | - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { | ||
| 789 | - isa = XCConfigurationList; | ||
| 790 | - buildConfigurations = ( | ||
| 791 | - 33CC111C2044C6BA0003C045 /* Debug */, | ||
| 792 | - 33CC111D2044C6BA0003C045 /* Release */, | ||
| 793 | - 338D0CEB231458BD00FA5F75 /* Profile */, | ||
| 794 | - ); | ||
| 795 | - defaultConfigurationIsVisible = 0; | ||
| 796 | - defaultConfigurationName = Release; | ||
| 797 | - }; | ||
| 798 | -/* End XCConfigurationList section */ | ||
| 799 | - }; | ||
| 800 | - rootObject = 33CC10E52044A3C60003C045 /* Project object */; | ||
| 801 | -} |
sherpa-onnx/flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
已删除
100644 → 0
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<Scheme | ||
| 3 | - LastUpgradeVersion = "1510" | ||
| 4 | - version = "1.3"> | ||
| 5 | - <BuildAction | ||
| 6 | - parallelizeBuildables = "YES" | ||
| 7 | - buildImplicitDependencies = "YES"> | ||
| 8 | - <BuildActionEntries> | ||
| 9 | - <BuildActionEntry | ||
| 10 | - buildForTesting = "YES" | ||
| 11 | - buildForRunning = "YES" | ||
| 12 | - buildForProfiling = "YES" | ||
| 13 | - buildForArchiving = "YES" | ||
| 14 | - buildForAnalyzing = "YES"> | ||
| 15 | - <BuildableReference | ||
| 16 | - BuildableIdentifier = "primary" | ||
| 17 | - BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 18 | - BuildableName = "sherpa_onnx.app" | ||
| 19 | - BlueprintName = "Runner" | ||
| 20 | - ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 21 | - </BuildableReference> | ||
| 22 | - </BuildActionEntry> | ||
| 23 | - </BuildActionEntries> | ||
| 24 | - </BuildAction> | ||
| 25 | - <TestAction | ||
| 26 | - buildConfiguration = "Debug" | ||
| 27 | - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 28 | - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 29 | - shouldUseLaunchSchemeArgsEnv = "YES"> | ||
| 30 | - <MacroExpansion> | ||
| 31 | - <BuildableReference | ||
| 32 | - BuildableIdentifier = "primary" | ||
| 33 | - BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 34 | - BuildableName = "sherpa_onnx.app" | ||
| 35 | - BlueprintName = "Runner" | ||
| 36 | - ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 37 | - </BuildableReference> | ||
| 38 | - </MacroExpansion> | ||
| 39 | - <Testables> | ||
| 40 | - <TestableReference | ||
| 41 | - skipped = "NO" | ||
| 42 | - parallelizable = "YES"> | ||
| 43 | - <BuildableReference | ||
| 44 | - BuildableIdentifier = "primary" | ||
| 45 | - BlueprintIdentifier = "331C80D4294CF70F00263BE5" | ||
| 46 | - BuildableName = "RunnerTests.xctest" | ||
| 47 | - BlueprintName = "RunnerTests" | ||
| 48 | - ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 49 | - </BuildableReference> | ||
| 50 | - </TestableReference> | ||
| 51 | - </Testables> | ||
| 52 | - </TestAction> | ||
| 53 | - <LaunchAction | ||
| 54 | - buildConfiguration = "Debug" | ||
| 55 | - selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| 56 | - selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| 57 | - launchStyle = "0" | ||
| 58 | - useCustomWorkingDirectory = "NO" | ||
| 59 | - ignoresPersistentStateOnLaunch = "NO" | ||
| 60 | - debugDocumentVersioning = "YES" | ||
| 61 | - debugServiceExtension = "internal" | ||
| 62 | - allowLocationSimulation = "YES"> | ||
| 63 | - <BuildableProductRunnable | ||
| 64 | - runnableDebuggingMode = "0"> | ||
| 65 | - <BuildableReference | ||
| 66 | - BuildableIdentifier = "primary" | ||
| 67 | - BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 68 | - BuildableName = "sherpa_onnx.app" | ||
| 69 | - BlueprintName = "Runner" | ||
| 70 | - ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 71 | - </BuildableReference> | ||
| 72 | - </BuildableProductRunnable> | ||
| 73 | - </LaunchAction> | ||
| 74 | - <ProfileAction | ||
| 75 | - buildConfiguration = "Profile" | ||
| 76 | - shouldUseLaunchSchemeArgsEnv = "YES" | ||
| 77 | - savedToolIdentifier = "" | ||
| 78 | - useCustomWorkingDirectory = "NO" | ||
| 79 | - debugDocumentVersioning = "YES"> | ||
| 80 | - <BuildableProductRunnable | ||
| 81 | - runnableDebuggingMode = "0"> | ||
| 82 | - <BuildableReference | ||
| 83 | - BuildableIdentifier = "primary" | ||
| 84 | - BlueprintIdentifier = "33CC10EC2044A3C60003C045" | ||
| 85 | - BuildableName = "sherpa_onnx.app" | ||
| 86 | - BlueprintName = "Runner" | ||
| 87 | - ReferencedContainer = "container:Runner.xcodeproj"> | ||
| 88 | - </BuildableReference> | ||
| 89 | - </BuildableProductRunnable> | ||
| 90 | - </ProfileAction> | ||
| 91 | - <AnalyzeAction | ||
| 92 | - buildConfiguration = "Debug"> | ||
| 93 | - </AnalyzeAction> | ||
| 94 | - <ArchiveAction | ||
| 95 | - buildConfiguration = "Release" | ||
| 96 | - revealArchiveInOrganizer = "YES"> | ||
| 97 | - </ArchiveAction> | ||
| 98 | -</Scheme> |
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
已删除
100644 → 0
| 1 | -{ | ||
| 2 | - "images" : [ | ||
| 3 | - { | ||
| 4 | - "size" : "16x16", | ||
| 5 | - "idiom" : "mac", | ||
| 6 | - "filename" : "app_icon_16.png", | ||
| 7 | - "scale" : "1x" | ||
| 8 | - }, | ||
| 9 | - { | ||
| 10 | - "size" : "16x16", | ||
| 11 | - "idiom" : "mac", | ||
| 12 | - "filename" : "app_icon_32.png", | ||
| 13 | - "scale" : "2x" | ||
| 14 | - }, | ||
| 15 | - { | ||
| 16 | - "size" : "32x32", | ||
| 17 | - "idiom" : "mac", | ||
| 18 | - "filename" : "app_icon_32.png", | ||
| 19 | - "scale" : "1x" | ||
| 20 | - }, | ||
| 21 | - { | ||
| 22 | - "size" : "32x32", | ||
| 23 | - "idiom" : "mac", | ||
| 24 | - "filename" : "app_icon_64.png", | ||
| 25 | - "scale" : "2x" | ||
| 26 | - }, | ||
| 27 | - { | ||
| 28 | - "size" : "128x128", | ||
| 29 | - "idiom" : "mac", | ||
| 30 | - "filename" : "app_icon_128.png", | ||
| 31 | - "scale" : "1x" | ||
| 32 | - }, | ||
| 33 | - { | ||
| 34 | - "size" : "128x128", | ||
| 35 | - "idiom" : "mac", | ||
| 36 | - "filename" : "app_icon_256.png", | ||
| 37 | - "scale" : "2x" | ||
| 38 | - }, | ||
| 39 | - { | ||
| 40 | - "size" : "256x256", | ||
| 41 | - "idiom" : "mac", | ||
| 42 | - "filename" : "app_icon_256.png", | ||
| 43 | - "scale" : "1x" | ||
| 44 | - }, | ||
| 45 | - { | ||
| 46 | - "size" : "256x256", | ||
| 47 | - "idiom" : "mac", | ||
| 48 | - "filename" : "app_icon_512.png", | ||
| 49 | - "scale" : "2x" | ||
| 50 | - }, | ||
| 51 | - { | ||
| 52 | - "size" : "512x512", | ||
| 53 | - "idiom" : "mac", | ||
| 54 | - "filename" : "app_icon_512.png", | ||
| 55 | - "scale" : "1x" | ||
| 56 | - }, | ||
| 57 | - { | ||
| 58 | - "size" : "512x512", | ||
| 59 | - "idiom" : "mac", | ||
| 60 | - "filename" : "app_icon_1024.png", | ||
| 61 | - "scale" : "2x" | ||
| 62 | - } | ||
| 63 | - ], | ||
| 64 | - "info" : { | ||
| 65 | - "version" : 1, | ||
| 66 | - "author" : "xcode" | ||
| 67 | - } | ||
| 68 | -} |
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
已删除
100644 → 0
100.6 KB
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
已删除
100644 → 0
5.5 KB
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
已删除
100644 → 0
520 字节
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
已删除
100644 → 0
13.8 KB
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
已删除
100644 → 0
1.0 KB
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
已删除
100644 → 0
35.6 KB
sherpa-onnx/flutter/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
已删除
100644 → 0
2.2 KB
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
| 3 | - <dependencies> | ||
| 4 | - <deployment identifier="macosx"/> | ||
| 5 | - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> | ||
| 6 | - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 7 | - </dependencies> | ||
| 8 | - <objects> | ||
| 9 | - <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> | ||
| 10 | - <connections> | ||
| 11 | - <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/> | ||
| 12 | - </connections> | ||
| 13 | - </customObject> | ||
| 14 | - <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
| 15 | - <customObject id="-3" userLabel="Application" customClass="NSObject"/> | ||
| 16 | - <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target"> | ||
| 17 | - <connections> | ||
| 18 | - <outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/> | ||
| 19 | - <outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/> | ||
| 20 | - </connections> | ||
| 21 | - </customObject> | ||
| 22 | - <customObject id="YLy-65-1bz" customClass="NSFontManager"/> | ||
| 23 | - <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6"> | ||
| 24 | - <items> | ||
| 25 | - <menuItem title="APP_NAME" id="1Xt-HY-uBw"> | ||
| 26 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 27 | - <menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr"> | ||
| 28 | - <items> | ||
| 29 | - <menuItem title="About APP_NAME" id="5kV-Vb-QxS"> | ||
| 30 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 31 | - <connections> | ||
| 32 | - <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/> | ||
| 33 | - </connections> | ||
| 34 | - </menuItem> | ||
| 35 | - <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/> | ||
| 36 | - <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/> | ||
| 37 | - <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/> | ||
| 38 | - <menuItem title="Services" id="NMo-om-nkz"> | ||
| 39 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 40 | - <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/> | ||
| 41 | - </menuItem> | ||
| 42 | - <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/> | ||
| 43 | - <menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN"> | ||
| 44 | - <connections> | ||
| 45 | - <action selector="hide:" target="-1" id="PnN-Uc-m68"/> | ||
| 46 | - </connections> | ||
| 47 | - </menuItem> | ||
| 48 | - <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO"> | ||
| 49 | - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
| 50 | - <connections> | ||
| 51 | - <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/> | ||
| 52 | - </connections> | ||
| 53 | - </menuItem> | ||
| 54 | - <menuItem title="Show All" id="Kd2-mp-pUS"> | ||
| 55 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 56 | - <connections> | ||
| 57 | - <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/> | ||
| 58 | - </connections> | ||
| 59 | - </menuItem> | ||
| 60 | - <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/> | ||
| 61 | - <menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi"> | ||
| 62 | - <connections> | ||
| 63 | - <action selector="terminate:" target="-1" id="Te7-pn-YzF"/> | ||
| 64 | - </connections> | ||
| 65 | - </menuItem> | ||
| 66 | - </items> | ||
| 67 | - </menu> | ||
| 68 | - </menuItem> | ||
| 69 | - <menuItem title="Edit" id="5QF-Oa-p0T"> | ||
| 70 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 71 | - <menu key="submenu" title="Edit" id="W48-6f-4Dl"> | ||
| 72 | - <items> | ||
| 73 | - <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg"> | ||
| 74 | - <connections> | ||
| 75 | - <action selector="undo:" target="-1" id="M6e-cu-g7V"/> | ||
| 76 | - </connections> | ||
| 77 | - </menuItem> | ||
| 78 | - <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam"> | ||
| 79 | - <connections> | ||
| 80 | - <action selector="redo:" target="-1" id="oIA-Rs-6OD"/> | ||
| 81 | - </connections> | ||
| 82 | - </menuItem> | ||
| 83 | - <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/> | ||
| 84 | - <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG"> | ||
| 85 | - <connections> | ||
| 86 | - <action selector="cut:" target="-1" id="YJe-68-I9s"/> | ||
| 87 | - </connections> | ||
| 88 | - </menuItem> | ||
| 89 | - <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU"> | ||
| 90 | - <connections> | ||
| 91 | - <action selector="copy:" target="-1" id="G1f-GL-Joy"/> | ||
| 92 | - </connections> | ||
| 93 | - </menuItem> | ||
| 94 | - <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL"> | ||
| 95 | - <connections> | ||
| 96 | - <action selector="paste:" target="-1" id="UvS-8e-Qdg"/> | ||
| 97 | - </connections> | ||
| 98 | - </menuItem> | ||
| 99 | - <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk"> | ||
| 100 | - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
| 101 | - <connections> | ||
| 102 | - <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/> | ||
| 103 | - </connections> | ||
| 104 | - </menuItem> | ||
| 105 | - <menuItem title="Delete" id="pa3-QI-u2k"> | ||
| 106 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 107 | - <connections> | ||
| 108 | - <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/> | ||
| 109 | - </connections> | ||
| 110 | - </menuItem> | ||
| 111 | - <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m"> | ||
| 112 | - <connections> | ||
| 113 | - <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/> | ||
| 114 | - </connections> | ||
| 115 | - </menuItem> | ||
| 116 | - <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/> | ||
| 117 | - <menuItem title="Find" id="4EN-yA-p0u"> | ||
| 118 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 119 | - <menu key="submenu" title="Find" id="1b7-l0-nxx"> | ||
| 120 | - <items> | ||
| 121 | - <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W"> | ||
| 122 | - <connections> | ||
| 123 | - <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/> | ||
| 124 | - </connections> | ||
| 125 | - </menuItem> | ||
| 126 | - <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz"> | ||
| 127 | - <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> | ||
| 128 | - <connections> | ||
| 129 | - <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/> | ||
| 130 | - </connections> | ||
| 131 | - </menuItem> | ||
| 132 | - <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye"> | ||
| 133 | - <connections> | ||
| 134 | - <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/> | ||
| 135 | - </connections> | ||
| 136 | - </menuItem> | ||
| 137 | - <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV"> | ||
| 138 | - <connections> | ||
| 139 | - <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/> | ||
| 140 | - </connections> | ||
| 141 | - </menuItem> | ||
| 142 | - <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt"> | ||
| 143 | - <connections> | ||
| 144 | - <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/> | ||
| 145 | - </connections> | ||
| 146 | - </menuItem> | ||
| 147 | - <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd"> | ||
| 148 | - <connections> | ||
| 149 | - <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/> | ||
| 150 | - </connections> | ||
| 151 | - </menuItem> | ||
| 152 | - </items> | ||
| 153 | - </menu> | ||
| 154 | - </menuItem> | ||
| 155 | - <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7"> | ||
| 156 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 157 | - <menu key="submenu" title="Spelling" id="3IN-sU-3Bg"> | ||
| 158 | - <items> | ||
| 159 | - <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI"> | ||
| 160 | - <connections> | ||
| 161 | - <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/> | ||
| 162 | - </connections> | ||
| 163 | - </menuItem> | ||
| 164 | - <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7"> | ||
| 165 | - <connections> | ||
| 166 | - <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/> | ||
| 167 | - </connections> | ||
| 168 | - </menuItem> | ||
| 169 | - <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/> | ||
| 170 | - <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN"> | ||
| 171 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 172 | - <connections> | ||
| 173 | - <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/> | ||
| 174 | - </connections> | ||
| 175 | - </menuItem> | ||
| 176 | - <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG"> | ||
| 177 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 178 | - <connections> | ||
| 179 | - <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/> | ||
| 180 | - </connections> | ||
| 181 | - </menuItem> | ||
| 182 | - <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v"> | ||
| 183 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 184 | - <connections> | ||
| 185 | - <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/> | ||
| 186 | - </connections> | ||
| 187 | - </menuItem> | ||
| 188 | - </items> | ||
| 189 | - </menu> | ||
| 190 | - </menuItem> | ||
| 191 | - <menuItem title="Substitutions" id="9ic-FL-obx"> | ||
| 192 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 193 | - <menu key="submenu" title="Substitutions" id="FeM-D8-WVr"> | ||
| 194 | - <items> | ||
| 195 | - <menuItem title="Show Substitutions" id="z6F-FW-3nz"> | ||
| 196 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 197 | - <connections> | ||
| 198 | - <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/> | ||
| 199 | - </connections> | ||
| 200 | - </menuItem> | ||
| 201 | - <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/> | ||
| 202 | - <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM"> | ||
| 203 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 204 | - <connections> | ||
| 205 | - <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/> | ||
| 206 | - </connections> | ||
| 207 | - </menuItem> | ||
| 208 | - <menuItem title="Smart Quotes" id="hQb-2v-fYv"> | ||
| 209 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 210 | - <connections> | ||
| 211 | - <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/> | ||
| 212 | - </connections> | ||
| 213 | - </menuItem> | ||
| 214 | - <menuItem title="Smart Dashes" id="rgM-f4-ycn"> | ||
| 215 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 216 | - <connections> | ||
| 217 | - <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/> | ||
| 218 | - </connections> | ||
| 219 | - </menuItem> | ||
| 220 | - <menuItem title="Smart Links" id="cwL-P1-jid"> | ||
| 221 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 222 | - <connections> | ||
| 223 | - <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/> | ||
| 224 | - </connections> | ||
| 225 | - </menuItem> | ||
| 226 | - <menuItem title="Data Detectors" id="tRr-pd-1PS"> | ||
| 227 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 228 | - <connections> | ||
| 229 | - <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/> | ||
| 230 | - </connections> | ||
| 231 | - </menuItem> | ||
| 232 | - <menuItem title="Text Replacement" id="HFQ-gK-NFA"> | ||
| 233 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 234 | - <connections> | ||
| 235 | - <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/> | ||
| 236 | - </connections> | ||
| 237 | - </menuItem> | ||
| 238 | - </items> | ||
| 239 | - </menu> | ||
| 240 | - </menuItem> | ||
| 241 | - <menuItem title="Transformations" id="2oI-Rn-ZJC"> | ||
| 242 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 243 | - <menu key="submenu" title="Transformations" id="c8a-y6-VQd"> | ||
| 244 | - <items> | ||
| 245 | - <menuItem title="Make Upper Case" id="vmV-6d-7jI"> | ||
| 246 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 247 | - <connections> | ||
| 248 | - <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/> | ||
| 249 | - </connections> | ||
| 250 | - </menuItem> | ||
| 251 | - <menuItem title="Make Lower Case" id="d9M-CD-aMd"> | ||
| 252 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 253 | - <connections> | ||
| 254 | - <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/> | ||
| 255 | - </connections> | ||
| 256 | - </menuItem> | ||
| 257 | - <menuItem title="Capitalize" id="UEZ-Bs-lqG"> | ||
| 258 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 259 | - <connections> | ||
| 260 | - <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/> | ||
| 261 | - </connections> | ||
| 262 | - </menuItem> | ||
| 263 | - </items> | ||
| 264 | - </menu> | ||
| 265 | - </menuItem> | ||
| 266 | - <menuItem title="Speech" id="xrE-MZ-jX0"> | ||
| 267 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 268 | - <menu key="submenu" title="Speech" id="3rS-ZA-NoH"> | ||
| 269 | - <items> | ||
| 270 | - <menuItem title="Start Speaking" id="Ynk-f8-cLZ"> | ||
| 271 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 272 | - <connections> | ||
| 273 | - <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/> | ||
| 274 | - </connections> | ||
| 275 | - </menuItem> | ||
| 276 | - <menuItem title="Stop Speaking" id="Oyz-dy-DGm"> | ||
| 277 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 278 | - <connections> | ||
| 279 | - <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/> | ||
| 280 | - </connections> | ||
| 281 | - </menuItem> | ||
| 282 | - </items> | ||
| 283 | - </menu> | ||
| 284 | - </menuItem> | ||
| 285 | - </items> | ||
| 286 | - </menu> | ||
| 287 | - </menuItem> | ||
| 288 | - <menuItem title="View" id="H8h-7b-M4v"> | ||
| 289 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 290 | - <menu key="submenu" title="View" id="HyV-fh-RgO"> | ||
| 291 | - <items> | ||
| 292 | - <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa"> | ||
| 293 | - <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> | ||
| 294 | - <connections> | ||
| 295 | - <action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/> | ||
| 296 | - </connections> | ||
| 297 | - </menuItem> | ||
| 298 | - </items> | ||
| 299 | - </menu> | ||
| 300 | - </menuItem> | ||
| 301 | - <menuItem title="Window" id="aUF-d1-5bR"> | ||
| 302 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 303 | - <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo"> | ||
| 304 | - <items> | ||
| 305 | - <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV"> | ||
| 306 | - <connections> | ||
| 307 | - <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/> | ||
| 308 | - </connections> | ||
| 309 | - </menuItem> | ||
| 310 | - <menuItem title="Zoom" id="R4o-n2-Eq4"> | ||
| 311 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 312 | - <connections> | ||
| 313 | - <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/> | ||
| 314 | - </connections> | ||
| 315 | - </menuItem> | ||
| 316 | - <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/> | ||
| 317 | - <menuItem title="Bring All to Front" id="LE2-aR-0XJ"> | ||
| 318 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 319 | - <connections> | ||
| 320 | - <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/> | ||
| 321 | - </connections> | ||
| 322 | - </menuItem> | ||
| 323 | - </items> | ||
| 324 | - </menu> | ||
| 325 | - </menuItem> | ||
| 326 | - <menuItem title="Help" id="EPT-qC-fAb"> | ||
| 327 | - <modifierMask key="keyEquivalentModifierMask"/> | ||
| 328 | - <menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/> | ||
| 329 | - </menuItem> | ||
| 330 | - </items> | ||
| 331 | - <point key="canvasLocation" x="142" y="-258"/> | ||
| 332 | - </menu> | ||
| 333 | - <window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target"> | ||
| 334 | - <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> | ||
| 335 | - <rect key="contentRect" x="335" y="390" width="800" height="600"/> | ||
| 336 | - <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/> | ||
| 337 | - <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ"> | ||
| 338 | - <rect key="frame" x="0.0" y="0.0" width="800" height="600"/> | ||
| 339 | - <autoresizingMask key="autoresizingMask"/> | ||
| 340 | - </view> | ||
| 341 | - </window> | ||
| 342 | - </objects> | ||
| 343 | -</document> |
| 1 | -// Application-level settings for the Runner target. | ||
| 2 | -// | ||
| 3 | -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the | ||
| 4 | -// future. If not, the values below would default to using the project name when this becomes a | ||
| 5 | -// 'flutter create' template. | ||
| 6 | - | ||
| 7 | -// The application's name. By default this is also the title of the Flutter window. | ||
| 8 | -PRODUCT_NAME = sherpa_onnx | ||
| 9 | - | ||
| 10 | -// The application's bundle identifier | ||
| 11 | -PRODUCT_BUNDLE_IDENTIFIER = com.k2fsa.sherpa.onnx | ||
| 12 | - | ||
| 13 | -// The copyright displayed in application information | ||
| 14 | -PRODUCT_COPYRIGHT = Copyright © 2024 Next-gen Kaldi. All rights reserved. |
| 1 | -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings | ||
| 2 | -GCC_WARN_UNDECLARED_SELECTOR = YES | ||
| 3 | -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES | ||
| 4 | -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE | ||
| 5 | -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES | ||
| 6 | -CLANG_WARN_PRAGMA_PACK = YES | ||
| 7 | -CLANG_WARN_STRICT_PROTOTYPES = YES | ||
| 8 | -CLANG_WARN_COMMA = YES | ||
| 9 | -GCC_WARN_STRICT_SELECTOR_MATCH = YES | ||
| 10 | -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES | ||
| 11 | -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES | ||
| 12 | -GCC_WARN_SHADOW = YES | ||
| 13 | -CLANG_WARN_UNREACHABLE_CODE = YES |
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | -<plist version="1.0"> | ||
| 4 | -<dict> | ||
| 5 | - <key>com.apple.security.app-sandbox</key> | ||
| 6 | - <true/> | ||
| 7 | - <key>com.apple.security.cs.allow-jit</key> | ||
| 8 | - <true/> | ||
| 9 | - <key>com.apple.security.device.audio-input</key> | ||
| 10 | - <true/> | ||
| 11 | - <key>com.apple.security.network.server</key> | ||
| 12 | - <true/> | ||
| 13 | -</dict> | ||
| 14 | -</plist> |
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | -<plist version="1.0"> | ||
| 4 | -<dict> | ||
| 5 | - <key>NSMicrophoneUsageDescription</key> | ||
| 6 | - <string>Need microphone access for Next-gen kaldi to work</string> | ||
| 7 | - <key>CFBundleDevelopmentRegion</key> | ||
| 8 | - <string>$(DEVELOPMENT_LANGUAGE)</string> | ||
| 9 | - <key>CFBundleExecutable</key> | ||
| 10 | - <string>$(EXECUTABLE_NAME)</string> | ||
| 11 | - <key>CFBundleIconFile</key> | ||
| 12 | - <string></string> | ||
| 13 | - <key>CFBundleIdentifier</key> | ||
| 14 | - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 15 | - <key>CFBundleInfoDictionaryVersion</key> | ||
| 16 | - <string>6.0</string> | ||
| 17 | - <key>CFBundleName</key> | ||
| 18 | - <string>$(PRODUCT_NAME)</string> | ||
| 19 | - <key>CFBundlePackageType</key> | ||
| 20 | - <string>APPL</string> | ||
| 21 | - <key>CFBundleShortVersionString</key> | ||
| 22 | - <string>$(FLUTTER_BUILD_NAME)</string> | ||
| 23 | - <key>CFBundleVersion</key> | ||
| 24 | - <string>$(FLUTTER_BUILD_NUMBER)</string> | ||
| 25 | - <key>LSMinimumSystemVersion</key> | ||
| 26 | - <string>$(MACOSX_DEPLOYMENT_TARGET)</string> | ||
| 27 | - <key>NSHumanReadableCopyright</key> | ||
| 28 | - <string>$(PRODUCT_COPYRIGHT)</string> | ||
| 29 | - <key>NSMainNibFile</key> | ||
| 30 | - <string>MainMenu</string> | ||
| 31 | - <key>NSPrincipalClass</key> | ||
| 32 | - <string>NSApplication</string> | ||
| 33 | -</dict> | ||
| 34 | -</plist> |
| 1 | -import Cocoa | ||
| 2 | -import FlutterMacOS | ||
| 3 | - | ||
| 4 | -class MainFlutterWindow: NSWindow { | ||
| 5 | - override func awakeFromNib() { | ||
| 6 | - let flutterViewController = FlutterViewController() | ||
| 7 | - let windowFrame = self.frame | ||
| 8 | - self.contentViewController = flutterViewController | ||
| 9 | - self.setFrame(windowFrame, display: true) | ||
| 10 | - | ||
| 11 | - RegisterGeneratedPlugins(registry: flutterViewController) | ||
| 12 | - | ||
| 13 | - super.awakeFromNib() | ||
| 14 | - } | ||
| 15 | -} |
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | -<plist version="1.0"> | ||
| 4 | -<dict> | ||
| 5 | - <key>com.apple.security.app-sandbox</key> | ||
| 6 | - <true/> | ||
| 7 | - <key>com.apple.security.device.audio-input</key> | ||
| 8 | - <true/> | ||
| 9 | -</dict> | ||
| 10 | -</plist> |
| 1 | -import Cocoa | ||
| 2 | -import FlutterMacOS | ||
| 3 | -import XCTest | ||
| 4 | - | ||
| 5 | -class RunnerTests: XCTestCase { | ||
| 6 | - | ||
| 7 | - func testExample() { | ||
| 8 | - // If you add code to the Runner application, consider adding tests here. | ||
| 9 | - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. | ||
| 10 | - } | ||
| 11 | - | ||
| 12 | -} |
sherpa-onnx/flutter/example/pubspec.yaml
已删除
100644 → 0
| 1 | -name: hello_sherpa_onnx | ||
| 2 | -description: "Demonstrates how to use the sherpa_onnx ffi plugin." | ||
| 3 | -# The following line prevents the package from being accidentally published to | ||
| 4 | -# pub.dev using `flutter pub publish`. This is preferred for private packages. | ||
| 5 | -publish_to: 'none' # Remove this line if you wish to publish to pub.dev | ||
| 6 | - | ||
| 7 | -# The following defines the version and build number for your application. | ||
| 8 | -# A version number is three numbers separated by dots, like 1.2.43 | ||
| 9 | -# followed by an optional build number separated by a +. | ||
| 10 | -# Both the version and the builder number may be overridden in flutter | ||
| 11 | -# build by specifying --build-name and --build-number, respectively. | ||
| 12 | -# In Android, build-name is used as versionName while build-number used as versionCode. | ||
| 13 | -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning | ||
| 14 | -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. | ||
| 15 | -# Read more about iOS versioning at | ||
| 16 | -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html | ||
| 17 | -# In Windows, build-name is used as the major, minor, and patch parts | ||
| 18 | -# of the product and file versions while build-number is used as the build suffix. | ||
| 19 | -version: 1.0.0+1 | ||
| 20 | - | ||
| 21 | -environment: | ||
| 22 | - sdk: '>=3.4.0 <4.0.0' | ||
| 23 | - | ||
| 24 | -# Dependencies specify other packages that your package needs in order to work. | ||
| 25 | -# To automatically upgrade your package dependencies to the latest versions | ||
| 26 | -# consider running `flutter pub upgrade --major-versions`. Alternatively, | ||
| 27 | -# dependencies can be manually updated by changing the version numbers below to | ||
| 28 | -# the latest version available on pub.dev. To see which dependencies have newer | ||
| 29 | -# versions available, run `flutter pub outdated`. | ||
| 30 | -dependencies: | ||
| 31 | - flutter: | ||
| 32 | - sdk: flutter | ||
| 33 | - | ||
| 34 | - path_provider: ^2.1.3 | ||
| 35 | - path: ^1.9.0 | ||
| 36 | - record: ^5.1.0 | ||
| 37 | - url_launcher: ^6.2.6 | ||
| 38 | - | ||
| 39 | - sherpa_onnx: | ||
| 40 | - # When depending on this package from a real application you should use: | ||
| 41 | - # sherpa_onnx: ^x.y.z | ||
| 42 | - # See https://dart.dev/tools/pub/dependencies#version-constraints | ||
| 43 | - # The example app is bundled with the plugin so we use a path dependency on | ||
| 44 | - # the parent directory to use the current plugin's version. | ||
| 45 | - path: ../ | ||
| 46 | - | ||
| 47 | - # The following adds the Cupertino Icons font to your application. | ||
| 48 | - # Use with the CupertinoIcons class for iOS style icons. | ||
| 49 | - cupertino_icons: ^1.0.6 | ||
| 50 | - | ||
| 51 | -dev_dependencies: | ||
| 52 | - flutter_test: | ||
| 53 | - sdk: flutter | ||
| 54 | - | ||
| 55 | - # The "flutter_lints" package below contains a set of recommended lints to | ||
| 56 | - # encourage good coding practices. The lint set provided by the package is | ||
| 57 | - # activated in the `analysis_options.yaml` file located at the root of your | ||
| 58 | - # package. See that file for information about deactivating specific lint | ||
| 59 | - # rules and activating additional ones. | ||
| 60 | - flutter_lints: ^3.0.0 | ||
| 61 | - | ||
| 62 | -# For information on the generic Dart part of this file, see the | ||
| 63 | -# following page: https://dart.dev/tools/pub/pubspec | ||
| 64 | - | ||
| 65 | -# The following section is specific to Flutter packages. | ||
| 66 | -flutter: | ||
| 67 | - | ||
| 68 | - # The following line ensures that the Material Icons font is | ||
| 69 | - # included with your application, so that you can use the icons in | ||
| 70 | - # the material Icons class. | ||
| 71 | - uses-material-design: true | ||
| 72 | - | ||
| 73 | - # To add assets to your application, add an assets section, like this: | ||
| 74 | - assets: | ||
| 75 | - - assets/ | ||
| 76 | - - assets/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20/ | ||
| 77 | - # - assets/sherpa-onnx-paraformer-zh-2023-03-28/ | ||
| 78 | - # - assets/sherpa-onnx-paraformer-zh-2023-03-28/test_wavs/ | ||
| 79 | - # - assets/sr-data/enroll/ | ||
| 80 | - # - assets/sr-data/test/ | ||
| 81 | - # - images/a_dot_ham.jpeg | ||
| 82 | - | ||
| 83 | - # An image asset can refer to one or more resolution-specific "variants", see | ||
| 84 | - # https://flutter.dev/assets-and-images/#resolution-aware | ||
| 85 | - | ||
| 86 | - # For details regarding adding assets from package dependencies, see | ||
| 87 | - # https://flutter.dev/assets-and-images/#from-packages | ||
| 88 | - | ||
| 89 | - # To add custom fonts to your application, add a fonts section here, | ||
| 90 | - # in this "flutter" section. Each entry in this list should have a | ||
| 91 | - # "family" key with the font family name, and a "fonts" key with a | ||
| 92 | - # list giving the asset and other descriptors for the font. For | ||
| 93 | - # example: | ||
| 94 | - # fonts: | ||
| 95 | - # - family: Schyler | ||
| 96 | - # fonts: | ||
| 97 | - # - asset: fonts/Schyler-Regular.ttf | ||
| 98 | - # - asset: fonts/Schyler-Italic.ttf | ||
| 99 | - # style: italic | ||
| 100 | - # - family: Trajan Pro | ||
| 101 | - # fonts: | ||
| 102 | - # - asset: fonts/TrajanPro.ttf | ||
| 103 | - # - asset: fonts/TrajanPro_Bold.ttf | ||
| 104 | - # weight: 700 | ||
| 105 | - # | ||
| 106 | - # For details regarding fonts from package dependencies, | ||
| 107 | - # see https://flutter.dev/custom-fonts/#from-packages |
| 1 | -flutter/ephemeral/ | ||
| 2 | - | ||
| 3 | -# Visual Studio user-specific files. | ||
| 4 | -*.suo | ||
| 5 | -*.user | ||
| 6 | -*.userosscache | ||
| 7 | -*.sln.docstates | ||
| 8 | - | ||
| 9 | -# Visual Studio build-related files. | ||
| 10 | -x64/ | ||
| 11 | -x86/ | ||
| 12 | - | ||
| 13 | -# Visual Studio cache files | ||
| 14 | -# files ending in .cache can be ignored | ||
| 15 | -*.[Cc]ache | ||
| 16 | -# but keep track of directories ending in .cache | ||
| 17 | -!*.[Cc]ache/ |
| 1 | -# Project-level configuration. | ||
| 2 | -cmake_minimum_required(VERSION 3.14) | ||
| 3 | -project(sherpa_onnx LANGUAGES CXX) | ||
| 4 | - | ||
| 5 | -# The name of the executable created for the application. Change this to change | ||
| 6 | -# the on-disk name of your application. | ||
| 7 | -set(BINARY_NAME "sherpa_onnx") | ||
| 8 | - | ||
| 9 | -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent | ||
| 10 | -# versions of CMake. | ||
| 11 | -cmake_policy(VERSION 3.14...3.25) | ||
| 12 | - | ||
| 13 | -# Define build configuration option. | ||
| 14 | -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) | ||
| 15 | -if(IS_MULTICONFIG) | ||
| 16 | - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" | ||
| 17 | - CACHE STRING "" FORCE) | ||
| 18 | -else() | ||
| 19 | - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
| 20 | - set(CMAKE_BUILD_TYPE "Debug" CACHE | ||
| 21 | - STRING "Flutter build mode" FORCE) | ||
| 22 | - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS | ||
| 23 | - "Debug" "Profile" "Release") | ||
| 24 | - endif() | ||
| 25 | -endif() | ||
| 26 | -# Define settings for the Profile build mode. | ||
| 27 | -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") | ||
| 28 | -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") | ||
| 29 | -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") | ||
| 30 | -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") | ||
| 31 | - | ||
| 32 | -# Use Unicode for all projects. | ||
| 33 | -add_definitions(-DUNICODE -D_UNICODE) | ||
| 34 | - | ||
| 35 | -# Compilation settings that should be applied to most targets. | ||
| 36 | -# | ||
| 37 | -# Be cautious about adding new options here, as plugins use this function by | ||
| 38 | -# default. In most cases, you should add new options to specific targets instead | ||
| 39 | -# of modifying this function. | ||
| 40 | -function(APPLY_STANDARD_SETTINGS TARGET) | ||
| 41 | - target_compile_features(${TARGET} PUBLIC cxx_std_17) | ||
| 42 | - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") | ||
| 43 | - target_compile_options(${TARGET} PRIVATE /EHsc) | ||
| 44 | - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") | ||
| 45 | - target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>") | ||
| 46 | -endfunction() | ||
| 47 | - | ||
| 48 | -# Flutter library and tool build rules. | ||
| 49 | -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") | ||
| 50 | -add_subdirectory(${FLUTTER_MANAGED_DIR}) | ||
| 51 | - | ||
| 52 | -# Application build; see runner/CMakeLists.txt. | ||
| 53 | -add_subdirectory("runner") | ||
| 54 | - | ||
| 55 | - | ||
| 56 | -# Generated plugin build rules, which manage building the plugins and adding | ||
| 57 | -# them to the application. | ||
| 58 | -include(flutter/generated_plugins.cmake) | ||
| 59 | - | ||
| 60 | - | ||
| 61 | -# === Installation === | ||
| 62 | -# Support files are copied into place next to the executable, so that it can | ||
| 63 | -# run in place. This is done instead of making a separate bundle (as on Linux) | ||
| 64 | -# so that building and running from within Visual Studio will work. | ||
| 65 | -set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>") | ||
| 66 | -# Make the "install" step default, as it's required to run. | ||
| 67 | -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) | ||
| 68 | -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
| 69 | - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) | ||
| 70 | -endif() | ||
| 71 | - | ||
| 72 | -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") | ||
| 73 | -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") | ||
| 74 | - | ||
| 75 | -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" | ||
| 76 | - COMPONENT Runtime) | ||
| 77 | - | ||
| 78 | -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" | ||
| 79 | - COMPONENT Runtime) | ||
| 80 | - | ||
| 81 | -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 82 | - COMPONENT Runtime) | ||
| 83 | - | ||
| 84 | -if(PLUGIN_BUNDLED_LIBRARIES) | ||
| 85 | - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" | ||
| 86 | - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 87 | - COMPONENT Runtime) | ||
| 88 | -endif() | ||
| 89 | - | ||
| 90 | -# Copy the native assets provided by the build.dart from all packages. | ||
| 91 | -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") | ||
| 92 | -install(DIRECTORY "${NATIVE_ASSETS_DIR}" | ||
| 93 | - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" | ||
| 94 | - COMPONENT Runtime) | ||
| 95 | - | ||
| 96 | -# Fully re-copy the assets directory on each build to avoid having stale files | ||
| 97 | -# from a previous install. | ||
| 98 | -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") | ||
| 99 | -install(CODE " | ||
| 100 | - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") | ||
| 101 | - " COMPONENT Runtime) | ||
| 102 | -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" | ||
| 103 | - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) | ||
| 104 | - | ||
| 105 | -# Install the AOT library on non-Debug builds only. | ||
| 106 | -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" | ||
| 107 | - CONFIGURATIONS Profile;Release | ||
| 108 | - COMPONENT Runtime) |
| 1 | -# This file controls Flutter-level build steps. It should not be edited. | ||
| 2 | -cmake_minimum_required(VERSION 3.14) | ||
| 3 | - | ||
| 4 | -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") | ||
| 5 | - | ||
| 6 | -# Configuration provided via flutter tool. | ||
| 7 | -include(${EPHEMERAL_DIR}/generated_config.cmake) | ||
| 8 | - | ||
| 9 | -# TODO: Move the rest of this into files in ephemeral. See | ||
| 10 | -# https://github.com/flutter/flutter/issues/57146. | ||
| 11 | -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") | ||
| 12 | - | ||
| 13 | -# Set fallback configurations for older versions of the flutter tool. | ||
| 14 | -if (NOT DEFINED FLUTTER_TARGET_PLATFORM) | ||
| 15 | - set(FLUTTER_TARGET_PLATFORM "windows-x64") | ||
| 16 | -endif() | ||
| 17 | - | ||
| 18 | -# === Flutter Library === | ||
| 19 | -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") | ||
| 20 | - | ||
| 21 | -# Published to parent scope for install step. | ||
| 22 | -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) | ||
| 23 | -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) | ||
| 24 | -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) | ||
| 25 | -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) | ||
| 26 | - | ||
| 27 | -list(APPEND FLUTTER_LIBRARY_HEADERS | ||
| 28 | - "flutter_export.h" | ||
| 29 | - "flutter_windows.h" | ||
| 30 | - "flutter_messenger.h" | ||
| 31 | - "flutter_plugin_registrar.h" | ||
| 32 | - "flutter_texture_registrar.h" | ||
| 33 | -) | ||
| 34 | -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") | ||
| 35 | -add_library(flutter INTERFACE) | ||
| 36 | -target_include_directories(flutter INTERFACE | ||
| 37 | - "${EPHEMERAL_DIR}" | ||
| 38 | -) | ||
| 39 | -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") | ||
| 40 | -add_dependencies(flutter flutter_assemble) | ||
| 41 | - | ||
| 42 | -# === Wrapper === | ||
| 43 | -list(APPEND CPP_WRAPPER_SOURCES_CORE | ||
| 44 | - "core_implementations.cc" | ||
| 45 | - "standard_codec.cc" | ||
| 46 | -) | ||
| 47 | -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") | ||
| 48 | -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN | ||
| 49 | - "plugin_registrar.cc" | ||
| 50 | -) | ||
| 51 | -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") | ||
| 52 | -list(APPEND CPP_WRAPPER_SOURCES_APP | ||
| 53 | - "flutter_engine.cc" | ||
| 54 | - "flutter_view_controller.cc" | ||
| 55 | -) | ||
| 56 | -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") | ||
| 57 | - | ||
| 58 | -# Wrapper sources needed for a plugin. | ||
| 59 | -add_library(flutter_wrapper_plugin STATIC | ||
| 60 | - ${CPP_WRAPPER_SOURCES_CORE} | ||
| 61 | - ${CPP_WRAPPER_SOURCES_PLUGIN} | ||
| 62 | -) | ||
| 63 | -apply_standard_settings(flutter_wrapper_plugin) | ||
| 64 | -set_target_properties(flutter_wrapper_plugin PROPERTIES | ||
| 65 | - POSITION_INDEPENDENT_CODE ON) | ||
| 66 | -set_target_properties(flutter_wrapper_plugin PROPERTIES | ||
| 67 | - CXX_VISIBILITY_PRESET hidden) | ||
| 68 | -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) | ||
| 69 | -target_include_directories(flutter_wrapper_plugin PUBLIC | ||
| 70 | - "${WRAPPER_ROOT}/include" | ||
| 71 | -) | ||
| 72 | -add_dependencies(flutter_wrapper_plugin flutter_assemble) | ||
| 73 | - | ||
| 74 | -# Wrapper sources needed for the runner. | ||
| 75 | -add_library(flutter_wrapper_app STATIC | ||
| 76 | - ${CPP_WRAPPER_SOURCES_CORE} | ||
| 77 | - ${CPP_WRAPPER_SOURCES_APP} | ||
| 78 | -) | ||
| 79 | -apply_standard_settings(flutter_wrapper_app) | ||
| 80 | -target_link_libraries(flutter_wrapper_app PUBLIC flutter) | ||
| 81 | -target_include_directories(flutter_wrapper_app PUBLIC | ||
| 82 | - "${WRAPPER_ROOT}/include" | ||
| 83 | -) | ||
| 84 | -add_dependencies(flutter_wrapper_app flutter_assemble) | ||
| 85 | - | ||
| 86 | -# === Flutter tool backend === | ||
| 87 | -# _phony_ is a non-existent file to force this command to run every time, | ||
| 88 | -# since currently there's no way to get a full input/output list from the | ||
| 89 | -# flutter tool. | ||
| 90 | -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") | ||
| 91 | -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) | ||
| 92 | -add_custom_command( | ||
| 93 | - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} | ||
| 94 | - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} | ||
| 95 | - ${CPP_WRAPPER_SOURCES_APP} | ||
| 96 | - ${PHONY_OUTPUT} | ||
| 97 | - COMMAND ${CMAKE_COMMAND} -E env | ||
| 98 | - ${FLUTTER_TOOL_ENVIRONMENT} | ||
| 99 | - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" | ||
| 100 | - ${FLUTTER_TARGET_PLATFORM} $<CONFIG> | ||
| 101 | - VERBATIM | ||
| 102 | -) | ||
| 103 | -add_custom_target(flutter_assemble DEPENDS | ||
| 104 | - "${FLUTTER_LIBRARY}" | ||
| 105 | - ${FLUTTER_LIBRARY_HEADERS} | ||
| 106 | - ${CPP_WRAPPER_SOURCES_CORE} | ||
| 107 | - ${CPP_WRAPPER_SOURCES_PLUGIN} | ||
| 108 | - ${CPP_WRAPPER_SOURCES_APP} | ||
| 109 | -) |
| 1 | -cmake_minimum_required(VERSION 3.14) | ||
| 2 | -project(runner LANGUAGES CXX) | ||
| 3 | - | ||
| 4 | -# Define the application target. To change its name, change BINARY_NAME in the | ||
| 5 | -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer | ||
| 6 | -# work. | ||
| 7 | -# | ||
| 8 | -# Any new source files that you add to the application should be added here. | ||
| 9 | -add_executable(${BINARY_NAME} WIN32 | ||
| 10 | - "flutter_window.cpp" | ||
| 11 | - "main.cpp" | ||
| 12 | - "utils.cpp" | ||
| 13 | - "win32_window.cpp" | ||
| 14 | - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" | ||
| 15 | - "Runner.rc" | ||
| 16 | - "runner.exe.manifest" | ||
| 17 | -) | ||
| 18 | - | ||
| 19 | -# Apply the standard set of build settings. This can be removed for applications | ||
| 20 | -# that need different build settings. | ||
| 21 | -apply_standard_settings(${BINARY_NAME}) | ||
| 22 | - | ||
| 23 | -# Add preprocessor definitions for the build version. | ||
| 24 | -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") | ||
| 25 | -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") | ||
| 26 | -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") | ||
| 27 | -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") | ||
| 28 | -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") | ||
| 29 | - | ||
| 30 | -# Disable Windows macros that collide with C++ standard library functions. | ||
| 31 | -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") | ||
| 32 | - | ||
| 33 | -# Add dependency libraries and include directories. Add any application-specific | ||
| 34 | -# dependencies here. | ||
| 35 | -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) | ||
| 36 | -target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") | ||
| 37 | -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") | ||
| 38 | - | ||
| 39 | -# Run the Flutter tool portions of the build. This must not be removed. | ||
| 40 | -add_dependencies(${BINARY_NAME} flutter_assemble) |
-
请 注册 或 登录 后发表评论