Skip to main content

Live2D Mouth-sync artifact

Project description

pymouth

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

Quick Start

Installation

pip install pymouth

Get Started

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

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://github.com/itorr/itorr/issues/7

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

pymouth-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

pymouth-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pymouth-0.1.1.tar.gz.

File metadata

  • Download URL: pymouth-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for pymouth-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9bfda5448e1041451f53fd7779fc8bc7b02d0142437b57b968274ff7af5236dd
MD5 48d58136fcec3f3015854ea2d465370f
BLAKE2b-256 7313c7e0249a8dd1d11c5f867bb838692cb65380829fa513dfaf5a8efc5c3c6a

See more details on using hashes here.

File details

Details for the file pymouth-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pymouth-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for pymouth-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c538462c31dbffdf528770a0316cf54ab33bd5038aa1b03cc91e7210d58ad73b
MD5 67a5d46168e9c852da74d82964984a37
BLAKE2b-256 89a3922beddbc865d0501cb222a1a517491a523fa39cc22d0f93ab0e7ca9084f

See more details on using hashes here.

Supported by

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