Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
piper-phonemize
Try it Online
You can try piper-phonemize directly in your browser using WebAssembly:
- Hugging Face Spaces: https://huggingface.co/spaces/csukuangfj/piper-phonemize
- ModelScope Studios (for users in China, 中文用户): https://modelscope.cn/studios/csukuangfj/piper-phonemize/summary
Introduction
Phonemization library for Piper text-to-speech system.
Converts text to IPA phonemes using espeak-ng.
Supports Python, Go, Rust, Swift, Pascal, JavaScript (Node.js/WASM), C/C++, Tauri, Android, and iOS.
Installation
Python
Go
Rust
Add to your Cargo.toml:
[]
= "1.4.8"
The crate automatically downloads prebuilt libraries and embeds espeak-ng-data. No manual setup required.
Swift
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/csukuangfj/piper-phonemize", branch: "master")
]
JavaScript / Node.js
WASM version (works everywhere, no native dependencies):
Native addon (better performance, requires platform-specific binary, which is installed automagically):
C / C++
Download pre-built libraries from GitHub Releases or build from source.
Quick Start
Python
# Initialize espeak-ng
# Phonemize text
=
Go
package main
import (
"fmt"
pp "github.com/csukuangfj/piper-phonemize-go/piper_phonemize"
)
func main()
Rust
use phonemize_to_string;
JavaScript / Node.js
WASM version:
const piperPhonemize = require;
// espeak-ng-data is bundled — no initialization needed!
const result = piperPhonemize.;
console.log; // ['həlˈoʊ wˈɜːld']
Native addon:
const piperPhonemize = require;
// espeak-ng-data is bundled — no initialization needed!
const result = piperPhonemize.;
console.log; // ['həlˈoʊ wˈɜːld']
C
int
Tauri Example (Cross-Platform GUI)
A cross-platform desktop/mobile app built with Tauri v2. See tauri-examples/ for details.
Pre-built apps are available on the GitHub Releases page:
| Platform | File |
|---|---|
| macOS (Apple Silicon) | piper-phonemize-tauri-macos-arm64.app.zip |
| macOS (Intel) | piper-phonemize-tauri-macos-x64.app.zip |
| Linux (x64) | piper-phonemize-tauri-linux-x64.tar.bz2 |
| Linux (arm64) | piper-phonemize-tauri-linux-arm64.tar.bz2 |
| Windows (x64) | piper-phonemize-tauri-windows-x64.zip |
| Android (APK) | app-universal-release-unsigned.apk |
Building from Source
Using CMake
Using Docker
License
GPL-3.0-or-later (due to espeak-ng dependency)