SSMD - Speech Synthesis Markdown
==================================
**SSMD** (Speech Synthesis Markdown) is a lightweight Python library that provides a
human-friendly markdown-like syntax for creating SSML (Speech Synthesis Markup Language)
documents. It's designed to make TTS (Text-to-Speech) content more readable and
maintainable. See ``SPECIFICATION.md`` in the repo for the canonical syntax rules.
.. image:: https://img.shields.io/pypi/v/ssmd
:target: https://pypi.org/project/ssmd/
:alt: PyPI Version
.. image:: https://img.shields.io/pypi/pyversions/ssmd
:alt: Python Versions
.. image:: https://codecov.io/gh/holgern/ssmd/graph/badge.svg?token=iCHXwbjAXG
:target: https://codecov.io/gh/holgern/ssmd
:alt: Code Coverage
Features
--------
โจ **Markdown-like syntax** - More intuitive than raw SSML
๐ฏ **Full SSML support** - All major SSML features covered
๐ **Bidirectional** - Convert SSMDโSSML or strip to plain text
๐ **Parser API** - Extract structured data for custom TTS pipelines
๐ **TTS streaming** - Iterate through sentences for real-time TTS
๐๏ธ **TTS capabilities** - Auto-filter features based on engine support
๐จ **Extensible** - Custom extensions for platform-specific features
๐งช **Type-safe** - Full mypy type checking support
Quick Example
-------------
.. code-block:: python
import ssmd
# Convert SSMD to SSML
ssml = ssmd.to_ssml("Hello *world*!")
# โ Hello world!
# Convert SSML back to SSMD
ssmd_text = ssmd.from_ssml('Hello')
# โ *Hello*
# Strip markup for plain text
plain = ssmd.to_text("Hello *world* @marker!")
# โ Hello world!
# Or use the Parser API for structured data
from ssmd import parse_paragraphs
for paragraph in parse_paragraphs("Hello *world*!"):
for sentence in paragraph.sentences:
for seg in sentence.segments:
print(f"Text: {seg.text}, Emphasis: {seg.emphasis}")
Table of Contents
-----------------
.. toctree::
:maxdepth: 2
:caption: User Guide
installation
quickstart
syntax
capabilities
spans
parser
ssml_conversion
examples
.. toctree::
:maxdepth: 2
:caption: API Reference
api
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`