Git Product home page Git Product logo

scala-ssml's Introduction

scala-ssml

Scala CI

This library allows you to easily generate Speech Synthesis Markup Language (SSML) with Scala.

SSML is documented here, but it has applications for:

  • Alexa Skills (which only supports a subset of the official ssml tags, documented here)
  • Chrome Browser speechSynthesis fragments, documented here

Dependency

This dependency can be imported into any scala project using:

lazy val scalaSsml = RootProject(uri("git://github.com/infomofo/scala-ssml.git#v0.4.0"))

The library is currently compiled for scala versions 2.11.12, 2.12.11, and 2.13.2.

Basic Usage

You can generate ssml for any of the use cases outlined above.

This library makes use of method chaining for convenience.

import com.infomofo.scalassml.SSMLBuilder

SSMLBuilder()
        .text("hello")
        .pause(1000)
        .text("goodbye")

The output of a command like that would be:

<speak>
    hello
    <break time="1000ms"/>
    goodbye
</speak>

Running Tests

Tests can be run using sbt test.

Testing SSML pronunciation

Generated SSML can be tested using Amazon's online tool at: https://developer.amazon.com/alexa/console/ask/test/<skillid>/development/en_US/ where <skillid> is the id of an alexa skill.

scala-ssml's People

Contributors

infomofo avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar

scala-ssml's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-java v1
sbt
build.sbt
  • scala 2.13.13
  • org.scala-lang.modules:scala-xml 2.2.0
project/Dependencies.scala
  • org.scalatest:scalatest 3.1.2
project/build.properties
  • sbt/sbt 1.3.8

  • Check this box to trigger a request for Renovate to run again on this repository

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.