|
TelephonyServerTtsToFile Method (String, String) |
Converts the specified text string into speech and saves it as the designated file.
Namespace:
VoiceElements.Client
Assembly:
VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax public void TtsToFile(
string ttsText,
string outputFile
)
Public Sub TtsToFile (
ttsText As String,
outputFile As String
)
public:
void TtsToFile(
String^ ttsText,
String^ outputFile
)
member TtsToFile :
ttsText : string *
outputFile : string -> unit
Parameters
- ttsText
- Type: SystemString
String
Description: This is the text that the TTS engine will speak into the output file.
Note: You can use parameters and tags to change the way the engine speaks and also specify currency, dates, etc. For more information on configuring TTS
by adding paramters to this string, see Text-to-Speech Tips and Topics from Inventive Labs support.
- outputFile
- Type: SystemString
String of Path and File Name
This specifies the file for the wave output. See remarks below about file format.
Exceptions Exception | Condition |
---|
ElementsException | Thrown when the file or text string are null or a file access exception occurs. |
Remarks Output File Format
The output file will
usually be formatted as 8 kHz 8 bit mu-law wave file. Voice Elements uses native G.711 which determines the format.
This is the codec used at the transport level for SIP, T1's and PRI's. This allows files to be played without any conversion overhead.
Default Voice
This method has an additional overload allowing the use of any available specific TTS voice. In this case, since no voice is specified, Voice Elements
will use the voice specified in the Name setting of the [TTS] section of the CTI32.ini settings file in the root application directory of the Voice
Elements server. For more information on TTS settings on the server, see
TTS Settings on Voice Elements Server
from Inventive Labs support.
Examples
This sample uses a passed Telphony Server object to record "Hello World from Mr TTS" to a file.
class TestClass
{
public void TestMethod(TelephonyServer telephonyServer)
{
telephonyServer.TtsToFile("Hello world from Mr TTS", "C:\\Temp\\HelloWorld.wav");
return;
}
}
See Also