Returns the current setting of the attenuation volume.
The current setting of the attenuation volume is returned even if the attenuation volume change has not yet occurred. This may occur while setting attenuationVolume without the () call. The attenuation volume change occurs on clause boundaries.
Sets the attenuation volume of the text-to-speech system.
The attenuation volume change is not effective until the next phrase boundary. All the queued audio encountered before the phrase boundary is unaffected.
Returns a count of characters that the text-to-speech system is currently processing.
Returns if the Text-To-Speech system is currently speaking.
Has no meaning if the application is sending speech to a wave file or sending speech to memory.
Returns the current setting of the speaking rate.
Sets the text-to-speech speaking rate.
The speaking rate change is not effective until the next phrase boundary. All the queued audio encountered before the phrase boundary is unaffected.
Returns the value of the identifier for the last voice that has spoken.
Sets the voice of the speaker the text-to-speech system will use.
The change in speaking voice is not effective until the next phrase boundary. All queued audio encountered before the phrase boundary is unaffected.
Returns the current setting of the volume.
Sets the volume of the text-to-speech system.
The volume change is not effective until the next phrase boundary. All the queued audio encountered before the phrase boundary is unaffected.
Returns the current wave output device ID.
Static
versionReturns information about the currently running version of DECtalk Software.
Readonly
dReadonly
dapiReadonly
dapiReadonly
dllReadonly
dtReadonly
dtReadonly
language: stringReadonly
structReadonly
version: stringReadonly
versionAdd a buffer to the memory list.
The buffer to be added to the memory list.
The value will be zero if the function is successful. The return value will be one of the following constants:
Return the Text-To-Speech system to it's normal state. Speech samples will be routed to the audio device (if audio output was enabled at startup).
The value will be zero if the function is successful. The return value will be one of the following constants:
Closes the log file opened by the () function.
The value will be zero if the function is successful. The return value will be one of the following constants:
Close the Text-To-Speech Wave File.
The value will be zero if the function is successful. The return value will be one of the following constants:
Loads a user-defined pronunciation dictionary into the text-to-speech system.
The name of the user dictionary file to be loaded.
The value will be zero if the function is successful. The return value will be one of the following constants:
This call loads a dictionary created by the windict or userdict applet. Any previously loaded user dictionary must be unloaded before loading a new user dictionary. Note that the text-to-speech system will automatically load a user dictionary, user.dic, at startup if it exists in the home directory.
Causes the text-to-speech system to enter into the speech-to-memory mode. This mode indicates that the speech samples are to be written into memory buffers rather than sent to an audio device each time () is called. The () call supplies the text-to-speech system with the memory buffers that it needs. The text-to-speech system remains in the speech-to-memory mode until () is called.
Determines the wave file audio sample format
The value will be zero if the function is successful. return value will be one of the following constants:
The text-to-speech system is in the speech-to-memory mode after successfully invoking this call. The memory buffer is passed using the class TTSBuffer.
The text-to-speech system returns the buffer to the application when the memory buffer, phoneme array, or index mark array is full or when force was used in the () call.
The startup function must be called to start the text-to-speech system before calling this function.
() automatically resumes audio output if the text-to-speech system is in a paused state by a previously issued () call.
Causes the specified log file to be opened and the text-to-speech sytem to enter into the log-file mode. This mode indicates that the speech samples are to be written as text, phonemes, or syllables into the log file each time () is called. The phonemes and syllables are written using the arpabet alphabet. The text-to-speech system remains in the log-file mode until () is called.
The name of the log file to be created.
Optional
logType: LogTypeSpecifies one or more of the type of output.
The value will be zero if the function is successful. The return value will be one of the following constants:
If more than one of the dwFlags are passed, then the logged output is mixed in an unpredictable fashion. If there is already a log file open, this call returns an error. The Log command has no effect when a log file is already open.
The startup function must be called to start the text-to-speech system before calling this function.
() automatically resumes audio output if the text-to-speech system is in a paused state by a previously issued () call.
Causes the specified wave file to be opened and the text-to-speech system to enter into wave-file mode. This mode indicates that the speech samples are to be written in wave format into the wave file each time () is called. The text-to-speech system remains in the wave-file mode until () is called.
The name of the wave file to be created.
Determines one or more of the wave file audio sample format.
The value will be zero if the function is successful. The return value will be one of the following constants:
Pauses text-to-speech audio output.
The value will be zero if the function is successful. The return value will be one of the following constants:
This call only affects the audio output and has no effect when writing log files, wave files, or when using the speech-to-memory capability of the text-to-speech system.
If the text-to-speech system owns the audio device (i.e. OwnAudioDevice was specified in the startup function), then it remains paused until one of the following is called:
Cancels all audio output and deletes any text from the Text-To-Speech systems text queue. All pending index marks are discarded.
The value will be zero if the function is successful. The return value will be one of the following constants:
The () call flushes all previously queued text and stops all audio output. If the () call has enabled outputting the speech samples to memory, then all queued memory buffers will be returned to the calling application. If the reset
flag is on and the text-to-speech system is in one of its special modes (log-file, wave-file or speech-to-memory mode), then all files will be closed and the text-to-speech system is returned to the startup state.
() should be called before (). Failing to do this in a situation where the synthesizer is busy may result in a deadlock.
Resumes text-to-speech output after it was paused by calling ().
The value will be zero if the function is successful. The return value will be one of the following constants:
This call only affects the audio output and has no effect when writing log files, writing wave files, or when writing speech samples to memory.
Shuts down the text-to-speech system and frees all system resources used by the text-to-speech system.
This value is zero if shutdown was successful. The return value will be one of the following constants:
This call is called when you close an application. Any user-defined dictionaries, which were previously loaded, are automatically unloaded. All previously queued text is discarded and the text-to-speech system will immediately stop speaking.
Qqueues to the text-to-speech system. While in startup state, speech samples are routed to the audio device or ignored, depending on whether the DoNotUseAudioDevice flag is set in the deviceOptions
parameter of the startup function. If the text-to-speech system is in one of its special modes (wave-file, log-file, or speech-to-memory modes), the speech samples are handled accordingly.
The text to be spoken.
Optional
force: boolean = falseThe value will be zero if the function is successful. The return value will be one of the following constants:
The speaker, speaking rate, and volume can also be changed in the text string by inserting in-line commands as shown in the following example: [:name paul] I am Paul. [:nb] I am Betty. [:volume set 50] The volume has been set to 50% of the maximum level. [:ra 120] I am speaking at 120 words per minute.
Qqueues to the text-to-speech system. While in startup state, speech samples are routed to the audio device or ignored, depending on whether the DoNotUseAudioDevice flag is set in the deviceOptions
parameter of the startup function. If the text-to-speech system is in one of its special modes (wave-file, log-file, or speech-to-memory modes), the speech samples are handled accordingly.
The text to be spoken.
Optional
force: boolean = falseThe value will be zero if the function is successful. The return value will be one of the following constants:
The speaker, speaking rate, and volume can also be changed in the text string by inserting in-line commands as shown in the following example: [:name paul] I am Paul. [:nb] I am Betty. [:volume set 50] The volume has been set to 50% of the maximum level. [:ra 120] I am speaking at 120 words per minute.
Initializes the text-to-speech system; defines the callback routine; and loads the main and user pronunciation dictionaries.
Optional
deviceID: numberWave out device ID number. WaveMapper
may be used here if the device ID number is unknown.
Optional
deviceManagement: DeviceManagement = DeviceManagement.OwnAudioDeviceSpecifies how the wave output device is managed.
Optional
cb: TTSCallbackThis value is zero if initialization was successful. The return value will be one of the following constants:
If the callback procedure is defined, then the calling application will be called via the callback routine when a buffer is filled while in speech-to-memory mode, an error occurs, or an index mark is encountered.
The default parameters are:
Will block until all previously queued text has been spoken. This function will automatically resume audio if the Text - To - Speech system has been paused by the () function.
The value will be zero if the function is successful. The return value will be one of the following constants:
Will block until all previously queued text has been spoken. This function will automatically resume audio if the Text-To-Speech system has been paused by the () function.
The value will be zero if the function is successful. The return value will be one of the following constants:
Speaks a single letter as quickly as possible, aborting any previously queued speech. This will be somewhat slower if () has been called since the last () or () call.
The character to be spoken.
This function should only be called only when the application is synthesizing directly to an audio device (not to memory or to a file).
`
Unloads the currently loaded user dictionary.
The value will be zero if the function is successful. The return value will be one of the following constants:
Static
closeCloses an instance for an installed language and attempts to unload it from the DecTalk Multi-Language (ML) engine.
The language to be closed.
True if the language was closed successfully.
Call this application per thread using the selected language. When a thread returns true
, the language is freed and can be uninstalled or upgraded. A return of true
may be a bad pass of the lang variable or more instances. If there are more instances, the call frees the current instance and returns a false
flag. After calling (), assume the language handle is no longer valid.
Static
enumRetrieves information about what languages are available.
An object contains language data, and zero on error
() returns the default language in the registry as the first language of the array of entries returned by langs.
Static
getLists the current capabilities of the DECtalk Software by returning the class TTSCaps.
The capabilities of the DECtalk Software.
Information returned in the TTSCaps class includes languages and proper-name pronunciation support, sample rate, minimum and maximum speaking rate, number of predefined speaking voices, character-set supported, and version number.
Static
selectStatic
startChecks for an installed language and loads it into the DecTalk Multi-Language (ML) engine.
The language to be loaded.
A handle to the loaded language on success or sets the bit TTSLangError
on failure. If the TTSLangError
bit is set, the return can equal one of two values: TTSNotSupported
for the application is not running DECtalk ML and TTSNotAvailable
for the language selected is not installed.
This call must be called before a language may be selected and opened in a multi-language application.
Generated using TypeDoc
The main class for the DECtalk Text-To-Speech system.