GithubHelp home page GithubHelp logo

machisuji / ssmd Goto Github PK

View Code? Open in Web Editor NEW
20.0 5.0 0.0 53 KB

Speech Synthesis Markdown (SSMD) is a lightweight alternative syntax for SSML.

License: MIT License

Ruby 99.49% Shell 0.51%
ssml

ssmd's Introduction

SSMD

Build Status

Speech Synthesis Markdown (SSMD) is a lightweight alternative syntax for SSML. This repository contains both the reference implementation of the SSMD-to-SSML conversion tool (ssmd) as well as the specification of the language.

Requirements

The tools and executable specification provided in this repository require Ruby 2.3.4 or better.

Installation

Add this line to your application's Gemfile:

gem 'ssmd'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ssmd

Usage

You can convert SSML to SSMD using SSMD::to_ssml:

require 'ssmd'

ssmd = "hello *SSMD*!"
ssml = SSMD.to_ssml ssmd

puts ssml
# Output: <speak>hello <emphasis>SSMD</emphasis>!</speak>

Sometimes you will want to see just the plain text without any SSMD annotations. For this you can use SSMD::stip_ssmd:

require 'ssmd'

ssmd = "[hallo](de) *SSMD*!"
plain_text = SSMD.strip_ssmd ssmd

puts plain_text
# Output: hallo SSMD!

Note:

This version is still under development. See below which essential SSML constructs are implemented so far:

  • Text
  • Emphasis
  • Break
  • Language
  • Mark
  • Paragraph
  • Phoneme
  • Prosody
  • Say-as
  • Substitution
  • Extensions

Development

After checking out the repo, run bin/setup to install dependencies. You can run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Tests

Run rake spec to run the tests against a given executable.

This implementation and any other can be tested against the SSMD specification. Said specification is extracted from SPECIFICATION.md. It runs each SSMD snippet through the tested tool and compares it to the output of the following SSML snippet. If they match the test passes.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/machisuji/ssmd. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Related projects

SSMD (JS)

Follows the SSMD specification.

Source: https://github.com/fabien88/ssmd

Speech Markdown

Speech Markdown has their own specification which is different than SSMD.

Website: https://www.speechmarkdown.org/ Source: https://github.com/speechmarkdown/

ssmd's People

Contributors

machisuji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ssmd's Issues

Formalize spec for SSMD

As I embrace Markdown (CommonMark) for my documentation needs I am really keen on SSMD for speech requirements.

Learning from Markdown's past I think we should invest in creation of a spec for SSMD that's built off of CommonMark to avoid future issues.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.