Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ env/
misaki/

# Data
*.npy
*.npy

# General
.DS_Store
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
13 changes: 13 additions & 0 deletions examples/as_fallback.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
pip install misaki[en] phonoglyphe
"""
from misaki import en
from phonoglyphe import G2PModel

fallback = G2PModel(device="cpu") # Note: with its small size, PhonoGlyphe is often faster on CPU
g2p = en.G2P(trf=False, british=False, fallback=fallback)

text = "Misaki is a G2P engine designed for Kokoro models."
phonemes, tokens = g2p(text)

print(f"Phonemes: {phonemes}")
9 changes: 9 additions & 0 deletions examples/usage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
pip install phonoglyphe
"""

import phonoglyphe

phonemizer = phonoglyphe.G2PModel()
phonemes = phonemizer.predict("Hello world")
print(phonemes)
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[project]
name = "phonoglyphe"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "thewh1teagle", email = "61390950+thewh1teagle@users.noreply.github.com" }
]
requires-python = ">=3.11"
dependencies = [
"torch>=2.6.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["phonoglyphe"]

[dependency-groups]
dev = [
"matplotlib>=3.10.0",
"numpy>=2.2.2",
"pandas>=2.2.3",
"seaborn>=0.13.2",
]
Loading