12.4 dtk-speak

This module defines the TTS interface. Here, prefix dtk is synonymous with tts.

12.4.1 Dtk-Speak Commands

12.4.1.1 dtk-add-cleanup-pattern

Command: dtk-add-cleanup-pattern (&optional delete)
C-e d a
Add this pattern to the list of repeating patterns.
  Optional interactive prefix arg deletes
this pattern if previously added.    

(fn &optional DELETE)

12.4.1.2 dtk-cloud

Command: dtk-cloud
C-e d C-c
Select  Cloud TTS server.

12.4.1.3 dtk-local-server

Command: dtk-local-server (program &optional prompt-port)
C-e d L
Select and start an local speech server interactively. Local server
lets Emacspeak on a remote host connect back via SSH port forwarding
for instance. Argument PROGRAM specifies the speech server
program. Port defaults to dtk-local-server-port

(fn PROGRAM &optional PROMPT-PORT)

12.4.1.4 dtk-notify-initialize

Command: dtk-notify-initialize
C-e d C-n
Initialize notification TTS stream.

12.4.1.5 dtk-notify-stop

Command: dtk-notify-stop
C-e d .
Stop  speech on notification stream.

12.4.1.6 dtk-rate-adjust

Command: dtk-rate-adjust
C-e d -
C-e d +
C-e d =
Adjust speech rate in current buffer, inspired by
  text-scale-adjust.   Invoke this command via C-e d =/+ or
C-impel-d -. Pressing =,+, or - immediately continues to adjust
the speech rate.  Call when on a non-blank line to preview the effectt

12.4.1.7 dtk-reset-state

Command: dtk-reset-state
C-e d R
Reset TTS engine.

12.4.1.8 dtk-select-server

Command: dtk-select-server (program)
C-e d d
Select  speech server ‘program’. 

(fn PROGRAM)

12.4.1.9 dtk-set-character-scale

Command: dtk-set-character-scale (factor &optional prefix)
C-e d f
Set character scale FACTOR for   speech rate.
Speech rate is scaled by this factor when speaking characters.
Not presently used by either Dectalk or Viavoice TTS.
Interactive PREFIX arg means set the global default value, and
then set the current local value to the result.

(fn FACTOR &optional PREFIX)

12.4.1.10 dtk-set-chunk-separator-syntax

Command: dtk-set-chunk-separator-syntax (s)
C-e d C-j
Interactively set how text is split in chunks.
Argument S specifies the syntax class.

(fn S)

12.4.1.11 dtk-set-language

Command: dtk-set-language (lang)
C-e d S
Set language. If your server supports it, also set the synthesis
 voice, using the syntax language:voice , where language can be
 omitted.

(fn LANG)

12.4.1.12 dtk-set-next-language

Command: dtk-set-next-language
C-e d N
Switch to  next  language

12.4.1.13 dtk-set-predefined-rate

Command: dtk-set-predefined-rate (&optional prefix)
C-e d 9
C-e d 8
C-e d 7
C-e d 6
C-e d 5
C-e d 4
C-e d 3
C-e d 2
C-e d 1
C-e d 0
Set speech rate to one of nine predefined levels.
Interactive PREFIX arg says to set the rate globally.
Formula used is:
rate = dtk-speech-rate-base + dtk-speech-rate-step * level.

(fn &optional PREFIX)

12.4.1.14 dtk-set-preferred-language

Command: dtk-set-preferred-language (alias lang)
Set language by alias.

(fn ALIAS LANG)

12.4.1.15 dtk-set-previous-language

Command: dtk-set-previous-language
C-e d P
Switch to  previous  language

12.4.1.16 dtk-set-punctuations

Command: dtk-set-punctuations (mode &optional prefix)
C-e d p
Set punctuation mode to MODE.
Possible values are ‘some’, ‘all’, or ‘none’.
Interactive PREFIX arg means set   the global default value, and then set the
current local  value to the result.

(fn MODE &optional PREFIX)

12.4.1.17 dtk-set-punctuations-to-all

Command: dtk-set-punctuations-to-all (&optional prefix)
Set punctuation  mode to all.
Interactive PREFIX arg sets punctuation mode globally.

(fn &optional PREFIX)

12.4.1.18 dtk-set-punctuations-to-some

Command: dtk-set-punctuations-to-some (&optional prefix)
Set punctuation  mode to some.
Interactive PREFIX arg sets punctuation mode globally.

(fn &optional PREFIX)

12.4.1.19 dtk-set-rate

Command: dtk-set-rate (rate &optional prefix)
C-e d r
Set speaking RATE.
Interactive PREFIX arg means set   the global default value, and then set the
current local  value to the result.

(fn RATE &optional PREFIX)

12.4.1.20 dtk-stop

Command: dtk-stop (&optional all)
C-e s
Stop speech.  Optional arg ‘all’ or interactive call silences
notification stream as well.

(fn &optional ALL)

12.4.1.21 dtk-toggle-caps

Command: dtk-toggle-caps (&optional prefix)
C-e d c
Toggle dtk-caps.
Interactive PREFIX arg means toggle the global default
value, and then set the current local value to the result.

12.4.1.22 dtk-toggle-punctuation-mode

Command: dtk-toggle-punctuation-mode (&optional prefix)
C-e d ,
Toggle punctuation mode between "some" and "all".
Interactive PREFIX arg makes the new setting global.

(fn &optional PREFIX)

12.4.1.23 dtk-toggle-quiet

Command: dtk-toggle-quiet (&optional prefix)
C-e d q
Toggles state of  dtk-quiet.
Turning on this switch silences speech.  Optional interactive
prefix arg causes this setting to become global.

12.4.1.24 dtk-toggle-speak-nonprinting-chars

Command: dtk-toggle-speak-nonprinting-chars (&optional prefix)
C-e d n
Toggle speak-nonprinting-chars.
Interactive PREFIX arg means toggle the global default
value, and then set the current local value to the result.

12.4.1.25 dtk-toggle-split-caps

Command: dtk-toggle-split-caps (&optional prefix)
C-e d s
Toggle split caps mode.
Split caps mode is useful when reading Hungarian notation in
program source code.  Interactive PREFIX arg means toggle the
global default value, and then set the current local value to the
result.

12.4.1.26 dtk-toggle-splitting-on-white-space

Command: dtk-toggle-splitting-on-white-space
C-e d SPC
Toggle splitting of speech on white space. 

12.4.1.27 dtk-toggle-strip-octals

Command: dtk-toggle-strip-octals (&optional prefix)
C-e d o
Toggle stripping of octals.
Interactive prefix arg means
 toggle the global default value, and then set the current local
value to the result.

12.4.1.28 dtk-unicode-customize-char

Command: dtk-unicode-customize-char (char replacement)
Add a custom replacement string for CHAR.

When called interactively, CHAR defaults to the character after point.

(fn CHAR REPLACEMENT)

12.4.1.29 dtk-unicode-uncustomize-char

Command: dtk-unicode-uncustomize-char (char)
Delete custom replacement for CHAR.

When called interactively, CHAR defaults to the character after point.

(fn CHAR)

12.4.1.30 tts-restart

Command: tts-restart
C-e C-s
Restart TTS server.

12.4.1.31 tts-speak-version

Command: tts-speak-version
C-e d V
Speak version.

12.4.2 dtk-speak Options

Variable: User Option dtk-allcaps-prefix
Prefix used to indicate AllCaps

Default Value:

#(" acc " 0 5 (personality acss-p3-s1-r3))

Variable: User Option dtk-caps-prefix
Prefix used to indicate capitalization

Default Value:

#("cap" 0 3 (personality acss-p3-s1-r3))

Variable: User Option dtk-cloud-server
Set this to your preferred cloud TTS server.

Default Value:

"cloud-outloud"

Variable: User Option dtk-local-engine
Engine we use  for our local TTS  server.

Default Value:

"outloud"

Variable: User Option dtk-speech-rate-base
Value of lowest speech rate.

Default Value:

50

Variable: User Option dtk-speech-rate-step
Speech rate step used by ‘dtk-set-predefined-rate’.

Default Value:

8

Variable: User Option dtk-unicode-character-replacement-alist
Replacements for  characters.

Default Value:

((150 . "-")
 (9473 . "-")
 (9475 . "|")
 (176 . " degrees ")
 (8451 . "Degree C")
 (8457 . "Degree F ")
 (8220 . "\"")
 (8221 . "\"")
 (8902 . "*")
 (173 . "-")
 (8216 . "`")
 (8217 . "'")
 (8208 . " dash ")
 (8211 . " dash dash  ")
 (8212 . " em dash  ")
 (8202 . " ")
 (65279 . " ")
 (8204 . "")
 (8203 . " ")
 (8201 . " ")
 (8213 . "----")
 (8214 . "||")
 (8230 . "...")
 (8226 . " bullet ")
 (149 . " ... ")
 (8482 . "TM")
 (64256 . "ff")
 (64257 . "fi")
 (64258 . "fl")
 (64259 . "ffi")
 (64260 . "Ffl"))

Variable: User Option dtk-unicode-name-transformation-rules-alist
Alist of character name transformation rules.

Default Value:

(("BOX DRAWING" lambda (_ignored) ".")
 ("^Mathematical Sans-Serif\\( small\\| capital\\)? letter \\(.*\\)$" lambda
  (s)
  (match-string 2 s))
 ("^greek\\( small\\| capital\\)? letter \\(.*\\)$" lambda
  (s)
  (match-string 2 s))
 ("^latin\\( small\\| capital\\)? letter \\(.*\\)$" lambda
  (s)
  (match-string 2 s))
 ("^DEVANAGARI \\(sign\\|vowel sign\\|letter\\)? \\(.*\\)$" lambda
  (s)
  (match-string 2 s)))

Variable: User Option dtk-unicode-untouched-charsets
Characters of these charsets are  ignored by
  dtk-unicode-replace-chars.

Default Value:

(ascii latin-iso8859-1)

Variable: User Option tts-notification-device
Virtual sound device to use for notifications stream.
Set to nil to disable a separate Notification stream.
If you set the device here, make sure it exists first.
For swiftmac, set this to ‘left’ or ‘right’.

Default Value:

nil