adhearsion / virginia

A Reel interface to Adhearsion
MIT License
7 stars 10 forks source link

Built-in resource serving? #10

Closed bklang closed 9 years ago

bklang commented 10 years ago

I'm opening this as a feature request and to ask for discussion.

In Adhearsion apps, the app may run on a different machine than the telephony engine. However there is a need for the app to feed resources to the telephony engine. The two most obvious ones that come to mind are speech grammars and recorded audio prompts.

The correct large-scale answer for recorded audio prompts is likely to be a dedicated process like nginx. However, it would be convenient to not rely on nginx if Virginia can function as a prompt server at least for low-volume apps (think of this as the built-in Webrick server for Rails vs. a production deployment with Unicorn or Passenger).

For non-static content (such as speech grammars and possibly SSML documents) it may be desirable to have the content served directly from Adhearsion, especially since these documents may be generated uniquely for each call.

I'm proposing to have Virginia come bundled with a way for Adhearsion apps to register grammars and serve audio prompts. This functionality would supplement the behavior in Adhearsion so whenever a grammar is requested it is converted into a URL that is served by Virginia. The same is true for SSML documents and their embedded audio. It would require reserving a namespace within the request handler, and probably even require rethinking how Virginia handles HTTP requests in general.

Naturally these features would be optional and perhaps even default to "off."

Pinging @polysics and @benlangfeld.

benlangfeld commented 10 years ago

Definitely behind the idea.

bklang commented 9 years ago

Closing since #12 was merged.