Speak

Speak[expr]

speaks a spoken representation of the expression expr.

Details and Options

  • Speak["string"] speaks the text in "string".
  • Speak[expr] works with mathematical expressions, programs, graphics, and other constructs.
  • Speak[HoldForm[expr]] speaks the held form of expr, without evaluation.
  • Speak attempts to produce naturally worded speech rather than literal representations of expression structure.
  • Speak produces sound using your computer's operating system.
  • SpokenString[expr] gives text for the speech generated by Speak[expr].
  • SpeechSynthesize[expr] gives synthesized audio from expr.
  • The following options can be given:
  • "ArraySizeLimit" 10maximal number of elements of an array or arguments of a function
    "DetailedGraphics" Falsecontrols the description of graphics primitives
    "ExpressionDepthLimit" 10maximal depth of an expression allowed in the output
    "IncludeParentheses" Falsecontrols the delimiting of subexpressions
    "IntegerLimit" 10^10maximal integer that will be given with all its digits
    "RealPrecisionLimit" 3how many significant digits to include in approximate numbers
    "StringLengthLimit" 1000maximal number of characters in strings and symbol names
  • "ArraySizeLimit" and "ExpressionDepthLimit" control the size of all output expressions, including the representation of graphics.
  • The options controlling the size specify the level of complexity at which to begin eliding parts of the output rather than the exact count of elements in the output.
  • Speak["str"] sends "str" to the speech engine. Speak[HoldForm["str"]] speaks a processed version of the string, affected by the options.
  • Speak[Unevaluated[expr]] also speaks the held form of expr.
  • The text string that is sent to the speech engine on your computer system is given by SpokenString[expr,Options[Speak],"PostProcess"->False].

Examples

open allclose all

Basic Examples  (5)

Speak a string of text:

Speak a mathematical expression:

Speak an unevaluated expression:

Create a button that speaks when clicked:

Make the second bar act as a button that speaks when clicked:

Scope  (4)

Speak mathematical expressions and functions:

Speak programming constructs:

Describe a plot:

Describe a graphics object:

Options  (7)

"ArraySizeLimit"  (1)

Limit the number of arguments included in the spoken text:

"DetailedGraphics"  (1)

Include a detailed description of graphics primitives:

"ExpressionDepthLimit"  (1)

Limit the depth of subexpressions included in the spoken text:

"IncludeParentheses"  (1)

Use simplified delimiting of subexpressions:

Speak left and right parentheses:

"IntegerLimit"  (1)

Set a threshold for exact integers and rationals:

"RealPrecisionLimit"  (1)

Set a threshold for the number of digits in reals:

"StringLengthLimit"  (1)

Limit the length of strings in the spoken text:

Properties & Relations  (2)

Show the text string sent to the speech engine:

Speak the string:

Speak the same expression directly:

Use SpeechSynthesize to synthesize an Audio object containing the spoken string:

Synthesize the string:

Neat Examples  (1)

Generate a string:

Split into several substrings:

Highlight and speak each substring:

Wolfram Research (2008), Speak, Wolfram Language function, https://reference.wolfram.com/language/ref/Speak.html (updated 2012).

Text

Wolfram Research (2008), Speak, Wolfram Language function, https://reference.wolfram.com/language/ref/Speak.html (updated 2012).

CMS

Wolfram Language. 2008. "Speak." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/Speak.html.

APA

Wolfram Language. (2008). Speak. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Speak.html

BibTeX

@misc{reference.wolfram_2024_speak, author="Wolfram Research", title="{Speak}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Speak.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_speak, organization={Wolfram Research}, title={Speak}, year={2012}, url={https://reference.wolfram.com/language/ref/Speak.html}, note=[Accessed: 22-November-2024 ]}