com.telapi.api.inboundxml.elements
Class GetSpeech

java.lang.Object
  extended by com.telapi.api.inboundxml.elements.GetSpeech
All Implemented Interfaces:
ResponseElement

public class GetSpeech
extends Object
implements ResponseElement


Constructor Summary
protected GetSpeech()
           
 
Method Summary
static GetSpeech createGetSpeech(String grammar, String action)
          Convenience method for creating a new GetSpeech element.
static GetSpeech createGetSpeech(String grammar, String action, HttpMethod method, Long timeout, Boolean playBeep)
          Creates a new GetSpeech element.
 GetSpeech pause()
           
 GetSpeech pause(Long length)
           
 GetSpeech play(Long loop, String resource)
           
 GetSpeech say(String text)
           
 GetSpeech say(String text, Voice voice, Long loop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetSpeech

protected GetSpeech()
Method Detail

createGetSpeech

public static GetSpeech createGetSpeech(String grammar,
                                        String action,
                                        HttpMethod method,
                                        Long timeout,
                                        Boolean playBeep)
Creates a new GetSpeech element. The GetSpeech element is used to translate a callers voice into text. That translated text is then submitted to an action URL for further processing and use in your application.

Parameters:
grammar - The URL of an XML file defining acceptable words and phrases that a user might say during the call. For information on creating grammar files see this W3 reference.
action - A URL where the converted voice text will be forwarded.
method - Method used to request the action URL. Defaults to POST.
timeout - Amount of seconds GetSpeech should wait in silence before requesting the action URL. Defaults to 5.
playBeep - Specifies if a beep should play back to the caller when GetSpeech begins. Defaults to false.
Returns:
A new GetSpeech element.

createGetSpeech

public static GetSpeech createGetSpeech(String grammar,
                                        String action)
Convenience method for creating a new GetSpeech element.

Parameters:
grammar - The URL of an XML file defining acceptable words and phrases that a user might say during the call. For information on creating grammar files see this W3 reference.
action - A URL where the converted voice text will be forwarded.
Returns:
A new GetSpeech element.
See Also:
createGetSpeech(String, String, HttpMethod, Long, Boolean)

play

public GetSpeech play(Long loop,
                      String resource)
Parameters:
loop -
resource -
Returns:
See Also:
Response.play(Long, String)

say

public GetSpeech say(String text,
                     Voice voice,
                     Long loop)
Parameters:
text -
voice -
loop -
Returns:
See Also:
Response.say(String, Voice, Long)

say

public GetSpeech say(String text)
Parameters:
text -
Returns:
See Also:
Response.say(String)

pause

public GetSpeech pause(Long length)
Parameters:
length -
Returns:
See Also:
Response.pause(Long)

pause

public GetSpeech pause()
Returns:
See Also:
Response.pause()


Copyright © 2012. All Rights Reserved.