|
VoiceResourcePlayDate Method |
Namespace:
VoiceElements.Client
Assembly:
VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax public TerminationCode PlayDate(
DateTime date
)
Public Function PlayDate (
date As DateTime
) As TerminationCode
public:
TerminationCode PlayDate(
DateTime date
)
member PlayDate :
date : DateTime -> TerminationCode
Parameters
- date
- Type: SystemDateTime
This is a specified Date Time value you wish to be spoken.
Return Value
Type:
TerminationCode
A
Termination Code indicating how the play ended. Typically, you will use this to determine what to do next.
Remarks Make Sure to Set The VAP File
This method compiles pieces from an indexed sound file or
VAP File. You must specify the file to use
in the
Voice Resource'sVAP File Property prior to using this method or it may play silence.
Format Spoken Does Not Effect Playback
You may set
Format Spoken to any setting and date playback will always remain the same. For example, 10-26-06 (as a
Date Time, not a string)
will be spoken as "October Twenty Sixth Two Thousand Six".
Examples
The following sample code firstly code sets up a
Channel Resource,
Dials a Call, retrieves a
Voice Resource,
sets the
VAP File Property of the Voice Rescource, waits for a second and then plays the current
Date.
public void DialOutAndPlayCurrentDate()
{
TelephonyServer m_TelephonyServer = new TelephonyServer();
ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();
string phoneNumber = "2135551212";
m_ChannelResource.Dial(phoneNumber);
VoiceResource m_VoiceResource = m_ChannelResource.VoiceResource;
m_VoiceResource.VapFile = "English.vap";
m_VoiceResource.PlayDate(DateTime.Now);
}
Public Sub DialOutAndPlayCurrentDate()
Dim m_TelephonyServer As New TelephonyServer()
Dim m_ChannelResource As ChannelResource = m_TelephonyServer.GetChannel()
Dim phoneNumber As String = "2135551212"
m_ChannelResource.Dial(phoneNumber)
Dim m_VoiceResource As VoiceResource = m_ChannelResource.VoiceResource
m_VoiceResource.VapFile = "English.vap"
m_VoiceResource.PlayDate(DateTime.Now)
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also