Transcribe Esperanto text into phonetic Polish for use in professional TTS engines.
Project description
vocx
vocx transcribes Esperanto text into phonetic Polish for use in professional
text-to-speech (TTS) engines.
Background
Commercial TTS engines tend not to support minority languages, particularly constructed languages such as Esperanto. It turns out Esperanto shares lots of sounds with Polish. By transcribing Esperanto to Polish, we can make commercial TTS engines give us a good approximation for spoken Esperanto.
This is a Python port of the original Go library.
Installation
pip install vocx
Usage
Library
from vocx import Transcriber
t = Transcriber()
t.transcribe("Ĉu vi ŝatas Esperanton? Esperanto estas facila lingvo.")
# "czu wij szatas esperanton? esperanto estas fatssila lijngwo."
Custom rules
To override the default rules used during transcription, call load_rules,
passing a custom JSON rules document. See
src/vocx/default_rules.py for the correct
structure.
from vocx import Transcriber
t = Transcriber()
t.load_rules(my_rules_json)
A rules document has four sections:
letters— single-character substitutions (applied lowercased).fragments— ordered regular-expression replacements applied to each word.overrides— whole-word replacements (surrounding punctuation is preserved).numbers— the words used when transcribing numeric tokens.
Command line
# Transcribe arguments
vocx "Saluton, kiel vi fartas?"
# saluton, kijel wij fartas?
# Transcribe stdin
echo "Saluton" | vocx
# Use a custom rules file
vocx --rules my_rules.json "Saluton"
Development
uv sync
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vocx-0.1.0.tar.gz.
File metadata
- Download URL: vocx-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ca3f6aa84833e6c2586daa9328479b804527cd323c17b09c7e5f4ed70219e67
|
|
| MD5 |
107dca88cf08cf2e08d50636af11b40f
|
|
| BLAKE2b-256 |
a41d6abf520795fa303ec16ad47fe7950e5e63afb24d8bf27ecd60ceb45491af
|
Provenance
The following attestation bundles were made for vocx-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on eugenzor/vocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vocx-0.1.0.tar.gz -
Subject digest:
2ca3f6aa84833e6c2586daa9328479b804527cd323c17b09c7e5f4ed70219e67 - Sigstore transparency entry: 1757845825
- Sigstore integration time:
-
Permalink:
eugenzor/vocx@c2a175d2fa3ac06faf14e58680ad817e030802f7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/eugenzor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@c2a175d2fa3ac06faf14e58680ad817e030802f7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file vocx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vocx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de0fb0f394f9e588349592b6c3d7cb4d14266cbeaf42a4fd2ab8bed5a5799c6a
|
|
| MD5 |
eb77995c70f5e2223a38aae040b9f483
|
|
| BLAKE2b-256 |
dfd4212f77d3ebf727bade00bf829b6d89cb46bd3bf79bdcf6b4abe5f3743dbc
|
Provenance
The following attestation bundles were made for vocx-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on eugenzor/vocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vocx-0.1.0-py3-none-any.whl -
Subject digest:
de0fb0f394f9e588349592b6c3d7cb4d14266cbeaf42a4fd2ab8bed5a5799c6a - Sigstore transparency entry: 1757845951
- Sigstore integration time:
-
Permalink:
eugenzor/vocx@c2a175d2fa3ac06faf14e58680ad817e030802f7 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/eugenzor
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@c2a175d2fa3ac06faf14e58680ad817e030802f7 -
Trigger Event:
release
-
Statement type: