Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supplying SSML to #ask and #say does not use #output_formatter #473

Open
bklang opened this issue Mar 30, 2014 · 5 comments
Open

Supplying SSML to #ask and #say does not use #output_formatter #473

bklang opened this issue Mar 30, 2014 · 5 comments
Milestone

Comments

@bklang
Copy link
Member

bklang commented Mar 30, 2014

#output_formatter was created as a convenient way to provide default SSML formatting, and it is used by #say, but it is not used by #ask.

@bklang
Copy link
Member Author

bklang commented Mar 30, 2014

Actually...I'm wrong about this. The problem is passing SSML into #ask when using an output formatter - the output_formatter is not applied to wrap the SSML. I've updated the issue title to reflect this.

@bklang bklang changed the title #ask does not use #output_formatter Supplying SSML to #ask and #say does not use #output_formatter Mar 30, 2014
@benlangfeld
Copy link
Member

Is this #ask from adhearsion-asr? Could you please provide an example of required behaviour?

@benlangfeld
Copy link
Member

The formatter is applied, but it does this:

        def ssml_for_collection(collection)
          collection = collection.compact
          raise NoDocError if collection.empty?

          collection.inject RubySpeech::SSML.draw do |doc, argument|
            doc + case argument
            when Hash
              ssml_for argument.delete(:value), argument
            when RubySpeech::SSML::Speak
              argument
            when lambda { |a| a.respond_to? :each }
              ssml_for_collection argument
            else
              ssml_for argument
            end
          end
        end

SSML documents are passed through unaffected. Again, what might you want done with them?

@benlangfeld benlangfeld added this to the 3.0.0 milestone Jun 16, 2015
@benlangfeld
Copy link
Member

Closing for inactivity.

@bklang bklang reopened this Jun 23, 2015
@bklang
Copy link
Member Author

bklang commented Jun 23, 2015

Reopening because I've run into it again.

What I'm looking for is a way to specify application-wide defaults for things like prosody (I think we already covered voice). One way would simply be to add config items for what we need, like we did for voice. Alternatively, I'd like some global override that we can use to wrap the SSML that gets passed into #ask the same as it does for #say

@benlangfeld benlangfeld modified the milestones: 3.0.0, 3.1.0 Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants