2.316 tts-speak

This module defines the generic TTS interface.

2.316.1 Tts-Speak Commands

2.316.1.1 emacsvox-set-capitalization-presentation

Command: emacsvox-set-capitalization-presentation (presentation &optional global)
C-e d C
Select capitalization PRESENTATION and preview representative text.

Set the option buffer-locally by default.  With interactive prefix GLOBAL,
also set the global default and use it in the current buffer.

(fn PRESENTATION &optional GLOBAL)

2.316.1.2 tts-add-cleanup-pattern

Command: tts-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)

2.316.1.3 tts-cloud

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

2.316.1.4 tts-define-voice-from-acss

Command: tts-define-voice-from-acss (&rest arguments)
Ignore ARGUMENTS, do nothing, and return nil.
This function accepts any number of arguments in ARGUMENTS.
Also see ‘always’.

(fn &rest ARGUMENTS)

2.316.1.5 tts-local-server

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

(fn PROGRAM &optional PROMPT-PORT)

2.316.1.6 tts-notify-initialize

Command: tts-notify-initialize
C-e d C-n
Initialize a separate notification TTS process when configured.

2.316.1.7 tts-notify-stop

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

2.316.1.8 tts-rate-adjust

Command: tts-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

2.316.1.9 tts-reset-punctuation-mode

Command: tts-reset-punctuation-mode
Clear the buffer override and restore automatic punctuation policy.

2.316.1.10 tts-reset-state

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

2.316.1.11 tts-restart

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

2.316.1.12 tts-select-server

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

This function has :filter-args advice: ‘emacsvox-windows-speech–resolve-server-arguments’.

(fn PROGRAM)

2.316.1.13 tts-set-character-scale

Command: tts-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)

2.316.1.14 tts-set-chunk-separator-syntax

Command: tts-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)

2.316.1.15 tts-set-language

Command: tts-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.  Adapters with logical-voice language routing reject this
 legacy global operation with an actionable error.

(fn LANG)

2.316.1.16 tts-set-next-language

Command: tts-set-next-language
C-e d N
Switch to next legacy language.
Signal a user error when logical voices own language routing.

2.316.1.17 tts-set-predefined-rate

Command: tts-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 = tts-speech-rate-base + tts-speech-rate-step * level.

(fn &optional PREFIX)

2.316.1.18 tts-set-preferred-language

Command: tts-set-preferred-language (alias lang)
Set legacy language ALIAS to LANG.
Signal a user error when logical voices own language routing.

(fn ALIAS LANG)

2.316.1.19 tts-set-previous-language

Command: tts-set-previous-language
C-e d P
Switch to previous legacy language.
Signal a user error when logical voices own language routing.

2.316.1.20 tts-set-punctuations

Command: tts-set-punctuations (mode &optional prefix)
C-e d p
Set punctuation mode to MODE.
Values are ‘some’, ‘all’, ‘none’, or (profile ID FALLBACK).
Named profiles require matching worker catalogues; otherwise use FALLBACK.
Interactive PREFIX arg means set   the global default value, and then set the
current local  value to the result.

(fn MODE &optional PREFIX)

2.316.1.21 tts-set-punctuations-to-all

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

(fn &optional PREFIX)

2.316.1.22 tts-set-punctuations-to-some

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

(fn &optional PREFIX)

2.316.1.23 tts-set-rate

Command: tts-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)

2.316.1.24 tts-show-diagnostics

Command: tts-show-diagnostics (name)
Show retained local speech-server diagnostics for NAME.
Choose Speaker for main speech or Notify for notifications.
Signal a user error if no diagnostic buffer is available.

(fn NAME)

2.316.1.25 tts-speak-version

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

2.316.1.26 tts-stop

Command: tts-stop (&optional all)
C-e s
Stop speech.
Optional argument ALL or an interactive call also stops a distinct
notification process.

This function has :before advice: ‘emacsvox–delayed-phonetic-cancel’.

(fn &optional ALL)

2.316.1.27 tts-toggle-caps

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

2.316.1.28 tts-toggle-punctuation-mode

Command: tts-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)

2.316.1.29 tts-toggle-quiet

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

2.316.1.30 tts-toggle-speak-nonprinting-chars

Command: tts-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.

2.316.1.31 tts-toggle-split-caps

Command: tts-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.

2.316.1.32 tts-toggle-splitting-on-white-space

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

2.316.1.33 tts-toggle-strip-octals

Command: tts-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.

2.316.1.34 tts-unicode-customize-char

Command: tts-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)

2.316.1.35 tts-unicode-uncustomize-char

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

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

(fn CHAR)

2.316.2 tts-speak Options

Variable: User Option emacsvox-capitalization-presentation
How enabled capitalization indication is presented.

‘spoken’ says "cap" or "all caps".  ‘tone’ places a short tone at the
capitalized boundary, and ‘spoken-tone’ combines both presentations.  ‘custom’
publishes capitalization facts for personal aural rules without adding a
built-in presentation.  ‘none’ suppresses capitalization presentation while
leaving ‘tts-caps’ enabled.  Camel-case splitting remains controlled
independently by ‘tts-split-caps’.

Default Value:

tone

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

Default Value:

"cloud-outloud"

Variable: User Option tts-hide-diagnostic-buffers
Hide local speech-server diagnostic buffers from the standard buffer list.
When non-nil, their names start with a space.  Custom buffer switchers
may still list them.  Diagnostics are retained in either case; use
‘tts-show-diagnostics’ to inspect them.
Changes take effect when you restart speech with ‘tts-restart’.

Default Value:

t

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

Default Value:

"outloud"

Variable: User Option tts-main-earcon-volume
Main-stream earcon volume as a percentage from 0 to 100.
Zero silences earcons played by Omnivox.  External sound players are unaffected.
Customize applies changes to subsequent audio.

Default Value:

100

Variable: User Option tts-main-tone-volume
Main-stream tone volume as a percentage from 0 to 100.
Zero silences tones.  Customize applies changes to subsequent Omnivox audio.

Default Value:

100

Variable: User Option tts-notification-device
Virtual sound device to use for notifications stream.
For Omnivox, nil starts a second process routed to both channels; ‘left’,
‘right’, or ‘both’ selects its process-wide route.  Set this to ‘default’ or
the empty string to disable that separate process and fall back to main speech.
For other servers, nil disables a separate notification stream.  If you name a
device, make sure it exists first.  For SwiftMac, use ‘left’ or ‘right’.

Default Value:

nil

Variable: User Option tts-notification-earcon-volume
Notification earcon volume as a percentage from 0 to 100.
Zero silences earcons played by the separate Omnivox notification process.
Customize applies changes to subsequent audio.  Main output uses main settings.
External sound players are unaffected.

Default Value:

100

Variable: User Option tts-notification-speech-volume
Notification speech volume as a percentage from 0 to 100.
Zero silences speech on the separate Omnivox notification process.
Customize applies changes to subsequent audio.  Main output uses main settings.

Default Value:

100

Variable: User Option tts-notification-tone-volume
Notification tone volume as a percentage from 0 to 100.
Zero silences tones on the separate Omnivox notification process.
Customize applies changes to subsequent audio.  Main output uses main settings.

Default Value:

100

Variable: User Option tts-punctuation-mode-policy-alist
Automatic punctuation modes, ordered from specific to general.

Each entry maps a major mode to ‘all’, ‘some’, ‘none’, or
(profile ID FALLBACK), with a named Omnivox profile string and built-in fallback.  The first entry
for which ‘derived-mode-p’ succeeds supplies the buffer policy.  A buffer
override set through ‘tts-set-punctuations’ takes precedence.  When no entry
matches, the default value of ‘tts-punctuation-mode’ is used.

Default Value:

((agent-shell-mode . all)
 (2048-mode . some)
 (eat-mode . all)
 (eshell-mode . all)
 (eww-mode . some)
 (Man-mode . all)
 (speedbar-mode . all)
 (sudoku-mode . some)
 (term-mode . all)
 (vterm-mode . all)
 (org-mode . some)
 (markdown-mode . some)
 (muse-mode . some)
 (LaTeX-mode . some)
 (TeX-mode . some)
 (texinfo-mode . some)
 (conf-unix-mode . all)
 (html-helper-mode . all)
 (sgml-mode . all)
 (xml-mode . all)
 (nxml-mode . all)
 (xsl-mode . all)
 (bibtex-mode . all)
 (prog-mode
  . all)
 (comint-mode . all)
 (text-mode . some))

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

Default Value:

50

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

Default Value:

8

Variable: User Option tts-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 tts-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 tts-unicode-untouched-charsets
Characters of these charsets are  ignored by
  tts-unicode-replace-chars.

Default Value:

(ascii latin-iso8859-1)