A fully featured Python wrapper for the VTube Studio API
Project description
VTubeBridge
VTubeBridge is a full-featured Python wrapper for the VTube Studio API. It allows you to seamlessly interact with VTube Studio using asynchronous WebSocket communication and supports nearly all API endpoints.
Features
-
Async WebSocket Communication:
Interact with VTube Studio’s API in real time using asynchronous requests. -
Model, Item, and Background Management:
- Load and unload models
- Manage items (load, unload, move, animate, pin)
- Adjust backgrounds
-
Transformations & Parameter Control:
- Scale, rotate, and move models and items
- Inject and modify Live2D parameters
-
Hotkey & Expression Triggers:
Trigger hotkeys (which control expressions, animations, etc.) via the API. -
Event Subscription:
Subscribe to and handle VTube Studio events (e.g., model load, tracking changes) in real time. -
ArtMesh Control:
Adjust art mesh properties (such as opacity) and trigger animations. -
Advanced API Operations:
- Query API state
- Retrieve statistics and folder information
- Access both default and custom input parameter lists
-
Physics & NDI Control:
- Get and override physics settings for the current model
- Configure NDI streaming settings
-
UDP Server Discovery:
Discover VTube Studio instances on your network via UDP broadcasts. -
Graceful Disconnection:
Cleanly disconnect from the API when your application is done.
CLI Usage
You can also interact with VTube Studio using the provided command-line interface. For example:
python -m vtstudio list-models
python -m vtstudio load-model --id MODEL_ID
python -m vtstudio trigger-hotkey --id HOTKEY_ID
python -m vtstudio trigger-expression --file EXPRESSION_FILE
python -m vtstudio set-param --name ParamName --value 1.0
python -m vtstudio scale-model --posx 0 --posy 0 --rotation 0 --scalex 1.0 --scaley 1.0
python -m vtstudio rotate-scale-item --instance 1001 --rotation 45 --scalex 1.2 --scaley 1.2
python -m vtstudio face-tracking
python -m vtstudio get-expression
python -m vtstudio set-artmesh-opacity --tag ArtMeshTag --opacity 0.5
python -m vtstudio trigger-animation --file animation.motion3.json
Example
To run the example script, use:
python examples/main.py
Installation
Clone the repository and install the necessary dependencies:
pip install websockets colorama
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vtubebridge-0.2.1.tar.gz.
File metadata
- Download URL: vtubebridge-0.2.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcea60096e63947e65629a7aa0df92fc017f6c50456eb3cd2b6e7fd2c19e3793
|
|
| MD5 |
f9d3eb8a54b918deee364c9dc1bd9e80
|
|
| BLAKE2b-256 |
e333ff661ce9c4bb1bca3b7fd6a5b6685563bb59900e4e2c7fb6266a63487be9
|
File details
Details for the file vtubebridge-0.2.1-py3-none-any.whl.
File metadata
- Download URL: vtubebridge-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c17ed0812d39142b89a4aead284c357fd0fe8aa9948dfe20f7985ab71e6fb0af
|
|
| MD5 |
ad422ca0cfa253a3a4726d4d3bc2755f
|
|
| BLAKE2b-256 |
5cff98350d97c82551a80e1f58c63adc2285552ff99bc5fd14b7de7c5b237709
|