Sha256: 81db09467d0fd2b93673a23149208929a559a80c417dba3cd14bbf7b54379236

Contents?: true

Size: 852 Bytes

Versions: 14

Compression:

Stored size: 852 Bytes

Contents

module RubySpeech
  module SSML
    ##
    # The Speech Synthesis Markup Language is an XML application. The root element is speak.
    #
    # http://www.w3.org/TR/speech-synthesis/#S3.1.1
    #
    class Speak < Element
      include XML::Language

      register :speak

      self.defaults = { :version => '1.0', :language => "en-US" }

      VALID_CHILD_TYPES = [Nokogiri::XML::Element, Nokogiri::XML::Text, String, Audio, Break, Emphasis, Mark, P, Phoneme, Prosody, S, SayAs, Sub, Voice].freeze

      def <<(arg)
        raise InvalidChildError, "A Speak can only accept String, Audio, Break, Emphasis, Mark, P, Phoneme, Prosody, SayAs, Sub, S, Voice as children" unless VALID_CHILD_TYPES.include? arg.class
        super
      end

      def eql?(o)
        super o, :language, :base_uri
      end
    end # Speak
  end # SSML
end # RubySpeech

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_speech-2.1.2-java lib/ruby_speech/ssml/speak.rb
ruby_speech-2.1.2 lib/ruby_speech/ssml/speak.rb
ruby_speech-2.1.1-java lib/ruby_speech/ssml/speak.rb
ruby_speech-2.1.1 lib/ruby_speech/ssml/speak.rb
ruby_speech-2.1.0-java lib/ruby_speech/ssml/speak.rb
ruby_speech-2.1.0 lib/ruby_speech/ssml/speak.rb
ruby_speech-2.0.2 lib/ruby_speech/ssml/speak.rb
ruby_speech-2.0.1 lib/ruby_speech/ssml/speak.rb
ruby_speech-1.1.0 lib/ruby_speech/ssml/speak.rb
ruby_speech-1.0.2 lib/ruby_speech/ssml/speak.rb
ruby_speech-1.0.1 lib/ruby_speech/ssml/speak.rb
ruby_speech-1.0.0 lib/ruby_speech/ssml/speak.rb
ruby_speech-0.5.1 lib/ruby_speech/ssml/speak.rb
ruby_speech-0.5.0 lib/ruby_speech/ssml/speak.rb