Speak[expr]
speaks a spoken representation of the expression expr.
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" 10 maximal number of elements of an array or arguments of a function "DetailedGraphics" False controls the description of graphics primitives "ExpressionDepthLimit" 10 maximal depth of an expression allowed in the output "IncludeParentheses" False controls the delimiting of subexpressions "IntegerLimit" 10^10 maximal integer that will be given with all its digits "RealPrecisionLimit" 3 how many significant digits to include in approximate numbers "StringLengthLimit" 1000 maximal 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 all close allBasic Examples (3)
Scope (6)
Speak mathematical expressions and functions:
Speak[Sqrt[x / (y + z)]]Speak[Sin[x] + O[x] ^ 4]Speak[D[f[x, y], x, y]]Speak[HoldForm[Solve[{x + y == 1, x - 2y == 2}]]]Speak[x_ /; x > 0]Speak[HoldForm[i = 0;While[RandomReal[] < .5, Print[++i]]]]Speak[HoldForm[Plot[x, {x, 0, 1}]]]Speak[Graphics3D[Cylinder[]]]Create a button that speaks when clicked:
Button["press me", Speak["thank you"]]Make the second bar act as a button that speaks when clicked:
BarChart[{1, Button[2, Speak[2]], 3}]Options (7)
"ArraySizeLimit" (1)
"DetailedGraphics" (1)
"ExpressionDepthLimit" (1)
"IncludeParentheses" (1)
"IntegerLimit" (1)
"RealPrecisionLimit" (1)
Properties & Relations (2)
Show the text string sent to the speech engine:
SpokenString[Range[15], Options[Speak], "PostProcess" -> False]Speak[%]Speak the same expression directly:
Speak[Range[15]]Use SpeechSynthesize to synthesize an Audio object containing the spoken string:
Speak["Hello Wolfram"]SpeechSynthesize["Hello Wolfram"]Neat Examples (1)
str = SpokenString[Range[15], Options[Speak], "PostProcess" -> False]Split into several substrings:
lst = StringSplit[str, RegularExpression[" *(<|\\[\\[)[^>\\]]++(>|\\]\\]) *"]]Highlight and speak each substring:
Monitor[Do[Speak[lst[[i]]];Pause[1.25], {i, Length[lst]}],
Row[MapAt[Style[#, Red]&, lst, If[IntegerQ[i], i, 1]], " "]]See Also
SpokenString SpeechSynthesize Play Sound AudioPlay Audio EmitSound Beep
Function Repository: Soundex
Related Guides
Related Links
History
Introduced in 2008 (7.0) | Updated in 2010 (8.0) ▪ 2012 (9.0)
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_2026_speak, author="Wolfram Research", title="{Speak}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Speak.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_speak, organization={Wolfram Research}, title={Speak}, year={2012}, url={https://reference.wolfram.com/language/ref/Speak.html}, note=[Accessed: 13-June-2026]}