Skip to main content

Style-Bert-VITSの推論ライブラリ

Project description

SBV2-API

[!CAUTION] 本バージョンはアルファ版です。

安定版を利用したい場合はこちらをご覧ください。

[!CAUTION] オプションの辞書はLGPLです。

オプションの辞書を使用する場合、バイナリの内部の辞書部分について、LGPLが適用されます。

[!NOTE] このレポジトリはメンテナンスの都合上、tuna2134氏の所属するNeodylandへとリポジトリ所在地を移動しました。

引き続きtuna2134氏がメインメンテナとして管理しています。

プログラミングに詳しくない方向け

こちらを参照してください。

コマンドやpythonの知識なしで簡単に使えるバージョンです。(できることはほぼ同じ)

このプロジェクトについて

このプロジェクトは Style-Bert-ViTS2 を ONNX 化したものを Rust で実行するのを目的としたライブラリです。

JP-Extra しか対応していません。(基本的に対応する予定もありません)

変換方法

こちらを参照してください。

Todo

  • REST API の実装
  • Rust ライブラリの実装
  • .sbv2フォーマットの開発
  • PyO3 を利用し、 Python から使えるようにする
  • 組み込み向けにCライブラリの作成
  • GPU 対応(CUDA)
  • GPU 対応(DirectML)
  • GPU 対応(CoreML)
  • WASM 変換
  • arm64のdockerサポート
  • aivis形式のサポート
  • MeCabを利用する

構造説明

  • crates/sbv2_api - 推論用 REST API
  • crates/sbv2_core - 推論コア部分
  • scripts/docker - docker ビルドスクリプト
  • scripts/convert - onnx, sbv2フォーマットへの変換スクリプト

プログラミングある程度できる人向けREST API起動方法

models をインストール

https://huggingface.co/neody/sbv2-api-assets/tree/main/deberta からtokenizer.json,debert.onnx https://huggingface.co/neody/sbv2-api-assets/tree/main/model からtsukuyomi.sbv2 を models フォルダに配置

.env ファイルの作成

cp .env.sample .env

起動

CPUの場合は

docker run -it --rm -p 3000:3000 --name sbv2 \
-v ./models:/work/models --env-file .env \
ghcr.io/neodyland/sbv2-api:cpu
Apple Silicon搭載のMac(M1以降)の場合 docker上で動作させる場合、.envのADDRをlocalhostから0.0.0.0に変更してください。
ADDR=0.0.0.0:3000

CPUの場合は

docker run --platform linux/amd64 -it --rm -p 3000:3000 --name sbv2 \
-v ./models:/work/models --env-file .env \
ghcr.io/neodyland/sbv2-api:cpu

CUDAの場合は

docker run -it --rm -p 3000:3000 --name sbv2 \
-v ./models:/work/models --env-file .env \
--gpus all \
ghcr.io/neodyland/sbv2-api:cuda

起動確認

curl -XPOST -H "Content-type: application/json" -d '{"text": "こんにちは","ident": "tsukuyomi"}' 'http://localhost:3000/synthesize' --output "output.wav"
curl http://localhost:3000/models

開発者向けガイド

Feature flags

sbv2_apisbv2_core共に

  • cuda featureでcuda
  • cuda_tf32 featureでcudaのtf32機能
  • tensorrt featureでbert部分のtensorrt利用
  • dynamic featureで手元のonnxruntime共有ライブラリを利用(ORT_DYLIB_PATH=./libonnxruntime.dllなどで指定)
  • directml featureでdirectmlの利用ができます。
  • coreml featureでcoremlの利用ができます。

環境変数

以下の環境変数はライブラリ側では適用されません。

ライブラリAPIについてはhttps://docs.rs/sbv2_coreを参照してください。

  • ADDR localhost:3000などのようにサーバー起動アドレスをコントロールできます。
  • MODELS_PATH sbv2モデルの存在するフォルダを指定できます。
  • RUST_LOG おなじみlog levelです。
  • HOLDER_MAX_LOADED_MODElS RAMにロードされるモデルの最大数を指定します。

謝辞

  • litagin02/Style-Bert-VITS2 - このコードを書くにあたり、ベースとなる部分を参考にさせていただきました。
  • Googlefan - 彼にモデルを ONNX ヘ変換および効率化をする方法を教わりました。
  • Aivis Project - 辞書部分

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sbv2_bindings-0.2.0a6.tar.gz (47.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sbv2_bindings-0.2.0a6-cp313-cp313-win_amd64.whl (73.7 MB view details)

Uploaded CPython 3.13Windows x86-64

sbv2_bindings-0.2.0a6-cp313-cp313-manylinux_2_38_x86_64.whl (75.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64

sbv2_bindings-0.2.0a6-cp313-cp313-manylinux_2_38_aarch64.whl (74.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ ARM64

sbv2_bindings-0.2.0a6-cp313-cp313-macosx_11_0_arm64.whl (75.6 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

sbv2_bindings-0.2.0a6-cp312-cp312-win_amd64.whl (73.7 MB view details)

Uploaded CPython 3.12Windows x86-64

sbv2_bindings-0.2.0a6-cp312-cp312-manylinux_2_38_x86_64.whl (75.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

sbv2_bindings-0.2.0a6-cp312-cp312-manylinux_2_38_aarch64.whl (74.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ ARM64

sbv2_bindings-0.2.0a6-cp312-cp312-macosx_11_0_arm64.whl (75.6 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

sbv2_bindings-0.2.0a6-cp311-cp311-win_amd64.whl (73.7 MB view details)

Uploaded CPython 3.11Windows x86-64

sbv2_bindings-0.2.0a6-cp311-cp311-manylinux_2_38_x86_64.whl (75.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64

sbv2_bindings-0.2.0a6-cp311-cp311-manylinux_2_38_aarch64.whl (74.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ ARM64

sbv2_bindings-0.2.0a6-cp311-cp311-macosx_11_0_arm64.whl (75.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

sbv2_bindings-0.2.0a6-cp310-cp310-win_amd64.whl (73.7 MB view details)

Uploaded CPython 3.10Windows x86-64

sbv2_bindings-0.2.0a6-cp310-cp310-manylinux_2_38_x86_64.whl (75.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

sbv2_bindings-0.2.0a6-cp310-cp310-manylinux_2_38_aarch64.whl (74.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ ARM64

sbv2_bindings-0.2.0a6-cp39-cp39-win_amd64.whl (73.7 MB view details)

Uploaded CPython 3.9Windows x86-64

sbv2_bindings-0.2.0a6-cp39-cp39-manylinux_2_38_x86_64.whl (75.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.38+ x86-64

sbv2_bindings-0.2.0a6-cp39-cp39-manylinux_2_38_aarch64.whl (74.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.38+ ARM64

sbv2_bindings-0.2.0a6-cp38-cp38-win_amd64.whl (73.7 MB view details)

Uploaded CPython 3.8Windows x86-64

sbv2_bindings-0.2.0a6-cp38-cp38-manylinux_2_38_x86_64.whl (75.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.38+ x86-64

sbv2_bindings-0.2.0a6-cp38-cp38-manylinux_2_38_aarch64.whl (74.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.38+ ARM64

File details

Details for the file sbv2_bindings-0.2.0a6.tar.gz.

File metadata

  • Download URL: sbv2_bindings-0.2.0a6.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for sbv2_bindings-0.2.0a6.tar.gz
Algorithm Hash digest
SHA256 9e7e67a474a752c12a3ecd4136befd7454e91ed737a2c201b60e608e6e1c3c23
MD5 31991a98dd4e37c05756e4f798726037
BLAKE2b-256 37ca7fc35c887cdf7d27ba8384186c30c01973270b3326083577d84648ad7e6a

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8a6ec27718d077234c6fbf88e642d2e7de79cc124ee46a5d91fff9f2394851e5
MD5 ef06597801331c37b8ba5e5ef6b5d6d2
BLAKE2b-256 c1a5cef043df586f63592e2df7fb98eff6993b5fa3c4cc4b7ba343c7fe89e262

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp313-cp313-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 d394c62ee507585e94e1560fcc3b4e1a50af555b2c441177a5870fea28cd6085
MD5 d3c2fd6941f8b8ed6043fab6e12c2e91
BLAKE2b-256 40a64d858375909608ff4a086c032014b6bbc56b2095c80cf1afbfa2f1e1318a

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp313-cp313-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp313-cp313-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 8831a3e6dd143bda52c91b19a34d53b03065f558bb47662162c62f84ded8504e
MD5 7ca247e5ad2d1bb004f431a2aae8556d
BLAKE2b-256 d52cf4d2f0042c842da1f0c4a385885df536e68062d2c50891a9d2ffc6143119

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fcec4b1375253eb5a1186f2fce996b71635a041d21ba94a4d3ac092276a3445e
MD5 49dd562fa2c882cb2faa46534727fd3c
BLAKE2b-256 a4bf4c016ccfbe49a3f016a39eeb8a47c97983240bca90edfe0cd1afa8bc1b89

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b2eb333a8c2e117397df18e08d78dcc1ec09f826ba35ad02ad321ad882b90725
MD5 64f1c813aaf82514d7015b7f5e47abe4
BLAKE2b-256 48a3e4519460ce0cef57e7049fbf526bda9cc5030ad6ebfcf878c6da354ca1d6

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 a899664e198cb20b8820850b0f61fe265f2c767931da79297bbef4f8e0c7acc2
MD5 22a6b4c502ea9d9c936e922b43e4a4d4
BLAKE2b-256 38a3812c9cb9ebcb149cd19f860e8cce33c1bf3185d612016ebeb5972a222d7a

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp312-cp312-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp312-cp312-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 cb0121cd34794b2b14ebedafdb502d80d55a797e6f0bad9c0e2050c16f8ecba7
MD5 4e17ec13a558f9413d071e824f53efb0
BLAKE2b-256 b530ed74396a588303746826b75db466e7022a1d840a809bda1d2e11f31f3c1b

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99b0668d4f0c261465374d57072ae0c3e70a693fbe6300ca106c3f98af55f8ce
MD5 c5717aee1e7fdf768fe281ad1d5828de
BLAKE2b-256 54f8ce09ed3dc7d2fbcd2bd0062f075da6e8905b08af7db4cbb131fc7ebb1f1c

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9ac600c10d4dc2e15e883dfea4b839e363bd8abfa00f8ded6da4efffe2974e5f
MD5 b3139dc8e3102b576194805d4237eac6
BLAKE2b-256 7a18fd0492ea65de1cdccc4897f154ac89581d33037f6396265a3072818aefc1

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp311-cp311-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 10d31c236d9322e7d0a3085082a5283e86ab9a5aef0bd80109e804934904eb7e
MD5 239c6ea4265023ee1e75fd55a7899b4b
BLAKE2b-256 c6f8252b7be4d06231517b556bc9dcdf10fe70e11d91d404f958cc48392c4b23

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp311-cp311-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp311-cp311-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 d2efe2fc7e53073f8b0349b489486da5a617c65fe30b0dc6f2285c81d44f1cba
MD5 53ab557f31c2071d9c0508a6c633ea45
BLAKE2b-256 273f130662c046d8222c668d7b50fcc304a7f6b92af4561f576b9d0fe9c5f1d4

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 574a0d6bc20879fae6ec990e4a3d03893801b5d4697d6f6d828db3d9dfaf41f7
MD5 6d0f6cecac1f9e03132e1a0eb2c72809
BLAKE2b-256 5a617928fad9028c3271087e17232dab70266cc626e61cfd196ced82b9987049

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f50f633acd957c09a9ccc43722d56402bbc280eb4993d7822c671bb31392f404
MD5 c44402ba42311e6990fa84d42387756f
BLAKE2b-256 8cf9c6d1999fd21f779d4d47a68d8a49306ee204d44e5f0a0f68a3736e5dee42

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp310-cp310-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 99be78200081af3a6a22b79238b823e3202fea2eae0e70b33229ee68727c229e
MD5 6f35fdb7bf6fde7741a1ea20b69a80d6
BLAKE2b-256 6d5481c8e46f4810a96b7ab60993f091c1c77300ce94d60b98595b89a4302ac4

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp310-cp310-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp310-cp310-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 9ab47f4020145e9d9cf513242fa0167a1f7c571f07dfdd3936a0e6d176fcf372
MD5 9883cb7f54dae58ce6f5490467512ff1
BLAKE2b-256 b0f589f6b6c9710ba787d4c119134c334e9eb72522b7d74c6b1b85eeeea9966c

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 abe932c2ac4c7528adc9a5da87cabadf89166b957e8616f6f27f12352e4d8eec
MD5 dca714b13fce2cc5a2af9abc25c52eed
BLAKE2b-256 4d3306a8493182e64bbe76c1bf814bbcfcb07f723e61f777a90a90f6f375cb56

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp39-cp39-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp39-cp39-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 af53e04898a96ae512d0e24861b4c6fd6c98089e853a53958e2fb28ad21468a6
MD5 379d93ca2445b304fd622072e1786ef7
BLAKE2b-256 a6a45003eea0f56ed6c1c96c731facfc994352ceaf8f1d14a9941b7a6da5f22a

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp39-cp39-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp39-cp39-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 1ff60a0e241f76eb395c5980fb66d24c0e650fc680d7201e822063e47a736925
MD5 03329232ea960c581cfca333a5dc21d4
BLAKE2b-256 c5af62aa3ee454b3a2aca530f5183f8ca43c27b75f4dbeacc699ea9b7e2b9b17

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8e1a0781607c692b1c7c414d2724440a6362f349988721ac871734148fa60e5e
MD5 8ccbfa282ef3f6eaea69cf91a5f870aa
BLAKE2b-256 e08f9286ff2ad03a31a75ee74dc5a7dc2f278e7b6ea75d08805f0e5b03a8db48

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp38-cp38-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp38-cp38-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 f9ef6de4e2b3893667e9f297e232ca57792a32cc519734414880651160f999c0
MD5 e7f2d98683d320ad9ff1811a1eef2e0f
BLAKE2b-256 1ddece6921248db21617b94f9ce0fd51e0dfc71a5557d771c2365b0497cc8144

See more details on using hashes here.

File details

Details for the file sbv2_bindings-0.2.0a6-cp38-cp38-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for sbv2_bindings-0.2.0a6-cp38-cp38-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 4e5f88d8ec24d3efdfd615895c9c24b8fc4b902ce3f49f99578c16934b4120f1
MD5 18822dd51e83b68bb440990ced729bfd
BLAKE2b-256 69c660f6cbb191abc08820335a5c810976350c3edf8f7afae0fc9b89471742ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page