SpokenString

SpokenString[expr]

gives a string of text corresponding to a spoken representation of the expression expr.

Details and Options

  • SpokenString[expr] works with mathematical expressions, programs, graphics, and other constructs.
  • SpokenString[HoldForm[expr]] gives a representation of the held form of expr, without evaluation.
  • SpokenString attempts to give naturally worded speech rather than literal representations of expression structure.
  • The following options can be given:
  • "ArraySizeLimit" Infinitymaximal number of elements of an array or arguments of a function
    "DetailedGraphics" Falsecontrols the description of graphics primitives
    "ExpressionDepthLimit" Infinitymaximal depth of an expression allowed in the output
    "IncludeParentheses" Falsecontrols the delimiting of subexpressions
    "IntegerLimit" Infinitymaximal integer that will be given with all its digits
    "PostProcess" Truewhether to remove special formatting used by Speak from the output
    "RealPrecisionLimit" 3how many significant digits to include in approximate numbers
    "StringLengthLimit" Infinitymaximal 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.
  • SpokenString["str"] always returns "str". SpokenString[HoldForm["str"]] returns a processed version of the string, affected by the options.
  • SpokenString[Unevaluated[expr]] also gives a representation of the held form of expr.

Examples

open allclose all

Basic Examples  (2)

Give a spoken representation of a formula:

Give a spoken description of a graphic:

Scope  (4)

Describe mathematical expressions and functions:

Describe programming constructs:

Describe a plot:

Describe a graphics object:

Options  (8)

"ArraySizeLimit"  (1)

Limit the number of arguments included in the text:

"DetailedGraphics"  (1)

Include a detailed description of graphics primitives:

"ExpressionDepthLimit"  (1)

Limit the depth of subexpressions included in the text:

"IncludeParentheses"  (1)

Use simplified delimiting of subexpressions:

Include left and right parentheses in the text:

"IntegerLimit"  (1)

Set a threshold for exact integers and rationals:

"PostProcess"  (1)

Show the text with the markup used by the speech engine:

"RealPrecisionLimit"  (1)

Set a threshold for number of digits in reals:

"StringLengthLimit"  (1)

Limit the length of strings in the text:

Properties & Relations  (1)

Use Speak to hear the string produced by SpokenString:

Neat Examples  (1)

Describe a mathematical expression:

Use the result as a Wolfram|Alpha query:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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