Sha256: b8768c0ee31afaadb125cf605d091016ff65845253563b38e57ea3101612b238

Contents?: true

Size: 750 Bytes

Versions: 18

Compression:

Stored size: 750 Bytes

Contents

module RubySpeech
  module SSML
    InvalidChildError = Class.new StandardError

    SSML_NAMESPACE = 'http://www.w3.org/2001/10/synthesis'

    %w{
      audio
      break
      desc
      element
      emphasis
      mark
      p
      phoneme
      prosody
      s
      say_as
      speak
      sub
      voice
    }.each { |f| require "ruby_speech/ssml/#{f}" }

    def self.draw(*args, &block)
      document = Nokogiri::XML::Document.new
      Speak.new(document, *args).tap do |speak|
        document.root = speak.node
        block_return = speak.eval_dsl_block &block
        speak << block_return if block_return.is_a?(String)
      end
    end

    def self.import(other)
      Element.import other
    end
  end # SSML
end # RubySpeech

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby_speech-3.0.1-java lib/ruby_speech/ssml.rb
ruby_speech-3.0.1 lib/ruby_speech/ssml.rb
ruby_speech-3.0.0-java lib/ruby_speech/ssml.rb
ruby_speech-3.0.0 lib/ruby_speech/ssml.rb
ruby_speech-2.4.0-java lib/ruby_speech/ssml.rb
ruby_speech-2.4.0 lib/ruby_speech/ssml.rb
ruby_speech-2.3.2-java lib/ruby_speech/ssml.rb
ruby_speech-2.3.2 lib/ruby_speech/ssml.rb
ruby_speech-2.3.1-java lib/ruby_speech/ssml.rb
ruby_speech-2.3.1 lib/ruby_speech/ssml.rb
ruby_speech-2.3.0-java lib/ruby_speech/ssml.rb
ruby_speech-2.3.0 lib/ruby_speech/ssml.rb
ruby_speech-2.2.2-java lib/ruby_speech/ssml.rb
ruby_speech-2.2.2 lib/ruby_speech/ssml.rb
ruby_speech-2.2.1-java lib/ruby_speech/ssml.rb
ruby_speech-2.2.1 lib/ruby_speech/ssml.rb
ruby_speech-2.2.0-java lib/ruby_speech/ssml.rb
ruby_speech-2.2.0 lib/ruby_speech/ssml.rb