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`