Speak

Speak[expr]
speaks a spoken representation of the expression expr.

Details and OptionsDetails and Options

  • Speak["string"] speaks the text in .
  • 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].
  • 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
  • and 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 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].

ExamplesExamplesopen allclose all

Basic Examples (5)Basic Examples (5)

Speak a string of text:

In[1]:=
Click for copyable input

Speak a mathematical expression:

In[1]:=
Click for copyable input

Speak an unevaluated expression:

In[1]:=
Click for copyable input

Create a button that speaks when clicked:

In[1]:=
Click for copyable input
Out[1]=

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

In[1]:=
Click for copyable input
Out[1]=
New in 7 | Last modified in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »