Sha256: 6c1b2fdb40c001bc53286cf465d19028bb7575589764ea1392317b6f9f38dfd8

Contents?: true

Size: 1.52 KB

Versions: 11

Compression:

Stored size: 1.52 KB

Contents

module RubySpeech
  module SSML
    ##
    # A mark element is an empty element that places a marker into the text/tag sequence. It has one required attribute, name, which is of type xsd:token [SCHEMA2 ยง3.3.2]. The mark element can be used to reference a specific location in the text/tag sequence, and can additionally be used to insert a marker into an output stream for asynchronous notification. When processing a mark element, a synthesis processor must do one or both of the following:
    #
    # * inform the hosting environment with the value of the name attribute and with information allowing the platform to retrieve the corresponding position in the rendered output.
    # * when audio output of the SSML document reaches the mark, issue an event that includes the required name attribute of the element. The hosting environment defines the destination of the event.
    #
    # The mark element does not affect the speech output process.
    #
    # http://www.w3.org/TR/speech-synthesis/#S3.3.2
    #
    class Mark < Element

      register :mark

      ##
      # This attribute is a token by which to reference the mark
      #
      # @return [String]
      #
      def name
        read_attr :name
      end

      ##
      # @param [String] the name token
      #
      def name=(other)
        self[:name] = other
      end

      def <<(*args)
        raise InvalidChildError, "A Mark cannot contain children"
        super
      end

      def eql?(o)
        super o, :name
      end
    end # Mark
  end # SSML
end # RubySpeech

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ruby_speech-2.1.2-java lib/ruby_speech/ssml/mark.rb
ruby_speech-2.1.2 lib/ruby_speech/ssml/mark.rb
ruby_speech-2.1.1-java lib/ruby_speech/ssml/mark.rb
ruby_speech-2.1.1 lib/ruby_speech/ssml/mark.rb
ruby_speech-2.1.0-java lib/ruby_speech/ssml/mark.rb
ruby_speech-2.1.0 lib/ruby_speech/ssml/mark.rb
ruby_speech-2.0.2 lib/ruby_speech/ssml/mark.rb
ruby_speech-2.0.1 lib/ruby_speech/ssml/mark.rb
ruby_speech-1.1.0 lib/ruby_speech/ssml/mark.rb
ruby_speech-1.0.2 lib/ruby_speech/ssml/mark.rb
ruby_speech-1.0.1 lib/ruby_speech/ssml/mark.rb