SSML Maker
A Python library for building SSML (Speech Synthesis Markup Language) documents with a fluent interface.
Installation
pip install ssml-maker
Features
- Fluent interface for building SSML documents
- Support for all major SSML elements
- Type hints and proper documentation
- Comprehensive test coverage
- Input validation and error handling
Quick Start
from ssml_maker import Speech, InterpretAs, ProsodyConfig, ProsodyRate
# Create a simple SSML document
with Speech() as speech:
speech.add_text("Here are ")
with speech.say_as(InterpretAs.CHARACTERS):
speech.add_text("SSML")
speech.add_text(" examples")
# Get the SSML string
ssml_string = speech.build()
print(ssml_string)
Advanced Usage
Prosody Control
from ssml_maker import ProsodyConfig, ProsodyRate, ProsodyPitch, VolumeLevel
config = ProsodyConfig(
rate=ProsodyRate.FAST,
pitch=ProsodyPitch.HIGH,
volume=VolumeLevel.LOUD
)
with Speech() as speech:
with speech.prosody(config):
speech.add_text("This will be spoken quickly, with high pitch and loud volume")
Voice Selection
with Speech() as speech:
with speech.voice(name="Joanna", language="en-US", gender="female"):
speech.add_text("This text will be spoken by Joanna")
Phonetic Pronunciation
from ssml_maker import PhoneticAlphabet
with Speech() as speech:
with speech.phoneme(PhoneticAlphabet.IPA, "pɪˈkɑːn"):
speech.add_text("pecan")
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for ssml-maker 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ssml_maker-0.1.1.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ssml_maker-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / ssml_maker-0.1.1.tar.gz
| Download URL | ssml_maker-0.1.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f72669a31e88c1e46f2676aa56b4d03898e962c4898f058c9339a49852df63a
|
|
BLAKE2b-256 checksum How to use checksums |
49b0b0b4cbccfa59c1d22386c19093258d571df19b6245c0653f64c6f77358a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / ssml_maker-0.1.1-py3-none-any.whl
| Download URL | ssml_maker-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
155787730b359960f8769fb746fe6aba3c21e41187043f5a96c956d5d215feaa
|
|
BLAKE2b-256 checksum How to use checksums |
897b6fb023a89194626ab5ba770cc0126f6ea2c92827a053e7ebcee2eac31f81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|