Generate audio from text documents
Project description
jmes-tts
Generate audio books from text documents
Installation
pip install jmes-tts
Development
This project requires Python 3.12 and uses uv to manage dependencies.
You can create a virtual environment with all the necessary dependencies by running:
uv sync --all-extras --dev
This will install all necessary dependencies and install this project in editable mode.
You can activate the venv with:
. .venv/bin/activate
Testing
Poe the Poet is the task runner
used for this project, it's automatically installed as part of the
dev dependencies. To see a list of available tasks, run the
poe command with no args.
To run the tests for this project run:
poe test
Before submitting a PR, ensure the prcheck task runs successfully:
poe prcheck
Usage
The jmes-tts command is the main interface for converting text to speech.
It offers several options to customize the conversion process.
Basic Usage
jmes-tts --text "Hello, world!" --output hello.mp3
This will convert the text "Hello, world!" to speech and save it as "hello.mp3".
Command Options
--filename: Input file to convert to speech--text: Text to convert to speech--bucket: S3 bucket for long-form text (optional)--output: Output audio file (default: output.mp3)--language: Language of phrase (default: english)--language-code: Language code override (optional)--voice: Voice to use for text-to-speech (optional)--engine: TTS engine (optional)--list-languages: List language presets and Polly language codes
Supported --language values:
english(default)frenchspanishcantonesemandarin
Run jmes-tts --list-languages to see all presets and the full list of
supported language codes.
Converting a File
For longer texts, you can specify an S3 bucket and the path to a local file:
jmes-tts --filename long_text.txt --bucket my-s3-bucket --output long_audio.mp3
Notes
- You must provide either
--filenameor--text, but not both. - If your text is larger than 3000 (billable) characters, you need to provide
the
--bucketargument. Otherwise synchronous TTS will be used. - If no output file is specified, the audio will be saved as
output.mp3in the current directory.
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 jmes_tts-0.0.2.tar.gz.
File metadata
- Download URL: jmes_tts-0.0.2.tar.gz
- Upload date:
- Size: 54.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7049c4e93ad4898f70f28e59bf00202a05e042b355448c11e4959284f6840cf9
|
|
| MD5 |
6b2404587944feba751dcc0632def909
|
|
| BLAKE2b-256 |
80816ef0b07bbd2f55dbe6785ed9e51523f54947e4271335f910a9629289c86b
|
Provenance
The following attestation bundles were made for jmes_tts-0.0.2.tar.gz:
Publisher:
publish.yml on jamesls/jmes-tts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jmes_tts-0.0.2.tar.gz -
Subject digest:
7049c4e93ad4898f70f28e59bf00202a05e042b355448c11e4959284f6840cf9 - Sigstore transparency entry: 843216506
- Sigstore integration time:
-
Permalink:
jamesls/jmes-tts@f1a0af76d28e81c8dd517e92b967301874191de7 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/jamesls
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f1a0af76d28e81c8dd517e92b967301874191de7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jmes_tts-0.0.2-py3-none-any.whl.
File metadata
- Download URL: jmes_tts-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20e0da750d8d04ca81bd1eca6e4dcba1694f020daf384f523d94e609a39fd3e5
|
|
| MD5 |
3b814fa421ef192f0faadec36ff380b1
|
|
| BLAKE2b-256 |
9225bdf90d4ccfebbf831eae1c9bd72ed18324df9802ed5f9715dcea087cb423
|
Provenance
The following attestation bundles were made for jmes_tts-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on jamesls/jmes-tts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jmes_tts-0.0.2-py3-none-any.whl -
Subject digest:
20e0da750d8d04ca81bd1eca6e4dcba1694f020daf384f523d94e609a39fd3e5 - Sigstore transparency entry: 843216517
- Sigstore integration time:
-
Permalink:
jamesls/jmes-tts@f1a0af76d28e81c8dd517e92b967301874191de7 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/jamesls
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f1a0af76d28e81c8dd517e92b967301874191de7 -
Trigger Event:
push
-
Statement type: