Skip to content

Commit

Permalink
Add README and LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
bplevin36 committed Jun 18, 2021
1 parent 556cafa commit a766b22
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[package]
name = "espeak-py"
version = "0.1.0"
version = "0.1.2"
authors = ["Benjamin Levin <[email protected]>"]
edition = "2018"
description = "Python bindings for a very narrow subset of espeak"
repository = "https://github.com/PolyAI-LDN/espeak-py"
license-file = "LICENSE"
categories = ["text-processing", "api-bindings"]

[lib]
name = "espeak_py"
Expand Down
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright © 2021 PolyAI Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# espeak_py

Native espeak bindings for Python.

This package provides performance-optimized bindings to the espeak library.
Currently, this only provides text phonemization functions, not invoking full TTS.

On Linux, espeak is statically linked into the built wheel, but there is a runtime dependency on espeak-ng-data.
This can be satisfied by `sudo apt install espeak-ng-data` (or the equivalent for your distro).

On Mac the data and necessary shared library can be installed with `brew install anarchivist/espeak-ng/espeak-ng --without-pcaudiolib --without-waywardgeek-sonic`

## Building

Requires Rust (and cargo) as well as GNU autotools and python packages [`maturin`](https://github.com/PyO3/maturin) and `twine`

1. Clone (including submodules)
2. Build espeak-ng in-tree with:
```
cd espeak-ng
./configure --without-klatt --without-speechplayer --without-mbrola --without-sonic --without-async
make
cd ..
```
3. Build wheels with `RUSTFLAGS='-L espeak-ng/src/.libs' maturin build --release` (on Linux this requires the [maturin docker container](https://hub.docker.com/r/konstin2/maturin))
4. Install to local python with `pip install target/wheels/<generated_wheel_name>.whl`
5. Publish to PyPi using `twine`
2 changes: 1 addition & 1 deletion espeak-sys
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = ["maturin>=0.10,<0.11"]
build-backend = "maturin"

[project]
name = "espeak_py"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Rust"
]
license = { file = "LICENSE" }

0 comments on commit a766b22

Please sign in to comment.