speechmarkdown / speechmarkdown-ex

SpeechMarkdown transpiler for Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpeechMarkdown

Speech Markdown transpiler for Elixir.

This library converts text in the Speech Markdown format to SSML for processing by Text-To-Speech APIs, etc.

Status

Hex Test Coverage

The API reference is available here.

Installation

def deps do
  [
    {:speechmarkdown, "~> 0.2"}
  ]
end

Usage

As of version 0.2, the entire Speech Markdown specification is supported and unified over the multiple implementations (JS, Elixir) under a single collection of reference test cases.

iex> SpeechMarkdown.to_ssml!("You say pecan, I say (pecan)[/pɪˈkɑːn/].")

"<speak>You say pecan, I say <phoneme alphabet=\"ipa\" ph=\"pɪˈkɑːn\">pecan</phoneme>.</speak>"

The library supports the :general, :alexa and :google variants of SSML. Some Speech Markdown tags are only available on those platforms, e.g. [whisper]:

iex> SpeechMarkdown.to_ssml!("#[whisper] I can see dead people", variant: :alexa)
"<speak><amazon:effect name=\"whispered\">I can see dead people</amazon:effect></speak>"

The following Speech Markdown modifiers are supported:

Extensions to speech markdown

The following additional Speech Markdown syntax is supported:

License

Copyright 2020 Spokestack, Inc. Copyright 2020 Bwisc B.V. (Botsquad). Copyright 2021 Voiceworks B.V.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

SpeechMarkdown transpiler for Elixir

License:Apache License 2.0


Languages

Language:Elixir 100.0%