Metadata-Version: 2.3
Name: pymouth
Version: 0.1.1
Summary: Live2D Mouth-sync artifact
Project-URL: Homepage, https://github.com/organics2016/pymouth
Project-URL: Documentation, https://github.com/organics2016/pymouth
Project-URL: Source, https://github.com/organics2016/pymouth
Project-URL: Issues, https://github.com/organics2016/pymouth/issues
Author-email: organics2016 <organics2015@outlook.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: librosa~=0.10.2.post1
Requires-Dist: numpy~=1.26.4
Requires-Dist: pyvts~=0.3.2
Requires-Dist: sounddevice~=0.4.7
Requires-Dist: soundfile~=0.12.1
Description-Content-Type: text/markdown

# pymouth

`pymouth` 是Python 基于音频的Live2D口型同步库. 你可以用音频文件, 甚至是AI模型输出的ndarray, 就能轻松的让你的Live2D形象开口
唱跳RAP ~v~.

## Quick Start

### Installation

```shell
pip install pymouth
```

### Get Started

注意: 在开始前你需要打开 `VTubeStudio` 的 Server API. 端口一般默认是8001.<br>
下面是一个完整的Demo,你可以找一个音频文件替换`some.wav`.<br>

```python
import asyncio
from pymouth import VTSAdapter, DBAnalyser


async def main():
    async with VTSAdapter(DBAnalyser) as a:
        await a.action(audio='some.wav', samplerate=44100, output_channels=1)
        await asyncio.sleep(100000)  # do something


if __name__ == "__main__":
    asyncio.run(main())
```

第一次运行程序时, `VTubeStudio`会弹出插件授权界面, 通过授权后, 插件会在runtime路径下生成`pymouth_vts_token.txt`文件,
之后运行不会重复授权, 除非token文件丢失或在`VTubeStudio`移除授权.

### More Details

### TODO

- 文档补全
- CI
- 基于元音的口型同步API
- Test case

### Special Thanks

Idea源:
[![](https://avatars.githubusercontent.com/u/1933673?s=40)卜卜口](https://github.com/itorr)

https://github.com/itorr/itorr/issues/7