Skip to main content

HayaKoe — Fast ONNX-optimized Japanese TTS based on Style-Bert-VITS2

Project description

HayaKoe

Style-Bert-VITS2를 기반으로 한 고속 일본어 TTS 라이브러리.

Based on Style-Bert-VITS2 by litagin02 (AGPL-3.0)

특징

  • ONNX 최적화 — CPU 실시간 추론 (PyTorch 대비 1.6x 속도 향상, 81% RAM 절감)
  • torch 불필요 — CPU 추론 시 PyTorch 없이 동작 (경량 설치)
  • 3줄 추론 — 모델 자동 다운로드, 설정 불필요
  • JP-Extra 모델 — Style-Bert-VITS2 JP-Extra (v2.7.0), DeBERTa JP
  • 영어→카타카나 자동 변환 — 22만 엔트리 외래어 사전 룩업 (의존성 없음)

설치

# CPU (기본, torch 불필요)
pip install hayakoe

# GPU (PyTorch CUDA 별도 설치 필요)
pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install hayakoe[gpu]

모델은 HuggingFace에서 자동 다운로드됩니다.

사용법

from hayakoe import TTS

speaker = TTS().load("jvnv-F1-jp")
speaker.generate("こんにちは").save("output.wav")

GPU 추론:

speaker = TTS(device="cuda").load("jvnv-F1-jp")
speaker.generate("こんにちは").save("output.wav")

파라미터 조절:

audio = speaker.generate(
    "今日はどんな国に辿り着くのでしょうか。楽しみですね。",
    style="Neutral",
    speed=0.9,
    sdp_ratio=0.2,
    noise=0.6,
    noise_w=0.8,
    pitch_scale=1.0,
    intonation_scale=1.0,
    style_weight=1.0,
)

사용 가능한 화자

이름 설명
jvnv-F1-jp 여성 화자 1
jvnv-F2-jp 여성 화자 2
jvnv-M1-jp 남성 화자 1
jvnv-M2-jp 남성 화자 2

각 화자는 7개 스타일을 지원합니다: Neutral, Happy, Sad, Angry, Fear, Surprise, Disgust

Docker / 서버 환경

# 빌드 시점 — 이미지에 모델 포함 (GPU 불필요)
RUN python -c "from hayakoe import TTS; TTS.prepare()"

# 실행 시점 — 다운로드 없이 바로 서빙
CMD ["python", "server.py"]
메서드 다운로드 메모리 로드 GPU 필요 용도
TTS.prepare() O X X Docker 빌드, CI
TTS(device=...) O (없으면) O 선택 추론

유저 사전

pyopenjtalk가 모르는 고유명사의 발음을 등록할 수 있습니다.

# 읽기만 등록 (악센트는 평판)
tts.add_word(surface="担々麺", reading="タンタンメン")

# 악센트 위치도 지정 (3번째 모라에서 피치 하강)
tts.add_word(surface="担々麺", reading="タンタンメン", accent=3)

아키텍처

TTS (엔진)
├── BERT DeBERTa Q8 (ONNX)  ← 자동 다운로드
│
├── speakers["jvnv-F1-jp"]  → Synthesizer ONNX + style vectors
├── speakers["jvnv-F2-jp"]  → ...
└── ...
  • CPU: ONNX Runtime (BERT Q8 + Synthesizer FP32)
  • GPU: PyTorch FP32 (BERT + Synthesizer)

라이선스

  • 코드: AGPL-3.0 (원본 Style-Bert-VITS2)
  • JVNV 음성 모델: CC BY-SA 4.0 (JVNV Corpus)
  • 사전학습 모델 (DeBERTa): MIT
  • 영어→카타카나 사전 데이터: GPL-3.0 (loanwords_gairaigo)

Credits

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

hayakoe-0.0.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

hayakoe-0.0.1-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file hayakoe-0.0.1.tar.gz.

File metadata

  • Download URL: hayakoe-0.0.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hayakoe-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6970789b982af99418534dba3e1e47cc4ceeedc37696f4ce09fde85077140e6d
MD5 6a928c768153564f2ebcf65a76ffd13f
BLAKE2b-256 ac513bbcc3ef52d0cb4e81db56901a47c6c7e62ee10ac375f52bf5044cecb71e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hayakoe-0.0.1.tar.gz:

Publisher: publish.yml on LemonDouble/hayakoe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hayakoe-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: hayakoe-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hayakoe-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 262e2a4e89377f1c64d9dfcb70a2d7e8186e769701bfdcd5c1906ed2a8875ac5
MD5 e4aa7562b753a7441087f969c9480df0
BLAKE2b-256 a38dc68f53b52f2c04f3c9745e66971d661b52f912039ccca754aaf1cccf93c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for hayakoe-0.0.1-py3-none-any.whl:

Publisher: publish.yml on LemonDouble/hayakoe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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