diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 768bba9..2ff45bc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,9 +19,6 @@ permissions: contents: read id-token: write packages: write - -env: - GHCR_REPO: ghcr.io/tuna2134/sbv2-api jobs: linux: @@ -45,12 +42,12 @@ jobs: args: --release --out dist --find-interpreter sccache: 'true' manylinux: auto - working-directory: sbv2_bindings + working-directory: ./crates/sbv2_bindings - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-linux-${{ matrix.platform.target }} - path: sbv2_bindings/dist + path: ./crates/sbv2_bindings/dist windows: runs-on: ${{ matrix.platform.runner }} @@ -71,12 +68,12 @@ jobs: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: 'true' - working-directory: sbv2_bindings + working-directory: ./crates/sbv2_bindings - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-windows-${{ matrix.platform.target }} - path: sbv2_bindings/dist + path: ./crates/sbv2_bindings/dist macos: runs-on: ${{ matrix.platform.runner }} @@ -96,12 +93,12 @@ jobs: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: 'true' - working-directory: sbv2_bindings + working-directory: ./crates/sbv2_bindings - name: Upload wheels uses: actions/upload-artifact@v4 with: name: wheels-macos-${{ matrix.platform.target }} - path: sbv2_bindings/dist + path: ./crates/sbv2_bindings/dist sdist: runs-on: ubuntu-latest @@ -112,12 +109,12 @@ jobs: with: command: sdist args: --out dist - working-directory: sbv2_bindings + working-directory: ./crates/sbv2_bindings - name: Upload sdist uses: actions/upload-artifact@v4 with: name: wheels-sdist - path: sbv2_bindings/dist + path: ./crates/sbv2_bindings/dist release: name: Release @@ -148,14 +145,14 @@ jobs: - name: Prepare run: | platform=${{ matrix.machine.platform }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: | - ${{ env.GHCR_REPO }} + ghcr.io/${{ github.repository }} - name: Login to GHCR uses: docker/login-action@v3 @@ -175,10 +172,10 @@ jobs: uses: docker/build-push-action@v6 with: labels: ${{ steps.meta.outputs.labels }} - file: docker/${{ matrix.tag }}.Dockerfile + file: ./scripts/docker/${{ matrix.tag }}.Dockerfile push: true tags: | - ${{ env.GHCR_REPO }}:latest-${{ matrix.tag }}-${{ matrix.machine.platform }} + ghcr.io/${{ github.repository }}:latest-${{ matrix.tag }}-${{ matrix.machine.platform }} merge: runs-on: ubuntu-latest @@ -191,7 +188,7 @@ jobs: path: ${{ runner.temp }}/digests pattern: digests-* merge-multiple: true - + - name: Login to GHCR uses: docker/login-action@v3 with: diff --git a/.gitignore b/.gitignore index 1b8d2ff..61ed004 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -target +target/ models/ !models/.gitkeep venv/ .env -output.wav -node_modules -dist/ \ No newline at end of file +*.wav +node_modules/ +dist/ +*.csv +*.bin \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index ea2fbcd..6135203 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -43,43 +43,50 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -168,6 +175,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bincode" version = "1.3.3" @@ -200,9 +213,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "block-buffer" @@ -215,9 +228,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -227,15 +240,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cc" -version = "1.1.31" +version = "1.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" dependencies = [ "jobserver", "libc", @@ -250,28 +263,44 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", + "once_cell", "unicode-width", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] -name = "cpufeatures" -version = "0.2.14" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -287,9 +316,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -306,15 +335,15 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-common" @@ -328,9 +357,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -340,9 +369,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" dependencies = [ "memchr", ] @@ -382,6 +411,16 @@ dependencies = [ "syn", ] +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "pem-rfc7468", + "zeroize", +] + [[package]] name = "derive_builder" version = "0.20.2" @@ -423,6 +462,17 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -437,9 +487,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding" @@ -507,9 +557,9 @@ checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -525,9 +575,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -548,18 +598,18 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -582,6 +632,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + [[package]] name = "filetime" version = "0.2.25" @@ -596,9 +652,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -610,6 +666,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -634,6 +705,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + [[package]] name = "futures-task" version = "0.3.31" @@ -671,10 +748,22 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", +] + [[package]] name = "gimli" version = "0.31.1" @@ -683,9 +772,28 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "h2" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] name = "half" @@ -699,9 +807,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -723,9 +831,9 @@ checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -757,9 +865,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -775,13 +883,14 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", "futures-util", + "h2", "http", "http-body", "httparse", @@ -790,22 +899,177 @@ dependencies = [ "pin-project-lite", "smallvec", "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", ] [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", + "futures-channel", "futures-util", "http", "http-body", "hyper", "pin-project-lite", + "socket2", "tokio", "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -816,19 +1080,30 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", @@ -837,15 +1112,15 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", "unicode-width", + "web-time", ] [[package]] @@ -855,13 +1130,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] -name = "instant" -version = "0.1.13" +name = "ipnet" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is_terminal_polyfill" @@ -889,9 +1161,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jlabel" @@ -899,7 +1171,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "145ee6f495871a0cde6d49ddfa0d103d07430c449d95b6d92fbfb032d622f0b7" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -913,71 +1185,53 @@ dependencies = [ [[package]] name = "jpreprocess" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05ad4316553f214144e04abb54a95f0ec55d9b8b5c4ae004f420ead40d07fe4" +checksum = "83db9c1370085636e1fed6cc87bf4de92b542ffc2397f340bc15230759d8eaf9" dependencies = [ "jlabel", "jpreprocess-core", "jpreprocess-dictionary", - "jpreprocess-dictionary-builder", "jpreprocess-jpcommon", "jpreprocess-naist-jdic", "jpreprocess-njd", - "lindera-core", + "lindera", "lindera-dictionary", - "lindera-tokenizer", "phf", ] [[package]] name = "jpreprocess-core" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe30c65ff4c092320f1bba3418ac111443a4827a9155442f6a7d8d0e3707cb51" +checksum = "1aec276b3cd0e291cfed484b81ecafac7caa658e967f37c1073c5e106a55e8b0" dependencies = [ "aho-corasick", "bincode", - "lindera-core", - "lindera-tokenizer", + "lindera", "once_cell", "regex", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "jpreprocess-dictionary" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c156a875d35ef6fedf31cb9d6bb3c562d16faad4506a5be27e2ed44357d755d4" -dependencies = [ - "anyhow", - "bincode", - "byteorder", - "jpreprocess-core", - "lindera-core", - "lindera-ipadic-builder", - "lindera-tokenizer", - "once_cell", - "serde", -] - -[[package]] -name = "jpreprocess-dictionary-builder" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cd89b119949a5071e6f49d805829f3dc17169eb7c6aab809e4f373c70098709" +checksum = "1f84675315762d9880f41c184d3854ef0578ca905fcca09a3d89784142e4446c" dependencies = [ "anyhow", "bincode", "byteorder", "csv", + "derive_builder", "glob", "jpreprocess-core", - "jpreprocess-dictionary", - "lindera-core", + "lindera", + "lindera-dictionary", "log", + "once_cell", "rayon", "serde", "yada", @@ -985,9 +1239,9 @@ dependencies = [ [[package]] name = "jpreprocess-jpcommon" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a95684847dcf9a95a94d74f725ca207e5106f2c0084959d9b328b7f8fcf3184" +checksum = "6f6b481d1f0dd259ef2ab368eec42140616826a8083e77f501286c108f9fad2c" dependencies = [ "jlabel", "jpreprocess-core", @@ -996,48 +1250,53 @@ dependencies = [ [[package]] name = "jpreprocess-naist-jdic" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "472767e7dc48354e3b42759721ffc6b457856a339b10f9cb039749011f570cc2" +checksum = "f85955941185de40aa6202d06fc78ef8b08cb810adcc0674e711287931f22b89" dependencies = [ - "encoding", - "flate2", "jpreprocess-dictionary", - "jpreprocess-dictionary-builder", - "lindera-core", - "tar", - "ureq", + "lindera-dictionary", + "tokio", ] [[package]] name = "jpreprocess-njd" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fc5071bd75e17af650bfe4697dfe7f5af8254965ce3242476698cee3c3b7af" +checksum = "168ece8bb1108a3477c9dec8e1cbed5104744c847a2f0fbf2d5b53c53fe10508" dependencies = [ "aho-corasick", "jpreprocess-core", "jpreprocess-dictionary", "jpreprocess-window", - "lindera-tokenizer", "phf", ] [[package]] name = "jpreprocess-window" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c06d7aceb8ce626a3318183096aa6dad82f046b3cec5d43e90066d1b07445a2" +checksum = "76f15d1def44b258c73ad66204e46f7f4be6f0876f2762b274017bf3f4aa8049" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] +[[package]] +name = "kanaria" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f9d9652540055ac4fded998a73aca97d965899077ab1212587437da44196ff" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -1052,9 +1311,9 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets", @@ -1066,76 +1325,41 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "redox_syscall", ] [[package]] -name = "lindera-cc-cedict-builder" -version = "0.32.2" +name = "lindera" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b8f642bc9c9130682569975772a17336c6aab26d11fc0f823f3e663167ace6" -dependencies = [ - "anyhow", - "lindera-core", - "lindera-decompress", - "lindera-dictionary-builder", -] - -[[package]] -name = "lindera-core" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c28191456debc98af6aa5f7db77872471983e9fa2a737b1c232b6ef543aed62" +checksum = "f1d8eeee3410e04f0375235b4420b105337db127e3759e6ceac52212f5b4e5ee" dependencies = [ "anyhow", "bincode", "byteorder", - "encoding_rs", - "log", + "csv", + "kanaria", + "lindera-dictionary", "once_cell", + "regex", "serde", - "thiserror", + "serde_json", + "serde_yaml", + "strum", + "strum_macros", + "unicode-blocks", + "unicode-normalization", + "unicode-segmentation", "yada", ] -[[package]] -name = "lindera-decompress" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4788a1ead2f63f3fc2888109272921dedd86a87b7d0bf05e9daab46600daac51" -dependencies = [ - "anyhow", - "flate2", - "serde", -] - [[package]] name = "lindera-dictionary" -version = "0.32.2" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf5f91725e32b9a21b1656baa7030766c9bafc4de4b4ddeb8ffdde7224dd2f6" -dependencies = [ - "anyhow", - "bincode", - "byteorder", - "lindera-cc-cedict-builder", - "lindera-core", - "lindera-ipadic-builder", - "lindera-ipadic-neologd-builder", - "lindera-ko-dic-builder", - "lindera-unidic-builder", - "serde", - "strum", - "strum_macros", -] - -[[package]] -name = "lindera-dictionary-builder" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41f00ba7ac541b0ffd8c30e7a73f2dd197546cc5780462ec4f2e4782945a780" +checksum = "cbb14e04b9937c7382a20e5b135f9a6c7077e0d9a57a3f69e560471e57300476" dependencies = [ "anyhow", "bincode", @@ -1145,80 +1369,28 @@ dependencies = [ "encoding", "encoding_rs", "encoding_rs_io", + "flate2", "glob", - "lindera-core", - "lindera-decompress", "log", + "once_cell", + "reqwest", + "serde", + "tar", + "thiserror 2.0.11", "yada", ] -[[package]] -name = "lindera-ipadic-builder" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5031c52686128db13f774b2c5a8abfd52b4cc1f904041d8411aa19d630ce4d" -dependencies = [ - "anyhow", - "lindera-core", - "lindera-decompress", - "lindera-dictionary-builder", -] - -[[package]] -name = "lindera-ipadic-neologd-builder" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf36e40ace904741efdd883ed5c4dba6425f65156a0fb5d3f73a386335950dc" -dependencies = [ - "anyhow", - "lindera-core", - "lindera-decompress", - "lindera-dictionary-builder", -] - -[[package]] -name = "lindera-ko-dic-builder" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f2c60425abc1548570c2568858f74a1f042105ecd89faa39c651b4315350fd9" -dependencies = [ - "anyhow", - "lindera-core", - "lindera-decompress", - "lindera-dictionary-builder", -] - -[[package]] -name = "lindera-tokenizer" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903e558981bcb6f59870aa7d6b4bcb09e8f7db778886a6a70f67fd74c9fa2ca3" -dependencies = [ - "bincode", - "lindera-core", - "lindera-dictionary", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "lindera-unidic-builder" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e2c50015c242e02c451acb6748667ac6fd1d3d667cd7db48cd89e2f2d2377e" -dependencies = [ - "anyhow", - "lindera-core", - "lindera-decompress", - "lindera-dictionary-builder", -] - [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1232,9 +1404,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "macro_rules_attribute" @@ -1297,22 +1469,21 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -1337,6 +1508,23 @@ dependencies = [ "syn", ] +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndarray" version = "0.16.1" @@ -1428,18 +1616,18 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "onig" @@ -1463,10 +1651,54 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "openssl" +version = "0.10.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +dependencies = [ + "bitflags 2.8.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "ort" -version = "2.0.0-rc.8" -source = "git+https://github.com/pykeio/ort.git#585efda15393c949010903990bd0a53e7d3d6ffe" +version = "2.0.0-rc.9" +source = "git+https://github.com/pykeio/ort.git#d738b1757bb375c8f7150cf566fc5a9d2c88008a" dependencies = [ "half", "libloading", @@ -1477,8 +1709,8 @@ dependencies = [ [[package]] name = "ort-sys" -version = "2.0.0-rc.8" -source = "git+https://github.com/pykeio/ort.git#585efda15393c949010903990bd0a53e7d3d6ffe" +version = "2.0.0-rc.9" +source = "git+https://github.com/pykeio/ort.git#d738b1757bb375c8f7150cf566fc5a9d2c88008a" dependencies = [ "flate2", "pkg-config", @@ -1516,6 +1748,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -1524,20 +1765,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.11", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -1545,9 +1786,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", @@ -1558,9 +1799,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", @@ -1569,9 +1810,9 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", "phf_shared", @@ -1579,9 +1820,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", "rand", @@ -1589,9 +1830,9 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ "phf_generator", "phf_shared", @@ -1602,18 +1843,18 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1629,15 +1870,15 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "portable-atomic-util" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a7d5beecc52a491b54d6dd05c7a45ba1801666a5baad9fdbfc6fef8d2d206c" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ "portable-atomic", ] @@ -1653,9 +1894,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -1739,9 +1980,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1773,7 +2014,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -1815,11 +2056,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -1836,9 +2077,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1852,16 +2093,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] -name = "ring" -version = "0.17.8" +name = "reqwest" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "ring" +version = "0.17.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34b5020fcdea098ef7d95e9f89ec15952123a4a039badd09fabebe9e963e839" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -1874,22 +2158,22 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ "log", "once_cell", @@ -1901,10 +2185,19 @@ dependencies = [ ] [[package]] -name = "rustls-pki-types" -version = "1.10.0" +name = "rustls-pemfile" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" [[package]] name = "rustls-webpki" @@ -1919,19 +2212,19 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "sbv2_api" -version = "0.2.0-alpha4" +version = "0.2.0-alpha6" dependencies = [ "anyhow", "axum", @@ -1947,7 +2240,7 @@ dependencies = [ [[package]] name = "sbv2_bindings" -version = "0.2.0-alpha4" +version = "0.2.0-alpha6" dependencies = [ "anyhow", "ndarray", @@ -1957,7 +2250,7 @@ dependencies = [ [[package]] name = "sbv2_core" -version = "0.2.0-alpha4" +version = "0.2.0-alpha6" dependencies = [ "anyhow", "base64 0.22.1", @@ -1974,14 +2267,15 @@ dependencies = [ "serde", "serde_json", "tar", - "thiserror", + "thiserror 2.0.11", "tokenizers", + "ureq", "zstd", ] [[package]] name = "sbv2_wasm" -version = "0.1.0" +version = "0.2.0-alpha6" dependencies = [ "js-sys", "ndarray", @@ -1991,6 +2285,15 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -1998,19 +2301,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "serde" -version = "1.0.217" +name = "security-framework" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.8.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.218" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", @@ -2019,9 +2345,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "itoa", "memchr", @@ -2051,6 +2377,19 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "sha2" version = "0.10.8" @@ -2079,21 +2418,30 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2110,12 +2458,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spm_precompiled" version = "0.1.4" @@ -2128,6 +2470,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -2164,9 +2512,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.87" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -2175,15 +2523,50 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.8.0", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "tar" -version = "0.4.43" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", @@ -2196,13 +2579,36 @@ version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +[[package]] +name = "tempfile" +version = "3.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" +dependencies = [ + "cfg-if", + "fastrand", + "getrandom 0.3.1", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + [[package]] name = "thiserror" version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] @@ -2217,10 +2623,31 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "thiserror-impl" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -2241,7 +2668,7 @@ dependencies = [ "derive_builder", "esaxx-rs", "fancy-regex", - "getrandom", + "getrandom 0.2.15", "indicatif", "itertools 0.12.1", "lazy_static", @@ -2258,7 +2685,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror", + "thiserror 1.0.69", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -2293,6 +2720,39 @@ dependencies = [ "syn", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "tower" version = "0.5.2" @@ -2323,9 +2783,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2334,18 +2794,24 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] [[package]] -name = "typenum" -version = "1.17.0" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "ucd-trie" @@ -2354,16 +2820,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] -name = "unicode-bidi" -version = "0.3.17" +name = "unicode-blocks" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "6b12e05d9e06373163a9bb6bb8c263c261b396643a99445fe6b9811fd376581b" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "unicode-normalization" @@ -2391,9 +2857,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "unicode_categories" @@ -2407,6 +2873,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.9.0" @@ -2415,31 +2887,67 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.1" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" +checksum = "ca2e2dbdf4e95780e5d41804fab88b928a24585721018409eb429b1d29356bde" dependencies = [ "base64 0.22.1", + "der", + "flate2", "log", - "once_cell", + "native-tls", + "percent-encoding", "rustls", + "rustls-pemfile", "rustls-pki-types", "socks", - "url", + "ureq-proto", + "utf-8", + "webpki-root-certs", "webpki-roots", ] [[package]] -name = "url" -version = "2.5.2" +name = "ureq-proto" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "2c51fe73e1d8c4e06bb2698286f7e7453c6fc90528d6d2e7fc36bb4e87fe09b1" +dependencies = [ + "base64 0.22.1", + "http", + "httparse", + "log", +] + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -2482,12 +2990,27 @@ dependencies = [ "utoipa", ] +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2495,25 +3018,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasm-bindgen" -version = "0.2.95" +name = "wasi" +version = "0.13.3+wasi-0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -2522,21 +3054,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2544,9 +3077,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -2557,25 +3090,47 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webpki-roots" -version = "0.26.6" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "0.26.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09aed61f5e8d2c18344b3faa33a4c837855fe56642757754775548fee21386c4" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webpki-roots" +version = "0.26.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -2602,6 +3157,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -2685,10 +3270,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "xattr" -version = "1.3.1" +name = "wit-bindgen-rt" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "xattr" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", @@ -2701,6 +3307,30 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aed111bd9e48a802518765906cbdadf0b45afb72b9c81ab049a3b86252adffdd" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2722,6 +3352,27 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -2729,28 +3380,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] -name = "zstd" -version = "0.13.2" +name = "zerovec" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.1" +version = "7.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" +version = "2.0.14+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index c7ee18e..240b6e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,25 @@ [workspace] resolver = "2" -members = ["sbv2_api", "sbv2_core", "sbv2_bindings", "sbv2_wasm"] +members = ["./crates/sbv2_api", "./crates/sbv2_core", "./crates/sbv2_bindings", "./crates/sbv2_wasm"] + +[workspace.package] +version = "0.2.0-alpha6" +edition = "2021" +description = "Style-Bert-VITSの推論ライブラリ" +license = "MIT" +readme = "./README.md" +repository = "https://github.com/tuna2134/sbv2-api" +documentation = "https://docs.rs/sbv2_core" [workspace.dependencies] -anyhow = "1.0.86" +anyhow = "1.0.96" dotenvy = "0.15.7" -env_logger = "0.11.5" +env_logger = "0.11.6" ndarray = "0.16.1" -once_cell = "1.19.0" +once_cell = "1.20.3" [profile.release] -lto = true -debug = false strip = true +opt-level = "z" +lto = true +codegen-units = 1 diff --git a/README.md b/README.md index b7c972c..59a9fa3 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ ## 注意:本バージョンはアルファ版です。 安定版を利用したい場合は[こちら](https://github.com/tuna2134/sbv2-api/tree/v0.1.x)をご覧ください。 +## 注意: オプションの辞書はLGPLです。 +オプションの辞書を使用する場合、バイナリの内部の辞書部分について、LGPLが適用されます。 + ## プログラミングに詳しくない方向け [こちら](https://github.com/tuna2134/sbv2-gui?tab=readme-ov-file)を参照してください。 @@ -17,7 +20,7 @@ JP-Extra しか対応していません。(基本的に対応する予定もあ ## 変換方法 -[こちら](https://github.com/tuna2134/sbv2-api/tree/main/convert)を参照してください。 +[こちら](https://github.com/tuna2134/sbv2-api/tree/main/scripts/convert)を参照してください。 ## Todo @@ -29,16 +32,17 @@ JP-Extra しか対応していません。(基本的に対応する予定もあ - [x] GPU 対応(CUDA) - [x] GPU 対応(DirectML) - [x] GPU 対応(CoreML) -- [ ] WASM 変換(依存ライブラリの関係により現在は不可) +- [x] WASM 変換 - [x] arm64のdockerサポート +- [x] aivis形式のサポート - [ ] MeCabを利用する ## 構造説明 -- `sbv2_api` - 推論用 REST API -- `sbv2_core` - 推論コア部分 -- `docker` - docker ビルドスクリプト -- `convert` - onnx, sbv2フォーマットへの変換スクリプト +- `crates/sbv2_api` - 推論用 REST API +- `crates/sbv2_core` - 推論コア部分 +- `scripts/docker` - docker ビルドスクリプト +- `scripts/convert` - onnx, sbv2フォーマットへの変換スクリプト ## プログラミングある程度できる人向けREST API起動方法 @@ -119,3 +123,4 @@ curl http://localhost:3000/models - [litagin02/Style-Bert-VITS2](https://github.com/litagin02/Style-Bert-VITS2) - このコードの書くにあたり、ベースとなる部分を参考にさせていただきました。 - [Googlefan](https://github.com/Googlefan256) - 彼にモデルを ONNX ヘ変換および効率化をする方法を教わりました。 +- [Aivis Project](https://github.com/Aivis-Project/AivisSpeech-Engine) - 辞書部分 \ No newline at end of file diff --git a/content.txt b/content.txt deleted file mode 100644 index caed4fc..0000000 --- a/content.txt +++ /dev/null @@ -1,14 +0,0 @@ -悪徳貴族として名高いヴェレット家の長男――オウガ・ヴェレットは転生者である。 -ブラック企業に勤め、過労死した彼には一つの夢があった。 - -「可愛いハーレム作って、美味い物を食べる。領民の税金で楽して好き放題な生活を送ってみせる!」 - -素晴らしき異世界ライフを夢見た彼は実現へ向けて、努力を始めた。 -ハーレムを築くためにいじめられてる平民の子を助けて恩を売ってやったり。 -労働力を手に入れるために多くの孤児を雇って教育したり。 -反乱を起きても鎮圧できるように魔法学院へ通って魔法を極める。 - -「クックック……! 順調、順調! 未来は明るいなぁ!」 - -――オウガはまだ知らない。 -楽な生活を送るためにしてきたことが評価され、世間から『聖者』様として呼ばれる未来を。 \ No newline at end of file diff --git a/sbv2_api/Cargo.toml b/crates/sbv2_api/Cargo.toml similarity index 78% rename from sbv2_api/Cargo.toml rename to crates/sbv2_api/Cargo.toml index 491759b..5679be5 100644 --- a/sbv2_api/Cargo.toml +++ b/crates/sbv2_api/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "sbv2_api" -version = "0.2.0-alpha4" -edition = "2021" +version.workspace = true +edition.workspace = true +description.workspace = true +readme.workspace = true +repository.workspace = true +documentation.workspace = true +license.workspace = true [dependencies] anyhow.workspace = true diff --git a/sbv2_api/build.rs b/crates/sbv2_api/build.rs similarity index 100% rename from sbv2_api/build.rs rename to crates/sbv2_api/build.rs diff --git a/sbv2_api/src/error.rs b/crates/sbv2_api/src/error.rs similarity index 100% rename from sbv2_api/src/error.rs rename to crates/sbv2_api/src/error.rs diff --git a/sbv2_api/src/main.rs b/crates/sbv2_api/src/main.rs similarity index 100% rename from sbv2_api/src/main.rs rename to crates/sbv2_api/src/main.rs diff --git a/sbv2_bindings/Cargo.toml b/crates/sbv2_bindings/Cargo.toml similarity index 66% rename from sbv2_bindings/Cargo.toml rename to crates/sbv2_bindings/Cargo.toml index 154382e..ec2d04e 100644 --- a/sbv2_bindings/Cargo.toml +++ b/crates/sbv2_bindings/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "sbv2_bindings" -version = "0.2.0-alpha4" -edition = "2021" +version.workspace = true +edition.workspace = true +description.workspace = true +readme.workspace = true +repository.workspace = true +documentation.workspace = true +license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] diff --git a/sbv2_bindings/pyproject.toml b/crates/sbv2_bindings/pyproject.toml similarity index 100% rename from sbv2_bindings/pyproject.toml rename to crates/sbv2_bindings/pyproject.toml diff --git a/sbv2_bindings/src/lib.rs b/crates/sbv2_bindings/src/lib.rs similarity index 100% rename from sbv2_bindings/src/lib.rs rename to crates/sbv2_bindings/src/lib.rs diff --git a/sbv2_bindings/src/sbv2.rs b/crates/sbv2_bindings/src/sbv2.rs similarity index 98% rename from sbv2_bindings/src/sbv2.rs rename to crates/sbv2_bindings/src/sbv2.rs index 0b45e3c..3bcb2ea 100644 --- a/sbv2_bindings/src/sbv2.rs +++ b/crates/sbv2_bindings/src/sbv2.rs @@ -107,7 +107,7 @@ impl TTSModel { /// style_vector : StyleVector /// スタイルベクトル fn get_style_vector( - &self, + &mut self, ident: String, style_id: i32, weight: f32, @@ -145,7 +145,7 @@ impl TTSModel { speaker_id: i64, sdp_ratio: f32, length_scale: f32, - ) -> anyhow::Result> { + ) -> anyhow::Result> { let data = self.model.easy_synthesize( ident.as_str(), &text, diff --git a/sbv2_bindings/src/style.rs b/crates/sbv2_bindings/src/style.rs similarity index 100% rename from sbv2_bindings/src/style.rs rename to crates/sbv2_bindings/src/style.rs diff --git a/sbv2_core/Cargo.toml b/crates/sbv2_core/Cargo.toml similarity index 73% rename from sbv2_core/Cargo.toml rename to crates/sbv2_core/Cargo.toml index 866dbbb..bf752dc 100644 --- a/sbv2_core/Cargo.toml +++ b/crates/sbv2_core/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "sbv2_core" -description = "Style-Bert-VITSの推論ライブラリ" -version = "0.2.0-alpha4" -edition = "2021" -license = "MIT" -readme = "../README.md" -repository = "https://github.com/tuna2134/sbv2-api" -documentation = "https://docs.rs/sbv2_core" +version.workspace = true +edition.workspace = true +description.workspace = true +readme.workspace = true +repository.workspace = true +documentation.workspace = true +license.workspace = true [dependencies] anyhow.workspace = true @@ -14,17 +14,17 @@ base64 = { version = "0.22.1", optional = true } dotenvy.workspace = true env_logger.workspace = true hound = "3.5.1" -jpreprocess = { version = "0.10.0", features = ["naist-jdic"] } +jpreprocess = { version = "0.12.0", features = ["naist-jdic"] } ndarray.workspace = true npyz = { version = "0.8.3", optional = true } num_cpus = "1.16.0" once_cell.workspace = true -ort = { git = "https://github.com/pykeio/ort.git", version = "2.0.0-rc.8", optional = true } +ort = { git = "https://github.com/pykeio/ort.git", version = "2.0.0-rc.9", optional = true } regex = "1.10.6" serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" tar = "0.4.41" -thiserror = "1.0.63" +thiserror = "2.0.11" tokenizers = { version = "0.21.0", default-features = false } zstd = "0.13.2" @@ -40,3 +40,6 @@ default = ["std"] no_std = ["tokenizers/unstable_wasm"] aivmx = ["npyz", "base64"] base64 = ["dep:base64"] + +[build-dependencies] +ureq = "3.0.6" diff --git a/crates/sbv2_core/build.rs b/crates/sbv2_core/build.rs new file mode 100644 index 0000000..22a387d --- /dev/null +++ b/crates/sbv2_core/build.rs @@ -0,0 +1,20 @@ +use std::env; +use std::fs; +use std::io::copy; +use std::path::Path; + +fn main() -> Result<(), Box> { + let out_dir = env::var("OUT_DIR")?; + let out_path = Path::new(&out_dir).join("all.bin"); + if !out_path.exists() { + println!("cargo:warning=Downloading dictionary file..."); + let mut response = + ureq::get("https://huggingface.co/neody/sbv2-api-assets/resolve/main/dic/all.bin") + .call()?; + let mut response = response.body_mut().as_reader(); + let mut file = fs::File::create(&out_path)?; + copy(&mut response, &mut file)?; + } + println!("cargo:rerun-if-changed=build.rs"); + Ok(()) +} diff --git a/sbv2_core/mora_convert.py b/crates/sbv2_core/mora_convert.py similarity index 100% rename from sbv2_core/mora_convert.py rename to crates/sbv2_core/mora_convert.py diff --git a/sbv2_core/src/bert.rs b/crates/sbv2_core/src/bert.rs similarity index 52% rename from sbv2_core/src/bert.rs rename to crates/sbv2_core/src/bert.rs index 0710bf6..d830606 100644 --- a/sbv2_core/src/bert.rs +++ b/crates/sbv2_core/src/bert.rs @@ -1,17 +1,18 @@ use crate::error::Result; use ndarray::{Array2, Ix2}; -use ort::Session; +use ort::session::Session; +use ort::value::TensorRef; pub fn predict( - session: &Session, + session: &mut Session, token_ids: Vec, attention_masks: Vec, ) -> Result> { let outputs = session.run( ort::inputs! { - "input_ids" => Array2::from_shape_vec((1, token_ids.len()), token_ids).unwrap(), - "attention_mask" => Array2::from_shape_vec((1, attention_masks.len()), attention_masks).unwrap(), - }? + "input_ids" => TensorRef::from_array_view((vec![1, token_ids.len() as i64], token_ids.as_slice()))?, + "attention_mask" => TensorRef::from_array_view((vec![1, attention_masks.len() as i64], attention_masks.as_slice()))?, + } )?; let output = outputs["output"] diff --git a/sbv2_core/src/error.rs b/crates/sbv2_core/src/error.rs similarity index 94% rename from sbv2_core/src/error.rs rename to crates/sbv2_core/src/error.rs index 57c2c48..10e52f7 100644 --- a/sbv2_core/src/error.rs +++ b/crates/sbv2_core/src/error.rs @@ -6,6 +6,8 @@ pub enum Error { TokenizerError(#[from] tokenizers::Error), #[error("JPreprocess error: {0}")] JPreprocessError(#[from] jpreprocess::error::JPreprocessError), + #[error("Lindera error: {0}")] + LinderaError(String), #[cfg(feature = "std")] #[error("ONNX error: {0}")] OrtError(#[from] ort::Error), diff --git a/sbv2_core/src/jtalk.rs b/crates/sbv2_core/src/jtalk.rs similarity index 96% rename from sbv2_core/src/jtalk.rs rename to crates/sbv2_core/src/jtalk.rs index 73aa2a8..c837269 100644 --- a/sbv2_core/src/jtalk.rs +++ b/crates/sbv2_core/src/jtalk.rs @@ -1,21 +1,21 @@ use crate::error::{Error, Result}; use crate::mora::{MORA_KATA_TO_MORA_PHONEMES, VOWELS}; use crate::norm::{replace_punctuation, PUNCTUATIONS}; -use jpreprocess::*; +use jpreprocess::{kind, DefaultTokenizer, JPreprocess, SystemDictionaryConfig, UserDictionary}; use once_cell::sync::Lazy; use regex::Regex; use std::cmp::Reverse; use std::collections::HashSet; use std::sync::Arc; -type JPreprocessType = JPreprocess; +type JPreprocessType = JPreprocess; fn initialize_jtalk() -> Result { - let config = JPreprocessConfig { - dictionary: SystemDictionaryConfig::Bundled(kind::JPreprocessDictionaryKind::NaistJdic), - user_dictionary: None, - }; - let jpreprocess = JPreprocess::from_config(config)?; + let sdic = + SystemDictionaryConfig::Bundled(kind::JPreprocessDictionaryKind::NaistJdic).load()?; + let u = UserDictionary::load(include_bytes!(concat!(env!("OUT_DIR"), "/all.bin"))) + .map_err(|e| Error::LinderaError(e.to_string()))?; + let jpreprocess = JPreprocess::with_dictionaries(sdic, Some(u)); Ok(jpreprocess) } diff --git a/sbv2_core/src/lib.rs b/crates/sbv2_core/src/lib.rs similarity index 100% rename from sbv2_core/src/lib.rs rename to crates/sbv2_core/src/lib.rs diff --git a/sbv2_core/src/main.rs b/crates/sbv2_core/src/main.rs similarity index 73% rename from sbv2_core/src/main.rs rename to crates/sbv2_core/src/main.rs index 381703f..07d9843 100644 --- a/sbv2_core/src/main.rs +++ b/crates/sbv2_core/src/main.rs @@ -6,7 +6,7 @@ fn main_inner() -> anyhow::Result<()> { use sbv2_core::tts; dotenvy::dotenv_override().ok(); env_logger::init(); - let text = fs::read_to_string("content.txt")?; + let text = "今日の天気は快晴です。"; let ident = "aaa"; let mut tts_holder = tts::TTSModelHolder::new( &fs::read(env::var("BERT_MODEL_PATH")?)?, @@ -15,13 +15,19 @@ fn main_inner() -> anyhow::Result<()> { .ok() .and_then(|x| x.parse().ok()), )?; + let mp = env::var("MODEL_PATH")?; + let b = fs::read(&mp)?; #[cfg(not(feature = "aivmx"))] { - tts_holder.load_sbv2file(ident, fs::read(env::var("MODEL_PATH")?)?)?; + tts_holder.load_sbv2file(ident, b)?; } #[cfg(feature = "aivmx")] { - tts_holder.load_aivmx(ident, fs::read(env::var("MODEL_PATH")?)?)?; + if mp.ends_with(".sbv2") { + tts_holder.load_sbv2file(ident, b)?; + } else { + tts_holder.load_aivmx(ident, b)?; + } } let audio = diff --git a/crates/sbv2_core/src/model.rs b/crates/sbv2_core/src/model.rs new file mode 100644 index 0000000..f695b23 --- /dev/null +++ b/crates/sbv2_core/src/model.rs @@ -0,0 +1,111 @@ +use crate::error::Result; +use ndarray::{array, Array1, Array2, Array3, Axis, Ix3}; +use ort::session::{builder::GraphOptimizationLevel, Session}; + +#[allow(clippy::vec_init_then_push, unused_variables)] +pub fn load_model>(model_file: P, bert: bool) -> Result { + let mut exp = Vec::new(); + #[cfg(feature = "tensorrt")] + { + if bert { + exp.push( + ort::execution_providers::TensorRTExecutionProvider::default() + .with_fp16(true) + .with_profile_min_shapes("input_ids:1x1,attention_mask:1x1") + .with_profile_max_shapes("input_ids:1x100,attention_mask:1x100") + .with_profile_opt_shapes("input_ids:1x25,attention_mask:1x25") + .build(), + ); + } + } + #[cfg(feature = "cuda")] + { + #[allow(unused_mut)] + let mut cuda = ort::execution_providers::CUDAExecutionProvider::default() + .with_conv_algorithm_search( + ort::execution_providers::cuda::CUDAExecutionProviderCuDNNConvAlgoSearch::Default, + ); + #[cfg(feature = "cuda_tf32")] + { + cuda = cuda.with_tf32(true); + } + exp.push(cuda.build()); + } + #[cfg(feature = "directml")] + { + exp.push(ort::execution_providers::DirectMLExecutionProvider::default().build()); + } + #[cfg(feature = "coreml")] + { + exp.push(ort::execution_providers::CoreMLExecutionProvider::default().build()); + } + exp.push(ort::execution_providers::CPUExecutionProvider::default().build()); + Ok(Session::builder()? + .with_execution_providers(exp)? + .with_optimization_level(GraphOptimizationLevel::Level3)? + .with_intra_threads(num_cpus::get_physical())? + .with_parallel_execution(true)? + .with_inter_threads(num_cpus::get_physical())? + .commit_from_memory(model_file.as_ref())?) +} + +#[allow(clippy::too_many_arguments)] +pub fn synthesize( + session: &mut Session, + bert_ori: Array2, + x_tst: Array1, + mut spk_ids: Array1, + tones: Array1, + lang_ids: Array1, + style_vector: Array1, + sdp_ratio: f32, + length_scale: f32, + noise_scale: f32, + noise_scale_w: f32, +) -> Result> { + let bert_ori = bert_ori.insert_axis(Axis(0)); + let bert_ori = bert_ori.as_standard_layout(); + let bert = ort::value::TensorRef::from_array_view(&bert_ori)?; + let mut x_tst_lengths = array![x_tst.shape()[0] as i64]; + let x_tst_lengths = ort::value::TensorRef::from_array_view(&mut x_tst_lengths)?; + let mut x_tst = x_tst.insert_axis(Axis(0)); + let x_tst = ort::value::TensorRef::from_array_view(&mut x_tst)?; + let mut lang_ids = lang_ids.insert_axis(Axis(0)); + let lang_ids = ort::value::TensorRef::from_array_view(&mut lang_ids)?; + let mut tones = tones.insert_axis(Axis(0)); + let tones = ort::value::TensorRef::from_array_view(&mut tones)?; + let mut style_vector = style_vector.insert_axis(Axis(0)); + let style_vector = ort::value::TensorRef::from_array_view(&mut style_vector)?; + let sid = ort::value::TensorRef::from_array_view(&mut spk_ids)?; + let sdp_ratio = vec![sdp_ratio]; + let sdp_ratio = ort::value::TensorRef::from_array_view((vec![1_i64], sdp_ratio.as_slice()))?; + let length_scale = vec![length_scale]; + let length_scale = + ort::value::TensorRef::from_array_view((vec![1_i64], length_scale.as_slice()))?; + let noise_scale = vec![noise_scale]; + let noise_scale = + ort::value::TensorRef::from_array_view((vec![1_i64], noise_scale.as_slice()))?; + let noise_scale_w = vec![noise_scale_w]; + let noise_scale_w = + ort::value::TensorRef::from_array_view((vec![1_i64], noise_scale_w.as_slice()))?; + let outputs = session.run(ort::inputs! { + "x_tst" => x_tst, + "x_tst_lengths" => x_tst_lengths, + "sid" => sid, + "tones" => tones, + "language" => lang_ids, + "bert" => bert, + "style_vec" => style_vector, + "sdp_ratio" => sdp_ratio, + "length_scale" => length_scale, + "noise_scale" => noise_scale, + "noise_scale_w" => noise_scale_w, + })?; + + let audio_array = outputs["output"] + .try_extract_tensor::()? + .into_dimensionality::()? + .to_owned(); + + Ok(audio_array) +} diff --git a/sbv2_core/src/mora.rs b/crates/sbv2_core/src/mora.rs similarity index 100% rename from sbv2_core/src/mora.rs rename to crates/sbv2_core/src/mora.rs diff --git a/sbv2_core/src/mora_list.json b/crates/sbv2_core/src/mora_list.json similarity index 100% rename from sbv2_core/src/mora_list.json rename to crates/sbv2_core/src/mora_list.json diff --git a/sbv2_core/src/nlp.rs b/crates/sbv2_core/src/nlp.rs similarity index 100% rename from sbv2_core/src/nlp.rs rename to crates/sbv2_core/src/nlp.rs diff --git a/sbv2_core/src/norm.rs b/crates/sbv2_core/src/norm.rs similarity index 100% rename from sbv2_core/src/norm.rs rename to crates/sbv2_core/src/norm.rs diff --git a/sbv2_core/src/sbv2file.rs b/crates/sbv2_core/src/sbv2file.rs similarity index 100% rename from sbv2_core/src/sbv2file.rs rename to crates/sbv2_core/src/sbv2file.rs diff --git a/sbv2_core/src/style.rs b/crates/sbv2_core/src/style.rs similarity index 100% rename from sbv2_core/src/style.rs rename to crates/sbv2_core/src/style.rs diff --git a/sbv2_core/src/tokenizer.rs b/crates/sbv2_core/src/tokenizer.rs similarity index 100% rename from sbv2_core/src/tokenizer.rs rename to crates/sbv2_core/src/tokenizer.rs diff --git a/sbv2_core/src/tts.rs b/crates/sbv2_core/src/tts.rs similarity index 94% rename from sbv2_core/src/tts.rs rename to crates/sbv2_core/src/tts.rs index 0057260..0c45da5 100644 --- a/sbv2_core/src/tts.rs +++ b/crates/sbv2_core/src/tts.rs @@ -5,7 +5,7 @@ use base64::prelude::{Engine as _, BASE64_STANDARD}; #[cfg(feature = "aivmx")] use ndarray::ShapeBuilder; use ndarray::{concatenate, Array1, Array2, Array3, Axis}; -use ort::Session; +use ort::session::Session; #[cfg(feature = "aivmx")] use std::io::Cursor; use tokenizers::Tokenizer; @@ -200,7 +200,7 @@ impl TTSModelHolder { /// This function is for low-level usage, use `easy_synthesize` for high-level usage. #[allow(clippy::type_complexity)] pub fn parse_text( - &self, + &mut self, text: &str, ) -> Result<(Array2, Array1, Array1, Array1)> { crate::tts_util::parse_text_blocking( @@ -208,15 +208,15 @@ impl TTSModelHolder { &self.jtalk, &self.tokenizer, |token_ids, attention_masks| { - crate::bert::predict(&self.bert, token_ids, attention_masks) + crate::bert::predict(&mut self.bert, token_ids, attention_masks) }, ) } - fn find_model>(&self, ident: I) -> Result<&TTSModel> { + fn find_model>(&mut self, ident: I) -> Result<&mut TTSModel> { let ident = ident.into(); self.models - .iter() + .iter_mut() .find(|m| m.ident == ident) .ok_or(Error::ModelNotFoundError(ident.to_string())) } @@ -262,7 +262,7 @@ impl TTSModelHolder { /// # Note /// This function is for low-level usage, use `easy_synthesize` for high-level usage. pub fn get_style_vector>( - &self, + &mut self, ident: I, style_id: i32, weight: f32, @@ -286,11 +286,6 @@ impl TTSModelHolder { options: SynthesizeOptions, ) -> Result> { self.find_and_load_model(ident)?; - let vits2 = &self - .find_model(ident)? - .vits2 - .as_ref() - .ok_or(Error::ModelNotFoundError(ident.into().to_string()))?; let style_vector = self.get_style_vector(ident, style_id, options.style_weight)?; let audio_array = if options.split_sentences { let texts: Vec<&str> = text.split('\n').collect(); @@ -300,6 +295,12 @@ impl TTSModelHolder { continue; } let (bert_ori, phones, tones, lang_ids) = self.parse_text(t)?; + + let vits2 = self + .find_model(ident)? + .vits2 + .as_mut() + .ok_or(Error::ModelNotFoundError(ident.into().to_string()))?; let audio = model::synthesize( vits2, bert_ori.to_owned(), @@ -324,6 +325,12 @@ impl TTSModelHolder { )? } else { let (bert_ori, phones, tones, lang_ids) = self.parse_text(text)?; + + let vits2 = self + .find_model(ident)? + .vits2 + .as_mut() + .ok_or(Error::ModelNotFoundError(ident.into().to_string()))?; model::synthesize( vits2, bert_ori.to_owned(), diff --git a/sbv2_core/src/tts_util.rs b/crates/sbv2_core/src/tts_util.rs similarity index 100% rename from sbv2_core/src/tts_util.rs rename to crates/sbv2_core/src/tts_util.rs diff --git a/sbv2_core/src/utils.rs b/crates/sbv2_core/src/utils.rs similarity index 100% rename from sbv2_core/src/utils.rs rename to crates/sbv2_core/src/utils.rs diff --git a/sbv2_wasm/Cargo.toml b/crates/sbv2_wasm/Cargo.toml similarity index 61% rename from sbv2_wasm/Cargo.toml rename to crates/sbv2_wasm/Cargo.toml index 4930456..4e78d69 100644 --- a/sbv2_wasm/Cargo.toml +++ b/crates/sbv2_wasm/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "sbv2_wasm" -version = "0.1.0" -edition = "2021" +version.workspace = true +edition.workspace = true +description.workspace = true +readme.workspace = true +repository.workspace = true +documentation.workspace = true +license.workspace = true [lib] crate-type = ["cdylib", "rlib"] @@ -13,7 +18,3 @@ once_cell.workspace = true js-sys = "0.3.70" ndarray.workspace = true wasm-bindgen-futures = "0.4.43" - -[profile.release] -lto = true -opt-level = "s" diff --git a/sbv2_wasm/README.md b/crates/sbv2_wasm/README.md similarity index 100% rename from sbv2_wasm/README.md rename to crates/sbv2_wasm/README.md diff --git a/sbv2_wasm/biome.json b/crates/sbv2_wasm/biome.json similarity index 100% rename from sbv2_wasm/biome.json rename to crates/sbv2_wasm/biome.json diff --git a/crates/sbv2_wasm/build.sh b/crates/sbv2_wasm/build.sh new file mode 100755 index 0000000..2550d53 --- /dev/null +++ b/crates/sbv2_wasm/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh +wasm-pack build --target web ./crates/sbv2_wasm --release +wasm-opt -O3 -o ./crates/sbv2_wasm/pkg/sbv2_wasm_bg.wasm ./crates/sbv2_wasm/pkg/sbv2_wasm_bg.wasm +wasm-strip ./crates/sbv2_wasm/pkg/sbv2_wasm_bg.wasm +mkdir -p ./crates/sbv2_wasm/dist +cp ./crates/sbv2_wasm/pkg/sbv2_wasm_bg.wasm ./crates/sbv2_wasm/dist/sbv2_wasm_bg.wasm +cd ./crates/sbv2_wasm +pnpm build \ No newline at end of file diff --git a/sbv2_wasm/example.html b/crates/sbv2_wasm/example.html similarity index 100% rename from sbv2_wasm/example.html rename to crates/sbv2_wasm/example.html diff --git a/sbv2_wasm/example.js b/crates/sbv2_wasm/example.js similarity index 60% rename from sbv2_wasm/example.js rename to crates/sbv2_wasm/example.js index 1c4fdc6..005e2c4 100644 --- a/sbv2_wasm/example.js +++ b/crates/sbv2_wasm/example.js @@ -3,9 +3,12 @@ import fs from "node:fs/promises"; ModelHolder.globalInit(await fs.readFile("./dist/sbv2_wasm_bg.wasm")); const holder = await ModelHolder.create( - (await fs.readFile("../models/tokenizer.json")).toString("utf-8"), - await fs.readFile("../models/deberta.onnx"), + (await fs.readFile("../../models/tokenizer.json")).toString("utf-8"), + await fs.readFile("../../models/deberta.onnx"), +); +await holder.load( + "tsukuyomi", + await fs.readFile("../../models/tsukuyomi.sbv2"), ); -await holder.load("tsukuyomi", await fs.readFile("../models/iroha2.sbv2")); await fs.writeFile("out.wav", await holder.synthesize("tsukuyomi", "おはよう")); holder.unload("tsukuyomi"); diff --git a/sbv2_wasm/package.json b/crates/sbv2_wasm/package.json similarity index 63% rename from sbv2_wasm/package.json rename to crates/sbv2_wasm/package.json index 4d24dd6..e7b0529 100644 --- a/sbv2_wasm/package.json +++ b/crates/sbv2_wasm/package.json @@ -1,6 +1,6 @@ { "name": "sbv2", - "version": "0.1.1", + "version": "0.2.0-alpha6", "description": "Style Bert VITS2 wasm", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,13 +13,13 @@ "author": "tuna2134", "license": "MIT", "devDependencies": { - "@biomejs/biome": "^1.9.2", - "@types/node": "^22.7.4", - "esbuild": "^0.24.0", - "typescript": "^5.6.2" + "@biomejs/biome": "^1.9.4", + "@types/node": "^22.13.5", + "esbuild": "^0.25.0", + "typescript": "^5.7.3" }, "dependencies": { - "onnxruntime-web": "^1.19.2" + "onnxruntime-web": "^1.20.1" }, - "files": ["dist/*", "package.json", "README.md"] + "files": ["dist/*", "package.json", "README.md", "pkg/*.ts", "pkg/*.js"] } diff --git a/sbv2_wasm/pnpm-lock.yaml b/crates/sbv2_wasm/pnpm-lock.yaml similarity index 53% rename from sbv2_wasm/pnpm-lock.yaml rename to crates/sbv2_wasm/pnpm-lock.yaml index 227d328..9e91833 100644 --- a/sbv2_wasm/pnpm-lock.yaml +++ b/crates/sbv2_wasm/pnpm-lock.yaml @@ -9,21 +9,21 @@ importers: .: dependencies: onnxruntime-web: - specifier: ^1.19.2 - version: 1.20.0 + specifier: ^1.20.1 + version: 1.20.1 devDependencies: '@biomejs/biome': - specifier: ^1.9.2 + specifier: ^1.9.4 version: 1.9.4 '@types/node': - specifier: ^22.7.4 - version: 22.8.0 + specifier: ^22.13.5 + version: 22.13.5 esbuild: - specifier: ^0.24.0 - version: 0.24.0 + specifier: ^0.25.0 + version: 0.25.0 typescript: - specifier: ^5.6.2 - version: 5.6.3 + specifier: ^5.7.3 + version: 5.7.3 packages: @@ -80,146 +80,152 @@ packages: cpu: [x64] os: [win32] - '@esbuild/aix-ppc64@0.24.0': - resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} + '@esbuild/aix-ppc64@0.25.0': + resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.24.0': - resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} + '@esbuild/android-arm64@0.25.0': + resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.24.0': - resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} + '@esbuild/android-arm@0.25.0': + resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.24.0': - resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} + '@esbuild/android-x64@0.25.0': + resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.24.0': - resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} + '@esbuild/darwin-arm64@0.25.0': + resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.24.0': - resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} + '@esbuild/darwin-x64@0.25.0': + resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.24.0': - resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} + '@esbuild/freebsd-arm64@0.25.0': + resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.24.0': - resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} + '@esbuild/freebsd-x64@0.25.0': + resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.24.0': - resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} + '@esbuild/linux-arm64@0.25.0': + resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.24.0': - resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} + '@esbuild/linux-arm@0.25.0': + resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.24.0': - resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} + '@esbuild/linux-ia32@0.25.0': + resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.24.0': - resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} + '@esbuild/linux-loong64@0.25.0': + resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.24.0': - resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} + '@esbuild/linux-mips64el@0.25.0': + resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.24.0': - resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} + '@esbuild/linux-ppc64@0.25.0': + resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.24.0': - resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} + '@esbuild/linux-riscv64@0.25.0': + resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.24.0': - resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} + '@esbuild/linux-s390x@0.25.0': + resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.24.0': - resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} + '@esbuild/linux-x64@0.25.0': + resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.24.0': - resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} + '@esbuild/netbsd-arm64@0.25.0': + resolution: {integrity: sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.0': + resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.24.0': - resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} + '@esbuild/openbsd-arm64@0.25.0': + resolution: {integrity: sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.24.0': - resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} + '@esbuild/openbsd-x64@0.25.0': + resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.24.0': - resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} + '@esbuild/sunos-x64@0.25.0': + resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.24.0': - resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} + '@esbuild/win32-arm64@0.25.0': + resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.24.0': - resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} + '@esbuild/win32-ia32@0.25.0': + resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.24.0': - resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} + '@esbuild/win32-x64@0.25.0': + resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -254,11 +260,11 @@ packages: '@protobufjs/utf8@1.1.0': resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} - '@types/node@22.8.0': - resolution: {integrity: sha512-84rafSBHC/z1i1E3p0cJwKA+CfYDNSXX9WSZBRopjIzLET8oNt6ht2tei4C7izwDeEiLLfdeSVBv1egOH916hg==} + '@types/node@22.13.5': + resolution: {integrity: sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==} - esbuild@0.24.0: - resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} + esbuild@0.25.0: + resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==} engines: {node: '>=18'} hasBin: true @@ -268,14 +274,14 @@ packages: guid-typescript@1.0.9: resolution: {integrity: sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==} - long@5.2.3: - resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + long@5.3.1: + resolution: {integrity: sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==} - onnxruntime-common@1.20.0: - resolution: {integrity: sha512-9ehS4ul5fBszIcHhfxuDgk45lO+Fqrxmrgwk1Pxb1JRvbQiCB/v9Royv95SRCWHktLMviqNjBsEd/biJhd39cg==} + onnxruntime-common@1.20.1: + resolution: {integrity: sha512-YiU0s0IzYYC+gWvqD1HzLc46Du1sXpSiwzKb63PACIJr6LfL27VsXSXQvt68EzD3V0D5Bc0vyJTjmMxp0ylQiw==} - onnxruntime-web@1.20.0: - resolution: {integrity: sha512-IoUf8dqHFJLV4DUSz+Ok+xxyN6cQk57gb20m6PZE5gag3QXuvegYMq9dG8t/QF4JjTKIwvfvnr16ouzCCB9IMA==} + onnxruntime-web@1.20.1: + resolution: {integrity: sha512-TePF6XVpLL1rWVMIl5Y9ACBQcyCNFThZON/jgElNd9Txb73CIEGlklhYR3UEr1cp5r0rbGI6nDwwrs79g7WjoA==} platform@1.3.6: resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} @@ -284,13 +290,13 @@ packages: resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} engines: {node: '>=12.0.0'} - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} snapshots: @@ -329,76 +335,79 @@ snapshots: '@biomejs/cli-win32-x64@1.9.4': optional: true - '@esbuild/aix-ppc64@0.24.0': + '@esbuild/aix-ppc64@0.25.0': optional: true - '@esbuild/android-arm64@0.24.0': + '@esbuild/android-arm64@0.25.0': optional: true - '@esbuild/android-arm@0.24.0': + '@esbuild/android-arm@0.25.0': optional: true - '@esbuild/android-x64@0.24.0': + '@esbuild/android-x64@0.25.0': optional: true - '@esbuild/darwin-arm64@0.24.0': + '@esbuild/darwin-arm64@0.25.0': optional: true - '@esbuild/darwin-x64@0.24.0': + '@esbuild/darwin-x64@0.25.0': optional: true - '@esbuild/freebsd-arm64@0.24.0': + '@esbuild/freebsd-arm64@0.25.0': optional: true - '@esbuild/freebsd-x64@0.24.0': + '@esbuild/freebsd-x64@0.25.0': optional: true - '@esbuild/linux-arm64@0.24.0': + '@esbuild/linux-arm64@0.25.0': optional: true - '@esbuild/linux-arm@0.24.0': + '@esbuild/linux-arm@0.25.0': optional: true - '@esbuild/linux-ia32@0.24.0': + '@esbuild/linux-ia32@0.25.0': optional: true - '@esbuild/linux-loong64@0.24.0': + '@esbuild/linux-loong64@0.25.0': optional: true - '@esbuild/linux-mips64el@0.24.0': + '@esbuild/linux-mips64el@0.25.0': optional: true - '@esbuild/linux-ppc64@0.24.0': + '@esbuild/linux-ppc64@0.25.0': optional: true - '@esbuild/linux-riscv64@0.24.0': + '@esbuild/linux-riscv64@0.25.0': optional: true - '@esbuild/linux-s390x@0.24.0': + '@esbuild/linux-s390x@0.25.0': optional: true - '@esbuild/linux-x64@0.24.0': + '@esbuild/linux-x64@0.25.0': optional: true - '@esbuild/netbsd-x64@0.24.0': + '@esbuild/netbsd-arm64@0.25.0': optional: true - '@esbuild/openbsd-arm64@0.24.0': + '@esbuild/netbsd-x64@0.25.0': optional: true - '@esbuild/openbsd-x64@0.24.0': + '@esbuild/openbsd-arm64@0.25.0': optional: true - '@esbuild/sunos-x64@0.24.0': + '@esbuild/openbsd-x64@0.25.0': optional: true - '@esbuild/win32-arm64@0.24.0': + '@esbuild/sunos-x64@0.25.0': optional: true - '@esbuild/win32-ia32@0.24.0': + '@esbuild/win32-arm64@0.25.0': optional: true - '@esbuild/win32-x64@0.24.0': + '@esbuild/win32-ia32@0.25.0': + optional: true + + '@esbuild/win32-x64@0.25.0': optional: true '@protobufjs/aspromise@1.1.2': {} @@ -424,51 +433,52 @@ snapshots: '@protobufjs/utf8@1.1.0': {} - '@types/node@22.8.0': + '@types/node@22.13.5': dependencies: - undici-types: 6.19.8 + undici-types: 6.20.0 - esbuild@0.24.0: + esbuild@0.25.0: optionalDependencies: - '@esbuild/aix-ppc64': 0.24.0 - '@esbuild/android-arm': 0.24.0 - '@esbuild/android-arm64': 0.24.0 - '@esbuild/android-x64': 0.24.0 - '@esbuild/darwin-arm64': 0.24.0 - '@esbuild/darwin-x64': 0.24.0 - '@esbuild/freebsd-arm64': 0.24.0 - '@esbuild/freebsd-x64': 0.24.0 - '@esbuild/linux-arm': 0.24.0 - '@esbuild/linux-arm64': 0.24.0 - '@esbuild/linux-ia32': 0.24.0 - '@esbuild/linux-loong64': 0.24.0 - '@esbuild/linux-mips64el': 0.24.0 - '@esbuild/linux-ppc64': 0.24.0 - '@esbuild/linux-riscv64': 0.24.0 - '@esbuild/linux-s390x': 0.24.0 - '@esbuild/linux-x64': 0.24.0 - '@esbuild/netbsd-x64': 0.24.0 - '@esbuild/openbsd-arm64': 0.24.0 - '@esbuild/openbsd-x64': 0.24.0 - '@esbuild/sunos-x64': 0.24.0 - '@esbuild/win32-arm64': 0.24.0 - '@esbuild/win32-ia32': 0.24.0 - '@esbuild/win32-x64': 0.24.0 + '@esbuild/aix-ppc64': 0.25.0 + '@esbuild/android-arm': 0.25.0 + '@esbuild/android-arm64': 0.25.0 + '@esbuild/android-x64': 0.25.0 + '@esbuild/darwin-arm64': 0.25.0 + '@esbuild/darwin-x64': 0.25.0 + '@esbuild/freebsd-arm64': 0.25.0 + '@esbuild/freebsd-x64': 0.25.0 + '@esbuild/linux-arm': 0.25.0 + '@esbuild/linux-arm64': 0.25.0 + '@esbuild/linux-ia32': 0.25.0 + '@esbuild/linux-loong64': 0.25.0 + '@esbuild/linux-mips64el': 0.25.0 + '@esbuild/linux-ppc64': 0.25.0 + '@esbuild/linux-riscv64': 0.25.0 + '@esbuild/linux-s390x': 0.25.0 + '@esbuild/linux-x64': 0.25.0 + '@esbuild/netbsd-arm64': 0.25.0 + '@esbuild/netbsd-x64': 0.25.0 + '@esbuild/openbsd-arm64': 0.25.0 + '@esbuild/openbsd-x64': 0.25.0 + '@esbuild/sunos-x64': 0.25.0 + '@esbuild/win32-arm64': 0.25.0 + '@esbuild/win32-ia32': 0.25.0 + '@esbuild/win32-x64': 0.25.0 flatbuffers@1.12.0: {} guid-typescript@1.0.9: {} - long@5.2.3: {} + long@5.3.1: {} - onnxruntime-common@1.20.0: {} + onnxruntime-common@1.20.1: {} - onnxruntime-web@1.20.0: + onnxruntime-web@1.20.1: dependencies: flatbuffers: 1.12.0 guid-typescript: 1.0.9 - long: 5.2.3 - onnxruntime-common: 1.20.0 + long: 5.3.1 + onnxruntime-common: 1.20.1 platform: 1.3.6 protobufjs: 7.4.0 @@ -486,9 +496,9 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.0 - long: 5.2.3 + '@types/node': 22.13.5 + long: 5.3.1 - typescript@5.6.3: {} + typescript@5.7.3: {} - undici-types@6.19.8: {} + undici-types@6.20.0: {} diff --git a/sbv2_wasm/src-js/index.ts b/crates/sbv2_wasm/src-js/index.ts similarity index 96% rename from sbv2_wasm/src-js/index.ts rename to crates/sbv2_wasm/src-js/index.ts index c3f138b..c6bba33 100644 --- a/sbv2_wasm/src-js/index.ts +++ b/crates/sbv2_wasm/src-js/index.ts @@ -74,6 +74,8 @@ export class ModelHolder { style_vec: e, sdp_ratio: new Tensor("float32", [f]), length_scale: new Tensor("float32", [g]), + noise_scale: new Tensor("float32", [0.677]), + noise_scale_w: new Tensor("float32", [0.8]), }) ).output; return [new Uint32Array(res.dims), await res.getData(true)]; diff --git a/sbv2_wasm/src/array_helper.rs b/crates/sbv2_wasm/src/array_helper.rs similarity index 100% rename from sbv2_wasm/src/array_helper.rs rename to crates/sbv2_wasm/src/array_helper.rs diff --git a/sbv2_wasm/src/lib.rs b/crates/sbv2_wasm/src/lib.rs similarity index 100% rename from sbv2_wasm/src/lib.rs rename to crates/sbv2_wasm/src/lib.rs diff --git a/sbv2_wasm/tsconfig.json b/crates/sbv2_wasm/tsconfig.json similarity index 100% rename from sbv2_wasm/tsconfig.json rename to crates/sbv2_wasm/tsconfig.json diff --git a/sbv2_core/src/model.rs b/sbv2_core/src/model.rs deleted file mode 100644 index 603ea83..0000000 --- a/sbv2_core/src/model.rs +++ /dev/null @@ -1,90 +0,0 @@ -use crate::error::Result; -use ndarray::{array, Array1, Array2, Array3, Axis, Ix3}; -use ort::{GraphOptimizationLevel, Session}; - -#[allow(clippy::vec_init_then_push, unused_variables)] -pub fn load_model>(model_file: P, bert: bool) -> Result { - let mut exp = Vec::new(); - #[cfg(feature = "tensorrt")] - { - if bert { - exp.push( - ort::TensorRTExecutionProvider::default() - .with_fp16(true) - .with_profile_min_shapes("input_ids:1x1,attention_mask:1x1") - .with_profile_max_shapes("input_ids:1x100,attention_mask:1x100") - .with_profile_opt_shapes("input_ids:1x25,attention_mask:1x25") - .build(), - ); - } - } - #[cfg(feature = "cuda")] - { - #[allow(unused_mut)] - let mut cuda = ort::CUDAExecutionProvider::default() - .with_conv_algorithm_search(ort::CUDAExecutionProviderCuDNNConvAlgoSearch::Default); - #[cfg(feature = "cuda_tf32")] - { - cuda = cuda.with_tf32(true); - } - exp.push(cuda.build()); - } - #[cfg(feature = "directml")] - { - exp.push(ort::DirectMLExecutionProvider::default().build()); - } - #[cfg(feature = "coreml")] - { - exp.push(ort::CoreMLExecutionProvider::default().build()); - } - exp.push(ort::CPUExecutionProvider::default().build()); - Ok(Session::builder()? - .with_execution_providers(exp)? - .with_optimization_level(GraphOptimizationLevel::Level3)? - .with_intra_threads(num_cpus::get_physical())? - .with_parallel_execution(true)? - .with_inter_threads(num_cpus::get_physical())? - .commit_from_memory(model_file.as_ref())?) -} - -#[allow(clippy::too_many_arguments)] -pub fn synthesize( - session: &Session, - bert_ori: Array2, - x_tst: Array1, - sid: Array1, - tones: Array1, - lang_ids: Array1, - style_vector: Array1, - sdp_ratio: f32, - length_scale: f32, - noise_scale: f32, - noise_scale_w: f32, -) -> Result> { - let bert = bert_ori.insert_axis(Axis(0)); - let x_tst_lengths: Array1 = array![x_tst.shape()[0] as i64]; - let x_tst = x_tst.insert_axis(Axis(0)); - let lang_ids = lang_ids.insert_axis(Axis(0)); - let tones = tones.insert_axis(Axis(0)); - let style_vector = style_vector.insert_axis(Axis(0)); - let outputs = session.run(ort::inputs! { - "x_tst" => x_tst, - "x_tst_lengths" => x_tst_lengths, - "sid" => sid, - "tones" => tones, - "language" => lang_ids, - "bert" => bert, - "style_vec" => style_vector, - "sdp_ratio" => array![sdp_ratio], - "length_scale" => array![length_scale], - "noise_scale" => array![noise_scale], - "noise_scale_w" => array![noise_scale_w] - }?)?; - - let audio_array = outputs["output"] - .try_extract_tensor::()? - .into_dimensionality::()? - .to_owned(); - - Ok(audio_array) -} diff --git a/sbv2_wasm/build.sh b/sbv2_wasm/build.sh deleted file mode 100755 index 1d23f47..0000000 --- a/sbv2_wasm/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -wasm-pack build --target web sbv2_wasm -wasm-opt -O3 -o sbv2_wasm/pkg/sbv2_wasm_bg.wasm sbv2_wasm/pkg/sbv2_wasm_bg.wasm -mkdir -p sbv2_wasm/dist -cp sbv2_wasm/sbv2_wasm/pkg/sbv2_wasm_bg.wasm sbv2_wasm/dist/sbv2_wasm_bg.wasm \ No newline at end of file diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000..bd60ff3 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1,5 @@ +*.json +venv/ +tmp/ +*.safetensors +*.npy \ No newline at end of file diff --git a/convert/README.md b/scripts/convert/README.md similarity index 100% rename from convert/README.md rename to scripts/convert/README.md diff --git a/convert/convert_deberta.py b/scripts/convert/convert_deberta.py similarity index 91% rename from convert/convert_deberta.py rename to scripts/convert/convert_deberta.py index 2c8ccb9..c5504b5 100644 --- a/convert/convert_deberta.py +++ b/scripts/convert/convert_deberta.py @@ -5,6 +5,7 @@ from transformers import AutoModelForMaskedLM, AutoTokenizer import torch from torch import nn from argparse import ArgumentParser +import os parser = ArgumentParser() parser.add_argument("--model", default="ku-nlp/deberta-v2-large-japanese-char-wwm") @@ -15,7 +16,7 @@ bert_models.load_tokenizer(Languages.JP, model_name) tokenizer = bert_models.load_tokenizer(Languages.JP) converter = BertConverter(tokenizer) tokenizer = converter.converted() -tokenizer.save("../models/tokenizer.json") +tokenizer.save("../../models/tokenizer.json") class ORTDeberta(nn.Module): @@ -42,9 +43,10 @@ inputs = AutoTokenizer.from_pretrained(model_name)( torch.onnx.export( model, (inputs["input_ids"], inputs["token_type_ids"], inputs["attention_mask"]), - "../models/deberta.onnx", + "../../models/deberta.onnx", input_names=["input_ids", "token_type_ids", "attention_mask"], output_names=["output"], verbose=True, dynamic_axes={"input_ids": {1: "batch_size"}, "attention_mask": {1: "batch_size"}}, ) +os.system("onnxsim ../../models/deberta.onnx ../../models/deberta.onnx") \ No newline at end of file diff --git a/convert/convert_model.py b/scripts/convert/convert_model.py similarity index 88% rename from convert/convert_model.py rename to scripts/convert/convert_model.py index e5badcc..689809b 100644 --- a/convert/convert_model.py +++ b/scripts/convert/convert_model.py @@ -36,7 +36,7 @@ data = array.tolist() hyper_parameters = HyperParameters.load_from_json(config_file) out_name = hyper_parameters.model_name -with open(f"../models/style_vectors_{out_name}.json", "w") as f: +with open(f"../../models/style_vectors_{out_name}.json", "w") as f: json.dump( { "data": data, @@ -127,7 +127,7 @@ torch.onnx.export( torch.tensor(0.6777), torch.tensor(0.8), ), - f"../models/model_{out_name}.onnx", + f"../../models/model_{out_name}.onnx", verbose=True, dynamic_axes={ "x_tst": {0: "batch_size", 1: "x_tst_max_length"}, @@ -153,11 +153,11 @@ torch.onnx.export( ], output_names=["output"], ) -os.system(f"onnxsim ../models/model_{out_name}.onnx ../models/model_{out_name}.onnx") -onnxfile = open(f"../models/model_{out_name}.onnx", "rb").read() -stylefile = open(f"../models/style_vectors_{out_name}.json", "rb").read() +os.system(f"onnxsim ../../models/model_{out_name}.onnx ../../models/model_{out_name}.onnx") +onnxfile = open(f"../../models/model_{out_name}.onnx", "rb").read() +stylefile = open(f"../../models/style_vectors_{out_name}.json", "rb").read() version = bytes("1", "utf8") -with taropen(f"../models/tmp_{out_name}.sbv2tar", "w") as w: +with taropen(f"../../models/tmp_{out_name}.sbv2tar", "w") as w: def add_tar(f, b): t = TarInfo(f) @@ -167,9 +167,9 @@ with taropen(f"../models/tmp_{out_name}.sbv2tar", "w") as w: add_tar("version.txt", version) add_tar("model.onnx", onnxfile) add_tar("style_vectors.json", stylefile) -open(f"../models/{out_name}.sbv2", "wb").write( +open(f"../../models/{out_name}.sbv2", "wb").write( ZstdCompressor(threads=-1, level=22).compress( - open(f"../models/tmp_{out_name}.sbv2tar", "rb").read() + open(f"../../models/tmp_{out_name}.sbv2tar", "rb").read() ) ) -os.unlink(f"../models/tmp_{out_name}.sbv2tar") +os.unlink(f"../../models/tmp_{out_name}.sbv2tar") diff --git a/convert/requirements.txt b/scripts/convert/requirements.txt similarity index 100% rename from convert/requirements.txt rename to scripts/convert/requirements.txt diff --git a/docker/cpu.Dockerfile b/scripts/docker/cpu.Dockerfile similarity index 100% rename from docker/cpu.Dockerfile rename to scripts/docker/cpu.Dockerfile diff --git a/docker/cuda.Dockerfile b/scripts/docker/cuda.Dockerfile similarity index 100% rename from docker/cuda.Dockerfile rename to scripts/docker/cuda.Dockerfile diff --git a/docker/run_cpu.sh b/scripts/docker/run_cpu.sh similarity index 100% rename from docker/run_cpu.sh rename to scripts/docker/run_cpu.sh diff --git a/docker/run_cuda.sh b/scripts/docker/run_cuda.sh similarity index 100% rename from docker/run_cuda.sh rename to scripts/docker/run_cuda.sh diff --git a/scripts/make_dict.sh b/scripts/make_dict.sh new file mode 100755 index 0000000..7b6a788 --- /dev/null +++ b/scripts/make_dict.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e +git clone https://github.com/Aivis-Project/AivisSpeech-Engine ./scripts/tmp --filter=blob:none -n +cd ./scripts/tmp +git checkout 168b2a1144afe300b0490d9a6dd773ec6e927667 -- resources/dictionaries/*.csv +cd ../.. +rm -rf ./crates/sbv2_core/src/dic +cp -r ./scripts/tmp/resources/dictionaries ./crates/sbv2_core/src/dic +rm -rf ./scripts/tmp +for file in ./crates/sbv2_core/src/dic/0*.csv; do + /usr/bin/cat "$file" + echo +done > ./crates/sbv2_core/src/all.csv +lindera build ./crates/sbv2_core/src/all.csv ./crates/sbv2_core/src/dic/all.dic -u -k ipadic \ No newline at end of file diff --git a/Colab-sbv2_bindings-CPU.ipynb b/scripts/sbv2-bindings-colab.ipynb similarity index 99% rename from Colab-sbv2_bindings-CPU.ipynb rename to scripts/sbv2-bindings-colab.ipynb index 1fee5fc..975e015 100644 --- a/Colab-sbv2_bindings-CPU.ipynb +++ b/scripts/sbv2-bindings-colab.ipynb @@ -16,7 +16,7 @@ "outputs": [], "source": [ "# 必要なパッケージのインストール\n", - "!pip install sbv2_bindings\n", + "%pip install sbv2_bindings\n", "\n", "# 必要なモジュールのインポート\n", "import os\n", diff --git a/test.py b/scripts/sbv2-test-api.py similarity index 100% rename from test.py rename to scripts/sbv2-test-api.py diff --git a/sbv2_bindings/examples/basic.py b/scripts/sbv2-test-bindings.py similarity index 72% rename from sbv2_bindings/examples/basic.py rename to scripts/sbv2-test-bindings.py index 0a833a2..7272c37 100644 --- a/sbv2_bindings/examples/basic.py +++ b/scripts/sbv2-test-bindings.py @@ -3,10 +3,10 @@ from sbv2_bindings import TTSModel def main(): print("Loading models...") - model = TTSModel.from_path("../models/debert.onnx", "../models/tokenizer.json") + model = TTSModel.from_path("./models/debert.onnx", "./models/tokenizer.json") print("Models loaded!") - model.load_sbv2file_from_path("amitaro", "../models/amitaro.sbv2") + model.load_sbv2file_from_path("amitaro", "./models/amitaro.sbv2") print("All setup is done!") style_vector = model.get_style_vector("amitaro", 0, 1.0)